diff --git a/packages/python/plotly/_plotly_utils/basevalidators.py b/packages/python/plotly/_plotly_utils/basevalidators.py index 452164bd2cd..4004ce738b6 100644 --- a/packages/python/plotly/_plotly_utils/basevalidators.py +++ b/packages/python/plotly/_plotly_utils/basevalidators.py @@ -35,8 +35,8 @@ def to_scalar_or_list(v): # Python native scalar type ('float' in the example above). # We explicitly check if is has the 'item' method, which conventionally # converts these types to native scalars. - np = get_module("numpy") - pd = get_module("pandas") + np = get_module("numpy", should_load=False) + pd = get_module("pandas", should_load=False) if np and np.isscalar(v) and hasattr(v, "item"): return v.item() if isinstance(v, (list, tuple)): @@ -74,7 +74,9 @@ def copy_to_readonly_numpy_array(v, kind=None, force_numeric=False): Numpy array with the 'WRITEABLE' flag set to False """ np = get_module("numpy") - pd = get_module("pandas") + + # Don't force pandas to be loaded, we only want to know if it's already loaded + pd = get_module("pandas", should_load=False) assert np is not None # ### Process kind ### @@ -166,8 +168,8 @@ def is_homogeneous_array(v): """ Return whether a value is considered to be a homogeneous array """ - np = get_module("numpy") - pd = get_module("pandas") + np = get_module("numpy", should_load=False) + pd = get_module("pandas", should_load=False) if ( np and isinstance(v, np.ndarray) @@ -2455,6 +2457,10 @@ def validate_coerce(self, v, skip_invalid=False): v._plotly_name = self.plotly_name return v + def present(self, v): + # Return compound object as-is + return v + class TitleValidator(CompoundValidator): """ @@ -2549,6 +2555,10 @@ def validate_coerce(self, v, skip_invalid=False): return v + def present(self, v): + # Return compound object as tuple + return tuple(v) + class BaseDataValidator(BaseValidator): def __init__( @@ -2559,7 +2569,7 @@ def __init__( ) self.class_strs_map = class_strs_map - self._class_map = None + self._class_map = {} self.set_uid = set_uid def description(self): @@ -2595,21 +2605,17 @@ def description(self): return desc - @property - def class_map(self): - if self._class_map is None: - - # Initialize class map - self._class_map = {} - - # Import trace classes + def get_trace_class(self, trace_name): + # Import trace classes + if trace_name not in self._class_map: trace_module = import_module("plotly.graph_objs") - for k, class_str in self.class_strs_map.items(): - self._class_map[k] = getattr(trace_module, class_str) + trace_class_name = self.class_strs_map[trace_name] + self._class_map[trace_name] = getattr(trace_module, trace_class_name) - return self._class_map + return self._class_map[trace_name] def validate_coerce(self, v, skip_invalid=False): + from plotly.basedatatypes import BaseTraceType # Import Histogram2dcontour, this is the deprecated name of the # Histogram2dContour trace. @@ -2621,13 +2627,11 @@ def validate_coerce(self, v, skip_invalid=False): if not isinstance(v, (list, tuple)): v = [v] - trace_classes = tuple(self.class_map.values()) - res = [] invalid_els = [] for v_el in v: - if isinstance(v_el, trace_classes): + if isinstance(v_el, BaseTraceType): # Clone input traces v_el = v_el.to_plotly_json() @@ -2641,10 +2645,10 @@ def validate_coerce(self, v, skip_invalid=False): else: trace_type = "scatter" - if trace_type not in self.class_map: + if trace_type not in self.class_strs_map: if skip_invalid: # Treat as scatter trace - trace = self.class_map["scatter"]( + trace = self.get_trace_class("scatter")( skip_invalid=skip_invalid, **v_copy ) res.append(trace) @@ -2652,14 +2656,14 @@ def validate_coerce(self, v, skip_invalid=False): res.append(None) invalid_els.append(v_el) else: - trace = self.class_map[trace_type]( + trace = self.get_trace_class(trace_type)( skip_invalid=skip_invalid, **v_copy ) res.append(trace) else: if skip_invalid: # Add empty scatter trace - trace = self.class_map["scatter"]() + trace = self.get_trace_class("scatter")() res.append(trace) else: res.append(None) diff --git a/packages/python/plotly/_plotly_utils/importers.py b/packages/python/plotly/_plotly_utils/importers.py new file mode 100644 index 00000000000..20c77c1c843 --- /dev/null +++ b/packages/python/plotly/_plotly_utils/importers.py @@ -0,0 +1,50 @@ +import importlib + + +def relative_import(parent_name, rel_modules=(), rel_classes=()): + """ + Helper function to import submodules lazily in Python 3.7+ + + Parameters + ---------- + rel_modules: list of str + list of submodules to import, of the form .submodule + rel_classes: list of str + list of submodule classes/variables to import, of the form ._submodule.Foo + + Returns + ------- + tuple + Tuple that should be assigned to __all__, __getattr__ in the caller + """ + module_names = {rel_module.split(".")[-1]: rel_module for rel_module in rel_modules} + class_names = {rel_path.split(".")[-1]: rel_path for rel_path in rel_classes} + + def __getattr__(import_name): + # In Python 3.7+, lazy import submodules + + # Check for submodule + if import_name in module_names: + rel_import = module_names[import_name] + return importlib.import_module(rel_import, parent_name) + + # Check for submodule class + if import_name in class_names: + rel_path_parts = class_names[import_name].split(".") + rel_module = ".".join(rel_path_parts[:-1]) + class_name = import_name + class_module = importlib.import_module(rel_module, parent_name) + return getattr(class_module, class_name) + + raise AttributeError( + "module {__name__!r} has no attribute {name!r}".format( + name=import_name, __name__=parent_name + ) + ) + + __all__ = list(module_names) + list(class_names) + + def __dir__(): + return __all__ + + return __all__, __getattr__, __dir__ diff --git a/packages/python/plotly/_plotly_utils/optional_imports.py b/packages/python/plotly/_plotly_utils/optional_imports.py index c36e0197b69..e76eab95f1c 100644 --- a/packages/python/plotly/_plotly_utils/optional_imports.py +++ b/packages/python/plotly/_plotly_utils/optional_imports.py @@ -12,7 +12,7 @@ _not_importable = set() -def get_module(name): +def get_module(name, should_load=True): """ Return module or None. Absolute import is required. @@ -23,6 +23,8 @@ def get_module(name): """ if name in sys.modules: return sys.modules[name] + if not should_load: + return None if name not in _not_importable: try: return import_module(name) diff --git a/packages/python/plotly/_plotly_utils/utils.py b/packages/python/plotly/_plotly_utils/utils.py index 86adad73099..c1ba92951da 100644 --- a/packages/python/plotly/_plotly_utils/utils.py +++ b/packages/python/plotly/_plotly_utils/utils.py @@ -147,7 +147,7 @@ def encode_as_sage(obj): @staticmethod def encode_as_pandas(obj): """Attempt to convert pandas.NaT""" - pandas = get_module("pandas") + pandas = get_module("pandas", should_load=False) if not pandas: raise NotEncodable @@ -159,7 +159,7 @@ def encode_as_pandas(obj): @staticmethod def encode_as_numpy(obj): """Attempt to convert numpy.ma.core.masked""" - numpy = get_module("numpy") + numpy = get_module("numpy", should_load=False) if not numpy: raise NotEncodable diff --git a/packages/python/plotly/codegen/__init__.py b/packages/python/plotly/codegen/__init__.py index a50bacf0b38..8d5b9d0570e 100644 --- a/packages/python/plotly/codegen/__init__.py +++ b/packages/python/plotly/codegen/__init__.py @@ -1,4 +1,5 @@ import json +import os import os.path as opath import shutil import subprocess @@ -17,6 +18,7 @@ FrameNode, write_init_py, ElementDefaultsNode, + build_from_imports_py, ) from codegen.validators import ( write_validator_py, @@ -190,14 +192,6 @@ def perform_codegen(): # ------------------- for node in all_compound_nodes: write_datatype_py(outdir, node) - alls.setdefault(node.path_parts, []) - alls[node.path_parts].extend( - c.name_datatype_class for c in node.child_compound_datatypes - ) - if node.parent_path_parts == (): - # Add top-level classes to alls - alls.setdefault((), []) - alls[node.parent_path_parts].append(node.name_datatype_class) # ### Deprecated ### # These are deprecated legacy datatypes like graph_objs.Marker @@ -219,20 +213,45 @@ def perform_codegen(): layout_array_nodes, ) + # Write validator __init__.py files + # --------------------------------- + # ### Write __init__.py files for each validator package ### + validator_rel_class_imports = {} + for node in all_datatype_nodes: + if node.is_mapped: + continue + key = node.parent_path_parts + validator_rel_class_imports.setdefault(key, []).append( + f"._{node.name_property}.{node.name_validator_class}" + ) + + # Add Data validator + root_validator_pairs = validator_rel_class_imports[()] + root_validator_pairs.append("._data.DataValidator") + + # Output validator __init__.py files + validators_pkg = opath.join(outdir, "validators") + for path_parts, rel_classes in validator_rel_class_imports.items(): + write_init_py(validators_pkg, path_parts, [], rel_classes) + # Write datatype __init__.py files # -------------------------------- - # ### Build mapping from parent package to datatype class ### - path_to_datatype_import_info = {} + datatype_rel_class_imports = {} + datatype_rel_module_imports = {} + for node in all_compound_nodes: key = node.parent_path_parts + # class import + datatype_rel_class_imports.setdefault(key, []).append( + f"._{node.name_undercase}.{node.name_datatype_class}" + ) + # submodule import if node.child_compound_datatypes: - - path_to_datatype_import_info.setdefault(key, []).append( - (f"plotly.graph_objs{node.parent_dotpath_str}", node.name_undercase) + datatype_rel_module_imports.setdefault(key, []).append( + f".{node.name_undercase}" ) - alls[node.parent_path_parts].append(node.name_undercase) # ### Write plotly/graph_objs/graph_objs.py ### # This if for backward compatibility. It just imports everything from @@ -240,33 +259,41 @@ def perform_codegen(): write_graph_objs_graph_objs(outdir) # ### Add Figure and FigureWidget ### - root_datatype_imports = path_to_datatype_import_info[()] - root_datatype_imports.append(("._figure", "Figure")) - alls[()].append("Figure") + root_datatype_imports = datatype_rel_class_imports[()] + root_datatype_imports.append("._figure.Figure") # ### Add deprecations ### - root_datatype_imports.append(("._deprecations", DEPRECATED_DATATYPES.keys())) - alls[()].extend(DEPRECATED_DATATYPES.keys()) - - # Sort alls - for k, v in alls.items(): - alls[k] = list(sorted(v)) + for dep_clas in DEPRECATED_DATATYPES: + root_datatype_imports.append(f"._deprecations.{dep_clas}") + validate_import = "from .._validate import validate\n" optional_figure_widget_import = f""" -__all__ = {alls[()]} -try: - import ipywidgets - from distutils.version import LooseVersion - if LooseVersion(ipywidgets.__version__) >= LooseVersion('7.0.0'): - from ._figurewidget import FigureWidget - __all__.append("FigureWidget") - del LooseVersion - del ipywidgets -except ImportError: - pass +if sys.version_info < (3, 7): + try: + import ipywidgets + from distutils.version import LooseVersion + if LooseVersion(ipywidgets.__version__) >= LooseVersion('7.0.0'): + from ..graph_objs._figurewidget import FigureWidget + del LooseVersion + del ipywidgets + except ImportError: + pass +else: + __all__.append("FigureWidget") + orig_getattr = __getattr__ + def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from distutils.version import LooseVersion + if LooseVersion(ipywidgets.__version__) >= LooseVersion('7.0.0'): + from ..graph_objs._figurewidget import FigureWidget + return FigureWidget + except ImportError: + pass + + return orig_getattr(import_name) """ - root_datatype_imports.append(optional_figure_widget_import) - # ### __all__ ### for path_parts, class_names in alls.items(): if path_parts and class_names: @@ -276,18 +303,34 @@ def perform_codegen(): # ### Output datatype __init__.py files ### graph_objs_pkg = opath.join(outdir, "graph_objs") - for path_parts, import_pairs in path_to_datatype_import_info.items(): - write_init_py(graph_objs_pkg, path_parts, import_pairs) + for path_parts in datatype_rel_class_imports: + rel_classes = datatype_rel_class_imports[path_parts] + rel_modules = datatype_rel_module_imports.get(path_parts, []) + if path_parts == (): + init_extra = validate_import + optional_figure_widget_import + else: + init_extra = "" + write_init_py(graph_objs_pkg, path_parts, rel_modules, rel_classes, init_extra) # ### Output graph_objects.py alias - graph_objects_path = opath.join(outdir, "graph_objects.py") + graph_objects_rel_classes = [ + "..graph_objs." + rel_path.split(".")[-1] + for rel_path in datatype_rel_class_imports[()] + ] + graph_objects_rel_modules = [ + "..graph_objs." + rel_module.split(".")[-1] + for rel_module in datatype_rel_module_imports[()] + ] + + graph_objects_init_source = build_from_imports_py( + graph_objects_rel_modules, + graph_objects_rel_classes, + init_extra=validate_import + optional_figure_widget_import, + ) + graph_objects_path = opath.join(outdir, "graph_objects", "__init__.py") + os.makedirs(opath.join(outdir, "graph_objects"), exist_ok=True) with open(graph_objects_path, "wt") as f: - f.write( - f"""\ -from __future__ import absolute_import -from plotly.graph_objs import * -__all__ = {alls[()]}""" - ) + f.write(graph_objects_init_source) # ### Run black code formatter on output directories ### subprocess.call(["black", "--target-version=py27", validators_pkgdir]) diff --git a/packages/python/plotly/codegen/datatypes.py b/packages/python/plotly/codegen/datatypes.py index fa25dae0027..35495d609a9 100644 --- a/packages/python/plotly/codegen/datatypes.py +++ b/packages/python/plotly/codegen/datatypes.py @@ -153,10 +153,22 @@ def _subplot_re_match(self, prop): """ ) - # ### Property definitions ### child_datatype_nodes = node.child_datatypes - subtype_nodes = child_datatype_nodes + valid_props_list = sorted( + [node.name_property for node in subtype_nodes + literal_nodes] + ) + buffer.write( + f""" + # class properties + # -------------------- + _parent_path_str = '{node.parent_path_str}' + _path_str = '{node.path_str}' + _valid_props = {{"{'", "'.join(valid_props_list)}"}} +""" + ) + + # ### Property definitions ### for subtype_node in subtype_nodes: if subtype_node.is_array_element: prop_type = ( @@ -243,15 +255,9 @@ def {literal_node.name_property}(self): ) # ### Private properties descriptions ### + valid_props = {node.name_property for node in subtype_nodes} buffer.write( f""" - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return '{node.parent_path_str}' - # Self properties description # --------------------------- @property @@ -309,6 +315,23 @@ def __init__(self""" f""" super({datatype_class}, self).__init__('{node.name_property}') + if '_parent' in kwargs: + self._parent = kwargs['_parent'] + return +""" + ) + + if datatype_class == "Layout": + buffer.write( + f""" + # Override _valid_props for instance so that instance can mutate set + # to support subplot properties (e.g. xaxis2) + self._valid_props = {{"{'", "'.join(valid_props_list)}"}} +""" + ) + + buffer.write( + f""" # Validate arg # ------------ if arg is None: @@ -326,23 +349,8 @@ def __init__(self""" # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop('skip_invalid', False) - - # Import validators - # ----------------- - from plotly.validators{node.parent_dotpath_str} import ( - {undercase} as v_{undercase}) - - # Initialize validators - # ---------------------""" + """ ) - for subtype_node in subtype_nodes: - if not subtype_node.is_mapped: - sub_name = subtype_node.name_property - sub_validator = subtype_node.name_validator_class - buffer.write( - f""" - self._validators['{sub_name}'] = v_{undercase}.{sub_validator}()""" - ) buffer.write( f""" @@ -352,27 +360,13 @@ def __init__(self""" ) for subtype_node in subtype_nodes: name_prop = subtype_node.name_property - if name_prop == "template" or subtype_node.is_mapped: - # Special handling for layout.template to avoid infinite - # recursion. Only initialize layout.template object if non-None - # value specified. - # - # Same special handling for mapped nodes (e.g. layout.titlefont) - # to keep them for overriding mapped property with None - buffer.write( - f""" + buffer.write( + f""" _v = arg.pop('{name_prop}', None) _v = {name_prop} if {name_prop} is not None else _v if _v is not None: self['{name_prop}'] = _v""" - ) - else: - buffer.write( - f""" - _v = arg.pop('{name_prop}', None) - self['{name_prop}'] = {name_prop} \ -if {name_prop} is not None else _v""" - ) + ) # ### Literals ### if literal_nodes: @@ -381,18 +375,14 @@ def __init__(self""" # Read-only literals # ------------------ - from _plotly_utils.basevalidators import LiteralValidator""" +""" ) for literal_node in literal_nodes: lit_name = literal_node.name_property - lit_parent = literal_node.parent_path_str lit_val = repr(literal_node.node_data) buffer.write( f""" self._props['{lit_name}'] = {lit_val} - self._validators['{lit_name}'] =\ -LiteralValidator(plotly_name='{lit_name}',\ - parent_name='{lit_parent}', val={lit_val}) arg.pop('{lit_name}', None)""" ) @@ -609,7 +599,10 @@ def write_datatype_py(outdir, node): # Build file path # --------------- - filepath = opath.join(outdir, "graph_objs", *node.parent_path_parts, "__init__.py") + # filepath = opath.join(outdir, "graph_objs", *node.parent_path_parts, "__init__.py") + filepath = opath.join( + outdir, "graph_objs", *node.parent_path_parts, "_" + node.name_undercase + ".py" + ) # Generate source code # -------------------- @@ -617,5 +610,4 @@ def write_datatype_py(outdir, node): # Write file # ---------- - write_source_py(datatype_source, filepath, leading_newlines=2) diff --git a/packages/python/plotly/codegen/figure.py b/packages/python/plotly/codegen/figure.py index 14ef22faf08..bf466d06d3a 100644 --- a/packages/python/plotly/codegen/figure.py +++ b/packages/python/plotly/codegen/figure.py @@ -69,12 +69,6 @@ def build_figure_py( # ### Import base class ### buffer.write(f"from plotly.{base_package} import {base_classname}\n") - # ### Import trace graph_obj classes / layout ### - trace_types_csv = ", ".join( - [n.name_datatype_class for n in trace_nodes] + ["layout as _layout"] - ) - buffer.write(f"from plotly.graph_objs import ({trace_types_csv})\n") - # Write class definition # ---------------------- buffer.write( @@ -192,6 +186,7 @@ def add_{trace_node.plotly_name}(self""" # #### Function body #### buffer.write( f""" + from plotly.graph_objs import {trace_node.name_datatype_class} new_trace = {trace_node.name_datatype_class}( """ ) @@ -571,6 +566,7 @@ def add_{method_prefix}{singular_name}(self""" # #### Function body #### buffer.write( f""" + from plotly.graph_objs import layout as _layout new_obj = _layout.{node.name_datatype_class}(arg, """ ) diff --git a/packages/python/plotly/codegen/utils.py b/packages/python/plotly/codegen/utils.py index 9c000fa70b0..6791cd07912 100644 --- a/packages/python/plotly/codegen/utils.py +++ b/packages/python/plotly/codegen/utils.py @@ -42,46 +42,55 @@ def write_source_py(py_source, filepath, leading_newlines=0): f.write(py_source) -def build_from_imports_py(imports_info): +def build_from_imports_py(rel_modules=(), rel_classes=(), init_extra=""): """ Build a string containing a series of `from X import Y` lines Parameters ---------- - imports_info : str or list of (str, str or list of str) - List of import info - If element is a pair first entry is the package to be imported - from and the second entry is either a string of the single name - to be - - If element is a string, insert string directly + rel_modules: list of str + list of submodules to import, of the form .submodule + rel_classes: list of str + list of submodule classes/variables to import, of the form ._submodule.Foo + init_extra: str + Extra code snippet to append to end of __init__.py file Returns ------- str String containing a series of imports """ - buffer = StringIO() - for import_info in imports_info: - - if isinstance(import_info, tuple): - from_pkg, class_name = import_info - if isinstance(class_name, str): - class_name_str = class_name - else: - class_name_str = "(" + ", ".join(class_name) + ")" - - buffer.write( - f"""\ -from {from_pkg} import {class_name_str}\n""" - ) - elif isinstance(import_info, str): - buffer.write(import_info) - - return buffer.getvalue() + rel_modules = list(rel_modules) + rel_classes = list(rel_classes) + + import_lines = [] + for rel in rel_classes + rel_modules: + rel_parts = rel.split(".") + parent_module = ".".join(rel_parts[:-1]) or "." + import_target = rel_parts[-1] + import_line = f"from {parent_module} import {import_target}" + import_lines.append(import_line) + + imports_str = "\n ".join(import_lines) + + result = f"""\ +import sys +if sys.version_info < (3, 7): + {imports_str} +else: + from _plotly_utils.importers import relative_import + __all__, __getattr__, __dir__ = relative_import( + __name__, + {repr(rel_modules)}, + {repr(rel_classes)} + ) + +{init_extra} +""" + return result -def write_init_py(pkg_root, path_parts, import_pairs): +def write_init_py(pkg_root, path_parts, rel_modules=(), rel_classes=(), init_extra=""): """ Build __init__.py source code and write to a file @@ -93,22 +102,24 @@ def write_init_py(pkg_root, path_parts, import_pairs): path_parts : tuple of str Tuple of sub-packages under pkg_root where the __init__.py file should be written - import_pairs : list of (str, str or list of str) - List of pairs where first entry is the package to be imported from. - The second entry is either a string of the single name to be - imported, or a list of names to be imported. + rel_modules: list of str + list of submodules to import, of the form .submodule + rel_classes: list of str + list of submodule classes/variables to import, of the form ._submodule.Foo + init_extra: str + Extra code snippet to append to end of __init__.py file Returns ------- None """ # Generate source code # -------------------- - init_source = build_from_imports_py(import_pairs) + init_source = build_from_imports_py(rel_modules, rel_classes, init_extra) # Write file # ---------- filepath = opath.join(pkg_root, *path_parts, "__init__.py") - write_source_py(init_source, filepath, leading_newlines=2) + write_source_py(init_source, filepath) def format_description(desc): @@ -411,11 +422,7 @@ def name_validator_class(self) -> str: ------- str """ - return ( - self.name_datatype_class - + ("s" if self.is_array_element else "") - + "Validator" - ) + return self.name_property.title() + "Validator" @property def name_base_validator(self) -> str: diff --git a/packages/python/plotly/codegen/validators.py b/packages/python/plotly/codegen/validators.py index 88d79db6487..5a433603fb5 100644 --- a/packages/python/plotly/codegen/validators.py +++ b/packages/python/plotly/codegen/validators.py @@ -107,7 +107,10 @@ def write_validator_py(outdir, node: PlotlyNode): # Write file # ---------- - filepath = opath.join(outdir, "validators", *node.parent_path_parts, "__init__.py") + # filepath = opath.join(outdir, "validators", *node.parent_path_parts, "__init__.py") + filepath = opath.join( + outdir, "validators", *node.parent_path_parts, "_" + node.name_property + ".py" + ) write_source_py(validator_source, filepath, leading_newlines=2) @@ -259,5 +262,6 @@ def write_data_validator_py(outdir, base_trace_node: TraceNode): # Write file # ---------- - filepath = opath.join(outdir, "validators", "__init__.py") + # filepath = opath.join(outdir, "validators", "__init__.py") + filepath = opath.join(outdir, "validators", "_data.py") write_source_py(source, filepath, leading_newlines=2) diff --git a/packages/python/plotly/plotly/__init__.py b/packages/python/plotly/plotly/__init__.py index c6a82afe4f0..727585c4fd6 100644 --- a/packages/python/plotly/plotly/__init__.py +++ b/packages/python/plotly/plotly/__init__.py @@ -26,20 +26,53 @@ """ from __future__ import absolute_import +import sys +from _plotly_utils.importers import relative_import -from plotly import ( - graph_objs, - tools, - utils, - offline, - colors, - io, - data, - colors, - _docstring_gen, -) - -from plotly.version import __version__ - -# Set default template here to make sure import process is complete -io.templates._default = "plotly" + +if sys.version_info < (3, 7): + from plotly import ( + graph_objs, + tools, + utils, + offline, + colors, + io, + data, + colors, + ) + from plotly.version import __version__ + + __all__ = [ + "graph_objs", + "tools", + "utils", + "offline", + "colors", + "io", + "data", + "colors", + "__version__", + ] + + # Set default template (for >= 3.7 this is done in ploty/io/__init__.py) + from plotly.io import templates + + templates._default = "plotly" +else: + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".graph_objs", + ".graph_objects", + ".tools", + ".utils", + ".offline", + ".colors", + ".io", + ".data", + ".colors", + ".express", + ], + [".version.__version__"], + ) diff --git a/packages/python/plotly/plotly/_docstring_gen.py b/packages/python/plotly/plotly/_docstring_gen.py deleted file mode 100644 index b091d9973ea..00000000000 --- a/packages/python/plotly/plotly/_docstring_gen.py +++ /dev/null @@ -1,26 +0,0 @@ -from __future__ import absolute_import -import re as _re -import plotly.io as pio -from plotly.basedatatypes import BaseFigure -import sys - -# Perform docstrings generation -def copy_doc_without_fig(from_fn, to_method): - """ - Copy docstring from a plotly.io function to a Figure method, removing the - fig argument docstring in the process - """ - docstr = _re.sub(r" {4}fig:(?:.*?\n)*? {4}(\w+)", r" \1", from_fn.__doc__) - if sys.version_info[0] < 3: - to_method.__func__.__doc__ = docstr - else: - to_method.__doc__ = docstr - - -copy_doc_without_fig(pio.show, BaseFigure.show) -copy_doc_without_fig(pio.to_json, BaseFigure.to_json) -copy_doc_without_fig(pio.write_json, BaseFigure.write_json) -copy_doc_without_fig(pio.to_html, BaseFigure.to_html) -copy_doc_without_fig(pio.write_html, BaseFigure.write_html) -copy_doc_without_fig(pio.to_image, BaseFigure.to_image) -copy_doc_without_fig(pio.write_image, BaseFigure.write_image) diff --git a/packages/python/plotly/plotly/_validate.py b/packages/python/plotly/plotly/_validate.py new file mode 100644 index 00000000000..6a776075312 --- /dev/null +++ b/packages/python/plotly/plotly/_validate.py @@ -0,0 +1,12 @@ +class validate(object): + _should_validate = True + + def __init__(self, should_validate): + self._old = validate._should_validate + validate._should_validate = should_validate + + def __enter__(self): + pass + + def __exit__(self, exc_type, exc_val, exc_tb): + validate._should_validate = self._old diff --git a/packages/python/plotly/plotly/basedatatypes.py b/packages/python/plotly/plotly/basedatatypes.py index b5a4a749f17..9eb4ddce370 100644 --- a/packages/python/plotly/plotly/basedatatypes.py +++ b/packages/python/plotly/plotly/basedatatypes.py @@ -10,25 +10,9 @@ from copy import deepcopy, copy from _plotly_utils.utils import _natural_sort_strings -from plotly.subplots import ( - _set_trace_grid_reference, - _get_grid_subplot, - _get_subplot_ref_for_trace, -) +from plotly._validate import validate from .optional_imports import get_module -from _plotly_utils.basevalidators import ( - CompoundValidator, - CompoundArrayValidator, - BaseDataValidator, - BaseValidator, - LiteralValidator, -) -from . import animation -from .callbacks import Points, InputDeviceState -from plotly.utils import ElidedPrettyPrinter -from .validators import DataValidator, LayoutValidator, FramesValidator - # Create Undefined sentinel value # - Setting a property to None removes any existing value # - Setting a property to Undefined leaves existing value unmodified @@ -104,6 +88,8 @@ class is a subclass of both BaseFigure and widgets.DOMWidget. if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False """ + from .validators import DataValidator, LayoutValidator, FramesValidator + super(BaseFigure, self).__init__() # Assign layout_plotly to layout @@ -261,6 +247,8 @@ class is a subclass of both BaseFigure and widgets.DOMWidget. # Animation property validators # ----------------------------- + from . import animation + self._animation_duration_validator = animation.DurationValidator() self._animation_easing_validator = animation.EasingValidator() @@ -768,6 +756,7 @@ def select_traces(self, selector=None, row=None, col=None, secondary_y=None): ) def _perform_select_traces(self, filter_by_subplot, grid_subplot_refs, selector): + from plotly.subplots import _get_subplot_ref_for_trace for trace in self.data: # Filter by subplot @@ -1799,6 +1788,8 @@ def append_trace(self, trace, row, col): self.add_trace(trace=trace, row=row, col=col) def _set_trace_grid_position(self, trace, row, col, secondary_y=False): + from plotly.subplots import _set_trace_grid_reference + grid_ref = self._validate_get_grid_ref() return _set_trace_grid_reference( trace, self.layout, grid_ref, row, col, secondary_y @@ -1854,6 +1845,8 @@ def get_subplot(self, row, col, secondary_y=False): - xaxis: plotly.graph_objs.layout.XAxis instance for subplot - yaxis: plotly.graph_objs.layout.YAxis instance for subplot """ + from plotly.subplots import _get_grid_subplot + return _get_grid_subplot(self, row, col, secondary_y) # Child property operations @@ -1945,11 +1938,12 @@ def _init_child_props(self, child): def _initialize_layout_template(self): import plotly.io as pio - if self._layout_obj.template is None: + if self._layout_obj._props.get("template", None) is None: if pio.templates.default is not None: - self._layout_obj.template = pio.templates.default - else: - self._layout_obj.template = None + with validate(False): + # Assume default template is already validated + template_dict = pio.templates[pio.templates.default] + self._layout_obj.template = template_dict @property def layout(self): @@ -2789,36 +2783,394 @@ def to_ordered_dict(self, skip_uid=True): # ----------------- # Note that docstrings are auto-generated in plotly/_docstring_gen.py def show(self, *args, **kwargs): + """ + Show a figure using either the default renderer(s) or the renderer(s) + specified by the renderer argument + + Parameters + ---------- + renderer: str or None (default None) + A string containing the names of one or more registered renderers + (separated by '+' characters) or None. If None, then the default + renderers specified in plotly.io.renderers.default are used. + + validate: bool (default True) + True if the figure should be validated before being shown, + False otherwise. + + Returns + ------- + None + """ import plotly.io as pio return pio.show(self, *args, **kwargs) def to_json(self, *args, **kwargs): + """ + Convert a figure to a JSON string representation + + Parameters + ---------- + validate: bool (default True) + True if the figure should be validated before being converted to + JSON, False otherwise. + + pretty: bool (default False) + True if JSON representation should be pretty-printed, False if + representation should be as compact as possible. + + remove_uids: bool (default True) + True if trace UIDs should be omitted from the JSON representation + + Returns + ------- + str + Representation of figure as a JSON string + """ import plotly.io as pio return pio.to_json(self, *args, **kwargs) def write_json(self, *args, **kwargs): + """ + Convert a figure to JSON and write it to a file or writeable + object + + Parameters + ---------- + file: str or writeable + A string representing a local file path or a writeable object + (e.g. an open file descriptor) + + pretty: bool (default False) + True if JSON representation should be pretty-printed, False if + representation should be as compact as possible. + + remove_uids: bool (default True) + True if trace UIDs should be omitted from the JSON representation + + Returns + ------- + None + """ import plotly.io as pio return pio.write_json(self, *args, **kwargs) def to_html(self, *args, **kwargs): + """ + Convert a figure to an HTML string representation. + + Parameters + ---------- + config: dict or None (default None) + Plotly.js figure config options + auto_play: bool (default=True) + Whether to automatically start the animation sequence on page load + if the figure contains frames. Has no effect if the figure does not + contain frames. + include_plotlyjs: bool or string (default True) + Specifies how the plotly.js library is included/loaded in the output + div string. + + If True, a script tag containing the plotly.js source code (~3MB) + is included in the output. HTML files generated with this option are + fully self-contained and can be used offline. + + If 'cdn', a script tag that references the plotly.js CDN is included + in the output. HTML files generated with this option are about 3MB + smaller than those generated with include_plotlyjs=True, but they + require an active internet connection in order to load the plotly.js + library. + + If 'directory', a script tag is included that references an external + plotly.min.js bundle that is assumed to reside in the same + directory as the HTML file. + + If 'require', Plotly.js is loaded using require.js. This option + assumes that require.js is globally available and that it has been + globally configured to know how to find Plotly.js as 'plotly'. + This option is not advised when full_html=True as it will result + in a non-functional html file. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point + the resulting HTML file to an alternative CDN or local bundle. + + If False, no script tag referencing plotly.js is included. This is + useful when the resulting div string will be placed inside an HTML + document that already loads plotly.js. This option is not advised + when full_html=True as it will result in a non-functional html file. + include_mathjax: bool or string (default False) + Specifies how the MathJax.js library is included in the output html + div string. MathJax is required in order to display labels + with LaTeX typesetting. + + If False, no script tag referencing MathJax.js will be included in the + output. + + If 'cdn', a script tag that references a MathJax CDN location will be + included in the output. HTML div strings generated with this option + will be able to display LaTeX typesetting as long as internet access + is available. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point the + resulting HTML div string to an alternative CDN. + post_script: str or list or None (default None) + JavaScript snippet(s) to be included in the resulting div just after + plot creation. The string(s) may include '{plot_id}' placeholders + that will then be replaced by the `id` of the div element that the + plotly.js figure is associated with. One application for this script + is to install custom plotly.js event handlers. + full_html: bool (default True) + If True, produce a string containing a complete HTML document + starting with an tag. If False, produce a string containing + a single
element. + animation_opts: dict or None (default None) + dict of custom animation parameters to be passed to the function + Plotly.animate in Plotly.js. See + https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js + for available options. Has no effect if the figure does not contain + frames, or auto_play is False. + default_width, default_height: number or str (default '100%') + The default figure width/height to use if the provided figure does not + specify its own layout.width/layout.height property. May be + specified in pixels as an integer (e.g. 500), or as a css width style + string (e.g. '500px', '100%'). + validate: bool (default True) + True if the figure should be validated before being converted to + JSON, False otherwise. + Returns + ------- + str + Representation of figure as an HTML div string + """ import plotly.io as pio return pio.to_html(self, *args, **kwargs) def write_html(self, *args, **kwargs): + """ + Write a figure to an HTML file representation + + Parameters + ---------- + file: str or writeable + A string representing a local file path or a writeable object + (e.g. an open file descriptor) + config: dict or None (default None) + Plotly.js figure config options + auto_play: bool (default=True) + Whether to automatically start the animation sequence on page load + if the figure contains frames. Has no effect if the figure does not + contain frames. + include_plotlyjs: bool or string (default True) + Specifies how the plotly.js library is included/loaded in the output + div string. + + If True, a script tag containing the plotly.js source code (~3MB) + is included in the output. HTML files generated with this option are + fully self-contained and can be used offline. + + If 'cdn', a script tag that references the plotly.js CDN is included + in the output. HTML files generated with this option are about 3MB + smaller than those generated with include_plotlyjs=True, but they + require an active internet connection in order to load the plotly.js + library. + + If 'directory', a script tag is included that references an external + plotly.min.js bundle that is assumed to reside in the same + directory as the HTML file. If `file` is a string to a local file path + and `full_html` is True then + + If 'directory', a script tag is included that references an external + plotly.min.js bundle that is assumed to reside in the same + directory as the HTML file. If `file` is a string to a local file + path and `full_html` is True, then the plotly.min.js bundle is copied + into the directory of the resulting HTML file. If a file named + plotly.min.js already exists in the output directory then this file + is left unmodified and no copy is performed. HTML files generated + with this option can be used offline, but they require a copy of + the plotly.min.js bundle in the same directory. This option is + useful when many figures will be saved as HTML files in the same + directory because the plotly.js source code will be included only + once per output directory, rather than once per output file. + + If 'require', Plotly.js is loaded using require.js. This option + assumes that require.js is globally available and that it has been + globally configured to know how to find Plotly.js as 'plotly'. + This option is not advised when full_html=True as it will result + in a non-functional html file. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point + the resulting HTML file to an alternative CDN or local bundle. + + If False, no script tag referencing plotly.js is included. This is + useful when the resulting div string will be placed inside an HTML + document that already loads plotly.js. This option is not advised + when full_html=True as it will result in a non-functional html file. + + include_mathjax: bool or string (default False) + Specifies how the MathJax.js library is included in the output html + div string. MathJax is required in order to display labels + with LaTeX typesetting. + + If False, no script tag referencing MathJax.js will be included in the + output. + + If 'cdn', a script tag that references a MathJax CDN location will be + included in the output. HTML div strings generated with this option + will be able to display LaTeX typesetting as long as internet access + is available. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point the + resulting HTML div string to an alternative CDN. + post_script: str or list or None (default None) + JavaScript snippet(s) to be included in the resulting div just after + plot creation. The string(s) may include '{plot_id}' placeholders + that will then be replaced by the `id` of the div element that the + plotly.js figure is associated with. One application for this script + is to install custom plotly.js event handlers. + full_html: bool (default True) + If True, produce a string containing a complete HTML document + starting with an tag. If False, produce a string containing + a single
element. + animation_opts: dict or None (default None) + dict of custom animation parameters to be passed to the function + Plotly.animate in Plotly.js. See + https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js + for available options. Has no effect if the figure does not contain + frames, or auto_play is False. + default_width, default_height: number or str (default '100%') + The default figure width/height to use if the provided figure does not + specify its own layout.width/layout.height property. May be + specified in pixels as an integer (e.g. 500), or as a css width style + string (e.g. '500px', '100%'). + validate: bool (default True) + True if the figure should be validated before being converted to + JSON, False otherwise. + auto_open: bool (default True + If True, open the saved file in a web browser after saving. + This argument only applies if `full_html` is True. + Returns + ------- + str + Representation of figure as an HTML div string + """ import plotly.io as pio return pio.write_html(self, *args, **kwargs) def to_image(self, *args, **kwargs): + """ + Convert a figure to a static image bytes string + + Parameters + ---------- + format: str or None + The desired image format. One of + - 'png' + - 'jpg' or 'jpeg' + - 'webp' + - 'svg' + - 'pdf' + - 'eps' (Requires the poppler library to be installed) + + If not specified, will default to `plotly.io.config.default_format` + + width: int or None + The width of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the width of the exported image + in physical pixels. + + If not specified, will default to `plotly.io.config.default_width` + + height: int or None + The height of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the height of the exported image + in physical pixels. + + If not specified, will default to `plotly.io.config.default_height` + + scale: int or float or None + The scale factor to use when exporting the figure. A scale factor + larger than 1.0 will increase the image resolution with respect + to the figure's layout pixel dimensions. Whereas as scale factor of + less than 1.0 will decrease the image resolution. + + If not specified, will default to `plotly.io.config.default_scale` + + validate: bool + True if the figure should be validated before being converted to + an image, False otherwise. + + Returns + ------- + bytes + The image data + """ import plotly.io as pio return pio.to_image(self, *args, **kwargs) def write_image(self, *args, **kwargs): + """ + Convert a figure to a static image and write it to a file or writeable + object + + Parameters + ---------- + file: str or writeable + A string representing a local file path or a writeable object + (e.g. an open file descriptor) + + format: str or None + The desired image format. One of + - 'png' + - 'jpg' or 'jpeg' + - 'webp' + - 'svg' + - 'pdf' + - 'eps' (Requires the poppler library to be installed) + + If not specified and `file` is a string then this will default to the + file extension. If not specified and `file` is not a string then this + will default to `plotly.io.config.default_format` + + width: int or None + The width of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the width of the exported image + in physical pixels. + + If not specified, will default to `plotly.io.config.default_width` + + height: int or None + The height of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the height of the exported image + in physical pixels. + + If not specified, will default to `plotly.io.config.default_height` + + scale: int or float or None + The scale factor to use when exporting the figure. A scale factor + larger than 1.0 will increase the image resolution with respect + to the figure's layout pixel dimensions. Whereas as scale factor of + less than 1.0 will decrease the image resolution. + + If not specified, will default to `plotly.io.config.default_scale` + + validate: bool + True if the figure should be validated before being converted to + an image, False otherwise. + + Returns + ------- + None + """ import plotly.io as pio return pio.write_image(self, *args, **kwargs) @@ -2850,6 +3202,10 @@ def _perform_update(plotly_obj, update_obj, overwrite=False): :class:`BasePlotlyType`, ``update_obj`` should be a tuple or list of dicts """ + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + ) if update_obj is None: # Nothing to do @@ -2963,6 +3319,10 @@ class BasePlotlyType(object): # of relative path to new property (e.g. ('title', 'font') _mapped_properties = {} + _parent_path_str = "" + _path_str = "" + _valid_props = set() + def __init__(self, plotly_name, **kwargs): """ Construct a new BasePlotlyType @@ -2989,10 +3349,6 @@ def __init__(self, plotly_name, **kwargs): # Initialize properties # --------------------- - # ### _validators ### - # A dict from property names to property validators - self._validators = {} - # ### _compound_props ### # A dict from compound property names to compound objects self._compound_props = {} @@ -3019,6 +3375,47 @@ def __init__(self, plotly_name, **kwargs): # properties is modified self._change_callbacks = {} + # ### Backing property for backward compatible _validator property ## + self.__validators = None + + def _get_validator(self, prop): + from .validator_cache import ValidatorCache + + return ValidatorCache.get_validator(self._path_str, prop) + + @property + def _validators(self): + """ + Validators used to be stored in a private _validators property. This was + eliminated when we switched to building validators on demand using the + _get_validator method. + + This property returns a simple object that + + Returns + ------- + dict-like interface for accessing the object's validators + """ + obj = self + if self.__validators is None: + + class ValidatorCompat(object): + def __getitem__(self, item): + return obj._get_validator(item) + + def __contains__(self, item): + return obj.__contains__(item) + + def __iter__(self): + return iter(obj) + + def items(self): + return [(k, self[k]) for k in self] + + self.__validators = ValidatorCompat() + + return self.__validators + def _process_kwargs(self, **kwargs): """ Process any extra kwargs that are not predefined as constructor params @@ -3028,6 +3425,9 @@ def _process_kwargs(self, **kwargs): if k in self: # e.g. underscore kwargs like marker_line_color self[k] = v + elif not validate._should_validate: + # Set extra property as-is + self[k] = v else: invalid_kwargs[k] = v @@ -3045,30 +3445,6 @@ def plotly_name(self): """ return self._plotly_name - @property - def _parent_path_str(self): - """ - dot-separated path string to this object's parent. - - Returns - ------- - str - - Examples - -------- - - >>> import plotly.graph_objs as go - >>> go.Layout()._parent_path_str - '' - - >>> go.layout.XAxis()._parent_path_str - 'layout' - - >>> go.layout.xaxis.rangeselector.Button()._parent_path_str - 'layout.xaxis.rangeselector' - """ - raise NotImplementedError - @property def _prop_descriptions(self): """ @@ -3122,21 +3498,30 @@ def _get_child_props(self, child): return None else: # ### Child a compound property ### - if child.plotly_name in self._compound_props: - return self._props.get(child.plotly_name, None) + if child.plotly_name in self: + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + ) - # ### Child an element of a compound array property ### - elif child.plotly_name in self._compound_array_props: - children = self._compound_array_props[child.plotly_name] - child_ind = BaseFigure._index_is(children, child) - assert child_ind is not None + validator = self._get_validator(child.plotly_name) - children_props = self._props.get(child.plotly_name, None) - return ( - children_props[child_ind] - if children_props is not None and len(children_props) > child_ind - else None - ) + if isinstance(validator, CompoundValidator): + return self._props.get(child.plotly_name, None) + + # ### Child an element of a compound array property ### + elif isinstance(validator, CompoundArrayValidator): + children = self[child.plotly_name] + child_ind = BaseFigure._index_is(children, child) + assert child_ind is not None + + children_props = self._props.get(child.plotly_name, None) + return ( + children_props[child_ind] + if children_props is not None + and len(children_props) > child_ind + else None + ) # ### Invalid child ### else: @@ -3282,7 +3667,7 @@ def _get_prop_validator(self, prop): # Return validator # ---------------- - return plotly_obj._validators[prop] + return plotly_obj._get_validator(prop) @property def parent(self): @@ -3344,6 +3729,11 @@ def __getitem__(self, prop): ------- Any """ + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + BaseDataValidator, + ) # Normalize prop # -------------- @@ -3361,13 +3751,33 @@ def __getitem__(self, prop): if len(prop) == 1: # Unwrap scalar tuple prop = prop[0] - if prop not in self._validators: + if prop not in self._valid_props: raise KeyError(prop) - validator = self._validators[prop] - if prop in self._compound_props: + validator = self._get_validator(prop) + + if isinstance(validator, CompoundValidator): + if self._compound_props.get(prop, None) is None: + # Init compound objects + self._compound_props[prop] = validator.data_class( + _parent=self, plotly_name=prop + ) + # Update plotly_name value in case the validator applies + # non-standard name (e.g. imagedefaults instead of image) + self._compound_props[prop]._plotly_name = prop + return validator.present(self._compound_props[prop]) - elif prop in self._compound_array_props: + elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)): + if self._compound_array_props.get(prop, None) is None: + # Init list of compound objects + if self._props is not None: + self._compound_array_props[prop] = [ + validator.data_class(_parent=self) + for _ in self._props.get(prop, []) + ] + else: + self._compound_array_props[prop] = [] + return validator.present(self._compound_array_props[prop]) elif self._props is not None and prop in self._props: return validator.present(self._props[prop]) @@ -3422,7 +3832,7 @@ def __contains__(self, prop): else: return False else: - if obj is not None and p in obj._validators: + if obj is not None and p in obj._valid_props: obj = obj[p] else: return False @@ -3445,6 +3855,11 @@ def __setitem__(self, prop, value): ------- None """ + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + BaseDataValidator, + ) # Normalize prop # -------------- @@ -3470,24 +3885,49 @@ def __setitem__(self, prop, value): # ### Unwrap scalar tuple ### prop = prop[0] - # ### Validate prop ### - if prop not in self._validators: - self._raise_on_invalid_property_error(prop) + if validate._should_validate: + if prop not in self._valid_props: + self._raise_on_invalid_property_error(prop) - # ### Get validator for this property ### - validator = self._validators[prop] + # ### Get validator for this property ### + validator = self._get_validator(prop) - # ### Handle compound property ### - if isinstance(validator, CompoundValidator): - self._set_compound_prop(prop, value) + # ### Handle compound property ### + if isinstance(validator, CompoundValidator): + self._set_compound_prop(prop, value) - # ### Handle compound array property ### - elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)): - self._set_array_prop(prop, value) + # ### Handle compound array property ### + elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)): + self._set_array_prop(prop, value) - # ### Handle simple property ### + # ### Handle simple property ### + else: + self._set_prop(prop, value) else: - self._set_prop(prop, value) + # Make sure properties dict is initialized + self._init_props() + + if isinstance(value, BasePlotlyType): + # Extract json from graph objects + value = value.to_plotly_json() + + # Check for list/tuple of graph objects + if ( + isinstance(value, (list, tuple)) + and value + and isinstance(value[0], BasePlotlyType) + ): + value = [ + v.to_plotly_json() if isinstance(v, BasePlotlyType) else v + for v in value + ] + + self._props[prop] = value + + # Remove any already constructed graph object so that it will be + # reconstructed on property access + self._compound_props.pop(prop, None) + self._compound_array_props.pop(prop, None) # Handle non-scalar case # ---------------------- @@ -3511,7 +3951,7 @@ def __setattr__(self, prop, value): ------- None """ - if prop.startswith("_") or hasattr(self, prop) or prop in self._validators: + if prop.startswith("_") or hasattr(self, prop) or prop in self._valid_props: # Let known properties and private properties through super(BasePlotlyType, self).__setattr__(prop, value) else: @@ -3522,7 +3962,7 @@ def __iter__(self): """ Return an iterator over the object's properties """ - res = list(self._validators.keys()) + res = list(self._valid_props) for prop in self._mapped_properties: res.append(prop) return iter(res) @@ -3575,6 +4015,8 @@ def _build_repr_for_class(props, class_name, parent_path_str=None): str The representation string """ + from plotly.utils import ElidedPrettyPrinter + if parent_path_str: class_name = parent_path_str + "." + class_name @@ -3597,6 +4039,7 @@ def __repr__(self): Customize object representation when displayed in the terminal/notebook """ + from _plotly_utils.basevalidators import LiteralValidator # Get all properties props = self._props if self._props is not None else {} @@ -3605,8 +4048,8 @@ def __repr__(self): props = { p: v for p, v in props.items() - if p in self._validators - and not isinstance(self._validators[p], LiteralValidator) + if p in self._valid_props + and not isinstance(self._get_validator(p), LiteralValidator) } # Elide template @@ -3767,7 +4210,8 @@ def _set_prop(self, prop, val): # Import value # ------------ - validator = self._validators.get(prop) + validator = self._get_validator(prop) + try: val = validator.validate_coerce(val) except ValueError as err: @@ -3832,7 +4276,7 @@ def _set_compound_prop(self, prop, val): # Import value # ------------ - validator = self._validators.get(prop) + validator = self._get_validator(prop) val = validator.validate_coerce(val, skip_invalid=self._skip_invalid) # Save deep copies of current and new states @@ -3906,7 +4350,7 @@ def _set_array_prop(self, prop, val): # Import value # ------------ - validator = self._validators.get(prop) + validator = self._get_validator(prop) val = validator.validate_coerce(val, skip_invalid=self._skip_invalid) # Save deep copies of current and new states @@ -4179,7 +4623,7 @@ def _vals_equal(v1, v2): bool True if v1 and v2 are equal, False otherwise """ - np = get_module("numpy") + np = get_module("numpy", should_load=False) if np is not None and ( isinstance(v1, np.ndarray) or isinstance(v2, np.ndarray) ): @@ -4331,10 +4775,8 @@ def _set_subplotid_prop(self, prop, value): # Construct and add validator # --------------------------- - if prop not in self._validators: - validator_class = self._subplotid_validators[subplot_prop] - validator = validator_class(plotly_name=prop) - self._validators[prop] = validator + if prop not in self._valid_props: + self._valid_props.add(prop) # Import value # ------------ @@ -4395,7 +4837,7 @@ def __getattr__(self, prop): """ prop = self._strip_subplot_suffix_of_1(prop) if prop != "_subplotid_props" and prop in self._subplotid_props: - validator = self._validators[prop] + validator = self._get_validator(prop) return validator.present(self._compound_props[prop]) else: return super(BaseLayoutHierarchyType, self).__getattribute__(prop) diff --git a/packages/python/plotly/plotly/graph_objects.py b/packages/python/plotly/plotly/graph_objects.py deleted file mode 100644 index c63c2a376d2..00000000000 --- a/packages/python/plotly/plotly/graph_objects.py +++ /dev/null @@ -1,128 +0,0 @@ -from __future__ import absolute_import -from plotly.graph_objs import * - -__all__ = [ - "AngularAxis", - "Annotation", - "Annotations", - "Area", - "Bar", - "Barpolar", - "Box", - "Candlestick", - "Carpet", - "Choropleth", - "Choroplethmapbox", - "ColorBar", - "Cone", - "Contour", - "Contourcarpet", - "Contours", - "Data", - "Densitymapbox", - "ErrorX", - "ErrorY", - "ErrorZ", - "Figure", - "Font", - "Frame", - "Frames", - "Funnel", - "Funnelarea", - "Heatmap", - "Heatmapgl", - "Histogram", - "Histogram2d", - "Histogram2dContour", - "Histogram2dcontour", - "Image", - "Indicator", - "Isosurface", - "Layout", - "Legend", - "Line", - "Margin", - "Marker", - "Mesh3d", - "Ohlc", - "Parcats", - "Parcoords", - "Pie", - "Pointcloud", - "RadialAxis", - "Sankey", - "Scatter", - "Scatter3d", - "Scattercarpet", - "Scattergeo", - "Scattergl", - "Scattermapbox", - "Scatterpolar", - "Scatterpolargl", - "Scatterternary", - "Scene", - "Splom", - "Stream", - "Streamtube", - "Sunburst", - "Surface", - "Table", - "Trace", - "Treemap", - "Violin", - "Volume", - "Waterfall", - "XAxis", - "XBins", - "YAxis", - "YBins", - "ZAxis", - "area", - "bar", - "barpolar", - "box", - "candlestick", - "carpet", - "choropleth", - "choroplethmapbox", - "cone", - "contour", - "contourcarpet", - "densitymapbox", - "funnel", - "funnelarea", - "heatmap", - "heatmapgl", - "histogram", - "histogram2d", - "histogram2dcontour", - "image", - "indicator", - "isosurface", - "layout", - "mesh3d", - "ohlc", - "parcats", - "parcoords", - "pie", - "pointcloud", - "sankey", - "scatter", - "scatter3d", - "scattercarpet", - "scattergeo", - "scattergl", - "scattermapbox", - "scatterpolar", - "scatterpolargl", - "scatterternary", - "splom", - "streamtube", - "sunburst", - "surface", - "table", - "treemap", - "violin", - "volume", - "waterfall", -] diff --git a/packages/python/plotly/plotly/graph_objects/__init__.py b/packages/python/plotly/plotly/graph_objects/__init__.py new file mode 100644 index 00000000000..6935730d4c6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objects/__init__.py @@ -0,0 +1,291 @@ +import sys + +if sys.version_info < (3, 7): + from ..graph_objs import Waterfall + from ..graph_objs import Volume + from ..graph_objs import Violin + from ..graph_objs import Treemap + from ..graph_objs import Table + from ..graph_objs import Surface + from ..graph_objs import Sunburst + from ..graph_objs import Streamtube + from ..graph_objs import Splom + from ..graph_objs import Scatterternary + from ..graph_objs import Scatterpolargl + from ..graph_objs import Scatterpolar + from ..graph_objs import Scattermapbox + from ..graph_objs import Scattergl + from ..graph_objs import Scattergeo + from ..graph_objs import Scattercarpet + from ..graph_objs import Scatter3d + from ..graph_objs import Scatter + from ..graph_objs import Sankey + from ..graph_objs import Pointcloud + from ..graph_objs import Pie + from ..graph_objs import Parcoords + from ..graph_objs import Parcats + from ..graph_objs import Ohlc + from ..graph_objs import Mesh3d + from ..graph_objs import Isosurface + from ..graph_objs import Indicator + from ..graph_objs import Image + from ..graph_objs import Histogram2dContour + from ..graph_objs import Histogram2d + from ..graph_objs import Histogram + from ..graph_objs import Heatmapgl + from ..graph_objs import Heatmap + from ..graph_objs import Funnelarea + from ..graph_objs import Funnel + from ..graph_objs import Densitymapbox + from ..graph_objs import Contourcarpet + from ..graph_objs import Contour + from ..graph_objs import Cone + from ..graph_objs import Choroplethmapbox + from ..graph_objs import Choropleth + from ..graph_objs import Carpet + from ..graph_objs import Candlestick + from ..graph_objs import Box + from ..graph_objs import Barpolar + from ..graph_objs import Bar + from ..graph_objs import Area + from ..graph_objs import Layout + from ..graph_objs import Frame + from ..graph_objs import Figure + from ..graph_objs import Data + from ..graph_objs import Annotations + from ..graph_objs import Frames + from ..graph_objs import AngularAxis + from ..graph_objs import Annotation + from ..graph_objs import ColorBar + from ..graph_objs import Contours + from ..graph_objs import ErrorX + from ..graph_objs import ErrorY + from ..graph_objs import ErrorZ + from ..graph_objs import Font + from ..graph_objs import Legend + from ..graph_objs import Line + from ..graph_objs import Margin + from ..graph_objs import Marker + from ..graph_objs import RadialAxis + from ..graph_objs import Scene + from ..graph_objs import Stream + from ..graph_objs import XAxis + from ..graph_objs import YAxis + from ..graph_objs import ZAxis + from ..graph_objs import XBins + from ..graph_objs import YBins + from ..graph_objs import Trace + from ..graph_objs import Histogram2dcontour + from ..graph_objs import waterfall + from ..graph_objs import volume + from ..graph_objs import violin + from ..graph_objs import treemap + from ..graph_objs import table + from ..graph_objs import surface + from ..graph_objs import sunburst + from ..graph_objs import streamtube + from ..graph_objs import splom + from ..graph_objs import scatterternary + from ..graph_objs import scatterpolargl + from ..graph_objs import scatterpolar + from ..graph_objs import scattermapbox + from ..graph_objs import scattergl + from ..graph_objs import scattergeo + from ..graph_objs import scattercarpet + from ..graph_objs import scatter3d + from ..graph_objs import scatter + from ..graph_objs import sankey + from ..graph_objs import pointcloud + from ..graph_objs import pie + from ..graph_objs import parcoords + from ..graph_objs import parcats + from ..graph_objs import ohlc + from ..graph_objs import mesh3d + from ..graph_objs import isosurface + from ..graph_objs import indicator + from ..graph_objs import image + from ..graph_objs import histogram2dcontour + from ..graph_objs import histogram2d + from ..graph_objs import histogram + from ..graph_objs import heatmapgl + from ..graph_objs import heatmap + from ..graph_objs import funnelarea + from ..graph_objs import funnel + from ..graph_objs import densitymapbox + from ..graph_objs import contourcarpet + from ..graph_objs import contour + from ..graph_objs import cone + from ..graph_objs import choroplethmapbox + from ..graph_objs import choropleth + from ..graph_objs import carpet + from ..graph_objs import candlestick + from ..graph_objs import box + from ..graph_objs import barpolar + from ..graph_objs import bar + from ..graph_objs import area + from ..graph_objs import layout +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + "..graph_objs.waterfall", + "..graph_objs.volume", + "..graph_objs.violin", + "..graph_objs.treemap", + "..graph_objs.table", + "..graph_objs.surface", + "..graph_objs.sunburst", + "..graph_objs.streamtube", + "..graph_objs.splom", + "..graph_objs.scatterternary", + "..graph_objs.scatterpolargl", + "..graph_objs.scatterpolar", + "..graph_objs.scattermapbox", + "..graph_objs.scattergl", + "..graph_objs.scattergeo", + "..graph_objs.scattercarpet", + "..graph_objs.scatter3d", + "..graph_objs.scatter", + "..graph_objs.sankey", + "..graph_objs.pointcloud", + "..graph_objs.pie", + "..graph_objs.parcoords", + "..graph_objs.parcats", + "..graph_objs.ohlc", + "..graph_objs.mesh3d", + "..graph_objs.isosurface", + "..graph_objs.indicator", + "..graph_objs.image", + "..graph_objs.histogram2dcontour", + "..graph_objs.histogram2d", + "..graph_objs.histogram", + "..graph_objs.heatmapgl", + "..graph_objs.heatmap", + "..graph_objs.funnelarea", + "..graph_objs.funnel", + "..graph_objs.densitymapbox", + "..graph_objs.contourcarpet", + "..graph_objs.contour", + "..graph_objs.cone", + "..graph_objs.choroplethmapbox", + "..graph_objs.choropleth", + "..graph_objs.carpet", + "..graph_objs.candlestick", + "..graph_objs.box", + "..graph_objs.barpolar", + "..graph_objs.bar", + "..graph_objs.area", + "..graph_objs.layout", + ], + [ + "..graph_objs.Waterfall", + "..graph_objs.Volume", + "..graph_objs.Violin", + "..graph_objs.Treemap", + "..graph_objs.Table", + "..graph_objs.Surface", + "..graph_objs.Sunburst", + "..graph_objs.Streamtube", + "..graph_objs.Splom", + "..graph_objs.Scatterternary", + "..graph_objs.Scatterpolargl", + "..graph_objs.Scatterpolar", + "..graph_objs.Scattermapbox", + "..graph_objs.Scattergl", + "..graph_objs.Scattergeo", + "..graph_objs.Scattercarpet", + "..graph_objs.Scatter3d", + "..graph_objs.Scatter", + "..graph_objs.Sankey", + "..graph_objs.Pointcloud", + "..graph_objs.Pie", + "..graph_objs.Parcoords", + "..graph_objs.Parcats", + "..graph_objs.Ohlc", + "..graph_objs.Mesh3d", + "..graph_objs.Isosurface", + "..graph_objs.Indicator", + "..graph_objs.Image", + "..graph_objs.Histogram2dContour", + "..graph_objs.Histogram2d", + "..graph_objs.Histogram", + "..graph_objs.Heatmapgl", + "..graph_objs.Heatmap", + "..graph_objs.Funnelarea", + "..graph_objs.Funnel", + "..graph_objs.Densitymapbox", + "..graph_objs.Contourcarpet", + "..graph_objs.Contour", + "..graph_objs.Cone", + "..graph_objs.Choroplethmapbox", + "..graph_objs.Choropleth", + "..graph_objs.Carpet", + "..graph_objs.Candlestick", + "..graph_objs.Box", + "..graph_objs.Barpolar", + "..graph_objs.Bar", + "..graph_objs.Area", + "..graph_objs.Layout", + "..graph_objs.Frame", + "..graph_objs.Figure", + "..graph_objs.Data", + "..graph_objs.Annotations", + "..graph_objs.Frames", + "..graph_objs.AngularAxis", + "..graph_objs.Annotation", + "..graph_objs.ColorBar", + "..graph_objs.Contours", + "..graph_objs.ErrorX", + "..graph_objs.ErrorY", + "..graph_objs.ErrorZ", + "..graph_objs.Font", + "..graph_objs.Legend", + "..graph_objs.Line", + "..graph_objs.Margin", + "..graph_objs.Marker", + "..graph_objs.RadialAxis", + "..graph_objs.Scene", + "..graph_objs.Stream", + "..graph_objs.XAxis", + "..graph_objs.YAxis", + "..graph_objs.ZAxis", + "..graph_objs.XBins", + "..graph_objs.YBins", + "..graph_objs.Trace", + "..graph_objs.Histogram2dcontour", + ], + ) + +from .._validate import validate + +if sys.version_info < (3, 7): + try: + import ipywidgets + from distutils.version import LooseVersion + + if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + del LooseVersion + del ipywidgets + except ImportError: + pass +else: + __all__.append("FigureWidget") + orig_getattr = __getattr__ + + def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from distutils.version import LooseVersion + + if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + + return FigureWidget + except ImportError: + pass + + return orig_getattr(import_name) diff --git a/packages/python/plotly/plotly/graph_objs/__init__.py b/packages/python/plotly/plotly/graph_objs/__init__.py index cf7c5e0d63a..80648e0661e 100644 --- a/packages/python/plotly/plotly/graph_objs/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/__init__.py @@ -1,101472 +1,291 @@ -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Waterfall(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val - - # base - # ---- - @property - def base(self): - """ - Sets where the bar base is drawn (in position axis units). - - The 'base' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["base"] - - @base.setter - def base(self, val): - self["base"] = val - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether the text nodes are clipped about the subplot - axes. To show the text nodes above axis lines and tick labels, - make sure to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # connector - # --------- - @property - def connector(self): - """ - The 'connector' property is an instance of Connector - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Connector` - - A dict of string/value properties that will be passed - to the Connector constructor - - Supported dict properties: - - line - :class:`plotly.graph_objects.waterfall.connecto - r.Line` instance or dict with compatible - properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. - - Returns - ------- - plotly.graph_objs.waterfall.Connector - """ - return self["connector"] - - @connector.setter - def connector(self, val): - self["connector"] = val - - # constraintext - # ------------- - @property - def constraintext(self): - """ - Constrain the size of text inside or outside a bar to be no - larger than the bar itself. - - The 'constraintext' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'both', 'none'] - - Returns - ------- - Any - """ - return self["constraintext"] - - @constraintext.setter - def constraintext(self, val): - self["constraintext"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # decreasing - # ---------- - @property - def decreasing(self): - """ - The 'decreasing' property is an instance of Decreasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Decreasing` - - A dict of string/value properties that will be passed - to the Decreasing constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.waterfall.decreasi - ng.Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.waterfall.Decreasing - """ - return self["decreasing"] - - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['name', 'x', 'y', 'text', 'initial', 'delta', 'final'] joined with '+' characters - (e.g. 'name+x') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.waterfall.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `initial`, `delta` and `final`. Anything contained in - tag `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # increasing - # ---------- - @property - def increasing(self): - """ - The 'increasing' property is an instance of Increasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Increasing` - - A dict of string/value properties that will be passed - to the Increasing constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.waterfall.increasi - ng.Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.waterfall.Increasing - """ - return self["increasing"] - - @increasing.setter - def increasing(self, val): - self["increasing"] = val - - # insidetextanchor - # ---------------- - @property - def insidetextanchor(self): - """ - Determines if texts are kept at center or start/end points in - `textposition` "inside" mode. - - The 'insidetextanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['end', 'middle', 'start'] - - Returns - ------- - Any - """ - return self["insidetextanchor"] - - @insidetextanchor.setter - def insidetextanchor(self, val): - self["insidetextanchor"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `text` lying inside the bar. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.waterfall.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # measure - # ------- - @property - def measure(self): - """ - An array containing types of values. By default the values are - considered as 'relative'. However; it is possible to use - 'total' to compute the sums. Also 'absolute' could be applied - to reset the computed total or to declare an initial value - where needed. - - The 'measure' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["measure"] - - @measure.setter - def measure(self, val): - self["measure"] = val - - # measuresrc - # ---------- - @property - def measuresrc(self): - """ - Sets the source reference on Chart Studio Cloud for measure . - - The 'measuresrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["measuresrc"] - - @measuresrc.setter - def measuresrc(self, val): - self["measuresrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # offset - # ------ - @property - def offset(self): - """ - Shifts the position where the bar is drawn (in position axis - units). In "group" barmode, traces that set "offset" will be - excluded and drawn in "overlay" mode instead. - - The 'offset' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - - # offsetsrc - # --------- - @property - def offsetsrc(self): - """ - Sets the source reference on Chart Studio Cloud for offset . - - The 'offsetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["offsetsrc"] - - @offsetsrc.setter - def offsetsrc(self, val): - self["offsetsrc"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the bars. With "v" ("h"), the value of - the each bar spans along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `text` lying outside the bar. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont` - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.waterfall.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.waterfall.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textangle - # --------- - @property - def textangle(self): - """ - Sets the angle of the tick labels with respect to the bar. For - example, a `tickangle` of -90 draws the tick labels vertically. - With "auto" the texts may automatically be rotated to fit with - the maximum size in bars. - - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["textangle"] - - @textangle.setter - def textangle(self, val): - self["textangle"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `text`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.waterfall.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. In the - case of having multiple waterfalls, totals are computed - separately (per trace). - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'initial', 'delta', 'final'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `text`. "inside" positions `text` - inside, next to the bar end (rotated and scaled if needed). - "outside" positions `text` outside, next to the bar end (scaled - if needed), unless there is another bar stacked on this one, - then the text gets pushed inside. "auto" tries to position - `text` inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `initial`, `delta`, `final` and `label`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # totals - # ------ - @property - def totals(self): - """ - The 'totals' property is an instance of Totals - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.Totals` - - A dict of string/value properties that will be passed - to the Totals constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.waterfall.totals.M - arker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.waterfall.Totals - """ - return self["totals"] - - @totals.setter - def totals(self, val): - self["totals"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the bar width (in position axis units). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - :class:`plotly.graph_objects.waterfall.Connector` - instance or dict with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - decreasing - :class:`plotly.graph_objects.waterfall.Decreasing` - instance or dict with compatible properties - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.waterfall.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `initial`, `delta` and - `final`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - increasing - :class:`plotly.graph_objects.waterfall.Increasing` - instance or dict with compatible properties - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - measure - An array containing types of values. By default the - values are considered as 'relative'. However; it is - possible to use 'total' to compute the sums. Also - 'absolute' could be applied to reset the computed total - or to declare an initial value where needed. - measuresrc - Sets the source reference on Chart Studio Cloud for - measure . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on Chart Studio Cloud for - offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.waterfall.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple waterfalls, totals are - computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `initial`, - `delta`, `final` and `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - totals - :class:`plotly.graph_objects.waterfall.Totals` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - alignmentgroup=None, - base=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - decreasing=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - insidetextanchor=None, - insidetextfont=None, - legendgroup=None, - measure=None, - measuresrc=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - totals=None, - uid=None, - uirevision=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Waterfall object - - Draws waterfall trace which is useful graph to displays the - contribution of various elements (either positive or negative) - in a bar chart. The data visualized by the span of the bars is - set in `y` if `orientation` is set th "v" (the default) and the - labels are set in `x`. By setting `orientation` to "h", the - roles are interchanged. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Waterfall` - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - :class:`plotly.graph_objects.waterfall.Connector` - instance or dict with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - decreasing - :class:`plotly.graph_objects.waterfall.Decreasing` - instance or dict with compatible properties - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.waterfall.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `initial`, `delta` and - `final`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - increasing - :class:`plotly.graph_objects.waterfall.Increasing` - instance or dict with compatible properties - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - measure - An array containing types of values. By default the - values are considered as 'relative'. However; it is - possible to use 'total' to compute the sums. Also - 'absolute' could be applied to reset the computed total - or to declare an initial value where needed. - measuresrc - Sets the source reference on Chart Studio Cloud for - measure . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on Chart Studio Cloud for - offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.waterfall.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple waterfalls, totals are - computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `initial`, - `delta`, `final` and `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - totals - :class:`plotly.graph_objects.waterfall.Totals` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Waterfall - """ - super(Waterfall, self).__init__("waterfall") - - # Validate arg - # ------------ - 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.Waterfall -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Waterfall`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import waterfall as v_waterfall - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_waterfall.AlignmentgroupValidator() - self._validators["base"] = v_waterfall.BaseValidator() - self._validators["cliponaxis"] = v_waterfall.CliponaxisValidator() - self._validators["connector"] = v_waterfall.ConnectorValidator() - self._validators["constraintext"] = v_waterfall.ConstraintextValidator() - self._validators["customdata"] = v_waterfall.CustomdataValidator() - self._validators["customdatasrc"] = v_waterfall.CustomdatasrcValidator() - self._validators["decreasing"] = v_waterfall.DecreasingValidator() - self._validators["dx"] = v_waterfall.DxValidator() - self._validators["dy"] = v_waterfall.DyValidator() - self._validators["hoverinfo"] = v_waterfall.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_waterfall.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_waterfall.HoverlabelValidator() - self._validators["hovertemplate"] = v_waterfall.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_waterfall.HovertemplatesrcValidator() - self._validators["hovertext"] = v_waterfall.HovertextValidator() - self._validators["hovertextsrc"] = v_waterfall.HovertextsrcValidator() - self._validators["ids"] = v_waterfall.IdsValidator() - self._validators["idssrc"] = v_waterfall.IdssrcValidator() - self._validators["increasing"] = v_waterfall.IncreasingValidator() - self._validators["insidetextanchor"] = v_waterfall.InsidetextanchorValidator() - self._validators["insidetextfont"] = v_waterfall.InsidetextfontValidator() - self._validators["legendgroup"] = v_waterfall.LegendgroupValidator() - self._validators["measure"] = v_waterfall.MeasureValidator() - self._validators["measuresrc"] = v_waterfall.MeasuresrcValidator() - self._validators["meta"] = v_waterfall.MetaValidator() - self._validators["metasrc"] = v_waterfall.MetasrcValidator() - self._validators["name"] = v_waterfall.NameValidator() - self._validators["offset"] = v_waterfall.OffsetValidator() - self._validators["offsetgroup"] = v_waterfall.OffsetgroupValidator() - self._validators["offsetsrc"] = v_waterfall.OffsetsrcValidator() - self._validators["opacity"] = v_waterfall.OpacityValidator() - self._validators["orientation"] = v_waterfall.OrientationValidator() - self._validators["outsidetextfont"] = v_waterfall.OutsidetextfontValidator() - self._validators["selectedpoints"] = v_waterfall.SelectedpointsValidator() - self._validators["showlegend"] = v_waterfall.ShowlegendValidator() - self._validators["stream"] = v_waterfall.StreamValidator() - self._validators["text"] = v_waterfall.TextValidator() - self._validators["textangle"] = v_waterfall.TextangleValidator() - self._validators["textfont"] = v_waterfall.TextfontValidator() - self._validators["textinfo"] = v_waterfall.TextinfoValidator() - self._validators["textposition"] = v_waterfall.TextpositionValidator() - self._validators["textpositionsrc"] = v_waterfall.TextpositionsrcValidator() - self._validators["textsrc"] = v_waterfall.TextsrcValidator() - self._validators["texttemplate"] = v_waterfall.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_waterfall.TexttemplatesrcValidator() - self._validators["totals"] = v_waterfall.TotalsValidator() - self._validators["uid"] = v_waterfall.UidValidator() - self._validators["uirevision"] = v_waterfall.UirevisionValidator() - self._validators["visible"] = v_waterfall.VisibleValidator() - self._validators["width"] = v_waterfall.WidthValidator() - self._validators["widthsrc"] = v_waterfall.WidthsrcValidator() - self._validators["x"] = v_waterfall.XValidator() - self._validators["x0"] = v_waterfall.X0Validator() - self._validators["xaxis"] = v_waterfall.XAxisValidator() - self._validators["xsrc"] = v_waterfall.XsrcValidator() - self._validators["y"] = v_waterfall.YValidator() - self._validators["y0"] = v_waterfall.Y0Validator() - self._validators["yaxis"] = v_waterfall.YAxisValidator() - self._validators["ysrc"] = v_waterfall.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("base", None) - self["base"] = base if base is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connector", None) - self["connector"] = connector if connector is not None else _v - _v = arg.pop("constraintext", None) - self["constraintext"] = constraintext if constraintext is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v - _v = arg.pop("insidetextanchor", None) - self["insidetextanchor"] = ( - insidetextanchor if insidetextanchor is not None else _v - ) - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("measure", None) - self["measure"] = measure if measure is not None else _v - _v = arg.pop("measuresrc", None) - self["measuresrc"] = measuresrc if measuresrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("offsetsrc", None) - self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("totals", None) - self["totals"] = totals if totals is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "waterfall" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="waterfall", val="waterfall" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Volume(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # caps - # ---- - @property - def caps(self): - """ - The 'caps' property is an instance of Caps - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Caps` - - A dict of string/value properties that will be passed - to the Caps constructor - - Supported dict properties: - - x - :class:`plotly.graph_objects.volume.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.caps.Z` - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.volume.Caps - """ - return self["caps"] - - @caps.setter - def caps(self, val): - self["caps"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here `value`) or the bounds set in - `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` - are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as `value` and if set, `cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as `value`. Has no effect when `cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as `value` and if set, `cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.volume. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.volume.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of volume.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.volume.colorbar.Ti - tle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - volume.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - volume.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.volume.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # contour - # ------- - @property - def contour(self): - """ - The 'contour' property is an instance of Contour - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Contour` - - A dict of string/value properties that will be passed - to the Contour constructor - - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. - - Returns - ------- - plotly.graph_objs.volume.Contour - """ - return self["contour"] - - @contour.setter - def contour(self, val): - self["contour"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # flatshading - # ----------- - @property - def flatshading(self): - """ - Determines whether or not normal smoothing is applied to the - meshes, creating meshes with an angular, low-poly look via flat - reflections. - - The 'flatshading' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["flatshading"] - - @flatshading.setter - def flatshading(self, val): - self["flatshading"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.volume.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # isomax - # ------ - @property - def isomax(self): - """ - Sets the maximum boundary for iso-surface plot. - - The 'isomax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["isomax"] - - @isomax.setter - def isomax(self, val): - self["isomax"] = val - - # isomin - # ------ - @property - def isomin(self): - """ - Sets the minimum boundary for iso-surface plot. - - The 'isomin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["isomin"] - - @isomin.setter - def isomin(self, val): - self["isomin"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lighting - # -------- - @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Lighting` - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - - Returns - ------- - plotly.graph_objs.volume.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): - """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Lightposition` - - A dict of string/value properties that will be passed - to the Lightposition constructor - - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.volume.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacityscale - # ------------ - @property - def opacityscale(self): - """ - Sets the opacityscale. The opacityscale must be an array - containing arrays mapping a normalized value to an opacity - value. At minimum, a mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], [0.5, 0.2], [1, - 1]]` means that higher/lower values would have higher opacity - values and those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette name string of - the following list: 'min', 'max', 'extremes' and 'uniform'. The - default is 'uniform'. - - The 'opacityscale' property accepts values of any type - - Returns - ------- - Any - """ - return self["opacityscale"] - - @opacityscale.setter - def opacityscale(self, val): - self["opacityscale"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # slices - # ------ - @property - def slices(self): - """ - The 'slices' property is an instance of Slices - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Slices` - - A dict of string/value properties that will be passed - to the Slices constructor - - Supported dict properties: - - x - :class:`plotly.graph_objects.volume.slices.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.slices.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.slices.Z` - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.volume.Slices - """ - return self["slices"] - - @slices.setter - def slices(self, val): - self["slices"] = val - - # spaceframe - # ---------- - @property - def spaceframe(self): - """ - The 'spaceframe' property is an instance of Spaceframe - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Spaceframe` - - A dict of string/value properties that will be passed - to the Spaceframe constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 1 meaning - that they are entirely shaded. Applying a - `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. - - Returns - ------- - plotly.graph_objs.volume.Spaceframe - """ - return self["spaceframe"] - - @spaceframe.setter - def spaceframe(self, val): - self["spaceframe"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.volume.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # surface - # ------- - @property - def surface(self): - """ - The 'surface' property is an instance of Surface - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.Surface` - - A dict of string/value properties that will be passed - to the Surface constructor - - Supported dict properties: - - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. - - Returns - ------- - plotly.graph_objs.volume.Surface - """ - return self["surface"] - - @surface.setter - def surface(self, val): - self["surface"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with the vertices. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the 4th dimension (value) of the vertices. - - The 'value' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valuesrc - # -------- - @property - def valuesrc(self): - """ - Sets the source reference on Chart Studio Cloud for value . - - The 'valuesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuesrc"] - - @valuesrc.setter - def valuesrc(self, val): - self["valuesrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the X coordinates of the vertices on X axis. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the Y coordinates of the vertices on Y axis. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the Z coordinates of the vertices on Z axis. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.volume.Caps` instance or - dict with compatible properties - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.volume.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.volume.Contour` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.volume.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.volume.Lighting` instance - or dict with compatible properties - lightposition - :class:`plotly.graph_objects.volume.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be an - array containing arrays mapping a normalized value to - an opacity value. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For example, - `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and those in - the middle would be more transparent Alternatively, - `opacityscale` may be a palette name string of the - following list: 'min', 'max', 'extremes' and 'uniform'. - The default is 'uniform'. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - slices - :class:`plotly.graph_objects.volume.Slices` instance or - dict with compatible properties - spaceframe - :class:`plotly.graph_objects.volume.Spaceframe` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.volume.Stream` instance or - dict with compatible properties - surface - :class:`plotly.graph_objects.volume.Surface` instance - or dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on Chart Studio Cloud for - value . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices on X axis. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the Y coordinates of the vertices on Y axis. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the Z coordinates of the vertices on Z axis. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legendgroup=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuesrc=None, - visible=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Volume object - - Draws volume trace between iso-min and iso-max values with - coordinates given by four 1-dimensional arrays containing the - `value`, `x`, `y` and `z` of every vertex of a uniform or non- - uniform 3-D grid. Horizontal or vertical slices, caps as well - as spaceframe between iso-min and iso-max values could also be - drawn using this trace. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Volume` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.volume.Caps` instance or - dict with compatible properties - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.volume.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.volume.Contour` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.volume.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.volume.Lighting` instance - or dict with compatible properties - lightposition - :class:`plotly.graph_objects.volume.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be an - array containing arrays mapping a normalized value to - an opacity value. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For example, - `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and those in - the middle would be more transparent Alternatively, - `opacityscale` may be a palette name string of the - following list: 'min', 'max', 'extremes' and 'uniform'. - The default is 'uniform'. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - slices - :class:`plotly.graph_objects.volume.Slices` instance or - dict with compatible properties - spaceframe - :class:`plotly.graph_objects.volume.Spaceframe` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.volume.Stream` instance or - dict with compatible properties - surface - :class:`plotly.graph_objects.volume.Surface` instance - or dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on Chart Studio Cloud for - value . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices on X axis. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the Y coordinates of the vertices on Y axis. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the Z coordinates of the vertices on Z axis. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Volume - """ - super(Volume, self).__init__("volume") - - # Validate arg - # ------------ - 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.Volume -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Volume`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import volume as v_volume - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_volume.AutocolorscaleValidator() - self._validators["caps"] = v_volume.CapsValidator() - self._validators["cauto"] = v_volume.CautoValidator() - self._validators["cmax"] = v_volume.CmaxValidator() - self._validators["cmid"] = v_volume.CmidValidator() - self._validators["cmin"] = v_volume.CminValidator() - self._validators["coloraxis"] = v_volume.ColoraxisValidator() - self._validators["colorbar"] = v_volume.ColorBarValidator() - self._validators["colorscale"] = v_volume.ColorscaleValidator() - self._validators["contour"] = v_volume.ContourValidator() - self._validators["customdata"] = v_volume.CustomdataValidator() - self._validators["customdatasrc"] = v_volume.CustomdatasrcValidator() - self._validators["flatshading"] = v_volume.FlatshadingValidator() - self._validators["hoverinfo"] = v_volume.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_volume.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_volume.HoverlabelValidator() - self._validators["hovertemplate"] = v_volume.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_volume.HovertemplatesrcValidator() - self._validators["hovertext"] = v_volume.HovertextValidator() - self._validators["hovertextsrc"] = v_volume.HovertextsrcValidator() - self._validators["ids"] = v_volume.IdsValidator() - self._validators["idssrc"] = v_volume.IdssrcValidator() - self._validators["isomax"] = v_volume.IsomaxValidator() - self._validators["isomin"] = v_volume.IsominValidator() - self._validators["legendgroup"] = v_volume.LegendgroupValidator() - self._validators["lighting"] = v_volume.LightingValidator() - self._validators["lightposition"] = v_volume.LightpositionValidator() - self._validators["meta"] = v_volume.MetaValidator() - self._validators["metasrc"] = v_volume.MetasrcValidator() - self._validators["name"] = v_volume.NameValidator() - self._validators["opacity"] = v_volume.OpacityValidator() - self._validators["opacityscale"] = v_volume.OpacityscaleValidator() - self._validators["reversescale"] = v_volume.ReversescaleValidator() - self._validators["scene"] = v_volume.SceneValidator() - self._validators["showlegend"] = v_volume.ShowlegendValidator() - self._validators["showscale"] = v_volume.ShowscaleValidator() - self._validators["slices"] = v_volume.SlicesValidator() - self._validators["spaceframe"] = v_volume.SpaceframeValidator() - self._validators["stream"] = v_volume.StreamValidator() - self._validators["surface"] = v_volume.SurfaceValidator() - self._validators["text"] = v_volume.TextValidator() - self._validators["textsrc"] = v_volume.TextsrcValidator() - self._validators["uid"] = v_volume.UidValidator() - self._validators["uirevision"] = v_volume.UirevisionValidator() - self._validators["value"] = v_volume.ValueValidator() - self._validators["valuesrc"] = v_volume.ValuesrcValidator() - self._validators["visible"] = v_volume.VisibleValidator() - self._validators["x"] = v_volume.XValidator() - self._validators["xsrc"] = v_volume.XsrcValidator() - self._validators["y"] = v_volume.YValidator() - self._validators["ysrc"] = v_volume.YsrcValidator() - self._validators["z"] = v_volume.ZValidator() - self._validators["zsrc"] = v_volume.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("caps", None) - self["caps"] = caps if caps is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("flatshading", None) - self["flatshading"] = flatshading if flatshading is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("isomax", None) - self["isomax"] = isomax if isomax is not None else _v - _v = arg.pop("isomin", None) - self["isomin"] = isomin if isomin is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacityscale", None) - self["opacityscale"] = opacityscale if opacityscale is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("slices", None) - self["slices"] = slices if slices is not None else _v - _v = arg.pop("spaceframe", None) - self["spaceframe"] = spaceframe if spaceframe is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("surface", None) - self["surface"] = surface if surface is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valuesrc", None) - self["valuesrc"] = valuesrc if valuesrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "volume" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="volume", val="volume" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Violin(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val - - # bandwidth - # --------- - @property - def bandwidth(self): - """ - Sets the bandwidth used to compute the kernel density estimate. - By default, the bandwidth is determined by Silverman's rule of - thumb. - - The 'bandwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["bandwidth"] - - @bandwidth.setter - def bandwidth(self, val): - self["bandwidth"] = val - - # box - # --- - @property - def box(self): - """ - The 'box' property is an instance of Box - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Box` - - A dict of string/value properties that will be passed - to the Box constructor - - Supported dict properties: - - fillcolor - Sets the inner box plot fill color. - line - :class:`plotly.graph_objects.violin.box.Line` - instance or dict with compatible properties - visible - Determines if an miniature box plot is drawn - inside the violins. - width - Sets the width of the inner box plots relative - to the violins' width. For example, with 1, the - inner box plots are as wide as the violins. - - Returns - ------- - plotly.graph_objs.violin.Box - """ - return self["box"] - - @box.setter - def box(self, val): - self["box"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.violin.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual violins or sample - points or the kernel density estimate or any combination of - them? - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['violins', 'points', 'kde'] joined with '+' characters - (e.g. 'violins+points') - OR exactly one of ['all'] (e.g. 'all') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # jitter - # ------ - @property - def jitter(self): - """ - Sets the amount of jitter in the sample points drawn. If 0, the - sample points align along the distribution axis. If 1, the - sample points are drawn in a random jitter of width equal to - the width of the violins. - - The 'jitter' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["jitter"] - - @jitter.setter - def jitter(self, val): - self["jitter"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the - violin(s). - - Returns - ------- - plotly.graph_objs.violin.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.violin.marker.Line - ` instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - - Returns - ------- - plotly.graph_objs.violin.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meanline - # -------- - @property - def meanline(self): - """ - The 'meanline' property is an instance of Meanline - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Meanline` - - A dict of string/value properties that will be passed - to the Meanline constructor - - Supported dict properties: - - color - Sets the mean line color. - visible - Determines if a line corresponding to the - sample's mean is shown inside the violins. If - `box.visible` is turned on, the mean line is - drawn inside the inner box. Otherwise, the mean - line is drawn from one side of the violin to - other. - width - Sets the mean line width. - - Returns - ------- - plotly.graph_objs.violin.Meanline - """ - return self["meanline"] - - @meanline.setter - def meanline(self, val): - self["meanline"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. For violin traces, the name will also be used for - the position coordinate, if `x` and `x0` (`y` and `y0` if - horizontal) are missing and the position axis is categorical. - Note that the trace name is also used as a default value for - attribute `scalegroup` (please see its description for - details). - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the violin(s). If "v" ("h"), the - distribution is visualized along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # pointpos - # -------- - @property - def pointpos(self): - """ - Sets the position of the sample points in relation to the - violins. If 0, the sample points are places over the center of - the violins. Positive (negative) values correspond to positions - to the right (left) for vertical violins and above (below) for - horizontal violins. - - The 'pointpos' property is a number and may be specified as: - - An int or float in the interval [-2, 2] - - Returns - ------- - int|float - """ - return self["pointpos"] - - @pointpos.setter - def pointpos(self, val): - self["pointpos"] = val - - # points - # ------ - @property - def points(self): - """ - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier points - are shown and points either less than 4*Q1-3*Q3 or greater than - 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all - sample points are shown If False, only the violins are shown - with no sample points. Defaults to "suspectedoutliers" when - `marker.outliercolor` or `marker.line.outliercolor` is set, - otherwise defaults to "outliers". - - The 'points' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'outliers', 'suspectedoutliers', False] - - Returns - ------- - Any - """ - return self["points"] - - @points.setter - def points(self, val): - self["points"] = val - - # scalegroup - # ---------- - @property - def scalegroup(self): - """ - If there are multiple violins that should be sized according to - to some metric (see `scalemode`), link them by providing a non- - empty group id here shared by every trace in the same group. If - a violin's `width` is undefined, `scalegroup` will default to - the trace's name. In this case, violins with the same names - will be linked together - - The 'scalegroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["scalegroup"] - - @scalegroup.setter - def scalegroup(self, val): - self["scalegroup"] = val - - # scalemode - # --------- - @property - def scalemode(self): - """ - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number of - sample points makingup each violin. - - The 'scalemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['width', 'count'] - - Returns - ------- - Any - """ - return self["scalemode"] - - @scalemode.setter - def scalemode(self, val): - self["scalemode"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.violin.selected.Ma - rker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.violin.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # side - # ---- - @property - def side(self): - """ - Determines on which side of the position value the density - function making up one half of a violin is plotted. Useful when - comparing two violin traces under "overlay" mode, where one - trace has `side` set to "positive" and the other to "negative". - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['both', 'positive', 'negative'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # span - # ---- - @property - def span(self): - """ - Sets the span in data space for which the density function will - be computed. Has an effect only when `spanmode` is set to - "manual". - - The 'span' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'span[0]' property accepts values of any type - (1) The 'span[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["span"] - - @span.setter - def span(self, val): - self["span"] = val - - # spanmode - # -------- - @property - def spanmode(self): - """ - Sets the method by which the span in data space where the - density function will be computed. "soft" means the span goes - from the sample's minimum value minus two bandwidths to the - sample's maximum value plus two bandwidths. "hard" means the - span goes from the sample's minimum to its maximum value. For - custom span settings, use mode "manual" and fill in the `span` - attribute. - - The 'spanmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['soft', 'hard', 'manual'] - - Returns - ------- - Any - """ - return self["spanmode"] - - @spanmode.setter - def spanmode(self, val): - self["spanmode"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.violin.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each sample value. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.violin.unselected. - Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.violin.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the violin in data coordinates. If 0 (default - value) the width is automatically selected based on the - positions of other violin traces in the same subplot. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # x - # - - @property - def x(self): - """ - Sets the x sample data or coordinates. See overview for more - info. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Sets the x coordinate for single-box traces or the starting - coordinate for multi-box traces set using q1/median/q3. See - overview for more info. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y sample data or coordinates. See overview for more - info. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Sets the y coordinate for single-box traces or the starting - coordinate for multi-box traces set using q1/median/q3. See - overview for more info. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - bandwidth - Sets the bandwidth used to compute the kernel density - estimate. By default, the bandwidth is determined by - Silverman's rule of thumb. - box - :class:`plotly.graph_objects.violin.Box` instance or - dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.violin.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual violins or - sample points or the kernel density estimate or any - combination of them? - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the violins. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.violin.Line` instance or - dict with compatible properties - marker - :class:`plotly.graph_objects.violin.Marker` instance or - dict with compatible properties - meanline - :class:`plotly.graph_objects.violin.Meanline` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. For violin traces, the name - will also be used for the position coordinate, if `x` - and `x0` (`y` and `y0` if horizontal) are missing and - the position axis is categorical. Note that the trace - name is also used as a default value for attribute - `scalegroup` (please see its description for details). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" ("h"), - the distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the violins. If 0, the sample points are places over - the center of the violins. Positive (negative) values - correspond to positions to the right (left) for - vertical violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the violins are shown with no sample - points. Defaults to "suspectedoutliers" when - `marker.outliercolor` or `marker.line.outliercolor` is - set, otherwise defaults to "outliers". - scalegroup - If there are multiple violins that should be sized - according to to some metric (see `scalemode`), link - them by providing a non-empty group id here shared by - every trace in the same group. If a violin's `width` is - undefined, `scalegroup` will default to the trace's - name. In this case, violins with the same names will be - linked together - scalemode - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number - of sample points makingup each violin. - selected - :class:`plotly.graph_objects.violin.Selected` instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - side - Determines on which side of the position value the - density function making up one half of a violin is - plotted. Useful when comparing two violin traces under - "overlay" mode, where one trace has `side` set to - "positive" and the other to "negative". - span - Sets the span in data space for which the density - function will be computed. Has an effect only when - `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space where - the density function will be computed. "soft" means the - span goes from the sample's minimum value minus two - bandwidths to the sample's maximum value plus two - bandwidths. "hard" means the span goes from the - sample's minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the `span` - attribute. - stream - :class:`plotly.graph_objects.violin.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.violin.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the width of the violin in data coordinates. If 0 - (default value) the width is automatically selected - based on the positions of other violin traces in the - same subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - alignmentgroup=None, - bandwidth=None, - box=None, - customdata=None, - customdatasrc=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legendgroup=None, - line=None, - marker=None, - meanline=None, - meta=None, - metasrc=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - points=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Violin object - - In vertical (horizontal) violin plots, statistics are computed - using `y` (`x`) values. By supplying an `x` (`y`) array, one - violin per distinct x (y) value is drawn If no `x` (`y`) list - is provided, a single violin is drawn. That violin position is - then positioned with with `name` or with `x0` (`y0`) if - provided. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Violin` - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - bandwidth - Sets the bandwidth used to compute the kernel density - estimate. By default, the bandwidth is determined by - Silverman's rule of thumb. - box - :class:`plotly.graph_objects.violin.Box` instance or - dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.violin.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual violins or - sample points or the kernel density estimate or any - combination of them? - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the violins. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.violin.Line` instance or - dict with compatible properties - marker - :class:`plotly.graph_objects.violin.Marker` instance or - dict with compatible properties - meanline - :class:`plotly.graph_objects.violin.Meanline` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. For violin traces, the name - will also be used for the position coordinate, if `x` - and `x0` (`y` and `y0` if horizontal) are missing and - the position axis is categorical. Note that the trace - name is also used as a default value for attribute - `scalegroup` (please see its description for details). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" ("h"), - the distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the violins. If 0, the sample points are places over - the center of the violins. Positive (negative) values - correspond to positions to the right (left) for - vertical violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the violins are shown with no sample - points. Defaults to "suspectedoutliers" when - `marker.outliercolor` or `marker.line.outliercolor` is - set, otherwise defaults to "outliers". - scalegroup - If there are multiple violins that should be sized - according to to some metric (see `scalemode`), link - them by providing a non-empty group id here shared by - every trace in the same group. If a violin's `width` is - undefined, `scalegroup` will default to the trace's - name. In this case, violins with the same names will be - linked together - scalemode - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number - of sample points makingup each violin. - selected - :class:`plotly.graph_objects.violin.Selected` instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - side - Determines on which side of the position value the - density function making up one half of a violin is - plotted. Useful when comparing two violin traces under - "overlay" mode, where one trace has `side` set to - "positive" and the other to "negative". - span - Sets the span in data space for which the density - function will be computed. Has an effect only when - `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space where - the density function will be computed. "soft" means the - span goes from the sample's minimum value minus two - bandwidths to the sample's maximum value plus two - bandwidths. "hard" means the span goes from the - sample's minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the `span` - attribute. - stream - :class:`plotly.graph_objects.violin.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.violin.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the width of the violin in data coordinates. If 0 - (default value) the width is automatically selected - based on the positions of other violin traces in the - same subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Violin - """ - super(Violin, self).__init__("violin") - - # Validate arg - # ------------ - 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.Violin -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Violin`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import violin as v_violin - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_violin.AlignmentgroupValidator() - self._validators["bandwidth"] = v_violin.BandwidthValidator() - self._validators["box"] = v_violin.BoxValidator() - self._validators["customdata"] = v_violin.CustomdataValidator() - self._validators["customdatasrc"] = v_violin.CustomdatasrcValidator() - self._validators["fillcolor"] = v_violin.FillcolorValidator() - self._validators["hoverinfo"] = v_violin.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_violin.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_violin.HoverlabelValidator() - self._validators["hoveron"] = v_violin.HoveronValidator() - self._validators["hovertemplate"] = v_violin.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_violin.HovertemplatesrcValidator() - self._validators["hovertext"] = v_violin.HovertextValidator() - self._validators["hovertextsrc"] = v_violin.HovertextsrcValidator() - self._validators["ids"] = v_violin.IdsValidator() - self._validators["idssrc"] = v_violin.IdssrcValidator() - self._validators["jitter"] = v_violin.JitterValidator() - self._validators["legendgroup"] = v_violin.LegendgroupValidator() - self._validators["line"] = v_violin.LineValidator() - self._validators["marker"] = v_violin.MarkerValidator() - self._validators["meanline"] = v_violin.MeanlineValidator() - self._validators["meta"] = v_violin.MetaValidator() - self._validators["metasrc"] = v_violin.MetasrcValidator() - self._validators["name"] = v_violin.NameValidator() - self._validators["offsetgroup"] = v_violin.OffsetgroupValidator() - self._validators["opacity"] = v_violin.OpacityValidator() - self._validators["orientation"] = v_violin.OrientationValidator() - self._validators["pointpos"] = v_violin.PointposValidator() - self._validators["points"] = v_violin.PointsValidator() - self._validators["scalegroup"] = v_violin.ScalegroupValidator() - self._validators["scalemode"] = v_violin.ScalemodeValidator() - self._validators["selected"] = v_violin.SelectedValidator() - self._validators["selectedpoints"] = v_violin.SelectedpointsValidator() - self._validators["showlegend"] = v_violin.ShowlegendValidator() - self._validators["side"] = v_violin.SideValidator() - self._validators["span"] = v_violin.SpanValidator() - self._validators["spanmode"] = v_violin.SpanmodeValidator() - self._validators["stream"] = v_violin.StreamValidator() - self._validators["text"] = v_violin.TextValidator() - self._validators["textsrc"] = v_violin.TextsrcValidator() - self._validators["uid"] = v_violin.UidValidator() - self._validators["uirevision"] = v_violin.UirevisionValidator() - self._validators["unselected"] = v_violin.UnselectedValidator() - self._validators["visible"] = v_violin.VisibleValidator() - self._validators["width"] = v_violin.WidthValidator() - self._validators["x"] = v_violin.XValidator() - self._validators["x0"] = v_violin.X0Validator() - self._validators["xaxis"] = v_violin.XAxisValidator() - self._validators["xsrc"] = v_violin.XsrcValidator() - self._validators["y"] = v_violin.YValidator() - self._validators["y0"] = v_violin.Y0Validator() - self._validators["yaxis"] = v_violin.YAxisValidator() - self._validators["ysrc"] = v_violin.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("bandwidth", None) - self["bandwidth"] = bandwidth if bandwidth is not None else _v - _v = arg.pop("box", None) - self["box"] = box if box is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("jitter", None) - self["jitter"] = jitter if jitter is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meanline", None) - self["meanline"] = meanline if meanline is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("pointpos", None) - self["pointpos"] = pointpos if pointpos is not None else _v - _v = arg.pop("points", None) - self["points"] = points if points is not None else _v - _v = arg.pop("scalegroup", None) - self["scalegroup"] = scalegroup if scalegroup is not None else _v - _v = arg.pop("scalemode", None) - self["scalemode"] = scalemode if scalemode is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("span", None) - self["span"] = span if span is not None else _v - _v = arg.pop("spanmode", None) - self["spanmode"] = spanmode if spanmode is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "violin" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="violin", val="violin" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Treemap(_BaseTraceType): - - # branchvalues - # ------------ - @property - def branchvalues(self): - """ - Determines how the items in `values` are summed. When set to - "total", items in `values` are taken to be value of all its - descendants. When set to "remainder", items in `values` - corresponding to the root and the branches sectors are taken to - be the extra part not part of the sum of the values at their - leaves. - - The 'branchvalues' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['remainder', 'total'] - - Returns - ------- - Any - """ - return self["branchvalues"] - - @branchvalues.setter - def branchvalues(self, val): - self["branchvalues"] = val - - # count - # ----- - @property - def count(self): - """ - Determines default for `values` when it is not provided, by - inferring a 1 for each of the "leaves" and/or "branches", - otherwise 0. - - The 'count' property is a flaglist and may be specified - as a string containing: - - Any combination of ['branches', 'leaves'] joined with '+' characters - (e.g. 'branches+leaves') - - Returns - ------- - Any - """ - return self["count"] - - @count.setter - def count(self, val): - self["count"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this treemap trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this treemap trace . - x - Sets the horizontal domain of this treemap - trace (in plot fraction). - y - Sets the vertical domain of this treemap trace - (in plot fraction). - - Returns - ------- - plotly.graph_objs.treemap.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.treemap.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry` and `percentParent`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.treemap.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # labels - # ------ - @property - def labels(self): - """ - Sets the labels of each of the sectors. - - The 'labels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["labels"] - - @labels.setter - def labels(self, val): - self["labels"] = val - - # labelssrc - # --------- - @property - def labelssrc(self): - """ - Sets the source reference on Chart Studio Cloud for labels . - - The 'labelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["labelssrc"] - - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val - - # level - # ----- - @property - def level(self): - """ - Sets the level from which this trace hierarchy is rendered. Set - `level` to `''` to start from the root node in the hierarchy. - Must be an "id" if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - - The 'level' property accepts values of any type - - Returns - ------- - Any - """ - return self["level"] - - @level.setter - def level(self, val): - self["level"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colorsis set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colorsis - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colorsis set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.treemap.marker.Col - orBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colorsis set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - depthfade - Determines if the sector colors are faded - towards the background from the leaves up to - the headers. This option is unavailable when a - `colorscale` is present, defaults to false when - `marker.colors` is set, but otherwise defaults - to true. When set to "reversed", the fading - direction is inverted, that is the top elements - within hierarchy are drawn with fully saturated - colors while the leaves are faded towards the - background color. - line - :class:`plotly.graph_objects.treemap.marker.Lin - e` instance or dict with compatible properties - pad - :class:`plotly.graph_objects.treemap.marker.Pad - ` instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an - effect only if colorsis set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colorsis set to a numerical array. - - Returns - ------- - plotly.graph_objs.treemap.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # maxdepth - # -------- - @property - def maxdepth(self): - """ - Sets the number of rendered sectors from any given `level`. Set - `maxdepth` to "-1" to render all the levels in the hierarchy. - - The 'maxdepth' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - - Returns - ------- - int - """ - return self["maxdepth"] - - @maxdepth.setter - def maxdepth(self, val): - self["maxdepth"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `textinfo` lying outside the sector. - This option refers to the root of the hierarchy presented on - top left corner of a treemap graph. Please note that if a - hierarchy has multiple root nodes, this option won't have any - effect and `insidetextfont` would be used. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Outsidetextfont` - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.treemap.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # parents - # ------- - @property - def parents(self): - """ - Sets the parent sectors for each of the sectors. Empty string - items '' are understood to reference the root node in the - hierarchy. If `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, plotly attempts - to find matching items in `labels`, but beware they must be - unique. - - The 'parents' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["parents"] - - @parents.setter - def parents(self, val): - self["parents"] = val - - # parentssrc - # ---------- - @property - def parentssrc(self): - """ - Sets the source reference on Chart Studio Cloud for parents . - - The 'parentssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["parentssrc"] - - @parentssrc.setter - def parentssrc(self, val): - self["parentssrc"] = val - - # pathbar - # ------- - @property - def pathbar(self): - """ - The 'pathbar' property is an instance of Pathbar - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Pathbar` - - A dict of string/value properties that will be passed - to the Pathbar constructor - - Supported dict properties: - - edgeshape - Determines which shape is used for edges - between `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used - with 3 pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. - outside the trace `domain` and with one pixel - gap. - - Returns - ------- - plotly.graph_objs.treemap.Pathbar - """ - return self["pathbar"] - - @pathbar.setter - def pathbar(self, val): - self["pathbar"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.treemap.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `textinfo`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.treemap.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Sets the positions of the `text` elements. - - 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 - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry`, `percentParent`, `label` and - `value`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # tiling - # ------ - @property - def tiling(self): - """ - The 'tiling' property is an instance of Tiling - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.Tiling` - - A dict of string/value properties that will be passed - to the Tiling constructor - - Supported dict properties: - - flip - Determines if the positions obtained from - solver are flipped on each axis. - packing - Determines d3 treemap solver. For more info - please refer to - https://github.com/d3/d3-hierarchy#treemap- - tiling - pad - Sets the inner padding (in px). - squarifyratio - When using "squarify" `packing` algorithm, - according to https://github.com/d3/d3-hierarchy - /blob/master/README.md#squarify_ratio this - option specifies the desired aspect ratio of - the generated rectangles. The ratio must be - specified as a number greater than or equal to - one. Note that the orientation of the generated - rectangles (tall or wide) is not implied by the - ratio; for example, a ratio of two will attempt - to produce a mixture of rectangles whose - width:height ratio is either 2:1 or 1:2. When - using "squarify", unlike d3 which uses the - Golden Ratio i.e. 1.618034, Plotly applies 1 to - increase squares in treemap layouts. - - Returns - ------- - plotly.graph_objs.treemap.Tiling - """ - return self["tiling"] - - @tiling.setter - def tiling(self, val): - self["tiling"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the values associated with each of the sectors. Use with - `branchvalues` to determine how the values are summed. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - branchvalues - Determines how the items in `values` are summed. When - set to "total", items in `values` are taken to be value - of all its descendants. When set to "remainder", items - in `values` corresponding to the root and the branches - sectors are taken to be the extra part not part of the - sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the "leaves" - and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.treemap.Domain` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.treemap.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `currentPath`, `root`, - `entry`, `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - level - Sets the level from which this trace hierarchy is - rendered. Set `level` to `''` to start from the root - node in the hierarchy. Must be an "id" if `ids` is - filled in, otherwise plotly attempts to find a matching - item in `labels`. - marker - :class:`plotly.graph_objects.treemap.Marker` instance - or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any given - `level`. Set `maxdepth` to "-1" to render all the - levels in the hierarchy. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. This option refers to the root of the hierarchy - presented on top left corner of a treemap graph. Please - note that if a hierarchy has multiple root nodes, this - option won't have any effect and `insidetextfont` would - be used. - parents - Sets the parent sectors for each of the sectors. Empty - string items '' are understood to reference the root - node in the hierarchy. If `ids` is filled, `parents` - items are understood to be "ids" themselves. When `ids` - is not set, plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud for - parents . - pathbar - :class:`plotly.graph_objects.treemap.Pathbar` instance - or dict with compatible properties - stream - :class:`plotly.graph_objects.treemap.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Sets the positions of the `text` elements. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - tiling - :class:`plotly.graph_objects.treemap.Tiling` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values associated with each of the sectors. - Use with `branchvalues` to determine how the values are - summed. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Treemap object - - Visualize hierarchal data from leaves (and/or outer branches) - towards root with rectangles. The treemap sectors are - determined by the entries in "labels" or "ids" and in - "parents". - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Treemap` - branchvalues - Determines how the items in `values` are summed. When - set to "total", items in `values` are taken to be value - of all its descendants. When set to "remainder", items - in `values` corresponding to the root and the branches - sectors are taken to be the extra part not part of the - sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the "leaves" - and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.treemap.Domain` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.treemap.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `currentPath`, `root`, - `entry`, `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - level - Sets the level from which this trace hierarchy is - rendered. Set `level` to `''` to start from the root - node in the hierarchy. Must be an "id" if `ids` is - filled in, otherwise plotly attempts to find a matching - item in `labels`. - marker - :class:`plotly.graph_objects.treemap.Marker` instance - or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any given - `level`. Set `maxdepth` to "-1" to render all the - levels in the hierarchy. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. This option refers to the root of the hierarchy - presented on top left corner of a treemap graph. Please - note that if a hierarchy has multiple root nodes, this - option won't have any effect and `insidetextfont` would - be used. - parents - Sets the parent sectors for each of the sectors. Empty - string items '' are understood to reference the root - node in the hierarchy. If `ids` is filled, `parents` - items are understood to be "ids" themselves. When `ids` - is not set, plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud for - parents . - pathbar - :class:`plotly.graph_objects.treemap.Pathbar` instance - or dict with compatible properties - stream - :class:`plotly.graph_objects.treemap.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Sets the positions of the `text` elements. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - tiling - :class:`plotly.graph_objects.treemap.Tiling` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values associated with each of the sectors. - Use with `branchvalues` to determine how the values are - summed. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Treemap - """ - super(Treemap, self).__init__("treemap") - - # Validate arg - # ------------ - 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.Treemap -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Treemap`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import treemap as v_treemap - - # Initialize validators - # --------------------- - self._validators["branchvalues"] = v_treemap.BranchvaluesValidator() - self._validators["count"] = v_treemap.CountValidator() - self._validators["customdata"] = v_treemap.CustomdataValidator() - self._validators["customdatasrc"] = v_treemap.CustomdatasrcValidator() - self._validators["domain"] = v_treemap.DomainValidator() - self._validators["hoverinfo"] = v_treemap.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_treemap.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_treemap.HoverlabelValidator() - self._validators["hovertemplate"] = v_treemap.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_treemap.HovertemplatesrcValidator() - self._validators["hovertext"] = v_treemap.HovertextValidator() - self._validators["hovertextsrc"] = v_treemap.HovertextsrcValidator() - self._validators["ids"] = v_treemap.IdsValidator() - self._validators["idssrc"] = v_treemap.IdssrcValidator() - self._validators["insidetextfont"] = v_treemap.InsidetextfontValidator() - self._validators["labels"] = v_treemap.LabelsValidator() - self._validators["labelssrc"] = v_treemap.LabelssrcValidator() - self._validators["level"] = v_treemap.LevelValidator() - self._validators["marker"] = v_treemap.MarkerValidator() - self._validators["maxdepth"] = v_treemap.MaxdepthValidator() - self._validators["meta"] = v_treemap.MetaValidator() - self._validators["metasrc"] = v_treemap.MetasrcValidator() - self._validators["name"] = v_treemap.NameValidator() - self._validators["opacity"] = v_treemap.OpacityValidator() - self._validators["outsidetextfont"] = v_treemap.OutsidetextfontValidator() - self._validators["parents"] = v_treemap.ParentsValidator() - self._validators["parentssrc"] = v_treemap.ParentssrcValidator() - self._validators["pathbar"] = v_treemap.PathbarValidator() - self._validators["stream"] = v_treemap.StreamValidator() - self._validators["text"] = v_treemap.TextValidator() - self._validators["textfont"] = v_treemap.TextfontValidator() - self._validators["textinfo"] = v_treemap.TextinfoValidator() - self._validators["textposition"] = v_treemap.TextpositionValidator() - self._validators["textsrc"] = v_treemap.TextsrcValidator() - self._validators["texttemplate"] = v_treemap.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_treemap.TexttemplatesrcValidator() - self._validators["tiling"] = v_treemap.TilingValidator() - self._validators["uid"] = v_treemap.UidValidator() - self._validators["uirevision"] = v_treemap.UirevisionValidator() - self._validators["values"] = v_treemap.ValuesValidator() - self._validators["valuessrc"] = v_treemap.ValuessrcValidator() - self._validators["visible"] = v_treemap.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("branchvalues", None) - self["branchvalues"] = branchvalues if branchvalues is not None else _v - _v = arg.pop("count", None) - self["count"] = count if count is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v - _v = arg.pop("level", None) - self["level"] = level if level is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("maxdepth", None) - self["maxdepth"] = maxdepth if maxdepth is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("parents", None) - self["parents"] = parents if parents is not None else _v - _v = arg.pop("parentssrc", None) - self["parentssrc"] = parentssrc if parentssrc is not None else _v - _v = arg.pop("pathbar", None) - self["pathbar"] = pathbar if pathbar is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("tiling", None) - self["tiling"] = tiling if tiling is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "treemap" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="treemap", val="treemap" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Table(_BaseTraceType): - - # cells - # ----- - @property - def cells(self): - """ - The 'cells' property is an instance of Cells - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.Cells` - - A dict of string/value properties that will be passed - to the Cells constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - fill - :class:`plotly.graph_objects.table.cells.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.cells.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud - for format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.cells.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for suffix . - values - Cell values. `values[m][n]` represents the - value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - - Returns - ------- - plotly.graph_objs.table.Cells - """ - return self["cells"] - - @cells.setter - def cells(self, val): - self["cells"] = val - - # columnorder - # ----------- - @property - def columnorder(self): - """ - Specifies the rendered order of the data columns; for example, - a value `2` at position `0` means that column index `0` in the - data will be rendered as the third column, as columns have an - index base of zero. - - The 'columnorder' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["columnorder"] - - @columnorder.setter - def columnorder(self, val): - self["columnorder"] = val - - # columnordersrc - # -------------- - @property - def columnordersrc(self): - """ - Sets the source reference on Chart Studio Cloud for - columnorder . - - The 'columnordersrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["columnordersrc"] - - @columnordersrc.setter - def columnordersrc(self, val): - self["columnordersrc"] = val - - # columnwidth - # ----------- - @property - def columnwidth(self): - """ - The width of columns expressed as a ratio. Columns fill the - available width in proportion of their specified column widths. - - The 'columnwidth' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["columnwidth"] - - @columnwidth.setter - def columnwidth(self, val): - self["columnwidth"] = val - - # columnwidthsrc - # -------------- - @property - def columnwidthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - columnwidth . - - The 'columnwidthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["columnwidthsrc"] - - @columnwidthsrc.setter - def columnwidthsrc(self, val): - self["columnwidthsrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this table trace . - row - If there is a layout grid, use the domain for - this row in the grid for this table trace . - x - Sets the horizontal domain of this table trace - (in plot fraction). - y - Sets the vertical domain of this table trace - (in plot fraction). - - Returns - ------- - plotly.graph_objs.table.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # header - # ------ - @property - def header(self): - """ - The 'header' property is an instance of Header - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.Header` - - A dict of string/value properties that will be passed - to the Header constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - fill - :class:`plotly.graph_objects.table.header.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.header.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud - for format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.header.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for suffix . - values - Header cell values. `values[m][n]` represents - the value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - - Returns - ------- - plotly.graph_objs.table.Header - """ - return self["header"] - - @header.setter - def header(self, val): - self["header"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.table.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.table.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - cells - :class:`plotly.graph_objects.table.Cells` instance or - dict with compatible properties - columnorder - Specifies the rendered order of the data columns; for - example, a value `2` at position `0` means that column - index `0` in the data will be rendered as the third - column, as columns have an index base of zero. - columnordersrc - Sets the source reference on Chart Studio Cloud for - columnorder . - columnwidth - The width of columns expressed as a ratio. Columns fill - the available width in proportion of their specified - column widths. - columnwidthsrc - Sets the source reference on Chart Studio Cloud for - columnwidth . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.table.Domain` instance or - dict with compatible properties - header - :class:`plotly.graph_objects.table.Header` instance or - dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.table.Hoverlabel` instance - or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - stream - :class:`plotly.graph_objects.table.Stream` instance or - dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - cells=None, - columnorder=None, - columnordersrc=None, - columnwidth=None, - columnwidthsrc=None, - customdata=None, - customdatasrc=None, - domain=None, - header=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - meta=None, - metasrc=None, - name=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new Table object - - Table view for detailed data viewing. The data are arranged in - a grid of rows and columns. Most styling can be specified for - columns, rows or individual cells. Table is using a column- - major order, ie. the grid is represented as a vector of column - vectors. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Table` - cells - :class:`plotly.graph_objects.table.Cells` instance or - dict with compatible properties - columnorder - Specifies the rendered order of the data columns; for - example, a value `2` at position `0` means that column - index `0` in the data will be rendered as the third - column, as columns have an index base of zero. - columnordersrc - Sets the source reference on Chart Studio Cloud for - columnorder . - columnwidth - The width of columns expressed as a ratio. Columns fill - the available width in proportion of their specified - column widths. - columnwidthsrc - Sets the source reference on Chart Studio Cloud for - columnwidth . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.table.Domain` instance or - dict with compatible properties - header - :class:`plotly.graph_objects.table.Header` instance or - dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.table.Hoverlabel` instance - or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - stream - :class:`plotly.graph_objects.table.Stream` instance or - dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Table - """ - super(Table, self).__init__("table") - - # Validate arg - # ------------ - 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.Table -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Table`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import table as v_table - - # Initialize validators - # --------------------- - self._validators["cells"] = v_table.CellsValidator() - self._validators["columnorder"] = v_table.ColumnorderValidator() - self._validators["columnordersrc"] = v_table.ColumnordersrcValidator() - self._validators["columnwidth"] = v_table.ColumnwidthValidator() - self._validators["columnwidthsrc"] = v_table.ColumnwidthsrcValidator() - self._validators["customdata"] = v_table.CustomdataValidator() - self._validators["customdatasrc"] = v_table.CustomdatasrcValidator() - self._validators["domain"] = v_table.DomainValidator() - self._validators["header"] = v_table.HeaderValidator() - self._validators["hoverinfo"] = v_table.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_table.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_table.HoverlabelValidator() - self._validators["ids"] = v_table.IdsValidator() - self._validators["idssrc"] = v_table.IdssrcValidator() - self._validators["meta"] = v_table.MetaValidator() - self._validators["metasrc"] = v_table.MetasrcValidator() - self._validators["name"] = v_table.NameValidator() - self._validators["stream"] = v_table.StreamValidator() - self._validators["uid"] = v_table.UidValidator() - self._validators["uirevision"] = v_table.UirevisionValidator() - self._validators["visible"] = v_table.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cells", None) - self["cells"] = cells if cells is not None else _v - _v = arg.pop("columnorder", None) - self["columnorder"] = columnorder if columnorder is not None else _v - _v = arg.pop("columnordersrc", None) - self["columnordersrc"] = columnordersrc if columnordersrc is not None else _v - _v = arg.pop("columnwidth", None) - self["columnwidth"] = columnwidth if columnwidth is not None else _v - _v = arg.pop("columnwidthsrc", None) - self["columnwidthsrc"] = columnwidthsrc if columnwidthsrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("header", None) - self["header"] = header if header is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "table" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="table", val="table" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Surface(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here z or surfacecolor) or the - bounds set in `cmin` and `cmax` Defaults to `false` when - `cmin` and `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as z or surfacecolor and if set, `cmin` must be set - as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as z or surfacecolor. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as z or surfacecolor and if set, `cmax` must be set - as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.surface - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.surface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of surface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.surface.colorbar.T - itle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - surface.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - surface.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.surface.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data are filled in. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.Contours` - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - x - :class:`plotly.graph_objects.surface.contours.X - ` instance or dict with compatible properties - y - :class:`plotly.graph_objects.surface.contours.Y - ` instance or dict with compatible properties - z - :class:`plotly.graph_objects.surface.contours.Z - ` instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.surface.Contours - """ - return self["contours"] - - @contours.setter - def contours(self, val): - self["contours"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hidesurface - # ----------- - @property - def hidesurface(self): - """ - Determines whether or not a surface is drawn. For example, set - `hidesurface` to False `contours.x.show` to True and - `contours.y.show` to True to draw a wire frame plot. - - The 'hidesurface' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["hidesurface"] - - @hidesurface.setter - def hidesurface(self, val): - self["hidesurface"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.surface.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lighting - # -------- - @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.Lighting` - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - - Returns - ------- - plotly.graph_objs.surface.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): - """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.Lightposition` - - A dict of string/value properties that will be passed - to the Lightposition constructor - - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.surface.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacityscale - # ------------ - @property - def opacityscale(self): - """ - Sets the opacityscale. The opacityscale must be an array - containing arrays mapping a normalized value to an opacity - value. At minimum, a mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], [0.5, 0.2], [1, - 1]]` means that higher/lower values would have higher opacity - values and those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette name string of - the following list: 'min', 'max', 'extremes' and 'uniform'. The - default is 'uniform'. - - The 'opacityscale' property accepts values of any type - - Returns - ------- - Any - """ - return self["opacityscale"] - - @opacityscale.setter - def opacityscale(self, val): - self["opacityscale"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.surface.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # surfacecolor - # ------------ - @property - def surfacecolor(self): - """ - Sets the surface color values, used for setting a color scale - independent of `z`. - - The 'surfacecolor' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["surfacecolor"] - - @surfacecolor.setter - def surfacecolor(self, val): - self["surfacecolor"] = val - - # surfacecolorsrc - # --------------- - @property - def surfacecolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - surfacecolor . - - The 'surfacecolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["surfacecolorsrc"] - - @surfacecolorsrc.setter - def surfacecolorsrc(self, val): - self["surfacecolorsrc"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each z value. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the z coordinates. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zcalendar - # --------- - @property - def zcalendar(self): - """ - Sets the calendar system to use with `z` date data. - - The 'zcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["zcalendar"] - - @zcalendar.setter - def zcalendar(self, val): - self["zcalendar"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here z or surfacecolor) - or the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as z or surfacecolor. - Has no effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.surface.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. - contours - :class:`plotly.graph_objects.surface.Contours` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hidesurface - Determines whether or not a surface is drawn. For - example, set `hidesurface` to False `contours.x.show` - to True and `contours.y.show` to True to draw a wire - frame plot. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.surface.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.surface.Lighting` instance - or dict with compatible properties - lightposition - :class:`plotly.graph_objects.surface.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be an - array containing arrays mapping a normalized value to - an opacity value. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For example, - `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and those in - the middle would be more transparent Alternatively, - `opacityscale` may be a palette name string of the - following list: 'min', 'max', 'extremes' and 'uniform'. - The default is 'uniform'. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.surface.Stream` instance - or dict with compatible properties - surfacecolor - Sets the surface color values, used for setting a color - scale independent of `z`. - surfacecolorsrc - Sets the source reference on Chart Studio Cloud for - surfacecolor . - text - Sets the text elements associated with each z value. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - hidesurface=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - surfacecolor=None, - surfacecolorsrc=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xsrc=None, - y=None, - ycalendar=None, - ysrc=None, - z=None, - zcalendar=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Surface object - - The data the describes the coordinates of the surface is set in - `z`. Data in `z` should be a 2D list. Coordinates in `x` and - `y` can either be 1D lists or 2D lists (e.g. to graph - parametric surfaces). If not provided in `x` and `y`, the x and - y coordinates are assumed to be linear starting at 0 with a - unit step. The color scale corresponds to the `z` values by - default. For custom color scales, use `surfacecolor` which - should be a 2D list, where its bounds can be controlled using - `cmin` and `cmax`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Surface` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here z or surfacecolor) - or the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as z or surfacecolor. - Has no effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.surface.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. - contours - :class:`plotly.graph_objects.surface.Contours` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hidesurface - Determines whether or not a surface is drawn. For - example, set `hidesurface` to False `contours.x.show` - to True and `contours.y.show` to True to draw a wire - frame plot. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.surface.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.surface.Lighting` instance - or dict with compatible properties - lightposition - :class:`plotly.graph_objects.surface.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be an - array containing arrays mapping a normalized value to - an opacity value. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For example, - `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and those in - the middle would be more transparent Alternatively, - `opacityscale` may be a palette name string of the - following list: 'min', 'max', 'extremes' and 'uniform'. - The default is 'uniform'. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.surface.Stream` instance - or dict with compatible properties - surfacecolor - Sets the surface color values, used for setting a color - scale independent of `z`. - surfacecolorsrc - Sets the source reference on Chart Studio Cloud for - surfacecolor . - text - Sets the text elements associated with each z value. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Surface - """ - super(Surface, self).__init__("surface") - - # Validate arg - # ------------ - 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.Surface -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Surface`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import surface as v_surface - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_surface.AutocolorscaleValidator() - self._validators["cauto"] = v_surface.CautoValidator() - self._validators["cmax"] = v_surface.CmaxValidator() - self._validators["cmid"] = v_surface.CmidValidator() - self._validators["cmin"] = v_surface.CminValidator() - self._validators["coloraxis"] = v_surface.ColoraxisValidator() - self._validators["colorbar"] = v_surface.ColorBarValidator() - self._validators["colorscale"] = v_surface.ColorscaleValidator() - self._validators["connectgaps"] = v_surface.ConnectgapsValidator() - self._validators["contours"] = v_surface.ContoursValidator() - self._validators["customdata"] = v_surface.CustomdataValidator() - self._validators["customdatasrc"] = v_surface.CustomdatasrcValidator() - self._validators["hidesurface"] = v_surface.HidesurfaceValidator() - self._validators["hoverinfo"] = v_surface.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_surface.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_surface.HoverlabelValidator() - self._validators["hovertemplate"] = v_surface.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_surface.HovertemplatesrcValidator() - self._validators["hovertext"] = v_surface.HovertextValidator() - self._validators["hovertextsrc"] = v_surface.HovertextsrcValidator() - self._validators["ids"] = v_surface.IdsValidator() - self._validators["idssrc"] = v_surface.IdssrcValidator() - self._validators["legendgroup"] = v_surface.LegendgroupValidator() - self._validators["lighting"] = v_surface.LightingValidator() - self._validators["lightposition"] = v_surface.LightpositionValidator() - self._validators["meta"] = v_surface.MetaValidator() - self._validators["metasrc"] = v_surface.MetasrcValidator() - self._validators["name"] = v_surface.NameValidator() - self._validators["opacity"] = v_surface.OpacityValidator() - self._validators["opacityscale"] = v_surface.OpacityscaleValidator() - self._validators["reversescale"] = v_surface.ReversescaleValidator() - self._validators["scene"] = v_surface.SceneValidator() - self._validators["showlegend"] = v_surface.ShowlegendValidator() - self._validators["showscale"] = v_surface.ShowscaleValidator() - self._validators["stream"] = v_surface.StreamValidator() - self._validators["surfacecolor"] = v_surface.SurfacecolorValidator() - self._validators["surfacecolorsrc"] = v_surface.SurfacecolorsrcValidator() - self._validators["text"] = v_surface.TextValidator() - self._validators["textsrc"] = v_surface.TextsrcValidator() - self._validators["uid"] = v_surface.UidValidator() - self._validators["uirevision"] = v_surface.UirevisionValidator() - self._validators["visible"] = v_surface.VisibleValidator() - self._validators["x"] = v_surface.XValidator() - self._validators["xcalendar"] = v_surface.XcalendarValidator() - self._validators["xsrc"] = v_surface.XsrcValidator() - self._validators["y"] = v_surface.YValidator() - self._validators["ycalendar"] = v_surface.YcalendarValidator() - self._validators["ysrc"] = v_surface.YsrcValidator() - self._validators["z"] = v_surface.ZValidator() - self._validators["zcalendar"] = v_surface.ZcalendarValidator() - self._validators["zsrc"] = v_surface.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hidesurface", None) - self["hidesurface"] = hidesurface if hidesurface is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacityscale", None) - self["opacityscale"] = opacityscale if opacityscale is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("surfacecolor", None) - self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v - _v = arg.pop("surfacecolorsrc", None) - self["surfacecolorsrc"] = surfacecolorsrc if surfacecolorsrc is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zcalendar", None) - self["zcalendar"] = zcalendar if zcalendar is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "surface" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="surface", val="surface" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Sunburst(_BaseTraceType): - - # branchvalues - # ------------ - @property - def branchvalues(self): - """ - Determines how the items in `values` are summed. When set to - "total", items in `values` are taken to be value of all its - descendants. When set to "remainder", items in `values` - corresponding to the root and the branches sectors are taken to - be the extra part not part of the sum of the values at their - leaves. - - The 'branchvalues' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['remainder', 'total'] - - Returns - ------- - Any - """ - return self["branchvalues"] - - @branchvalues.setter - def branchvalues(self, val): - self["branchvalues"] = val - - # count - # ----- - @property - def count(self): - """ - Determines default for `values` when it is not provided, by - inferring a 1 for each of the "leaves" and/or "branches", - otherwise 0. - - The 'count' property is a flaglist and may be specified - as a string containing: - - Any combination of ['branches', 'leaves'] joined with '+' characters - (e.g. 'branches+leaves') - - Returns - ------- - Any - """ - return self["count"] - - @count.setter - def count(self, val): - self["count"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this sunburst trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst - trace (in plot fraction). - y - Sets the vertical domain of this sunburst trace - (in plot fraction). - - Returns - ------- - plotly.graph_objs.sunburst.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.sunburst.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry` and `percentParent`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sunburst.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # insidetextorientation - # --------------------- - @property - def insidetextorientation(self): - """ - Controls the orientation of the text inside chart sectors. When - set to "auto", text may be oriented in any direction in order - to be as big as possible in the middle of a sector. The - "horizontal" option orients text to be parallel with the bottom - of the chart, and may make text smaller in order to achieve - that goal. The "radial" option orients text along the radius of - the sector. The "tangential" option orients text perpendicular - to the radius of the sector. - - The 'insidetextorientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['horizontal', 'radial', 'tangential', 'auto'] - - Returns - ------- - Any - """ - return self["insidetextorientation"] - - @insidetextorientation.setter - def insidetextorientation(self, val): - self["insidetextorientation"] = val - - # labels - # ------ - @property - def labels(self): - """ - Sets the labels of each of the sectors. - - The 'labels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["labels"] - - @labels.setter - def labels(self, val): - self["labels"] = val - - # labelssrc - # --------- - @property - def labelssrc(self): - """ - Sets the source reference on Chart Studio Cloud for labels . - - The 'labelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["labelssrc"] - - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val - - # leaf - # ---- - @property - def leaf(self): - """ - The 'leaf' property is an instance of Leaf - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Leaf` - - A dict of string/value properties that will be passed - to the Leaf constructor - - Supported dict properties: - - opacity - Sets the opacity of the leaves. With colorscale - it is defaulted to 1; otherwise it is defaulted - to 0.7 - - Returns - ------- - plotly.graph_objs.sunburst.Leaf - """ - return self["leaf"] - - @leaf.setter - def leaf(self, val): - self["leaf"] = val - - # level - # ----- - @property - def level(self): - """ - Sets the level from which this trace hierarchy is rendered. Set - `level` to `''` to start from the root node in the hierarchy. - Must be an "id" if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - - The 'level' property accepts values of any type - - Returns - ------- - Any - """ - return self["level"] - - @level.setter - def level(self, val): - self["level"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colorsis set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colorsis - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colorsis set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.sunburst.marker.Co - lorBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colorsis set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - line - :class:`plotly.graph_objects.sunburst.marker.Li - ne` instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an - effect only if colorsis set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colorsis set to a numerical array. - - Returns - ------- - plotly.graph_objs.sunburst.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # maxdepth - # -------- - @property - def maxdepth(self): - """ - Sets the number of rendered sectors from any given `level`. Set - `maxdepth` to "-1" to render all the levels in the hierarchy. - - The 'maxdepth' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - - Returns - ------- - int - """ - return self["maxdepth"] - - @maxdepth.setter - def maxdepth(self, val): - self["maxdepth"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `textinfo` lying outside the sector. - This option refers to the root of the hierarchy presented at - the center of a sunburst graph. Please note that if a hierarchy - has multiple root nodes, this option won't have any effect and - `insidetextfont` would be used. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont` - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sunburst.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # parents - # ------- - @property - def parents(self): - """ - Sets the parent sectors for each of the sectors. Empty string - items '' are understood to reference the root node in the - hierarchy. If `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, plotly attempts - to find matching items in `labels`, but beware they must be - unique. - - The 'parents' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["parents"] - - @parents.setter - def parents(self, val): - self["parents"] = val - - # parentssrc - # ---------- - @property - def parentssrc(self): - """ - Sets the source reference on Chart Studio Cloud for parents . - - The 'parentssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["parentssrc"] - - @parentssrc.setter - def parentssrc(self, val): - self["parentssrc"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.sunburst.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `textinfo`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sunburst.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry`, `percentParent`, `label` and - `value`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the values associated with each of the sectors. Use with - `branchvalues` to determine how the values are summed. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - branchvalues - Determines how the items in `values` are summed. When - set to "total", items in `values` are taken to be value - of all its descendants. When set to "remainder", items - in `values` corresponding to the root and the branches - sectors are taken to be the extra part not part of the - sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the "leaves" - and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.sunburst.Domain` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.sunburst.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `currentPath`, `root`, - `entry`, `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - insidetextorientation - Controls the orientation of the text inside chart - sectors. When set to "auto", text may be oriented in - any direction in order to be as big as possible in the - middle of a sector. The "horizontal" option orients - text to be parallel with the bottom of the chart, and - may make text smaller in order to achieve that goal. - The "radial" option orients text along the radius of - the sector. The "tangential" option orients text - perpendicular to the radius of the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - leaf - :class:`plotly.graph_objects.sunburst.Leaf` instance or - dict with compatible properties - level - Sets the level from which this trace hierarchy is - rendered. Set `level` to `''` to start from the root - node in the hierarchy. Must be an "id" if `ids` is - filled in, otherwise plotly attempts to find a matching - item in `labels`. - marker - :class:`plotly.graph_objects.sunburst.Marker` instance - or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any given - `level`. Set `maxdepth` to "-1" to render all the - levels in the hierarchy. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. This option refers to the root of the hierarchy - presented at the center of a sunburst graph. Please - note that if a hierarchy has multiple root nodes, this - option won't have any effect and `insidetextfont` would - be used. - parents - Sets the parent sectors for each of the sectors. Empty - string items '' are understood to reference the root - node in the hierarchy. If `ids` is filled, `parents` - items are understood to be "ids" themselves. When `ids` - is not set, plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud for - parents . - stream - :class:`plotly.graph_objects.sunburst.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values associated with each of the sectors. - Use with `branchvalues` to determine how the values are - summed. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - labels=None, - labelssrc=None, - leaf=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Sunburst object - - Visualize hierarchal data spanning outward radially from root - to leaves. The sunburst sectors are determined by the entries - in "labels" or "ids" and in "parents". - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Sunburst` - branchvalues - Determines how the items in `values` are summed. When - set to "total", items in `values` are taken to be value - of all its descendants. When set to "remainder", items - in `values` corresponding to the root and the branches - sectors are taken to be the extra part not part of the - sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the "leaves" - and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.sunburst.Domain` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.sunburst.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `currentPath`, `root`, - `entry`, `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - insidetextorientation - Controls the orientation of the text inside chart - sectors. When set to "auto", text may be oriented in - any direction in order to be as big as possible in the - middle of a sector. The "horizontal" option orients - text to be parallel with the bottom of the chart, and - may make text smaller in order to achieve that goal. - The "radial" option orients text along the radius of - the sector. The "tangential" option orients text - perpendicular to the radius of the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - leaf - :class:`plotly.graph_objects.sunburst.Leaf` instance or - dict with compatible properties - level - Sets the level from which this trace hierarchy is - rendered. Set `level` to `''` to start from the root - node in the hierarchy. Must be an "id" if `ids` is - filled in, otherwise plotly attempts to find a matching - item in `labels`. - marker - :class:`plotly.graph_objects.sunburst.Marker` instance - or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any given - `level`. Set `maxdepth` to "-1" to render all the - levels in the hierarchy. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. This option refers to the root of the hierarchy - presented at the center of a sunburst graph. Please - note that if a hierarchy has multiple root nodes, this - option won't have any effect and `insidetextfont` would - be used. - parents - Sets the parent sectors for each of the sectors. Empty - string items '' are understood to reference the root - node in the hierarchy. If `ids` is filled, `parents` - items are understood to be "ids" themselves. When `ids` - is not set, plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud for - parents . - stream - :class:`plotly.graph_objects.sunburst.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values associated with each of the sectors. - Use with `branchvalues` to determine how the values are - summed. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Sunburst - """ - super(Sunburst, self).__init__("sunburst") - - # Validate arg - # ------------ - 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.Sunburst -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Sunburst`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import sunburst as v_sunburst - - # Initialize validators - # --------------------- - self._validators["branchvalues"] = v_sunburst.BranchvaluesValidator() - self._validators["count"] = v_sunburst.CountValidator() - self._validators["customdata"] = v_sunburst.CustomdataValidator() - self._validators["customdatasrc"] = v_sunburst.CustomdatasrcValidator() - self._validators["domain"] = v_sunburst.DomainValidator() - self._validators["hoverinfo"] = v_sunburst.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_sunburst.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_sunburst.HoverlabelValidator() - self._validators["hovertemplate"] = v_sunburst.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_sunburst.HovertemplatesrcValidator() - self._validators["hovertext"] = v_sunburst.HovertextValidator() - self._validators["hovertextsrc"] = v_sunburst.HovertextsrcValidator() - self._validators["ids"] = v_sunburst.IdsValidator() - self._validators["idssrc"] = v_sunburst.IdssrcValidator() - self._validators["insidetextfont"] = v_sunburst.InsidetextfontValidator() - self._validators[ - "insidetextorientation" - ] = v_sunburst.InsidetextorientationValidator() - self._validators["labels"] = v_sunburst.LabelsValidator() - self._validators["labelssrc"] = v_sunburst.LabelssrcValidator() - self._validators["leaf"] = v_sunburst.LeafValidator() - self._validators["level"] = v_sunburst.LevelValidator() - self._validators["marker"] = v_sunburst.MarkerValidator() - self._validators["maxdepth"] = v_sunburst.MaxdepthValidator() - self._validators["meta"] = v_sunburst.MetaValidator() - self._validators["metasrc"] = v_sunburst.MetasrcValidator() - self._validators["name"] = v_sunburst.NameValidator() - self._validators["opacity"] = v_sunburst.OpacityValidator() - self._validators["outsidetextfont"] = v_sunburst.OutsidetextfontValidator() - self._validators["parents"] = v_sunburst.ParentsValidator() - self._validators["parentssrc"] = v_sunburst.ParentssrcValidator() - self._validators["stream"] = v_sunburst.StreamValidator() - self._validators["text"] = v_sunburst.TextValidator() - self._validators["textfont"] = v_sunburst.TextfontValidator() - self._validators["textinfo"] = v_sunburst.TextinfoValidator() - self._validators["textsrc"] = v_sunburst.TextsrcValidator() - self._validators["texttemplate"] = v_sunburst.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_sunburst.TexttemplatesrcValidator() - self._validators["uid"] = v_sunburst.UidValidator() - self._validators["uirevision"] = v_sunburst.UirevisionValidator() - self._validators["values"] = v_sunburst.ValuesValidator() - self._validators["valuessrc"] = v_sunburst.ValuessrcValidator() - self._validators["visible"] = v_sunburst.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("branchvalues", None) - self["branchvalues"] = branchvalues if branchvalues is not None else _v - _v = arg.pop("count", None) - self["count"] = count if count is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("insidetextorientation", None) - self["insidetextorientation"] = ( - insidetextorientation if insidetextorientation is not None else _v - ) - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v - _v = arg.pop("leaf", None) - self["leaf"] = leaf if leaf is not None else _v - _v = arg.pop("level", None) - self["level"] = level if level is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("maxdepth", None) - self["maxdepth"] = maxdepth if maxdepth is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("parents", None) - self["parents"] = parents if parents is not None else _v - _v = arg.pop("parentssrc", None) - self["parentssrc"] = parentssrc if parentssrc is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "sunburst" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="sunburst", val="sunburst" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Streamtube(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here u/v/w norm) or the bounds set - in `cmin` and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmin` must be set as - well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as u/v/w norm. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmax` must be set as - well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.streamt - ube.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.streamtube.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of streamtube.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.streamtube.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - streamtube.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - streamtube.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.streamtube.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.streamtube.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, - `norm` and `divergence`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lighting - # -------- - @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.Lighting` - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - - Returns - ------- - plotly.graph_objs.streamtube.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): - """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.Lightposition` - - A dict of string/value properties that will be passed - to the Lightposition constructor - - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.streamtube.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # maxdisplayed - # ------------ - @property - def maxdisplayed(self): - """ - The maximum number of displayed segments in a streamtube. - - The 'maxdisplayed' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["maxdisplayed"] - - @maxdisplayed.setter - def maxdisplayed(self, val): - self["maxdisplayed"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - The scaling factor for the streamtubes. The default is 1, which - avoids two max divergence tubes from touching at adjacent - starting positions. - - The 'sizeref' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # starts - # ------ - @property - def starts(self): - """ - The 'starts' property is an instance of Starts - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.Starts` - - A dict of string/value properties that will be passed - to the Starts constructor - - Supported dict properties: - - x - Sets the x components of the starting position - of the streamtubes - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y components of the starting position - of the streamtubes - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the z components of the starting position - of the streamtubes - zsrc - Sets the source reference on Chart Studio Cloud - for z . - - Returns - ------- - plotly.graph_objs.streamtube.Starts - """ - return self["starts"] - - @starts.setter - def starts(self, val): - self["starts"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.streamtube.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets a text element associated with this trace. If trace - `hoverinfo` contains a "text" flag, this text element will be - seen in all hover labels. Note that streamtube traces do not - support array `text` values. - - 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 - - # u - # - - @property - def u(self): - """ - Sets the x components of the vector field. - - The 'u' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["u"] - - @u.setter - def u(self, val): - self["u"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # usrc - # ---- - @property - def usrc(self): - """ - Sets the source reference on Chart Studio Cloud for u . - - The 'usrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["usrc"] - - @usrc.setter - def usrc(self, val): - self["usrc"] = val - - # v - # - - @property - def v(self): - """ - Sets the y components of the vector field. - - The 'v' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["v"] - - @v.setter - def v(self, val): - self["v"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # vsrc - # ---- - @property - def vsrc(self): - """ - Sets the source reference on Chart Studio Cloud for v . - - The 'vsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["vsrc"] - - @vsrc.setter - def vsrc(self, val): - self["vsrc"] = val - - # w - # - - @property - def w(self): - """ - Sets the z components of the vector field. - - The 'w' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["w"] - - @w.setter - def w(self, val): - self["w"] = val - - # wsrc - # ---- - @property - def wsrc(self): - """ - Sets the source reference on Chart Studio Cloud for w . - - The 'wsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["wsrc"] - - @wsrc.setter - def wsrc(self, val): - self["wsrc"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates of the vector field. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates of the vector field. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the z coordinates of the vector field. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.streamtube.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.streamtube.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `tubex`, `tubey`, `tubez`, - `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.streamtube.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.streamtube.Lightposition` - instance or dict with compatible properties - maxdisplayed - The maximum number of displayed segments in a - streamtube. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - sizeref - The scaling factor for the streamtubes. The default is - 1, which avoids two max divergence tubes from touching - at adjacent starting positions. - starts - :class:`plotly.graph_objects.streamtube.Starts` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.streamtube.Stream` - instance or dict with compatible properties - text - Sets a text element associated with this trace. If - trace `hoverinfo` contains a "text" flag, this text - element will be seen in all hover labels. Note that - streamtube traces do not support array `text` values. - u - Sets the x components of the vector field. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud for u - . - v - Sets the y components of the vector field. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - vsrc - Sets the source reference on Chart Studio Cloud for v - . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on Chart Studio Cloud for w - . - x - Sets the x coordinates of the vector field. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates of the vector field. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates of the vector field. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - ids=None, - idssrc=None, - legendgroup=None, - lighting=None, - lightposition=None, - maxdisplayed=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizeref=None, - starts=None, - stream=None, - text=None, - u=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - visible=None, - vsrc=None, - w=None, - wsrc=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Streamtube object - - Use a streamtube trace to visualize flow in a vector field. - Specify a vector field using 6 1D arrays of equal length, 3 - position arrays `x`, `y` and `z` and 3 vector component arrays - `u`, `v`, and `w`. By default, the tubes' starting positions - will be cut from the vector field's x-z plane at its minimum y - value. To specify your own starting position, use attributes - `starts.x`, `starts.y` and `starts.z`. The color is encoded by - the norm of (u, v, w), and the local radius by the divergence - of (u, v, w). - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Streamtube` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.streamtube.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.streamtube.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `tubex`, `tubey`, `tubez`, - `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.streamtube.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.streamtube.Lightposition` - instance or dict with compatible properties - maxdisplayed - The maximum number of displayed segments in a - streamtube. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - sizeref - The scaling factor for the streamtubes. The default is - 1, which avoids two max divergence tubes from touching - at adjacent starting positions. - starts - :class:`plotly.graph_objects.streamtube.Starts` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.streamtube.Stream` - instance or dict with compatible properties - text - Sets a text element associated with this trace. If - trace `hoverinfo` contains a "text" flag, this text - element will be seen in all hover labels. Note that - streamtube traces do not support array `text` values. - u - Sets the x components of the vector field. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud for u - . - v - Sets the y components of the vector field. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - vsrc - Sets the source reference on Chart Studio Cloud for v - . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on Chart Studio Cloud for w - . - x - Sets the x coordinates of the vector field. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates of the vector field. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates of the vector field. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Streamtube - """ - super(Streamtube, self).__init__("streamtube") - - # Validate arg - # ------------ - 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.Streamtube -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Streamtube`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import streamtube as v_streamtube - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_streamtube.AutocolorscaleValidator() - self._validators["cauto"] = v_streamtube.CautoValidator() - self._validators["cmax"] = v_streamtube.CmaxValidator() - self._validators["cmid"] = v_streamtube.CmidValidator() - self._validators["cmin"] = v_streamtube.CminValidator() - self._validators["coloraxis"] = v_streamtube.ColoraxisValidator() - self._validators["colorbar"] = v_streamtube.ColorBarValidator() - self._validators["colorscale"] = v_streamtube.ColorscaleValidator() - self._validators["customdata"] = v_streamtube.CustomdataValidator() - self._validators["customdatasrc"] = v_streamtube.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_streamtube.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_streamtube.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_streamtube.HoverlabelValidator() - self._validators["hovertemplate"] = v_streamtube.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_streamtube.HovertemplatesrcValidator() - self._validators["hovertext"] = v_streamtube.HovertextValidator() - self._validators["ids"] = v_streamtube.IdsValidator() - self._validators["idssrc"] = v_streamtube.IdssrcValidator() - self._validators["legendgroup"] = v_streamtube.LegendgroupValidator() - self._validators["lighting"] = v_streamtube.LightingValidator() - self._validators["lightposition"] = v_streamtube.LightpositionValidator() - self._validators["maxdisplayed"] = v_streamtube.MaxdisplayedValidator() - self._validators["meta"] = v_streamtube.MetaValidator() - self._validators["metasrc"] = v_streamtube.MetasrcValidator() - self._validators["name"] = v_streamtube.NameValidator() - self._validators["opacity"] = v_streamtube.OpacityValidator() - self._validators["reversescale"] = v_streamtube.ReversescaleValidator() - self._validators["scene"] = v_streamtube.SceneValidator() - self._validators["showlegend"] = v_streamtube.ShowlegendValidator() - self._validators["showscale"] = v_streamtube.ShowscaleValidator() - self._validators["sizeref"] = v_streamtube.SizerefValidator() - self._validators["starts"] = v_streamtube.StartsValidator() - self._validators["stream"] = v_streamtube.StreamValidator() - self._validators["text"] = v_streamtube.TextValidator() - self._validators["u"] = v_streamtube.UValidator() - self._validators["uid"] = v_streamtube.UidValidator() - self._validators["uirevision"] = v_streamtube.UirevisionValidator() - self._validators["usrc"] = v_streamtube.UsrcValidator() - self._validators["v"] = v_streamtube.VValidator() - self._validators["visible"] = v_streamtube.VisibleValidator() - self._validators["vsrc"] = v_streamtube.VsrcValidator() - self._validators["w"] = v_streamtube.WValidator() - self._validators["wsrc"] = v_streamtube.WsrcValidator() - self._validators["x"] = v_streamtube.XValidator() - self._validators["xsrc"] = v_streamtube.XsrcValidator() - self._validators["y"] = v_streamtube.YValidator() - self._validators["ysrc"] = v_streamtube.YsrcValidator() - self._validators["z"] = v_streamtube.ZValidator() - self._validators["zsrc"] = v_streamtube.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("maxdisplayed", None) - self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("starts", None) - self["starts"] = starts if starts is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("u", None) - self["u"] = u if u is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("usrc", None) - self["usrc"] = usrc if usrc is not None else _v - _v = arg.pop("v", None) - self["v"] = v if v is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("vsrc", None) - self["vsrc"] = vsrc if vsrc is not None else _v - _v = arg.pop("w", None) - self["w"] = w if w is not None else _v - _v = arg.pop("wsrc", None) - self["wsrc"] = wsrc if wsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "streamtube" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="streamtube", val="streamtube" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Splom(_BaseTraceType): - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # diagonal - # -------- - @property - def diagonal(self): - """ - The 'diagonal' property is an instance of Diagonal - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Diagonal` - - A dict of string/value properties that will be passed - to the Diagonal constructor - - Supported dict properties: - - visible - Determines whether or not subplots on the - diagonal are displayed. - - Returns - ------- - plotly.graph_objs.splom.Diagonal - """ - return self["diagonal"] - - @diagonal.setter - def diagonal(self, val): - self["diagonal"] = val - - # dimensions - # ---------- - @property - def dimensions(self): - """ - The 'dimensions' property is a tuple of instances of - Dimension that may be specified as: - - A list or tuple of instances of plotly.graph_objs.splom.Dimension - - A list or tuple of dicts of string/value properties that - will be passed to the Dimension constructor - - Supported dict properties: - - axis - :class:`plotly.graph_objects.splom.dimension.Ax - is` instance or dict with compatible properties - label - Sets the label corresponding to this splom - dimension. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Determines whether or not this dimension is - shown on the graph. Note that even visible - false dimension contribute to the default grid - generate by this splom trace. - - Returns - ------- - tuple[plotly.graph_objs.splom.Dimension] - """ - return self["dimensions"] - - @dimensions.setter - def dimensions(self, val): - self["dimensions"] = val - - # dimensiondefaults - # ----------------- - @property - def dimensiondefaults(self): - """ - When used in a template (as - layout.template.data.splom.dimensiondefaults), sets the default - property values to use for elements of splom.dimensions - - The 'dimensiondefaults' property is an instance of Dimension - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Dimension` - - A dict of string/value properties that will be passed - to the Dimension constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.splom.Dimension - """ - return self["dimensiondefaults"] - - @dimensiondefaults.setter - def dimensiondefaults(self, val): - self["dimensiondefaults"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.splom.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.splom.marker.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.splom.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.splom.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.splom.selected.Mar - ker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.splom.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showlowerhalf - # ------------- - @property - def showlowerhalf(self): - """ - Determines whether or not subplots on the lower half from the - diagonal are displayed. - - The 'showlowerhalf' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlowerhalf"] - - @showlowerhalf.setter - def showlowerhalf(self, val): - self["showlowerhalf"] = val - - # showupperhalf - # ------------- - @property - def showupperhalf(self): - """ - Determines whether or not subplots on the upper half from the - diagonal are displayed. - - The 'showupperhalf' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showupperhalf"] - - @showupperhalf.setter - def showupperhalf(self, val): - self["showupperhalf"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.splom.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair to appear on - hover. If a single string, the same string appears over all the - data points. If an array of string, the items are mapped in - order to the this trace's (x,y) coordinates. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.splom.unselected.M - arker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.splom.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # xaxes - # ----- - @property - def xaxes(self): - """ - Sets the list of x axes corresponding to dimensions of this - splom trace. By default, a splom will match the first N xaxes - where N is the number of input dimensions. Note that, in case - where `diagonal.visible` is false and `showupperhalf` or - `showlowerhalf` is false, this splom trace will generate one - less x-axis and one less y-axis. - - The 'xaxes' property is an info array that may be specified as: - * a list of elements where: - The 'xaxes[i]' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - list - """ - return self["xaxes"] - - @xaxes.setter - def xaxes(self, val): - self["xaxes"] = val - - # yaxes - # ----- - @property - def yaxes(self): - """ - Sets the list of y axes corresponding to dimensions of this - splom trace. By default, a splom will match the first N yaxes - where N is the number of input dimensions. Note that, in case - where `diagonal.visible` is false and `showupperhalf` or - `showlowerhalf` is false, this splom trace will generate one - less x-axis and one less y-axis. - - The 'yaxes' property is an info array that may be specified as: - * a list of elements where: - The 'yaxes[i]' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - list - """ - return self["yaxes"] - - @yaxes.setter - def yaxes(self, val): - self["yaxes"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - diagonal - :class:`plotly.graph_objects.splom.Diagonal` instance - or dict with compatible properties - dimensions - A tuple of - :class:`plotly.graph_objects.splom.Dimension` instances - or dicts with compatible properties - dimensiondefaults - When used in a template (as - layout.template.data.splom.dimensiondefaults), sets the - default property values to use for elements of - splom.dimensions - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.splom.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.splom.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.splom.Selected` instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showlowerhalf - Determines whether or not subplots on the lower half - from the diagonal are displayed. - showupperhalf - Determines whether or not subplots on the upper half - from the diagonal are displayed. - stream - :class:`plotly.graph_objects.splom.Stream` instance or - dict with compatible properties - text - Sets text elements associated with each (x,y) pair to - appear on hover. If a single string, the same string - appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (x,y) coordinates. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.splom.Unselected` instance - or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - xaxes - Sets the list of x axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N xaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. - yaxes - Sets the list of y axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N yaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. - """ - - def __init__( - self, - arg=None, - customdata=None, - customdatasrc=None, - diagonal=None, - dimensions=None, - dimensiondefaults=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - showlowerhalf=None, - showupperhalf=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxes=None, - yaxes=None, - **kwargs - ): - """ - Construct a new Splom object - - Splom traces generate scatter plot matrix visualizations. Each - splom `dimensions` items correspond to a generated axis. Values - for each of those dimensions are set in `dimensions[i].values`. - Splom traces support all `scattergl` marker style attributes. - Specify `layout.grid` attributes and/or layout x-axis and - y-axis attributes for more control over the axis positioning - and style. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Splom` - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - diagonal - :class:`plotly.graph_objects.splom.Diagonal` instance - or dict with compatible properties - dimensions - A tuple of - :class:`plotly.graph_objects.splom.Dimension` instances - or dicts with compatible properties - dimensiondefaults - When used in a template (as - layout.template.data.splom.dimensiondefaults), sets the - default property values to use for elements of - splom.dimensions - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.splom.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.splom.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.splom.Selected` instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showlowerhalf - Determines whether or not subplots on the lower half - from the diagonal are displayed. - showupperhalf - Determines whether or not subplots on the upper half - from the diagonal are displayed. - stream - :class:`plotly.graph_objects.splom.Stream` instance or - dict with compatible properties - text - Sets text elements associated with each (x,y) pair to - appear on hover. If a single string, the same string - appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (x,y) coordinates. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.splom.Unselected` instance - or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - xaxes - Sets the list of x axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N xaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. - yaxes - Sets the list of y axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N yaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. - - Returns - ------- - Splom - """ - super(Splom, self).__init__("splom") - - # Validate arg - # ------------ - 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.Splom -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Splom`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import splom as v_splom - - # Initialize validators - # --------------------- - self._validators["customdata"] = v_splom.CustomdataValidator() - self._validators["customdatasrc"] = v_splom.CustomdatasrcValidator() - self._validators["diagonal"] = v_splom.DiagonalValidator() - self._validators["dimensions"] = v_splom.DimensionsValidator() - self._validators["dimensiondefaults"] = v_splom.DimensionValidator() - self._validators["hoverinfo"] = v_splom.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_splom.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_splom.HoverlabelValidator() - self._validators["hovertemplate"] = v_splom.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_splom.HovertemplatesrcValidator() - self._validators["hovertext"] = v_splom.HovertextValidator() - self._validators["hovertextsrc"] = v_splom.HovertextsrcValidator() - self._validators["ids"] = v_splom.IdsValidator() - self._validators["idssrc"] = v_splom.IdssrcValidator() - self._validators["legendgroup"] = v_splom.LegendgroupValidator() - self._validators["marker"] = v_splom.MarkerValidator() - self._validators["meta"] = v_splom.MetaValidator() - self._validators["metasrc"] = v_splom.MetasrcValidator() - self._validators["name"] = v_splom.NameValidator() - self._validators["opacity"] = v_splom.OpacityValidator() - self._validators["selected"] = v_splom.SelectedValidator() - self._validators["selectedpoints"] = v_splom.SelectedpointsValidator() - self._validators["showlegend"] = v_splom.ShowlegendValidator() - self._validators["showlowerhalf"] = v_splom.ShowlowerhalfValidator() - self._validators["showupperhalf"] = v_splom.ShowupperhalfValidator() - self._validators["stream"] = v_splom.StreamValidator() - self._validators["text"] = v_splom.TextValidator() - self._validators["textsrc"] = v_splom.TextsrcValidator() - self._validators["uid"] = v_splom.UidValidator() - self._validators["uirevision"] = v_splom.UirevisionValidator() - self._validators["unselected"] = v_splom.UnselectedValidator() - self._validators["visible"] = v_splom.VisibleValidator() - self._validators["xaxes"] = v_splom.XaxesValidator() - self._validators["yaxes"] = v_splom.YaxesValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("diagonal", None) - self["diagonal"] = diagonal if diagonal is not None else _v - _v = arg.pop("dimensions", None) - self["dimensions"] = dimensions if dimensions is not None else _v - _v = arg.pop("dimensiondefaults", None) - self["dimensiondefaults"] = ( - dimensiondefaults if dimensiondefaults is not None else _v - ) - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showlowerhalf", None) - self["showlowerhalf"] = showlowerhalf if showlowerhalf is not None else _v - _v = arg.pop("showupperhalf", None) - self["showupperhalf"] = showupperhalf if showupperhalf is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("xaxes", None) - self["xaxes"] = xaxes if xaxes is not None else _v - _v = arg.pop("yaxes", None) - self["yaxes"] = yaxes if yaxes is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "splom" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="splom", val="splom" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scatterternary(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - Sets the quantity of component `a` in each data point. If `a`, - `b`, and `c` are all provided, they need not be normalized, - only the relative values matter. If only two arrays are - provided they must be normalized to match `ternary.sum`. - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on Chart Studio Cloud for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val - - # b - # - - @property - def b(self): - """ - Sets the quantity of component `a` in each data point. If `a`, - `b`, and `c` are all provided, they need not be normalized, - only the relative values matter. If only two arrays are - provided they must be normalized to match `ternary.sum`. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # bsrc - # ---- - @property - def bsrc(self): - """ - Sets the source reference on Chart Studio Cloud for b . - - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bsrc"] - - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val - - # c - # - - @property - def c(self): - """ - Sets the quantity of component `a` in each data point. If `a`, - `b`, and `c` are all provided, they need not be normalized, - only the relative values matter. If only two arrays are - provided they must be normalized to match `ternary.sum`. - - The 'c' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["c"] - - @c.setter - def c(self, val): - self["c"] = val - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether or not markers and text nodes are clipped - about the subplot axes. To show markers and text nodes above - axis lines and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # csrc - # ---- - @property - def csrc(self): - """ - Sets the source reference on Chart Studio Cloud for c . - - The 'csrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["csrc"] - - @csrc.setter - def csrc(self, val): - self["csrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". scatterternary has a subset of the options - available to scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has gaps) into a - closed shape. "tonext" fills the space between two traces if - one completely encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is no trace before - it. "tonext" should not be used if one trace does not enclose - the other. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['a', 'b', 'c', 'text', 'name'] joined with '+' characters - (e.g. 'a+b') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scatterternary.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (a,b,c) point. If - a single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b,c). To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scatterternary.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterternary.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scatterternary.mar - ker.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterternary.mar - ker.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scatterternary.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterternary.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterternary.sel - ected.Textfont` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.scatterternary.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scatterternary.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - ternary subplot. If "ternary" (the default value), the data - refer to `layout.ternary`. If "ternary2", the data refer to - `layout.ternary2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'ternary', that may be specified as the string 'ternary' - optionally followed by an integer >= 1 - (e.g. 'ternary', 'ternary1', 'ternary2', 'ternary3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # sum - # --- - @property - def sum(self): - """ - The number each triplet should sum to, if only two of `a`, `b`, - and `c` are provided. This overrides `ternary.sum` to - normalize this specific trace, but does not affect the values - displayed on the axes. 0 (or missing) means to use - ternary.sum - - The 'sum' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sum"] - - @sum.setter - def sum(self, val): - self["sum"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (a,b,c) point. If a - single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b,c). If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatterternary.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `a`, `b`, `c` and `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterternary.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.uns - elected.Textfont` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.scatterternary.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - a - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - asrc - Sets the source reference on Chart Studio Cloud for a - . - b - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - bsrc - Sets the source reference on Chart Studio Cloud for b - . - c - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - csrc - Sets the source reference on Chart Studio Cloud for c - . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterternary.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (a,b,c) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b,c). - To be seen, trace `hoverinfo` must contain a "text" - flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatterternary.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterternary.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scatterternary.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterternary.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a ternary subplot. If "ternary" (the default - value), the data refer to `layout.ternary`. If - "ternary2", the data refer to `layout.ternary2`, and so - on. - sum - The number each triplet should sum to, if only two of - `a`, `b`, and `c` are provided. This overrides - `ternary.sum` to normalize this specific trace, but - does not affect the values displayed on the axes. 0 (or - missing) means to use ternary.sum - text - Sets text elements associated with each (a,b,c) point. - If a single string, the same string appears over all - the data points. If an array of strings, the items are - mapped in order to the the data points in (a,b,c). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `a`, `b`, `c` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterternary.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - a=None, - asrc=None, - b=None, - bsrc=None, - c=None, - cliponaxis=None, - connectgaps=None, - csrc=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - sum=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - **kwargs - ): - """ - Construct a new Scatterternary object - - Provides similar functionality to the "scatter" type but on a - ternary phase diagram. The data is provided by at least two - arrays out of `a`, `b`, `c` triplets. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.Scatterternary` - a - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - asrc - Sets the source reference on Chart Studio Cloud for a - . - b - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - bsrc - Sets the source reference on Chart Studio Cloud for b - . - c - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - csrc - Sets the source reference on Chart Studio Cloud for c - . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterternary.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (a,b,c) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b,c). - To be seen, trace `hoverinfo` must contain a "text" - flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatterternary.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterternary.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scatterternary.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterternary.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a ternary subplot. If "ternary" (the default - value), the data refer to `layout.ternary`. If - "ternary2", the data refer to `layout.ternary2`, and so - on. - sum - The number each triplet should sum to, if only two of - `a`, `b`, and `c` are provided. This overrides - `ternary.sum` to normalize this specific trace, but - does not affect the values displayed on the axes. 0 (or - missing) means to use ternary.sum - text - Sets text elements associated with each (a,b,c) point. - If a single string, the same string appears over all - the data points. If an array of strings, the items are - mapped in order to the the data points in (a,b,c). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `a`, `b`, `c` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterternary.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Scatterternary - """ - super(Scatterternary, self).__init__("scatterternary") - - # Validate arg - # ------------ - 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.Scatterternary -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scatterternary`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scatterternary as v_scatterternary - - # Initialize validators - # --------------------- - self._validators["a"] = v_scatterternary.AValidator() - self._validators["asrc"] = v_scatterternary.AsrcValidator() - self._validators["b"] = v_scatterternary.BValidator() - self._validators["bsrc"] = v_scatterternary.BsrcValidator() - self._validators["c"] = v_scatterternary.CValidator() - self._validators["cliponaxis"] = v_scatterternary.CliponaxisValidator() - self._validators["connectgaps"] = v_scatterternary.ConnectgapsValidator() - self._validators["csrc"] = v_scatterternary.CsrcValidator() - self._validators["customdata"] = v_scatterternary.CustomdataValidator() - self._validators["customdatasrc"] = v_scatterternary.CustomdatasrcValidator() - self._validators["fill"] = v_scatterternary.FillValidator() - self._validators["fillcolor"] = v_scatterternary.FillcolorValidator() - self._validators["hoverinfo"] = v_scatterternary.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatterternary.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatterternary.HoverlabelValidator() - self._validators["hoveron"] = v_scatterternary.HoveronValidator() - self._validators["hovertemplate"] = v_scatterternary.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scatterternary.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatterternary.HovertextValidator() - self._validators["hovertextsrc"] = v_scatterternary.HovertextsrcValidator() - self._validators["ids"] = v_scatterternary.IdsValidator() - self._validators["idssrc"] = v_scatterternary.IdssrcValidator() - self._validators["legendgroup"] = v_scatterternary.LegendgroupValidator() - self._validators["line"] = v_scatterternary.LineValidator() - self._validators["marker"] = v_scatterternary.MarkerValidator() - self._validators["meta"] = v_scatterternary.MetaValidator() - self._validators["metasrc"] = v_scatterternary.MetasrcValidator() - self._validators["mode"] = v_scatterternary.ModeValidator() - self._validators["name"] = v_scatterternary.NameValidator() - self._validators["opacity"] = v_scatterternary.OpacityValidator() - self._validators["selected"] = v_scatterternary.SelectedValidator() - self._validators["selectedpoints"] = v_scatterternary.SelectedpointsValidator() - self._validators["showlegend"] = v_scatterternary.ShowlegendValidator() - self._validators["stream"] = v_scatterternary.StreamValidator() - self._validators["subplot"] = v_scatterternary.SubplotValidator() - self._validators["sum"] = v_scatterternary.SumValidator() - self._validators["text"] = v_scatterternary.TextValidator() - self._validators["textfont"] = v_scatterternary.TextfontValidator() - self._validators["textposition"] = v_scatterternary.TextpositionValidator() - self._validators[ - "textpositionsrc" - ] = v_scatterternary.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatterternary.TextsrcValidator() - self._validators["texttemplate"] = v_scatterternary.TexttemplateValidator() - self._validators[ - "texttemplatesrc" - ] = v_scatterternary.TexttemplatesrcValidator() - self._validators["uid"] = v_scatterternary.UidValidator() - self._validators["uirevision"] = v_scatterternary.UirevisionValidator() - self._validators["unselected"] = v_scatterternary.UnselectedValidator() - self._validators["visible"] = v_scatterternary.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("c", None) - self["c"] = c if c is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("csrc", None) - self["csrc"] = csrc if csrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("sum", None) - self["sum"] = sum if sum is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scatterternary" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatterternary", val="scatterternary" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scatterpolargl(_BaseTraceType): - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dr - # -- - @property - def dr(self): - """ - Sets the r coordinate step. - - The 'dr' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dr"] - - @dr.setter - def dr(self, val): - self["dr"] = val - - # dtheta - # ------ - @property - def dtheta(self): - """ - Sets the theta coordinate step. By default, the `dtheta` step - equals the subplot's period divided by the length of the `r` - coordinates. - - The 'dtheta' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtheta"] - - @dtheta.setter - def dtheta(self, val): - self["dtheta"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Defaults to "none" - unless this trace is stacked, then it gets "tonexty" - ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 - respectively. "tonextx" and "tonexty" fill between the - endpoints of this trace and the endpoints of the trace before - it, connecting those endpoints with straight lines (to make a - stacked area graph); if there is no trace before it, they - behave like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the space between two - traces if one completely encloses the other (eg consecutive - contour lines), and behaves like "toself" if there is no trace - before it. "tonext" should not be used if one trace does not - enclose the other. Traces in a `stackgroup` will only fill to - (or be filled to) other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if fill- - linked traces are not already consecutive, the later ones will - be pushed down in the drawing order. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', - 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters - (e.g. 'r+theta') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scatterpolargl.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scatterpolargl.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolargl.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.scatterpolargl.mar - ker.Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scatterpolargl.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # r - # - - @property - def r(self): - """ - Sets the radial coordinates - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # r0 - # -- - @property - def r0(self): - """ - Alternate to `r`. Builds a linear space of r coordinates. Use - with `dr` where `r0` is the starting coordinate and `dr` the - step. - - The 'r0' property accepts values of any type - - Returns - ------- - Any - """ - return self["r0"] - - @r0.setter - def r0(self, val): - self["r0"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on Chart Studio Cloud for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Textfont` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.scatterpolargl.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scatterpolargl.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - polar subplot. If "polar" (the default value), the data refer - to `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'polar', that may be specified as the string 'polar' - optionally followed by an integer >= 1 - (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatterpolargl.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `r`, `theta` and `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # theta - # ----- - @property - def theta(self): - """ - Sets the angular coordinates - - The 'theta' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["theta"] - - @theta.setter - def theta(self, val): - self["theta"] = val - - # theta0 - # ------ - @property - def theta0(self): - """ - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the starting - coordinate and `dtheta` the step. - - The 'theta0' property accepts values of any type - - Returns - ------- - Any - """ - return self["theta0"] - - @theta0.setter - def theta0(self, val): - self["theta0"] = val - - # thetasrc - # -------- - @property - def thetasrc(self): - """ - Sets the source reference on Chart Studio Cloud for theta . - - The 'thetasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["thetasrc"] - - @thetasrc.setter - def thetasrc(self, val): - self["thetasrc"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the unit of input "theta" values. Has an effect only when - on "linear" angular axes. - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees', 'gradians'] - - Returns - ------- - Any - """ - return self["thetaunit"] - - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Textfont` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.scatterpolargl.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatterpolargl.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolargl.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.scatterpolargl.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolargl.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `r`, `theta` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud for - theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolargl.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - **kwargs - ): - """ - Construct a new Scatterpolargl object - - The scatterpolargl trace type encompasses line charts, scatter - charts, and bubble charts in polar coordinates using the WebGL - plotting engine. The data visualized as scatter point or lines - is set in `r` (radial) and `theta` (angular) coordinates Bubble - charts are achieved by setting `marker.size` and/or - `marker.color` to numerical arrays. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.Scatterpolargl` - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatterpolargl.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolargl.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.scatterpolargl.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolargl.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `r`, `theta` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud for - theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolargl.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Scatterpolargl - """ - super(Scatterpolargl, self).__init__("scatterpolargl") - - # Validate arg - # ------------ - 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.Scatterpolargl -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scatterpolargl`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scatterpolargl as v_scatterpolargl - - # Initialize validators - # --------------------- - self._validators["connectgaps"] = v_scatterpolargl.ConnectgapsValidator() - self._validators["customdata"] = v_scatterpolargl.CustomdataValidator() - self._validators["customdatasrc"] = v_scatterpolargl.CustomdatasrcValidator() - self._validators["dr"] = v_scatterpolargl.DrValidator() - self._validators["dtheta"] = v_scatterpolargl.DthetaValidator() - self._validators["fill"] = v_scatterpolargl.FillValidator() - self._validators["fillcolor"] = v_scatterpolargl.FillcolorValidator() - self._validators["hoverinfo"] = v_scatterpolargl.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatterpolargl.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatterpolargl.HoverlabelValidator() - self._validators["hovertemplate"] = v_scatterpolargl.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scatterpolargl.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatterpolargl.HovertextValidator() - self._validators["hovertextsrc"] = v_scatterpolargl.HovertextsrcValidator() - self._validators["ids"] = v_scatterpolargl.IdsValidator() - self._validators["idssrc"] = v_scatterpolargl.IdssrcValidator() - self._validators["legendgroup"] = v_scatterpolargl.LegendgroupValidator() - self._validators["line"] = v_scatterpolargl.LineValidator() - self._validators["marker"] = v_scatterpolargl.MarkerValidator() - self._validators["meta"] = v_scatterpolargl.MetaValidator() - self._validators["metasrc"] = v_scatterpolargl.MetasrcValidator() - self._validators["mode"] = v_scatterpolargl.ModeValidator() - self._validators["name"] = v_scatterpolargl.NameValidator() - self._validators["opacity"] = v_scatterpolargl.OpacityValidator() - self._validators["r"] = v_scatterpolargl.RValidator() - self._validators["r0"] = v_scatterpolargl.R0Validator() - self._validators["rsrc"] = v_scatterpolargl.RsrcValidator() - self._validators["selected"] = v_scatterpolargl.SelectedValidator() - self._validators["selectedpoints"] = v_scatterpolargl.SelectedpointsValidator() - self._validators["showlegend"] = v_scatterpolargl.ShowlegendValidator() - self._validators["stream"] = v_scatterpolargl.StreamValidator() - self._validators["subplot"] = v_scatterpolargl.SubplotValidator() - self._validators["text"] = v_scatterpolargl.TextValidator() - self._validators["textfont"] = v_scatterpolargl.TextfontValidator() - self._validators["textposition"] = v_scatterpolargl.TextpositionValidator() - self._validators[ - "textpositionsrc" - ] = v_scatterpolargl.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatterpolargl.TextsrcValidator() - self._validators["texttemplate"] = v_scatterpolargl.TexttemplateValidator() - self._validators[ - "texttemplatesrc" - ] = v_scatterpolargl.TexttemplatesrcValidator() - self._validators["theta"] = v_scatterpolargl.ThetaValidator() - self._validators["theta0"] = v_scatterpolargl.Theta0Validator() - self._validators["thetasrc"] = v_scatterpolargl.ThetasrcValidator() - self._validators["thetaunit"] = v_scatterpolargl.ThetaunitValidator() - self._validators["uid"] = v_scatterpolargl.UidValidator() - self._validators["uirevision"] = v_scatterpolargl.UirevisionValidator() - self._validators["unselected"] = v_scatterpolargl.UnselectedValidator() - self._validators["visible"] = v_scatterpolargl.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dr", None) - self["dr"] = dr if dr is not None else _v - _v = arg.pop("dtheta", None) - self["dtheta"] = dtheta if dtheta is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("r0", None) - self["r0"] = r0 if r0 is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("theta", None) - self["theta"] = theta if theta is not None else _v - _v = arg.pop("theta0", None) - self["theta0"] = theta0 if theta0 is not None else _v - _v = arg.pop("thetasrc", None) - self["thetasrc"] = thetasrc if thetasrc is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scatterpolargl" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatterpolargl", val="scatterpolargl" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scatterpolar(_BaseTraceType): - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether or not markers and text nodes are clipped - about the subplot axes. To show markers and text nodes above - axis lines and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dr - # -- - @property - def dr(self): - """ - Sets the r coordinate step. - - The 'dr' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dr"] - - @dr.setter - def dr(self, val): - self["dr"] = val - - # dtheta - # ------ - @property - def dtheta(self): - """ - Sets the theta coordinate step. By default, the `dtheta` step - equals the subplot's period divided by the length of the `r` - coordinates. - - The 'dtheta' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtheta"] - - @dtheta.setter - def dtheta(self, val): - self["dtheta"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". scatterpolar has a subset of the options - available to scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has gaps) into a - closed shape. "tonext" fills the space between two traces if - one completely encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is no trace before - it. "tonext" should not be used if one trace does not enclose - the other. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters - (e.g. 'r+theta') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scatterpolar.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scatterpolar.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolar.marke - r.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scatterpolar.marke - r.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterpolar.marke - r.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scatterpolar.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # r - # - - @property - def r(self): - """ - Sets the radial coordinates - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # r0 - # -- - @property - def r0(self): - """ - Alternate to `r`. Builds a linear space of r coordinates. Use - with `dr` where `r0` is the starting coordinate and `dr` the - step. - - The 'r0' property accepts values of any type - - Returns - ------- - Any - """ - return self["r0"] - - @r0.setter - def r0(self, val): - self["r0"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on Chart Studio Cloud for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolar.selec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.selec - ted.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scatterpolar.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scatterpolar.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - polar subplot. If "polar" (the default value), the data refer - to `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'polar', that may be specified as the string 'polar' - optionally followed by an integer >= 1 - (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatterpolar.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `r`, `theta` and `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # theta - # ----- - @property - def theta(self): - """ - Sets the angular coordinates - - The 'theta' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["theta"] - - @theta.setter - def theta(self, val): - self["theta"] = val - - # theta0 - # ------ - @property - def theta0(self): - """ - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the starting - coordinate and `dtheta` the step. - - The 'theta0' property accepts values of any type - - Returns - ------- - Any - """ - return self["theta0"] - - @theta0.setter - def theta0(self, val): - self["theta0"] = val - - # thetasrc - # -------- - @property - def thetasrc(self): - """ - Sets the source reference on Chart Studio Cloud for theta . - - The 'thetasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["thetasrc"] - - @thetasrc.setter - def thetasrc(self, val): - self["thetasrc"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the unit of input "theta" values. Has an effect only when - on "linear" angular axes. - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees', 'gradians'] - - Returns - ------- - Any - """ - return self["thetaunit"] - - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Textfont` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.scatterpolar.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterpolar has a subset of - the options available to scatter. "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterpolar.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatterpolar.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolar.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.scatterpolar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolar.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `r`, `theta` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud for - theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolar.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - **kwargs - ): - """ - Construct a new Scatterpolar object - - The scatterpolar trace type encompasses line charts, scatter - charts, text charts, and bubble charts in polar coordinates. - The data visualized as scatter point or lines is set in `r` - (radial) and `theta` (angular) coordinates Text (appearing - either on the chart or on hover only) is via `text`. Bubble - charts are achieved by setting `marker.size` and/or - `marker.color` to numerical arrays. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scatterpolar` - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterpolar has a subset of - the options available to scatter. "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterpolar.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatterpolar.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolar.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.scatterpolar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolar.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `r`, `theta` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud for - theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolar.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Scatterpolar - """ - super(Scatterpolar, self).__init__("scatterpolar") - - # Validate arg - # ------------ - 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.Scatterpolar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scatterpolar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scatterpolar as v_scatterpolar - - # Initialize validators - # --------------------- - self._validators["cliponaxis"] = v_scatterpolar.CliponaxisValidator() - self._validators["connectgaps"] = v_scatterpolar.ConnectgapsValidator() - self._validators["customdata"] = v_scatterpolar.CustomdataValidator() - self._validators["customdatasrc"] = v_scatterpolar.CustomdatasrcValidator() - self._validators["dr"] = v_scatterpolar.DrValidator() - self._validators["dtheta"] = v_scatterpolar.DthetaValidator() - self._validators["fill"] = v_scatterpolar.FillValidator() - self._validators["fillcolor"] = v_scatterpolar.FillcolorValidator() - self._validators["hoverinfo"] = v_scatterpolar.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatterpolar.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatterpolar.HoverlabelValidator() - self._validators["hoveron"] = v_scatterpolar.HoveronValidator() - self._validators["hovertemplate"] = v_scatterpolar.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scatterpolar.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatterpolar.HovertextValidator() - self._validators["hovertextsrc"] = v_scatterpolar.HovertextsrcValidator() - self._validators["ids"] = v_scatterpolar.IdsValidator() - self._validators["idssrc"] = v_scatterpolar.IdssrcValidator() - self._validators["legendgroup"] = v_scatterpolar.LegendgroupValidator() - self._validators["line"] = v_scatterpolar.LineValidator() - self._validators["marker"] = v_scatterpolar.MarkerValidator() - self._validators["meta"] = v_scatterpolar.MetaValidator() - self._validators["metasrc"] = v_scatterpolar.MetasrcValidator() - self._validators["mode"] = v_scatterpolar.ModeValidator() - self._validators["name"] = v_scatterpolar.NameValidator() - self._validators["opacity"] = v_scatterpolar.OpacityValidator() - self._validators["r"] = v_scatterpolar.RValidator() - self._validators["r0"] = v_scatterpolar.R0Validator() - self._validators["rsrc"] = v_scatterpolar.RsrcValidator() - self._validators["selected"] = v_scatterpolar.SelectedValidator() - self._validators["selectedpoints"] = v_scatterpolar.SelectedpointsValidator() - self._validators["showlegend"] = v_scatterpolar.ShowlegendValidator() - self._validators["stream"] = v_scatterpolar.StreamValidator() - self._validators["subplot"] = v_scatterpolar.SubplotValidator() - self._validators["text"] = v_scatterpolar.TextValidator() - self._validators["textfont"] = v_scatterpolar.TextfontValidator() - self._validators["textposition"] = v_scatterpolar.TextpositionValidator() - self._validators["textpositionsrc"] = v_scatterpolar.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatterpolar.TextsrcValidator() - self._validators["texttemplate"] = v_scatterpolar.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scatterpolar.TexttemplatesrcValidator() - self._validators["theta"] = v_scatterpolar.ThetaValidator() - self._validators["theta0"] = v_scatterpolar.Theta0Validator() - self._validators["thetasrc"] = v_scatterpolar.ThetasrcValidator() - self._validators["thetaunit"] = v_scatterpolar.ThetaunitValidator() - self._validators["uid"] = v_scatterpolar.UidValidator() - self._validators["uirevision"] = v_scatterpolar.UirevisionValidator() - self._validators["unselected"] = v_scatterpolar.UnselectedValidator() - self._validators["visible"] = v_scatterpolar.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dr", None) - self["dr"] = dr if dr is not None else _v - _v = arg.pop("dtheta", None) - self["dtheta"] = dtheta if dtheta is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("r0", None) - self["r0"] = r0 if r0 is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("theta", None) - self["theta"] = theta if theta is not None else _v - _v = arg.pop("theta0", None) - self["theta0"] = theta0 if theta0 is not None else _v - _v = arg.pop("thetasrc", None) - self["thetasrc"] = thetasrc if thetasrc is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scatterpolar" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatterpolar", val="scatterpolar" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scattermapbox(_BaseTraceType): - - # below - # ----- - @property - def below(self): - """ - Determines if this scattermapbox trace's layers are to be - inserted before the layer with the specified ID. By default, - scattermapbox layers are inserted above all the base layers. To - place the scattermapbox layers above every other layer, set - `below` to "''". - - The 'below' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["below"] - - @below.setter - def below(self, val): - self["below"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". "toself" connects the endpoints of the trace (or - each segment of the trace if it has gaps) into a closed shape. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'toself'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters - (e.g. 'lon+lat') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scattermapbox.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (lon,lat) pair If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # lat - # --- - @property - def lat(self): - """ - Sets the latitude coordinates (in degrees North). - - The 'lat' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # latsrc - # ------ - @property - def latsrc(self): - """ - Sets the source reference on Chart Studio Cloud for lat . - - The 'latsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["latsrc"] - - @latsrc.setter - def latsrc(self, val): - self["latsrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scattermapbox.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude coordinates (in degrees East). - - The 'lon' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # lonsrc - # ------ - @property - def lonsrc(self): - """ - Sets the source reference on Chart Studio Cloud for lon . - - The 'lonsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lonsrc"] - - @lonsrc.setter - def lonsrc(self, val): - self["lonsrc"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattermapbox.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that - the array `marker.color` and `marker.size` are - only available for "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scattermapbox.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattermapbox.sele - cted.Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattermapbox.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scattermapbox.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - mapbox subplot. If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data refer to - `layout.mapbox2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'mapbox', that may be specified as the string 'mapbox' - optionally followed by an integer >= 1 - (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (lon,lat) pair If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @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.scattermapbox.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattermapbox.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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 - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `lat`, `lon` and `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattermapbox.unse - lected.Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattermapbox.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - below - Determines if this scattermapbox trace's layers are to - be inserted before the layer with the specified ID. By - default, scattermapbox layers are inserted above all - the base layers. To place the scattermapbox layers - above every other layer, set `below` to "''". - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattermapbox.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on Chart Studio Cloud for - lat . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattermapbox.Line` - instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on Chart Studio Cloud for - lon . - marker - :class:`plotly.graph_objects.scattermapbox.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattermapbox.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattermapbox.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - 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. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `lat`, `lon` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattermapbox.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - below=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legendgroup=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - **kwargs - ): - """ - Construct a new Scattermapbox object - - The data visualized as scatter point, lines or marker symbols - on a Mapbox GL geographic map is provided by longitude/latitude - pairs in `lon` and `lat`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scattermapbox` - below - Determines if this scattermapbox trace's layers are to - be inserted before the layer with the specified ID. By - default, scattermapbox layers are inserted above all - the base layers. To place the scattermapbox layers - above every other layer, set `below` to "''". - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattermapbox.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on Chart Studio Cloud for - lat . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattermapbox.Line` - instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on Chart Studio Cloud for - lon . - marker - :class:`plotly.graph_objects.scattermapbox.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattermapbox.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattermapbox.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - 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. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `lat`, `lon` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattermapbox.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Scattermapbox - """ - super(Scattermapbox, self).__init__("scattermapbox") - - # Validate arg - # ------------ - 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.Scattermapbox -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scattermapbox`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scattermapbox as v_scattermapbox - - # Initialize validators - # --------------------- - self._validators["below"] = v_scattermapbox.BelowValidator() - self._validators["connectgaps"] = v_scattermapbox.ConnectgapsValidator() - self._validators["customdata"] = v_scattermapbox.CustomdataValidator() - self._validators["customdatasrc"] = v_scattermapbox.CustomdatasrcValidator() - self._validators["fill"] = v_scattermapbox.FillValidator() - self._validators["fillcolor"] = v_scattermapbox.FillcolorValidator() - self._validators["hoverinfo"] = v_scattermapbox.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattermapbox.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattermapbox.HoverlabelValidator() - self._validators["hovertemplate"] = v_scattermapbox.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scattermapbox.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattermapbox.HovertextValidator() - self._validators["hovertextsrc"] = v_scattermapbox.HovertextsrcValidator() - self._validators["ids"] = v_scattermapbox.IdsValidator() - self._validators["idssrc"] = v_scattermapbox.IdssrcValidator() - self._validators["lat"] = v_scattermapbox.LatValidator() - self._validators["latsrc"] = v_scattermapbox.LatsrcValidator() - self._validators["legendgroup"] = v_scattermapbox.LegendgroupValidator() - self._validators["line"] = v_scattermapbox.LineValidator() - self._validators["lon"] = v_scattermapbox.LonValidator() - self._validators["lonsrc"] = v_scattermapbox.LonsrcValidator() - self._validators["marker"] = v_scattermapbox.MarkerValidator() - self._validators["meta"] = v_scattermapbox.MetaValidator() - self._validators["metasrc"] = v_scattermapbox.MetasrcValidator() - self._validators["mode"] = v_scattermapbox.ModeValidator() - self._validators["name"] = v_scattermapbox.NameValidator() - self._validators["opacity"] = v_scattermapbox.OpacityValidator() - self._validators["selected"] = v_scattermapbox.SelectedValidator() - self._validators["selectedpoints"] = v_scattermapbox.SelectedpointsValidator() - self._validators["showlegend"] = v_scattermapbox.ShowlegendValidator() - self._validators["stream"] = v_scattermapbox.StreamValidator() - self._validators["subplot"] = v_scattermapbox.SubplotValidator() - self._validators["text"] = v_scattermapbox.TextValidator() - self._validators["textfont"] = v_scattermapbox.TextfontValidator() - self._validators["textposition"] = v_scattermapbox.TextpositionValidator() - self._validators["textsrc"] = v_scattermapbox.TextsrcValidator() - self._validators["texttemplate"] = v_scattermapbox.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scattermapbox.TexttemplatesrcValidator() - self._validators["uid"] = v_scattermapbox.UidValidator() - self._validators["uirevision"] = v_scattermapbox.UirevisionValidator() - self._validators["unselected"] = v_scattermapbox.UnselectedValidator() - self._validators["visible"] = v_scattermapbox.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("latsrc", None) - self["latsrc"] = latsrc if latsrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("lonsrc", None) - self["lonsrc"] = lonsrc if lonsrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scattermapbox" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattermapbox", val="scattermapbox" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scattergl(_BaseTraceType): - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.ErrorX` - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scattergl.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.ErrorY` - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scattergl.ErrorY - """ - return self["error_y"] - - @error_y.setter - def error_y(self, val): - self["error_y"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Defaults to "none" - unless this trace is stacked, then it gets "tonexty" - ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 - respectively. "tonextx" and "tonexty" fill between the - endpoints of this trace and the endpoints of the trace before - it, connecting those endpoints with straight lines (to make a - stacked area graph); if there is no trace before it, they - behave like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the space between two - traces if one completely encloses the other (eg consecutive - contour lines), and behaves like "toself" if there is no trace - before it. "tonext" should not be used if one trace does not - enclose the other. Traces in a `stackgroup` will only fill to - (or be filled to) other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if fill- - linked traces are not already consecutive, the later ones will - be pushed down in the drawing order. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', - 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scattergl.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scattergl.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergl.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.scattergl.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scattergl.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergl.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.selected - .Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattergl.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scattergl.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattergl.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergl.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.unselect - ed.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattergl.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - :class:`plotly.graph_objects.scattergl.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.scattergl.ErrorY` instance - or dict with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattergl.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattergl.Line` instance - or dict with compatible properties - marker - :class:`plotly.graph_objects.scattergl.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergl.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergl.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergl.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Scattergl object - - The data visualized as scatter point or lines is set in `x` and - `y` using the WebGL plotting engine. Bubble charts are achieved - by setting `marker.size` and/or `marker.color` to a numerical - arrays. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scattergl` - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - :class:`plotly.graph_objects.scattergl.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.scattergl.ErrorY` instance - or dict with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattergl.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattergl.Line` instance - or dict with compatible properties - marker - :class:`plotly.graph_objects.scattergl.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergl.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergl.Stream` instance - or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergl.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Scattergl - """ - super(Scattergl, self).__init__("scattergl") - - # Validate arg - # ------------ - 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.Scattergl -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scattergl`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scattergl as v_scattergl - - # Initialize validators - # --------------------- - self._validators["connectgaps"] = v_scattergl.ConnectgapsValidator() - self._validators["customdata"] = v_scattergl.CustomdataValidator() - self._validators["customdatasrc"] = v_scattergl.CustomdatasrcValidator() - self._validators["dx"] = v_scattergl.DxValidator() - self._validators["dy"] = v_scattergl.DyValidator() - self._validators["error_x"] = v_scattergl.ErrorXValidator() - self._validators["error_y"] = v_scattergl.ErrorYValidator() - self._validators["fill"] = v_scattergl.FillValidator() - self._validators["fillcolor"] = v_scattergl.FillcolorValidator() - self._validators["hoverinfo"] = v_scattergl.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattergl.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattergl.HoverlabelValidator() - self._validators["hovertemplate"] = v_scattergl.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scattergl.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattergl.HovertextValidator() - self._validators["hovertextsrc"] = v_scattergl.HovertextsrcValidator() - self._validators["ids"] = v_scattergl.IdsValidator() - self._validators["idssrc"] = v_scattergl.IdssrcValidator() - self._validators["legendgroup"] = v_scattergl.LegendgroupValidator() - self._validators["line"] = v_scattergl.LineValidator() - self._validators["marker"] = v_scattergl.MarkerValidator() - self._validators["meta"] = v_scattergl.MetaValidator() - self._validators["metasrc"] = v_scattergl.MetasrcValidator() - self._validators["mode"] = v_scattergl.ModeValidator() - self._validators["name"] = v_scattergl.NameValidator() - self._validators["opacity"] = v_scattergl.OpacityValidator() - self._validators["selected"] = v_scattergl.SelectedValidator() - self._validators["selectedpoints"] = v_scattergl.SelectedpointsValidator() - self._validators["showlegend"] = v_scattergl.ShowlegendValidator() - self._validators["stream"] = v_scattergl.StreamValidator() - self._validators["text"] = v_scattergl.TextValidator() - self._validators["textfont"] = v_scattergl.TextfontValidator() - self._validators["textposition"] = v_scattergl.TextpositionValidator() - self._validators["textpositionsrc"] = v_scattergl.TextpositionsrcValidator() - self._validators["textsrc"] = v_scattergl.TextsrcValidator() - self._validators["texttemplate"] = v_scattergl.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scattergl.TexttemplatesrcValidator() - self._validators["uid"] = v_scattergl.UidValidator() - self._validators["uirevision"] = v_scattergl.UirevisionValidator() - self._validators["unselected"] = v_scattergl.UnselectedValidator() - self._validators["visible"] = v_scattergl.VisibleValidator() - self._validators["x"] = v_scattergl.XValidator() - self._validators["x0"] = v_scattergl.X0Validator() - self._validators["xaxis"] = v_scattergl.XAxisValidator() - self._validators["xcalendar"] = v_scattergl.XcalendarValidator() - self._validators["xsrc"] = v_scattergl.XsrcValidator() - self._validators["y"] = v_scattergl.YValidator() - self._validators["y0"] = v_scattergl.Y0Validator() - self._validators["yaxis"] = v_scattergl.YAxisValidator() - self._validators["ycalendar"] = v_scattergl.YcalendarValidator() - self._validators["ysrc"] = v_scattergl.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scattergl" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattergl", val="scattergl" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scattergeo(_BaseTraceType): - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # featureidkey - # ------------ - @property - def featureidkey(self): - """ - Sets the key in GeoJSON features which is used as id to match - the items included in the `locations` array. Only has an effect - when `geojson` is set. Support nested property, for example - "properties.name". - - The 'featureidkey' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["featureidkey"] - - @featureidkey.setter - def featureidkey(self, val): - self["featureidkey"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". "toself" connects the endpoints of the trace (or - each segment of the trace if it has gaps) into a closed shape. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'toself'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # geo - # --- - @property - def geo(self): - """ - Sets a reference between this trace's geospatial coordinates - and a geographic map. If "geo" (the default value), the - geospatial coordinates refer to `layout.geo`. If "geo2", the - geospatial coordinates refer to `layout.geo2`, and so on. - - The 'geo' property is an identifier of a particular - subplot, of type 'geo', that may be specified as the string 'geo' - optionally followed by an integer >= 1 - (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) - - Returns - ------- - str - """ - return self["geo"] - - @geo.setter - def geo(self, val): - self["geo"] = val - - # geojson - # ------- - @property - def geojson(self): - """ - Sets optional GeoJSON data associated with this trace. If not - given, the features on the base map are used when `locations` - is set. It can be set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of type - "FeatureCollection" or "Feature" with geometries of type - "Polygon" or "MultiPolygon". - - The 'geojson' property accepts values of any type - - Returns - ------- - Any - """ - return self["geojson"] - - @geojson.setter - def geojson(self, val): - self["geojson"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lon', 'lat', 'location', 'text', 'name'] joined with '+' characters - (e.g. 'lon+lat') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scattergeo.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (lon,lat) pair or - item in `locations`. If a single string, the same string - appears over all the data points. If an array of string, the - items are mapped in order to the this trace's (lon,lat) or - `locations` coordinates. To be seen, trace `hoverinfo` must - contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # lat - # --- - @property - def lat(self): - """ - Sets the latitude coordinates (in degrees North). - - The 'lat' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # latsrc - # ------ - @property - def latsrc(self): - """ - Sets the source reference on Chart Studio Cloud for lat . - - The 'latsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["latsrc"] - - @latsrc.setter - def latsrc(self, val): - self["latsrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scattergeo.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # locationmode - # ------------ - @property - def locationmode(self): - """ - Determines the set of locations used to match entries in - `locations` to regions on the map. Values "ISO-3", "USA- - states", *country names* correspond to features on the base map - and value "geojson-id" corresponds to features from a custom - GeoJSON linked to the `geojson` attribute. - - The 'locationmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['ISO-3', 'USA-states', 'country names', 'geojson-id'] - - Returns - ------- - Any - """ - return self["locationmode"] - - @locationmode.setter - def locationmode(self, val): - self["locationmode"] = val - - # locations - # --------- - @property - def locations(self): - """ - Sets the coordinates via location IDs or names. Coordinates - correspond to the centroid of each location given. See - `locationmode` for more info. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude coordinates (in degrees East). - - The 'lon' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # lonsrc - # ------ - @property - def lonsrc(self): - """ - Sets the source reference on Chart Studio Cloud for lon . - - The 'lonsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lonsrc"] - - @lonsrc.setter - def lonsrc(self, val): - self["lonsrc"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergeo.marker. - ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scattergeo.marker. - Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattergeo.marker. - Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scattergeo.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergeo.selecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.selecte - d.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattergeo.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scattergeo.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (lon,lat) pair or item - in `locations`. If a single string, the same string appears - over all the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) or `locations` - coordinates. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattergeo.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `lat`, `lon`, `location` and `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergeo.unselec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.unselec - ted.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattergeo.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - featureidkey - Sets the key in GeoJSON features which is used as id to - match the items included in the `locations` array. Only - has an effect when `geojson` is set. Support nested - property, for example "properties.name". - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this trace. - If not given, the features on the base map are used - when `locations` is set. It can be set as a valid - GeoJSON object or as a URL string. Note that we only - accept GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattergeo.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (lon,lat) - pair or item in `locations`. If a single string, the - same string appears over all the data points. If an - array of string, the items are mapped in order to the - this trace's (lon,lat) or `locations` coordinates. To - be seen, trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on Chart Studio Cloud for - lat . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattergeo.Line` instance - or dict with compatible properties - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. Values "ISO-3", - "USA-states", *country names* correspond to features on - the base map and value "geojson-id" corresponds to - features from a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. - Coordinates correspond to the centroid of each location - given. See `locationmode` for more info. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on Chart Studio Cloud for - lon . - marker - :class:`plotly.graph_objects.scattergeo.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergeo.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergeo.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (lon,lat) pair - or item in `locations`. If a single string, the same - string appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (lon,lat) or `locations` coordinates. If trace - `hoverinfo` contains a "text" flag and "hovertext" is - not set, these elements will be seen in the hover - labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `lat`, `lon`, - `location` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergeo.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - fill=None, - fillcolor=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legendgroup=None, - line=None, - locationmode=None, - locations=None, - locationssrc=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - **kwargs - ): - """ - Construct a new Scattergeo object - - The data visualized as scatter point or lines on a geographic - map is provided either by longitude/latitude pairs in `lon` and - `lat` respectively or by geographic location IDs or names in - `locations`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scattergeo` - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - featureidkey - Sets the key in GeoJSON features which is used as id to - match the items included in the `locations` array. Only - has an effect when `geojson` is set. Support nested - property, for example "properties.name". - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this trace. - If not given, the features on the base map are used - when `locations` is set. It can be set as a valid - GeoJSON object or as a URL string. Note that we only - accept GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattergeo.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (lon,lat) - pair or item in `locations`. If a single string, the - same string appears over all the data points. If an - array of string, the items are mapped in order to the - this trace's (lon,lat) or `locations` coordinates. To - be seen, trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on Chart Studio Cloud for - lat . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattergeo.Line` instance - or dict with compatible properties - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. Values "ISO-3", - "USA-states", *country names* correspond to features on - the base map and value "geojson-id" corresponds to - features from a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. - Coordinates correspond to the centroid of each location - given. See `locationmode` for more info. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on Chart Studio Cloud for - lon . - marker - :class:`plotly.graph_objects.scattergeo.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergeo.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergeo.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (lon,lat) pair - or item in `locations`. If a single string, the same - string appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (lon,lat) or `locations` coordinates. If trace - `hoverinfo` contains a "text" flag and "hovertext" is - not set, these elements will be seen in the hover - labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `lat`, `lon`, - `location` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergeo.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Scattergeo - """ - super(Scattergeo, self).__init__("scattergeo") - - # Validate arg - # ------------ - 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.Scattergeo -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scattergeo`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scattergeo as v_scattergeo - - # Initialize validators - # --------------------- - self._validators["connectgaps"] = v_scattergeo.ConnectgapsValidator() - self._validators["customdata"] = v_scattergeo.CustomdataValidator() - self._validators["customdatasrc"] = v_scattergeo.CustomdatasrcValidator() - self._validators["featureidkey"] = v_scattergeo.FeatureidkeyValidator() - self._validators["fill"] = v_scattergeo.FillValidator() - self._validators["fillcolor"] = v_scattergeo.FillcolorValidator() - self._validators["geo"] = v_scattergeo.GeoValidator() - self._validators["geojson"] = v_scattergeo.GeojsonValidator() - self._validators["hoverinfo"] = v_scattergeo.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattergeo.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattergeo.HoverlabelValidator() - self._validators["hovertemplate"] = v_scattergeo.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scattergeo.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattergeo.HovertextValidator() - self._validators["hovertextsrc"] = v_scattergeo.HovertextsrcValidator() - self._validators["ids"] = v_scattergeo.IdsValidator() - self._validators["idssrc"] = v_scattergeo.IdssrcValidator() - self._validators["lat"] = v_scattergeo.LatValidator() - self._validators["latsrc"] = v_scattergeo.LatsrcValidator() - self._validators["legendgroup"] = v_scattergeo.LegendgroupValidator() - self._validators["line"] = v_scattergeo.LineValidator() - self._validators["locationmode"] = v_scattergeo.LocationmodeValidator() - self._validators["locations"] = v_scattergeo.LocationsValidator() - self._validators["locationssrc"] = v_scattergeo.LocationssrcValidator() - self._validators["lon"] = v_scattergeo.LonValidator() - self._validators["lonsrc"] = v_scattergeo.LonsrcValidator() - self._validators["marker"] = v_scattergeo.MarkerValidator() - self._validators["meta"] = v_scattergeo.MetaValidator() - self._validators["metasrc"] = v_scattergeo.MetasrcValidator() - self._validators["mode"] = v_scattergeo.ModeValidator() - self._validators["name"] = v_scattergeo.NameValidator() - self._validators["opacity"] = v_scattergeo.OpacityValidator() - self._validators["selected"] = v_scattergeo.SelectedValidator() - self._validators["selectedpoints"] = v_scattergeo.SelectedpointsValidator() - self._validators["showlegend"] = v_scattergeo.ShowlegendValidator() - self._validators["stream"] = v_scattergeo.StreamValidator() - self._validators["text"] = v_scattergeo.TextValidator() - self._validators["textfont"] = v_scattergeo.TextfontValidator() - self._validators["textposition"] = v_scattergeo.TextpositionValidator() - self._validators["textpositionsrc"] = v_scattergeo.TextpositionsrcValidator() - self._validators["textsrc"] = v_scattergeo.TextsrcValidator() - self._validators["texttemplate"] = v_scattergeo.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scattergeo.TexttemplatesrcValidator() - self._validators["uid"] = v_scattergeo.UidValidator() - self._validators["uirevision"] = v_scattergeo.UirevisionValidator() - self._validators["unselected"] = v_scattergeo.UnselectedValidator() - self._validators["visible"] = v_scattergeo.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("featureidkey", None) - self["featureidkey"] = featureidkey if featureidkey is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("geo", None) - self["geo"] = geo if geo is not None else _v - _v = arg.pop("geojson", None) - self["geojson"] = geojson if geojson is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("latsrc", None) - self["latsrc"] = latsrc if latsrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("locationmode", None) - self["locationmode"] = locationmode if locationmode is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("lonsrc", None) - self["lonsrc"] = lonsrc if lonsrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scattergeo" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattergeo", val="scattergeo" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scattercarpet(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - Sets the a-axis coordinates. - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on Chart Studio Cloud for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val - - # b - # - - @property - def b(self): - """ - Sets the b-axis coordinates. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # bsrc - # ---- - @property - def bsrc(self): - """ - Sets the source reference on Chart Studio Cloud for b . - - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bsrc"] - - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val - - # carpet - # ------ - @property - def carpet(self): - """ - An identifier for this carpet, so that `scattercarpet` and - `contourcarpet` traces can specify a carpet plot on which they - lie - - The 'carpet' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["carpet"] - - @carpet.setter - def carpet(self, val): - self["carpet"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". scatterternary has a subset of the options - available to scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has gaps) into a - closed shape. "tonext" fills the space between two traces if - one completely encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is no trace before - it. "tonext" should not be used if one trace does not enclose - the other. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['a', 'b', 'text', 'name'] joined with '+' characters - (e.g. 'a+b') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scattercarpet.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (a,b) point. If a - single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b). To be seen, trace `hoverinfo` - must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scattercarpet.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattercarpet.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scattercarpet.mark - er.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattercarpet.mark - er.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scattercarpet.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattercarpet.sele - cted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.sele - cted.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scattercarpet.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scattercarpet.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (a,b) point. If a - single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b). If trace `hoverinfo` contains - a "text" flag and "hovertext" is not set, these elements will - be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattercarpet.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `a`, `b` and `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattercarpet.unse - lected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.unse - lected.Textfont` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.scattercarpet.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - a - Sets the a-axis coordinates. - asrc - Sets the source reference on Chart Studio Cloud for a - . - b - Sets the b-axis coordinates. - bsrc - Sets the source reference on Chart Studio Cloud for b - . - carpet - An identifier for this carpet, so that `scattercarpet` - and `contourcarpet` traces can specify a carpet plot on - which they lie - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattercarpet.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (a,b) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b). To - be seen, trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattercarpet.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattercarpet.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattercarpet.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattercarpet.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (a,b) point. If - a single string, the same string appears over all the - data points. If an array of strings, the items are - mapped in order to the the data points in (a,b). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `a`, `b` and - `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattercarpet.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - """ - - def __init__( - self, - arg=None, - a=None, - asrc=None, - b=None, - bsrc=None, - carpet=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxis=None, - yaxis=None, - **kwargs - ): - """ - Construct a new Scattercarpet object - - Plots a scatter trace on either the first carpet axis or the - carpet axis with a matching `carpet` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scattercarpet` - a - Sets the a-axis coordinates. - asrc - Sets the source reference on Chart Studio Cloud for a - . - b - Sets the b-axis coordinates. - bsrc - Sets the source reference on Chart Studio Cloud for b - . - carpet - An identifier for this carpet, so that `scattercarpet` - and `contourcarpet` traces can specify a carpet plot on - which they lie - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattercarpet.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (a,b) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b). To - be seen, trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scattercarpet.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattercarpet.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattercarpet.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattercarpet.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (a,b) point. If - a single string, the same string appears over all the - data points. If an array of strings, the items are - mapped in order to the the data points in (a,b). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `a`, `b` and - `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattercarpet.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - - Returns - ------- - Scattercarpet - """ - super(Scattercarpet, self).__init__("scattercarpet") - - # Validate arg - # ------------ - 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.Scattercarpet -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scattercarpet`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scattercarpet as v_scattercarpet - - # Initialize validators - # --------------------- - self._validators["a"] = v_scattercarpet.AValidator() - self._validators["asrc"] = v_scattercarpet.AsrcValidator() - self._validators["b"] = v_scattercarpet.BValidator() - self._validators["bsrc"] = v_scattercarpet.BsrcValidator() - self._validators["carpet"] = v_scattercarpet.CarpetValidator() - self._validators["connectgaps"] = v_scattercarpet.ConnectgapsValidator() - self._validators["customdata"] = v_scattercarpet.CustomdataValidator() - self._validators["customdatasrc"] = v_scattercarpet.CustomdatasrcValidator() - self._validators["fill"] = v_scattercarpet.FillValidator() - self._validators["fillcolor"] = v_scattercarpet.FillcolorValidator() - self._validators["hoverinfo"] = v_scattercarpet.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattercarpet.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattercarpet.HoverlabelValidator() - self._validators["hoveron"] = v_scattercarpet.HoveronValidator() - self._validators["hovertemplate"] = v_scattercarpet.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scattercarpet.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattercarpet.HovertextValidator() - self._validators["hovertextsrc"] = v_scattercarpet.HovertextsrcValidator() - self._validators["ids"] = v_scattercarpet.IdsValidator() - self._validators["idssrc"] = v_scattercarpet.IdssrcValidator() - self._validators["legendgroup"] = v_scattercarpet.LegendgroupValidator() - self._validators["line"] = v_scattercarpet.LineValidator() - self._validators["marker"] = v_scattercarpet.MarkerValidator() - self._validators["meta"] = v_scattercarpet.MetaValidator() - self._validators["metasrc"] = v_scattercarpet.MetasrcValidator() - self._validators["mode"] = v_scattercarpet.ModeValidator() - self._validators["name"] = v_scattercarpet.NameValidator() - self._validators["opacity"] = v_scattercarpet.OpacityValidator() - self._validators["selected"] = v_scattercarpet.SelectedValidator() - self._validators["selectedpoints"] = v_scattercarpet.SelectedpointsValidator() - self._validators["showlegend"] = v_scattercarpet.ShowlegendValidator() - self._validators["stream"] = v_scattercarpet.StreamValidator() - self._validators["text"] = v_scattercarpet.TextValidator() - self._validators["textfont"] = v_scattercarpet.TextfontValidator() - self._validators["textposition"] = v_scattercarpet.TextpositionValidator() - self._validators["textpositionsrc"] = v_scattercarpet.TextpositionsrcValidator() - self._validators["textsrc"] = v_scattercarpet.TextsrcValidator() - self._validators["texttemplate"] = v_scattercarpet.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scattercarpet.TexttemplatesrcValidator() - self._validators["uid"] = v_scattercarpet.UidValidator() - self._validators["uirevision"] = v_scattercarpet.UirevisionValidator() - self._validators["unselected"] = v_scattercarpet.UnselectedValidator() - self._validators["visible"] = v_scattercarpet.VisibleValidator() - self._validators["xaxis"] = v_scattercarpet.XAxisValidator() - self._validators["yaxis"] = v_scattercarpet.YAxisValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scattercarpet" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattercarpet", val="scattercarpet" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scatter3d(_BaseTraceType): - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.ErrorX` - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter3d.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.ErrorY` - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter3d.ErrorY - """ - return self["error_y"] - - @error_y.setter - def error_y(self, val): - self["error_y"] = val - - # error_z - # ------- - @property - def error_z(self): - """ - The 'error_z' property is an instance of ErrorZ - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.ErrorZ` - - A dict of string/value properties that will be passed - to the ErrorZ constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter3d.ErrorZ - """ - return self["error_z"] - - @error_z.setter - def error_z(self, val): - self["error_z"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scatter3d.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets text elements associated with each (x,y,z) triplet. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y,z) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scatter3d.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.scatter3d.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. Note that the marker - opacity for scatter3d traces must be a scalar - value for performance reasons. To set a - blending opacity value (i.e. which is not - transparent), set "marker.color" to an rgba - color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scatter3d.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # projection - # ---------- - @property - def projection(self): - """ - The 'projection' property is an instance of Projection - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.Projection` - - A dict of string/value properties that will be passed - to the Projection constructor - - Supported dict properties: - - x - :class:`plotly.graph_objects.scatter3d.projecti - on.X` instance or dict with compatible - properties - y - :class:`plotly.graph_objects.scatter3d.projecti - on.Y` instance or dict with compatible - properties - z - :class:`plotly.graph_objects.scatter3d.projecti - on.Z` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scatter3d.Projection - """ - return self["projection"] - - @projection.setter - def projection(self, val): - self["projection"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scatter3d.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # surfaceaxis - # ----------- - @property - def surfaceaxis(self): - """ - If "-1", the scatter points are not fill with a surface If 0, - 1, 2, the scatter points are filled with a Delaunay surface - about the x, y, z respectively. - - The 'surfaceaxis' property is an enumeration that may be specified as: - - One of the following enumeration values: - [-1, 0, 1, 2] - - Returns - ------- - Any - """ - return self["surfaceaxis"] - - @surfaceaxis.setter - def surfaceaxis(self, val): - self["surfaceaxis"] = val - - # surfacecolor - # ------------ - @property - def surfacecolor(self): - """ - Sets the surface fill color. - - The 'surfacecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["surfacecolor"] - - @surfacecolor.setter - def surfacecolor(self, val): - self["surfacecolor"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y,z) triplet. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y,z) coordinates. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatter3d.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the z coordinates. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zcalendar - # --------- - @property - def zcalendar(self): - """ - Sets the calendar system to use with `z` date data. - - The 'zcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["zcalendar"] - - @zcalendar.setter - def zcalendar(self, val): - self["zcalendar"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - error_x - :class:`plotly.graph_objects.scatter3d.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter3d.ErrorY` instance - or dict with compatible properties - error_z - :class:`plotly.graph_objects.scatter3d.ErrorZ` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatter3d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatter3d.Line` instance - or dict with compatible properties - marker - :class:`plotly.graph_objects.scatter3d.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - projection - :class:`plotly.graph_objects.scatter3d.Projection` - instance or dict with compatible properties - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatter3d.Stream` instance - or dict with compatible properties - surfaceaxis - If "-1", the scatter points are not fill with a surface - If 0, 1, 2, the scatter points are filled with a - Delaunay surface about the x, y, z respectively. - surfacecolor - Sets the surface fill color. - text - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - :class:`plotly.graph_objects.scatter3d.Textfont` - instance or dict with compatible properties - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - error_z=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - projection=None, - scene=None, - showlegend=None, - stream=None, - surfaceaxis=None, - surfacecolor=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xsrc=None, - y=None, - ycalendar=None, - ysrc=None, - z=None, - zcalendar=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Scatter3d object - - The data visualized as scatter point or lines in 3D dimension - is set in `x`, `y`, `z`. Text (appearing either on the chart or - on hover only) is via `text`. Bubble charts are achieved by - setting `marker.size` and/or `marker.color` Projections are - achieved via `projection`. Surface fills are achieved via - `surfaceaxis`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scatter3d` - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - error_x - :class:`plotly.graph_objects.scatter3d.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter3d.ErrorY` instance - or dict with compatible properties - error_z - :class:`plotly.graph_objects.scatter3d.ErrorZ` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatter3d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatter3d.Line` instance - or dict with compatible properties - marker - :class:`plotly.graph_objects.scatter3d.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - projection - :class:`plotly.graph_objects.scatter3d.Projection` - instance or dict with compatible properties - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatter3d.Stream` instance - or dict with compatible properties - surfaceaxis - If "-1", the scatter points are not fill with a surface - If 0, 1, 2, the scatter points are filled with a - Delaunay surface about the x, y, z respectively. - surfacecolor - Sets the surface fill color. - text - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - :class:`plotly.graph_objects.scatter3d.Textfont` - instance or dict with compatible properties - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Scatter3d - """ - super(Scatter3d, self).__init__("scatter3d") - - # Validate arg - # ------------ - 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.Scatter3d -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scatter3d`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scatter3d as v_scatter3d - - # Initialize validators - # --------------------- - self._validators["connectgaps"] = v_scatter3d.ConnectgapsValidator() - self._validators["customdata"] = v_scatter3d.CustomdataValidator() - self._validators["customdatasrc"] = v_scatter3d.CustomdatasrcValidator() - self._validators["error_x"] = v_scatter3d.ErrorXValidator() - self._validators["error_y"] = v_scatter3d.ErrorYValidator() - self._validators["error_z"] = v_scatter3d.ErrorZValidator() - self._validators["hoverinfo"] = v_scatter3d.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatter3d.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatter3d.HoverlabelValidator() - self._validators["hovertemplate"] = v_scatter3d.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scatter3d.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatter3d.HovertextValidator() - self._validators["hovertextsrc"] = v_scatter3d.HovertextsrcValidator() - self._validators["ids"] = v_scatter3d.IdsValidator() - self._validators["idssrc"] = v_scatter3d.IdssrcValidator() - self._validators["legendgroup"] = v_scatter3d.LegendgroupValidator() - self._validators["line"] = v_scatter3d.LineValidator() - self._validators["marker"] = v_scatter3d.MarkerValidator() - self._validators["meta"] = v_scatter3d.MetaValidator() - self._validators["metasrc"] = v_scatter3d.MetasrcValidator() - self._validators["mode"] = v_scatter3d.ModeValidator() - self._validators["name"] = v_scatter3d.NameValidator() - self._validators["opacity"] = v_scatter3d.OpacityValidator() - self._validators["projection"] = v_scatter3d.ProjectionValidator() - self._validators["scene"] = v_scatter3d.SceneValidator() - self._validators["showlegend"] = v_scatter3d.ShowlegendValidator() - self._validators["stream"] = v_scatter3d.StreamValidator() - self._validators["surfaceaxis"] = v_scatter3d.SurfaceaxisValidator() - self._validators["surfacecolor"] = v_scatter3d.SurfacecolorValidator() - self._validators["text"] = v_scatter3d.TextValidator() - self._validators["textfont"] = v_scatter3d.TextfontValidator() - self._validators["textposition"] = v_scatter3d.TextpositionValidator() - self._validators["textpositionsrc"] = v_scatter3d.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatter3d.TextsrcValidator() - self._validators["texttemplate"] = v_scatter3d.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scatter3d.TexttemplatesrcValidator() - self._validators["uid"] = v_scatter3d.UidValidator() - self._validators["uirevision"] = v_scatter3d.UirevisionValidator() - self._validators["visible"] = v_scatter3d.VisibleValidator() - self._validators["x"] = v_scatter3d.XValidator() - self._validators["xcalendar"] = v_scatter3d.XcalendarValidator() - self._validators["xsrc"] = v_scatter3d.XsrcValidator() - self._validators["y"] = v_scatter3d.YValidator() - self._validators["ycalendar"] = v_scatter3d.YcalendarValidator() - self._validators["ysrc"] = v_scatter3d.YsrcValidator() - self._validators["z"] = v_scatter3d.ZValidator() - self._validators["zcalendar"] = v_scatter3d.ZcalendarValidator() - self._validators["zsrc"] = v_scatter3d.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("error_z", None) - self["error_z"] = error_z if error_z is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("projection", None) - self["projection"] = projection if projection is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("surfaceaxis", None) - self["surfaceaxis"] = surfaceaxis if surfaceaxis is not None else _v - _v = arg.pop("surfacecolor", None) - self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zcalendar", None) - self["zcalendar"] = zcalendar if zcalendar is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scatter3d" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatter3d", val="scatter3d" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scatter(_BaseTraceType): - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether or not markers and text nodes are clipped - about the subplot axes. To show markers and text nodes above - axis lines and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.ErrorX` - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.ErrorY` - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter.ErrorY - """ - return self["error_y"] - - @error_y.setter - def error_y(self, val): - self["error_y"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Defaults to "none" - unless this trace is stacked, then it gets "tonexty" - ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 - respectively. "tonextx" and "tonexty" fill between the - endpoints of this trace and the endpoints of the trace before - it, connecting those endpoints with straight lines (to make a - stacked area graph); if there is no trace before it, they - behave like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the space between two - traces if one completely encloses the other (eg consecutive - contour lines), and behaves like "toself" if there is no trace - before it. "tonext" should not be used if one trace does not - enclose the other. Traces in a `stackgroup` will only fill to - (or be filled to) other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if fill- - linked traces are not already consecutive, the later ones will - be pushed down in the drawing order. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', - 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # groupnorm - # --------- - @property - def groupnorm(self): - """ - Only relevant when `stackgroup` is used, and only the first - `groupnorm` found in the `stackgroup` will be used - including - if `visible` is "legendonly" but not if it is `false`. Sets the - normalization for the sum of this `stackgroup`. With - "fraction", the value of each trace at each location is divided - by the sum of all trace values at that location. "percent" is - the same but multiplied by 100 to show percentages. If there - are multiple subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own set. - - The 'groupnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'fraction', 'percent'] - - Returns - ------- - Any - """ - return self["groupnorm"] - - @groupnorm.setter - def groupnorm(self, val): - self["groupnorm"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.scatter.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - simplify - Simplifies lines by removing nearly-collinear - points. When transitioning lines, it may be - desirable to disable this so that the number of - points along the resulting SVG path is - unaffected. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scatter.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter.marker.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scatter.marker.Gra - dient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatter.marker.Lin - e` instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.scatter.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Only relevant when `stackgroup` is used, and only the first - `orientation` found in the `stackgroup` will be used - - including if `visible` is "legendonly" but not if it is - `false`. Sets the stacking direction. With "v" ("h"), the y (x) - values of subsequent traces are added. Also affects the default - value of `fill`. - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # r - # - - @property - def r(self): - """ - r coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the radial coordinatesfor - legacy polar chart only. - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on Chart Studio Cloud for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatter.selected.M - arker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.selected.T - extfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scatter.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stackgaps - # --------- - @property - def stackgaps(self): - """ - Only relevant when `stackgroup` is used, and only the first - `stackgaps` found in the `stackgroup` will be used - including - if `visible` is "legendonly" but not if it is `false`. - Determines how we handle locations at which other traces in - this group have data but this one does not. With *infer zero* - we insert a zero at these locations. With "interpolate" we - linearly interpolate between existing values, and extrapolate a - constant beyond the existing values. - - The 'stackgaps' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['infer zero', 'interpolate'] - - Returns - ------- - Any - """ - return self["stackgaps"] - - @stackgaps.setter - def stackgaps(self, val): - self["stackgaps"] = val - - # stackgroup - # ---------- - @property - def stackgroup(self): - """ - Set several scatter traces (on the same subplot) to the same - stackgroup in order to add their y values (or their x values if - `orientation` is "h"). If blank or omitted this trace will not - be stacked. Stacking also turns `fill` on by default, using - "tonexty" ("tonextx") if `orientation` is "h" ("v") and sets - the default `mode` to "lines" irrespective of point count. You - can only stack on a numeric (linear or log) axis. Traces in a - `stackgroup` will only fill to (or be filled to) other traces - in the same group. With multiple `stackgroup`s or some traces - stacked and some not, if fill-linked traces are not already - consecutive, the later ones will be pushed down in the drawing - order. - - The 'stackgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["stackgroup"] - - @stackgroup.setter - def stackgroup(self, val): - self["stackgroup"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.scatter.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # t - # - - @property - def t(self): - """ - t coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the angular coordinatesfor - legacy polar chart only. - - The 't' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the text font. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatter.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # tsrc - # ---- - @property - def tsrc(self): - """ - Sets the source reference on Chart Studio Cloud for t . - - The 'tsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tsrc"] - - @tsrc.setter - def tsrc(self, val): - self["tsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatter.unselected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.unselected - .Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.scatter.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - :class:`plotly.graph_objects.scatter.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter.ErrorY` instance - or dict with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - groupnorm - Only relevant when `stackgroup` is used, and only the - first `groupnorm` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the normalization for the sum of - this `stackgroup`. With "fraction", the value of each - trace at each location is divided by the sum of all - trace values at that location. "percent" is the same - but multiplied by 100 to show percentages. If there are - multiple subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own set. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatter.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatter.Line` instance or - dict with compatible properties - marker - :class:`plotly.graph_objects.scatter.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - orientation - Only relevant when `stackgroup` is used, and only the - first `orientation` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the stacking direction. With "v" - ("h"), the y (x) values of subsequent traces are added. - Also affects the default value of `fill`. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.scatter.Selected` instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stackgaps - Only relevant when `stackgroup` is used, and only the - first `stackgaps` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Determines how we handle locations at - which other traces in this group have data but this one - does not. With *infer zero* we insert a zero at these - locations. With "interpolate" we linearly interpolate - between existing values, and extrapolate a constant - beyond the existing values. - stackgroup - Set several scatter traces (on the same subplot) to the - same stackgroup in order to add their y values (or - their x values if `orientation` is "h"). If blank or - omitted this trace will not be stacked. Stacking also - turns `fill` on by default, using "tonexty" ("tonextx") - if `orientation` is "h" ("v") and sets the default - `mode` to "lines" irrespective of point count. You can - only stack on a numeric (linear or log) axis. Traces in - a `stackgroup` will only fill to (or be filled to) - other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if - fill-linked traces are not already consecutive, the - later ones will be pushed down in the drawing order. - stream - :class:`plotly.graph_objects.scatter.Stream` instance - or dict with compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - tsrc - Sets the source reference on Chart Studio Cloud for t - . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatter.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - groupnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - orientation=None, - r=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stackgaps=None, - stackgroup=None, - stream=None, - t=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Scatter object - - The scatter trace type encompasses line charts, scatter charts, - text charts, and bubble charts. The data visualized as scatter - point or lines is set in `x` and `y`. Text (appearing either on - the chart or on hover only) is via `text`. Bubble charts are - achieved by setting `marker.size` and/or `marker.color` to - numerical arrays. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Scatter` - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - :class:`plotly.graph_objects.scatter.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter.ErrorY` instance - or dict with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - groupnorm - Only relevant when `stackgroup` is used, and only the - first `groupnorm` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the normalization for the sum of - this `stackgroup`. With "fraction", the value of each - trace at each location is divided by the sum of all - trace values at that location. "percent" is the same - but multiplied by 100 to show percentages. If there are - multiple subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own set. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatter.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.scatter.Line` instance or - dict with compatible properties - marker - :class:`plotly.graph_objects.scatter.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - orientation - Only relevant when `stackgroup` is used, and only the - first `orientation` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the stacking direction. With "v" - ("h"), the y (x) values of subsequent traces are added. - Also affects the default value of `fill`. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.scatter.Selected` instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stackgaps - Only relevant when `stackgroup` is used, and only the - first `stackgaps` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Determines how we handle locations at - which other traces in this group have data but this one - does not. With *infer zero* we insert a zero at these - locations. With "interpolate" we linearly interpolate - between existing values, and extrapolate a constant - beyond the existing values. - stackgroup - Set several scatter traces (on the same subplot) to the - same stackgroup in order to add their y values (or - their x values if `orientation` is "h"). If blank or - omitted this trace will not be stacked. Stacking also - turns `fill` on by default, using "tonexty" ("tonextx") - if `orientation` is "h" ("v") and sets the default - `mode` to "lines" irrespective of point count. You can - only stack on a numeric (linear or log) axis. Traces in - a `stackgroup` will only fill to (or be filled to) - other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if - fill-linked traces are not already consecutive, the - later ones will be pushed down in the drawing order. - stream - :class:`plotly.graph_objects.scatter.Stream` instance - or dict with compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - tsrc - Sets the source reference on Chart Studio Cloud for t - . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatter.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Scatter - """ - super(Scatter, self).__init__("scatter") - - # Validate arg - # ------------ - 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.Scatter -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Scatter`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import scatter as v_scatter - - # Initialize validators - # --------------------- - self._validators["cliponaxis"] = v_scatter.CliponaxisValidator() - self._validators["connectgaps"] = v_scatter.ConnectgapsValidator() - self._validators["customdata"] = v_scatter.CustomdataValidator() - self._validators["customdatasrc"] = v_scatter.CustomdatasrcValidator() - self._validators["dx"] = v_scatter.DxValidator() - self._validators["dy"] = v_scatter.DyValidator() - self._validators["error_x"] = v_scatter.ErrorXValidator() - self._validators["error_y"] = v_scatter.ErrorYValidator() - self._validators["fill"] = v_scatter.FillValidator() - self._validators["fillcolor"] = v_scatter.FillcolorValidator() - self._validators["groupnorm"] = v_scatter.GroupnormValidator() - self._validators["hoverinfo"] = v_scatter.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatter.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatter.HoverlabelValidator() - self._validators["hoveron"] = v_scatter.HoveronValidator() - self._validators["hovertemplate"] = v_scatter.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scatter.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatter.HovertextValidator() - self._validators["hovertextsrc"] = v_scatter.HovertextsrcValidator() - self._validators["ids"] = v_scatter.IdsValidator() - self._validators["idssrc"] = v_scatter.IdssrcValidator() - self._validators["legendgroup"] = v_scatter.LegendgroupValidator() - self._validators["line"] = v_scatter.LineValidator() - self._validators["marker"] = v_scatter.MarkerValidator() - self._validators["meta"] = v_scatter.MetaValidator() - self._validators["metasrc"] = v_scatter.MetasrcValidator() - self._validators["mode"] = v_scatter.ModeValidator() - self._validators["name"] = v_scatter.NameValidator() - self._validators["opacity"] = v_scatter.OpacityValidator() - self._validators["orientation"] = v_scatter.OrientationValidator() - self._validators["r"] = v_scatter.RValidator() - self._validators["rsrc"] = v_scatter.RsrcValidator() - self._validators["selected"] = v_scatter.SelectedValidator() - self._validators["selectedpoints"] = v_scatter.SelectedpointsValidator() - self._validators["showlegend"] = v_scatter.ShowlegendValidator() - self._validators["stackgaps"] = v_scatter.StackgapsValidator() - self._validators["stackgroup"] = v_scatter.StackgroupValidator() - self._validators["stream"] = v_scatter.StreamValidator() - self._validators["t"] = v_scatter.TValidator() - self._validators["text"] = v_scatter.TextValidator() - self._validators["textfont"] = v_scatter.TextfontValidator() - self._validators["textposition"] = v_scatter.TextpositionValidator() - self._validators["textpositionsrc"] = v_scatter.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatter.TextsrcValidator() - self._validators["texttemplate"] = v_scatter.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_scatter.TexttemplatesrcValidator() - self._validators["tsrc"] = v_scatter.TsrcValidator() - self._validators["uid"] = v_scatter.UidValidator() - self._validators["uirevision"] = v_scatter.UirevisionValidator() - self._validators["unselected"] = v_scatter.UnselectedValidator() - self._validators["visible"] = v_scatter.VisibleValidator() - self._validators["x"] = v_scatter.XValidator() - self._validators["x0"] = v_scatter.X0Validator() - self._validators["xaxis"] = v_scatter.XAxisValidator() - self._validators["xcalendar"] = v_scatter.XcalendarValidator() - self._validators["xsrc"] = v_scatter.XsrcValidator() - self._validators["y"] = v_scatter.YValidator() - self._validators["y0"] = v_scatter.Y0Validator() - self._validators["yaxis"] = v_scatter.YAxisValidator() - self._validators["ycalendar"] = v_scatter.YcalendarValidator() - self._validators["ysrc"] = v_scatter.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("groupnorm", None) - self["groupnorm"] = groupnorm if groupnorm is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stackgaps", None) - self["stackgaps"] = stackgaps if stackgaps is not None else _v - _v = arg.pop("stackgroup", None) - self["stackgroup"] = stackgroup if stackgroup is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("tsrc", None) - self["tsrc"] = tsrc if tsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "scatter" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatter", val="scatter" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Sankey(_BaseTraceType): - - # arrangement - # ----------- - @property - def arrangement(self): - """ - If value is `snap` (the default), the node arrangement is - assisted by automatic snapping of elements to preserve space - between nodes specified via `nodepad`. If value is - `perpendicular`, the nodes can only move along a line - perpendicular to the flow. If value is `freeform`, the nodes - can freely move on the plane. If value is `fixed`, the nodes - are stationary. - - The 'arrangement' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['snap', 'perpendicular', 'freeform', 'fixed'] - - Returns - ------- - Any - """ - return self["arrangement"] - - @arrangement.setter - def arrangement(self, val): - self["arrangement"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for - this row in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace - (in plot fraction). - y - Sets the vertical domain of this sankey trace - (in plot fraction). - - Returns - ------- - plotly.graph_objs.sankey.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - Note that this attribute is superseded by `node.hoverinfo` and - `node.hoverinfo` for nodes and links respectively. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of [] joined with '+' characters - (e.g. '') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - Returns - ------- - Any - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.sankey.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # link - # ---- - @property - def link(self): - """ - The links of the Sankey plot. - - The 'link' property is an instance of Link - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.Link` - - A dict of string/value properties that will be passed - to the Link constructor - - Supported dict properties: - - color - Sets the `link` color. It can be a single - value, or an array for specifying color for - each `link`. If `link.color` is omitted, then - by default, a translucent grey link will be - used. - colorscales - A tuple of :class:`plotly.graph_objects.sankey. - link.Colorscale` instances or dicts with - compatible properties - colorscaledefaults - When used in a template (as layout.template.dat - a.sankey.link.colorscaledefaults), sets the - default property values to use for elements of - sankey.link.colorscales - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - customdata - Assigns extra data to each link. - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear when - hovering links. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.link.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - label - The shown name of the link. - labelsrc - Sets the source reference on Chart Studio Cloud - for label . - line - :class:`plotly.graph_objects.sankey.link.Line` - instance or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on Chart Studio Cloud - for source . - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on Chart Studio Cloud - for target . - value - A numeric value representing the flow volume - value. - valuesrc - Sets the source reference on Chart Studio Cloud - for value . - - Returns - ------- - plotly.graph_objs.sankey.Link - """ - return self["link"] - - @link.setter - def link(self, val): - self["link"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # node - # ---- - @property - def node(self): - """ - The nodes of the Sankey plot. - - The 'node' property is an instance of Node - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.Node` - - A dict of string/value properties that will be passed - to the Node constructor - - Supported dict properties: - - color - Sets the `node` color. It can be a single - value, or an array for specifying color for - each `node`. If `node.color` is omitted, then - the default `Plotly` color palette will be - cycled through to have a variety of colors. - These defaults are not fully opaque, to allow - some visibility of what is beneath the node. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - customdata - Assigns extra data to each node. - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - groups - Groups of nodes. Each group is defined by an - array with the indices of the nodes it - contains. Multiple groups can be specified. - hoverinfo - Determines which trace information appear when - hovering nodes. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.node.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - label - The shown name of the node. - labelsrc - Sets the source reference on Chart Studio Cloud - for label . - line - :class:`plotly.graph_objects.sankey.node.Line` - instance or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - The normalized vertical position of the node. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - - Returns - ------- - plotly.graph_objs.sankey.Node - """ - return self["node"] - - @node.setter - def node(self, val): - self["node"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the Sankey diagram. - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.sankey.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font for node labels - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.sankey.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # valueformat - # ----------- - @property - def valueformat(self): - """ - Sets the value formatting rule using d3 formatting mini- - language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'valueformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["valueformat"] - - @valueformat.setter - def valueformat(self, val): - self["valueformat"] = val - - # valuesuffix - # ----------- - @property - def valuesuffix(self): - """ - Adds a unit to follow the value in the hover tooltip. Add a - space if a separation is necessary from the value. - - The 'valuesuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["valuesuffix"] - - @valuesuffix.setter - def valuesuffix(self, val): - self["valuesuffix"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - arrangement - If value is `snap` (the default), the node arrangement - is assisted by automatic snapping of elements to - preserve space between nodes specified via `nodepad`. - If value is `perpendicular`, the nodes can only move - along a line perpendicular to the flow. If value is - `freeform`, the nodes can freely move on the plane. If - value is `fixed`, the nodes are stationary. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.sankey.Domain` instance or - dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. Note that this attribute is - superseded by `node.hoverinfo` and `node.hoverinfo` for - nodes and links respectively. - hoverlabel - :class:`plotly.graph_objects.sankey.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - link - The links of the Sankey plot. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - node - The nodes of the Sankey plot. - orientation - Sets the orientation of the Sankey diagram. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - stream - :class:`plotly.graph_objects.sankey.Stream` instance or - dict with compatible properties - textfont - Sets the font for node labels - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - valuesuffix - Adds a unit to follow the value in the hover tooltip. - Add a space if a separation is necessary from the - value. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - arrangement=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverlabel=None, - ids=None, - idssrc=None, - link=None, - meta=None, - metasrc=None, - name=None, - node=None, - orientation=None, - selectedpoints=None, - stream=None, - textfont=None, - uid=None, - uirevision=None, - valueformat=None, - valuesuffix=None, - visible=None, - **kwargs - ): - """ - Construct a new Sankey object - - Sankey plots for network flow data analysis. The nodes are - specified in `nodes` and the links between sources and targets - in `links`. The colors are set in `nodes[i].color` and - `links[i].color`, otherwise defaults are used. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Sankey` - arrangement - If value is `snap` (the default), the node arrangement - is assisted by automatic snapping of elements to - preserve space between nodes specified via `nodepad`. - If value is `perpendicular`, the nodes can only move - along a line perpendicular to the flow. If value is - `freeform`, the nodes can freely move on the plane. If - value is `fixed`, the nodes are stationary. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - domain - :class:`plotly.graph_objects.sankey.Domain` instance or - dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. Note that this attribute is - superseded by `node.hoverinfo` and `node.hoverinfo` for - nodes and links respectively. - hoverlabel - :class:`plotly.graph_objects.sankey.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - link - The links of the Sankey plot. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - node - The nodes of the Sankey plot. - orientation - Sets the orientation of the Sankey diagram. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - stream - :class:`plotly.graph_objects.sankey.Stream` instance or - dict with compatible properties - textfont - Sets the font for node labels - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - valuesuffix - Adds a unit to follow the value in the hover tooltip. - Add a space if a separation is necessary from the - value. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Sankey - """ - super(Sankey, self).__init__("sankey") - - # Validate arg - # ------------ - 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.Sankey -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Sankey`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import sankey as v_sankey - - # Initialize validators - # --------------------- - self._validators["arrangement"] = v_sankey.ArrangementValidator() - self._validators["customdata"] = v_sankey.CustomdataValidator() - self._validators["customdatasrc"] = v_sankey.CustomdatasrcValidator() - self._validators["domain"] = v_sankey.DomainValidator() - self._validators["hoverinfo"] = v_sankey.HoverinfoValidator() - self._validators["hoverlabel"] = v_sankey.HoverlabelValidator() - self._validators["ids"] = v_sankey.IdsValidator() - self._validators["idssrc"] = v_sankey.IdssrcValidator() - self._validators["link"] = v_sankey.LinkValidator() - self._validators["meta"] = v_sankey.MetaValidator() - self._validators["metasrc"] = v_sankey.MetasrcValidator() - self._validators["name"] = v_sankey.NameValidator() - self._validators["node"] = v_sankey.NodeValidator() - self._validators["orientation"] = v_sankey.OrientationValidator() - self._validators["selectedpoints"] = v_sankey.SelectedpointsValidator() - self._validators["stream"] = v_sankey.StreamValidator() - self._validators["textfont"] = v_sankey.TextfontValidator() - self._validators["uid"] = v_sankey.UidValidator() - self._validators["uirevision"] = v_sankey.UirevisionValidator() - self._validators["valueformat"] = v_sankey.ValueformatValidator() - self._validators["valuesuffix"] = v_sankey.ValuesuffixValidator() - self._validators["visible"] = v_sankey.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arrangement", None) - self["arrangement"] = arrangement if arrangement is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("link", None) - self["link"] = link if link is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("node", None) - self["node"] = node if node is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("valueformat", None) - self["valueformat"] = valueformat if valueformat is not None else _v - _v = arg.pop("valuesuffix", None) - self["valuesuffix"] = valuesuffix if valuesuffix is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "sankey" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="sankey", val="sankey" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Pointcloud(_BaseTraceType): - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.pointcloud.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # indices - # ------- - @property - def indices(self): - """ - A sequential value, 0..n, supply it to avoid creating this - array inside plotting. If specified, it must be a typed - `Int32Array` array. Its length must be equal to or greater than - the number of points. For the best performance and memory use, - create one large `indices` typed array that is guaranteed to be - at least as long as the largest number of points during use, - and reuse it on each `Plotly.restyle()` call. - - The 'indices' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["indices"] - - @indices.setter - def indices(self, val): - self["indices"] = val - - # indicessrc - # ---------- - @property - def indicessrc(self): - """ - Sets the source reference on Chart Studio Cloud for indices . - - The 'indicessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["indicessrc"] - - @indicessrc.setter - def indicessrc(self, val): - self["indicessrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.pointcloud.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - blend - Determines if colors are blended together for a - translucency effect in case `opacity` is - specified as a value less then `1`. Setting - `blend` to `true` reduces zoom/pan speed if - used with large numbers of points. - border - :class:`plotly.graph_objects.pointcloud.marker. - Border` instance or dict with compatible - properties - color - Sets the marker fill color. It accepts a - specific color.If the color is not fully opaque - and there are hundreds of thousandsof points, - it may cause slower zooming and panning. - opacity - Sets the marker opacity. The default value is - `1` (fully opaque). If the markers are not - fully opaque and there are hundreds of - thousands of points, it may cause slower - zooming and panning. Opacity fades the color - even if `blend` is left on `false` even if - there is no translucency effect in that case. - sizemax - Sets the maximum size (in px) of the rendered - marker points. Effective when the `pointcloud` - shows only few points. - sizemin - Sets the minimum size (in px) of the rendered - marker points, effective when the `pointcloud` - shows a million or more points. - - Returns - ------- - plotly.graph_objs.pointcloud.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.pointcloud.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.pointcloud.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xbounds - # ------- - @property - def xbounds(self): - """ - Specify `xbounds` in the shape of `[xMin, xMax] to avoid - looping through the `xy` typed array. Use it in conjunction - with `xy` and `ybounds` for the performance benefits. - - The 'xbounds' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["xbounds"] - - @xbounds.setter - def xbounds(self, val): - self["xbounds"] = val - - # xboundssrc - # ---------- - @property - def xboundssrc(self): - """ - Sets the source reference on Chart Studio Cloud for xbounds . - - The 'xboundssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xboundssrc"] - - @xboundssrc.setter - def xboundssrc(self, val): - self["xboundssrc"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # xy - # -- - @property - def xy(self): - """ - Faster alternative to specifying `x` and `y` separately. If - supplied, it must be a typed `Float32Array` array that - represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + - 1] = y[i]` - - The 'xy' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["xy"] - - @xy.setter - def xy(self, val): - self["xy"] = val - - # xysrc - # ----- - @property - def xysrc(self): - """ - Sets the source reference on Chart Studio Cloud for xy . - - The 'xysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xysrc"] - - @xysrc.setter - def xysrc(self, val): - self["xysrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ybounds - # ------- - @property - def ybounds(self): - """ - Specify `ybounds` in the shape of `[yMin, yMax] to avoid - looping through the `xy` typed array. Use it in conjunction - with `xy` and `xbounds` for the performance benefits. - - The 'ybounds' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ybounds"] - - @ybounds.setter - def ybounds(self, val): - self["ybounds"] = val - - # yboundssrc - # ---------- - @property - def yboundssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ybounds . - - The 'yboundssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["yboundssrc"] - - @yboundssrc.setter - def yboundssrc(self, val): - self["yboundssrc"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.pointcloud.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - indices - A sequential value, 0..n, supply it to avoid creating - this array inside plotting. If specified, it must be a - typed `Int32Array` array. Its length must be equal to - or greater than the number of points. For the best - performance and memory use, create one large `indices` - typed array that is guaranteed to be at least as long - as the largest number of points during use, and reuse - it on each `Plotly.restyle()` call. - indicessrc - Sets the source reference on Chart Studio Cloud for - indices . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.pointcloud.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.pointcloud.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbounds - Specify `xbounds` in the shape of `[xMin, xMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `ybounds` for the performance - benefits. - xboundssrc - Sets the source reference on Chart Studio Cloud for - xbounds . - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xy - Faster alternative to specifying `x` and `y` - separately. If supplied, it must be a typed - `Float32Array` array that represents points such that - `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` - xysrc - Sets the source reference on Chart Studio Cloud for xy - . - y - Sets the y coordinates. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybounds - Specify `ybounds` in the shape of `[yMin, yMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `xbounds` for the performance - benefits. - yboundssrc - Sets the source reference on Chart Studio Cloud for - ybounds . - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - indices=None, - indicessrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbounds=None, - xboundssrc=None, - xsrc=None, - xy=None, - xysrc=None, - y=None, - yaxis=None, - ybounds=None, - yboundssrc=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Pointcloud object - - The data visualized as a point cloud set in `x` and `y` using - the WebGl plotting engine. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Pointcloud` - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.pointcloud.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - indices - A sequential value, 0..n, supply it to avoid creating - this array inside plotting. If specified, it must be a - typed `Int32Array` array. Its length must be equal to - or greater than the number of points. For the best - performance and memory use, create one large `indices` - typed array that is guaranteed to be at least as long - as the largest number of points during use, and reuse - it on each `Plotly.restyle()` call. - indicessrc - Sets the source reference on Chart Studio Cloud for - indices . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.pointcloud.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.pointcloud.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbounds - Specify `xbounds` in the shape of `[xMin, xMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `ybounds` for the performance - benefits. - xboundssrc - Sets the source reference on Chart Studio Cloud for - xbounds . - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xy - Faster alternative to specifying `x` and `y` - separately. If supplied, it must be a typed - `Float32Array` array that represents points such that - `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` - xysrc - Sets the source reference on Chart Studio Cloud for xy - . - y - Sets the y coordinates. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybounds - Specify `ybounds` in the shape of `[yMin, yMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `xbounds` for the performance - benefits. - yboundssrc - Sets the source reference on Chart Studio Cloud for - ybounds . - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Pointcloud - """ - super(Pointcloud, self).__init__("pointcloud") - - # Validate arg - # ------------ - 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.Pointcloud -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Pointcloud`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import pointcloud as v_pointcloud - - # Initialize validators - # --------------------- - self._validators["customdata"] = v_pointcloud.CustomdataValidator() - self._validators["customdatasrc"] = v_pointcloud.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_pointcloud.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_pointcloud.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_pointcloud.HoverlabelValidator() - self._validators["ids"] = v_pointcloud.IdsValidator() - self._validators["idssrc"] = v_pointcloud.IdssrcValidator() - self._validators["indices"] = v_pointcloud.IndicesValidator() - self._validators["indicessrc"] = v_pointcloud.IndicessrcValidator() - self._validators["legendgroup"] = v_pointcloud.LegendgroupValidator() - self._validators["marker"] = v_pointcloud.MarkerValidator() - self._validators["meta"] = v_pointcloud.MetaValidator() - self._validators["metasrc"] = v_pointcloud.MetasrcValidator() - self._validators["name"] = v_pointcloud.NameValidator() - self._validators["opacity"] = v_pointcloud.OpacityValidator() - self._validators["showlegend"] = v_pointcloud.ShowlegendValidator() - self._validators["stream"] = v_pointcloud.StreamValidator() - self._validators["text"] = v_pointcloud.TextValidator() - self._validators["textsrc"] = v_pointcloud.TextsrcValidator() - self._validators["uid"] = v_pointcloud.UidValidator() - self._validators["uirevision"] = v_pointcloud.UirevisionValidator() - self._validators["visible"] = v_pointcloud.VisibleValidator() - self._validators["x"] = v_pointcloud.XValidator() - self._validators["xaxis"] = v_pointcloud.XAxisValidator() - self._validators["xbounds"] = v_pointcloud.XboundsValidator() - self._validators["xboundssrc"] = v_pointcloud.XboundssrcValidator() - self._validators["xsrc"] = v_pointcloud.XsrcValidator() - self._validators["xy"] = v_pointcloud.XyValidator() - self._validators["xysrc"] = v_pointcloud.XysrcValidator() - self._validators["y"] = v_pointcloud.YValidator() - self._validators["yaxis"] = v_pointcloud.YAxisValidator() - self._validators["ybounds"] = v_pointcloud.YboundsValidator() - self._validators["yboundssrc"] = v_pointcloud.YboundssrcValidator() - self._validators["ysrc"] = v_pointcloud.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("indices", None) - self["indices"] = indices if indices is not None else _v - _v = arg.pop("indicessrc", None) - self["indicessrc"] = indicessrc if indicessrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbounds", None) - self["xbounds"] = xbounds if xbounds is not None else _v - _v = arg.pop("xboundssrc", None) - self["xboundssrc"] = xboundssrc if xboundssrc is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xy", None) - self["xy"] = xy if xy is not None else _v - _v = arg.pop("xysrc", None) - self["xysrc"] = xysrc if xysrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybounds", None) - self["ybounds"] = ybounds if ybounds is not None else _v - _v = arg.pop("yboundssrc", None) - self["yboundssrc"] = yboundssrc if yboundssrc is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "pointcloud" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="pointcloud", val="pointcloud" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Pie(_BaseTraceType): - - # automargin - # ---------- - @property - def automargin(self): - """ - Determines whether outside text labels can push the margins. - - The 'automargin' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["automargin"] - - @automargin.setter - def automargin(self, val): - self["automargin"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # direction - # --------- - @property - def direction(self): - """ - Specifies the direction at which succeeding sectors follow one - another. - - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['clockwise', 'counterclockwise'] - - Returns - ------- - Any - """ - return self["direction"] - - @direction.setter - def direction(self, val): - self["direction"] = val - - # dlabel - # ------ - @property - def dlabel(self): - """ - Sets the label step. See `label0` for more info. - - The 'dlabel' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dlabel"] - - @dlabel.setter - def dlabel(self, val): - self["dlabel"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this pie trace . - row - If there is a layout grid, use the domain for - this row in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace - (in plot fraction). - y - Sets the vertical domain of this pie trace (in - plot fraction). - - Returns - ------- - plotly.graph_objs.pie.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # hole - # ---- - @property - def hole(self): - """ - Sets the fraction of the radius to cut out of the pie. Use this - to make a donut chart. - - The 'hole' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["hole"] - - @hole.setter - def hole(self, val): - self["hole"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.pie.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `percent` and `text`. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.pie.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # insidetextorientation - # --------------------- - @property - def insidetextorientation(self): - """ - Controls the orientation of the text inside chart sectors. When - set to "auto", text may be oriented in any direction in order - to be as big as possible in the middle of a sector. The - "horizontal" option orients text to be parallel with the bottom - of the chart, and may make text smaller in order to achieve - that goal. The "radial" option orients text along the radius of - the sector. The "tangential" option orients text perpendicular - to the radius of the sector. - - The 'insidetextorientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['horizontal', 'radial', 'tangential', 'auto'] - - Returns - ------- - Any - """ - return self["insidetextorientation"] - - @insidetextorientation.setter - def insidetextorientation(self, val): - self["insidetextorientation"] = val - - # label0 - # ------ - @property - def label0(self): - """ - Alternate to `labels`. Builds a numeric set of labels. Use with - `dlabel` where `label0` is the starting label and `dlabel` the - step. - - The 'label0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["label0"] - - @label0.setter - def label0(self, val): - self["label0"] = val - - # labels - # ------ - @property - def labels(self): - """ - Sets the sector labels. If `labels` entries are duplicated, we - sum associated `values` or simply count occurrences if `values` - is not provided. For other array attributes (including color) - we use the first non-empty entry among all occurrences of the - label. - - The 'labels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["labels"] - - @labels.setter - def labels(self, val): - self["labels"] = val - - # labelssrc - # --------- - @property - def labelssrc(self): - """ - Sets the source reference on Chart Studio Cloud for labels . - - The 'labelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["labelssrc"] - - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - line - :class:`plotly.graph_objects.pie.marker.Line` - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.pie.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `textinfo` lying outside the sector. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Outsidetextfont` - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.pie.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # pull - # ---- - @property - def pull(self): - """ - Sets the fraction of larger radius to pull the sectors out from - the center. This can be a constant to pull all slices apart - from each other equally or an array to highlight one or more - slices. - - The 'pull' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["pull"] - - @pull.setter - def pull(self, val): - self["pull"] = val - - # pullsrc - # ------- - @property - def pullsrc(self): - """ - Sets the source reference on Chart Studio Cloud for pull . - - The 'pullsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["pullsrc"] - - @pullsrc.setter - def pullsrc(self, val): - self["pullsrc"] = val - - # rotation - # -------- - @property - def rotation(self): - """ - Instead of the first slice starting at 12 o'clock, rotate to - some other angle. - - The 'rotation' property is a number and may be specified as: - - An int or float in the interval [-360, 360] - - Returns - ------- - int|float - """ - return self["rotation"] - - @rotation.setter - def rotation(self, val): - self["rotation"] = val - - # scalegroup - # ---------- - @property - def scalegroup(self): - """ - If there are multiple pie charts that should be sized according - to their totals, link them by providing a non-empty group id - here shared by every trace in the same group. - - The 'scalegroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["scalegroup"] - - @scalegroup.setter - def scalegroup(self, val): - self["scalegroup"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # sort - # ---- - @property - def sort(self): - """ - Determines whether or not the sectors are reordered from - largest to smallest. - - The 'sort' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["sort"] - - @sort.setter - def sort(self, val): - self["sort"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.pie.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `textinfo`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.pie.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `textinfo`. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, `percent` and - `text`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - position - Specifies the location of the `title`. Note - that the title's position used to be set by the - now deprecated `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no - title is displayed. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - - Returns - ------- - plotly.graph_objs.pie.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use pie.title.font instead. Sets the font - used for `title`. Note that the title's font used to be set by - the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleposition - # ------------- - @property - def titleposition(self): - """ - Deprecated: Please use pie.title.position instead. Specifies - the location of the `title`. Note that the title's position - used to be set by the now deprecated `titleposition` attribute. - - The 'position' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top left', 'top center', 'top right', 'middle center', - 'bottom left', 'bottom center', 'bottom right'] - - Returns - ------- - - """ - return self["titleposition"] - - @titleposition.setter - def titleposition(self, val): - self["titleposition"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the values of the sectors. If omitted, we count - occurrences of each label. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - automargin - Determines whether outside text labels can push the - margins. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - direction - Specifies the direction at which succeeding sectors - follow one another. - dlabel - Sets the label step. See `label0` for more info. - domain - :class:`plotly.graph_objects.pie.Domain` instance or - dict with compatible properties - hole - Sets the fraction of the radius to cut out of the pie. - Use this to make a donut chart. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.pie.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - insidetextorientation - Controls the orientation of the text inside chart - sectors. When set to "auto", text may be oriented in - any direction in order to be as big as possible in the - middle of a sector. The "horizontal" option orients - text to be parallel with the bottom of the chart, and - may make text smaller in order to achieve that goal. - The "radial" option orients text along the radius of - the sector. The "tangential" option orients text - perpendicular to the radius of the sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.pie.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. - pull - Sets the fraction of larger radius to pull the sectors - out from the center. This can be a constant to pull all - slices apart from each other equally or an array to - highlight one or more slices. - pullsrc - Sets the source reference on Chart Studio Cloud for - pull . - rotation - Instead of the first slice starting at 12 o'clock, - rotate to some other angle. - scalegroup - If there are multiple pie charts that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - sort - Determines whether or not the sectors are reordered - from largest to smallest. - stream - :class:`plotly.graph_objects.pie.Stream` instance or - dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `label`, - `color`, `value`, `percent` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - title - :class:`plotly.graph_objects.pie.Title` instance or - dict with compatible properties - titlefont - Deprecated: Please use pie.title.font instead. Sets the - font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleposition - Deprecated: Please use pie.title.position instead. - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleposition": ("title", "position"), - } - - def __init__( - self, - arg=None, - automargin=None, - customdata=None, - customdatasrc=None, - direction=None, - dlabel=None, - domain=None, - hole=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - label0=None, - labels=None, - labelssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - pull=None, - pullsrc=None, - rotation=None, - scalegroup=None, - showlegend=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - titlefont=None, - titleposition=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Pie object - - A data visualized by the sectors of the pie is set in `values`. - The sector labels are set in `labels`. The sector colors are - set in `marker.colors` - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Pie` - automargin - Determines whether outside text labels can push the - margins. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - direction - Specifies the direction at which succeeding sectors - follow one another. - dlabel - Sets the label step. See `label0` for more info. - domain - :class:`plotly.graph_objects.pie.Domain` instance or - dict with compatible properties - hole - Sets the fraction of the radius to cut out of the pie. - Use this to make a donut chart. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.pie.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - insidetextorientation - Controls the orientation of the text inside chart - sectors. When set to "auto", text may be oriented in - any direction in order to be as big as possible in the - middle of a sector. The "horizontal" option orients - text to be parallel with the bottom of the chart, and - may make text smaller in order to achieve that goal. - The "radial" option orients text along the radius of - the sector. The "tangential" option orients text - perpendicular to the radius of the sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.pie.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. - pull - Sets the fraction of larger radius to pull the sectors - out from the center. This can be a constant to pull all - slices apart from each other equally or an array to - highlight one or more slices. - pullsrc - Sets the source reference on Chart Studio Cloud for - pull . - rotation - Instead of the first slice starting at 12 o'clock, - rotate to some other angle. - scalegroup - If there are multiple pie charts that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - sort - Determines whether or not the sectors are reordered - from largest to smallest. - stream - :class:`plotly.graph_objects.pie.Stream` instance or - dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `label`, - `color`, `value`, `percent` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - title - :class:`plotly.graph_objects.pie.Title` instance or - dict with compatible properties - titlefont - Deprecated: Please use pie.title.font instead. Sets the - font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleposition - Deprecated: Please use pie.title.position instead. - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Pie - """ - super(Pie, self).__init__("pie") - - # Validate arg - # ------------ - 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.Pie -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Pie`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import pie as v_pie - - # Initialize validators - # --------------------- - self._validators["automargin"] = v_pie.AutomarginValidator() - self._validators["customdata"] = v_pie.CustomdataValidator() - self._validators["customdatasrc"] = v_pie.CustomdatasrcValidator() - self._validators["direction"] = v_pie.DirectionValidator() - self._validators["dlabel"] = v_pie.DlabelValidator() - self._validators["domain"] = v_pie.DomainValidator() - self._validators["hole"] = v_pie.HoleValidator() - self._validators["hoverinfo"] = v_pie.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_pie.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_pie.HoverlabelValidator() - self._validators["hovertemplate"] = v_pie.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_pie.HovertemplatesrcValidator() - self._validators["hovertext"] = v_pie.HovertextValidator() - self._validators["hovertextsrc"] = v_pie.HovertextsrcValidator() - self._validators["ids"] = v_pie.IdsValidator() - self._validators["idssrc"] = v_pie.IdssrcValidator() - self._validators["insidetextfont"] = v_pie.InsidetextfontValidator() - self._validators[ - "insidetextorientation" - ] = v_pie.InsidetextorientationValidator() - self._validators["label0"] = v_pie.Label0Validator() - self._validators["labels"] = v_pie.LabelsValidator() - self._validators["labelssrc"] = v_pie.LabelssrcValidator() - self._validators["legendgroup"] = v_pie.LegendgroupValidator() - self._validators["marker"] = v_pie.MarkerValidator() - self._validators["meta"] = v_pie.MetaValidator() - self._validators["metasrc"] = v_pie.MetasrcValidator() - self._validators["name"] = v_pie.NameValidator() - self._validators["opacity"] = v_pie.OpacityValidator() - self._validators["outsidetextfont"] = v_pie.OutsidetextfontValidator() - self._validators["pull"] = v_pie.PullValidator() - self._validators["pullsrc"] = v_pie.PullsrcValidator() - self._validators["rotation"] = v_pie.RotationValidator() - self._validators["scalegroup"] = v_pie.ScalegroupValidator() - self._validators["showlegend"] = v_pie.ShowlegendValidator() - self._validators["sort"] = v_pie.SortValidator() - self._validators["stream"] = v_pie.StreamValidator() - self._validators["text"] = v_pie.TextValidator() - self._validators["textfont"] = v_pie.TextfontValidator() - self._validators["textinfo"] = v_pie.TextinfoValidator() - self._validators["textposition"] = v_pie.TextpositionValidator() - self._validators["textpositionsrc"] = v_pie.TextpositionsrcValidator() - self._validators["textsrc"] = v_pie.TextsrcValidator() - self._validators["texttemplate"] = v_pie.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_pie.TexttemplatesrcValidator() - self._validators["title"] = v_pie.TitleValidator() - self._validators["uid"] = v_pie.UidValidator() - self._validators["uirevision"] = v_pie.UirevisionValidator() - self._validators["values"] = v_pie.ValuesValidator() - self._validators["valuessrc"] = v_pie.ValuessrcValidator() - self._validators["visible"] = v_pie.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("automargin", None) - self["automargin"] = automargin if automargin is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("dlabel", None) - self["dlabel"] = dlabel if dlabel is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hole", None) - self["hole"] = hole if hole is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("insidetextorientation", None) - self["insidetextorientation"] = ( - insidetextorientation if insidetextorientation is not None else _v - ) - _v = arg.pop("label0", None) - self["label0"] = label0 if label0 is not None else _v - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("pull", None) - self["pull"] = pull if pull is not None else _v - _v = arg.pop("pullsrc", None) - self["pullsrc"] = pullsrc if pullsrc is not None else _v - _v = arg.pop("rotation", None) - self["rotation"] = rotation if rotation is not None else _v - _v = arg.pop("scalegroup", None) - self["scalegroup"] = scalegroup if scalegroup is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("sort", None) - self["sort"] = sort if sort is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleposition", None) - _v = titleposition if titleposition is not None else _v - if _v is not None: - self["titleposition"] = _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "pie" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="pie", val="pie" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Parcoords(_BaseTraceType): - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dimensions - # ---------- - @property - def dimensions(self): - """ - The dimensions (variables) of the parallel coordinates chart. - 2..60 dimensions are supported. - - The 'dimensions' property is a tuple of instances of - Dimension that may be specified as: - - A list or tuple of instances of plotly.graph_objs.parcoords.Dimension - - A list or tuple of dicts of string/value properties that - will be passed to the Dimension constructor - - Supported dict properties: - - constraintrange - The domain range to which the filter on the - dimension is constrained. Must be an array of - `[fromValue, toValue]` with `fromValue <= - toValue`, or if `multiselect` is not disabled, - you may give an array of arrays, where each - inner array is `[fromValue, toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a - single range? - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - The domain range that represents the full, - shown axis extent. Defaults to the `values` - extent. Must be an array of `[fromValue, - toValue]` with finite numbers as elements. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticktext - Sets the text displayed at the ticks position - via `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - values - Dimension values. `values[n]` represents the - value of the `n`th point in the dataset, - therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. - - Returns - ------- - tuple[plotly.graph_objs.parcoords.Dimension] - """ - return self["dimensions"] - - @dimensions.setter - def dimensions(self, val): - self["dimensions"] = val - - # dimensiondefaults - # ----------------- - @property - def dimensiondefaults(self): - """ - When used in a template (as - layout.template.data.parcoords.dimensiondefaults), sets the - default property values to use for elements of - parcoords.dimensions - - The 'dimensiondefaults' property is an instance of Dimension - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Dimension` - - A dict of string/value properties that will be passed - to the Dimension constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.parcoords.Dimension - """ - return self["dimensiondefaults"] - - @dimensiondefaults.setter - def dimensiondefaults(self, val): - self["dimensiondefaults"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this parcoords - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords - trace (in plot fraction). - y - Sets the vertical domain of this parcoords - trace (in plot fraction). - - Returns - ------- - plotly.graph_objs.parcoords.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # labelangle - # ---------- - @property - def labelangle(self): - """ - Sets the angle of the labels with respect to the horizontal. - For example, a `tickangle` of -90 draws the labels vertically. - Tilted labels with "labelangle" may be positioned better inside - margins when `labelposition` is set to "bottom". - - The 'labelangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["labelangle"] - - @labelangle.setter - def labelangle(self, val): - self["labelangle"] = val - - # labelfont - # --------- - @property - def labelfont(self): - """ - Sets the font for the `dimension` labels. - - The 'labelfont' property is an instance of Labelfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Labelfont` - - A dict of string/value properties that will be passed - to the Labelfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcoords.Labelfont - """ - return self["labelfont"] - - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val - - # labelside - # --------- - @property - def labelside(self): - """ - Specifies the location of the `label`. "top" positions labels - above, next to the title "bottom" positions labels below the - graph Tilted labels with "labelangle" may be positioned better - inside margins when `labelposition` is set to "bottom". - - The 'labelside' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'bottom'] - - Returns - ------- - Any - """ - return self["labelside"] - - @labelside.setter - def labelside(self, val): - self["labelside"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcoords.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.parcoords.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # rangefont - # --------- - @property - def rangefont(self): - """ - Sets the font for the `dimension` range values. - - The 'rangefont' property is an instance of Rangefont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Rangefont` - - A dict of string/value properties that will be passed - to the Rangefont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcoords.Rangefont - """ - return self["rangefont"] - - @rangefont.setter - def rangefont(self, val): - self["rangefont"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.parcoords.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the font for the `dimension` tick values. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcoords.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dimensions - The dimensions (variables) of the parallel coordinates - chart. 2..60 dimensions are supported. - dimensiondefaults - When used in a template (as - layout.template.data.parcoords.dimensiondefaults), sets - the default property values to use for elements of - parcoords.dimensions - domain - :class:`plotly.graph_objects.parcoords.Domain` instance - or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - labelangle - Sets the angle of the labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - labels vertically. Tilted labels with "labelangle" may - be positioned better inside margins when - `labelposition` is set to "bottom". - labelfont - Sets the font for the `dimension` labels. - labelside - Specifies the location of the `label`. "top" positions - labels above, next to the title "bottom" positions - labels below the graph Tilted labels with "labelangle" - may be positioned better inside margins when - `labelposition` is set to "bottom". - line - :class:`plotly.graph_objects.parcoords.Line` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - rangefont - Sets the font for the `dimension` range values. - stream - :class:`plotly.graph_objects.parcoords.Stream` instance - or dict with compatible properties - tickfont - Sets the font for the `dimension` tick values. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - customdata=None, - customdatasrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - ids=None, - idssrc=None, - labelangle=None, - labelfont=None, - labelside=None, - line=None, - meta=None, - metasrc=None, - name=None, - rangefont=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new Parcoords object - - Parallel coordinates for multidimensional exploratory data - analysis. The samples are specified in `dimensions`. The colors - are set in `line.color`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Parcoords` - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dimensions - The dimensions (variables) of the parallel coordinates - chart. 2..60 dimensions are supported. - dimensiondefaults - When used in a template (as - layout.template.data.parcoords.dimensiondefaults), sets - the default property values to use for elements of - parcoords.dimensions - domain - :class:`plotly.graph_objects.parcoords.Domain` instance - or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - labelangle - Sets the angle of the labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - labels vertically. Tilted labels with "labelangle" may - be positioned better inside margins when - `labelposition` is set to "bottom". - labelfont - Sets the font for the `dimension` labels. - labelside - Specifies the location of the `label`. "top" positions - labels above, next to the title "bottom" positions - labels below the graph Tilted labels with "labelangle" - may be positioned better inside margins when - `labelposition` is set to "bottom". - line - :class:`plotly.graph_objects.parcoords.Line` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - rangefont - Sets the font for the `dimension` range values. - stream - :class:`plotly.graph_objects.parcoords.Stream` instance - or dict with compatible properties - tickfont - Sets the font for the `dimension` tick values. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Parcoords - """ - super(Parcoords, self).__init__("parcoords") - - # Validate arg - # ------------ - 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.Parcoords -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Parcoords`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import parcoords as v_parcoords - - # Initialize validators - # --------------------- - self._validators["customdata"] = v_parcoords.CustomdataValidator() - self._validators["customdatasrc"] = v_parcoords.CustomdatasrcValidator() - self._validators["dimensions"] = v_parcoords.DimensionsValidator() - self._validators["dimensiondefaults"] = v_parcoords.DimensionValidator() - self._validators["domain"] = v_parcoords.DomainValidator() - self._validators["ids"] = v_parcoords.IdsValidator() - self._validators["idssrc"] = v_parcoords.IdssrcValidator() - self._validators["labelangle"] = v_parcoords.LabelangleValidator() - self._validators["labelfont"] = v_parcoords.LabelfontValidator() - self._validators["labelside"] = v_parcoords.LabelsideValidator() - self._validators["line"] = v_parcoords.LineValidator() - self._validators["meta"] = v_parcoords.MetaValidator() - self._validators["metasrc"] = v_parcoords.MetasrcValidator() - self._validators["name"] = v_parcoords.NameValidator() - self._validators["rangefont"] = v_parcoords.RangefontValidator() - self._validators["stream"] = v_parcoords.StreamValidator() - self._validators["tickfont"] = v_parcoords.TickfontValidator() - self._validators["uid"] = v_parcoords.UidValidator() - self._validators["uirevision"] = v_parcoords.UirevisionValidator() - self._validators["visible"] = v_parcoords.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dimensions", None) - self["dimensions"] = dimensions if dimensions is not None else _v - _v = arg.pop("dimensiondefaults", None) - self["dimensiondefaults"] = ( - dimensiondefaults if dimensiondefaults is not None else _v - ) - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("labelangle", None) - self["labelangle"] = labelangle if labelangle is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("labelside", None) - self["labelside"] = labelside if labelside is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("rangefont", None) - self["rangefont"] = rangefont if rangefont is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "parcoords" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="parcoords", val="parcoords" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Parcats(_BaseTraceType): - - # arrangement - # ----------- - @property - def arrangement(self): - """ - Sets the drag interaction mode for categories and dimensions. - If `perpendicular`, the categories can only move along a line - perpendicular to the paths. If `freeform`, the categories can - freely move on the plane. If `fixed`, the categories and - dimensions are stationary. - - The 'arrangement' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['perpendicular', 'freeform', 'fixed'] - - Returns - ------- - Any - """ - return self["arrangement"] - - @arrangement.setter - def arrangement(self, val): - self["arrangement"] = val - - # bundlecolors - # ------------ - @property - def bundlecolors(self): - """ - Sort paths so that like colors are bundled together within each - category. - - The 'bundlecolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["bundlecolors"] - - @bundlecolors.setter - def bundlecolors(self, val): - self["bundlecolors"] = val - - # counts - # ------ - @property - def counts(self): - """ - The number of observations represented by each state. Defaults - to 1 so that each state represents one observation - - The 'counts' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["counts"] - - @counts.setter - def counts(self, val): - self["counts"] = val - - # countssrc - # --------- - @property - def countssrc(self): - """ - Sets the source reference on Chart Studio Cloud for counts . - - The 'countssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["countssrc"] - - @countssrc.setter - def countssrc(self, val): - self["countssrc"] = val - - # dimensions - # ---------- - @property - def dimensions(self): - """ - The dimensions (variables) of the parallel categories diagram. - - The 'dimensions' property is a tuple of instances of - Dimension that may be specified as: - - A list or tuple of instances of plotly.graph_objs.parcats.Dimension - - A list or tuple of dicts of string/value properties that - will be passed to the Dimension constructor - - Supported dict properties: - - categoryarray - Sets the order in which categories in this - dimension appear. Only has an effect if - `categoryorder` is set to "array". Used with - `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the categories - in the dimension. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - displayindex - The display index of dimension, from left to - right, zero indexed, defaults to dimension - index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories - in this dimension. Only has an effect if - `categoryorder` is set to "array". Should be an - array the same length as `categoryarray` Used - with `categoryorder`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - values - Dimension values. `values[n]` represents the - category value of the `n`th point in the - dataset, therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. - - Returns - ------- - tuple[plotly.graph_objs.parcats.Dimension] - """ - return self["dimensions"] - - @dimensions.setter - def dimensions(self, val): - self["dimensions"] = val - - # dimensiondefaults - # ----------------- - @property - def dimensiondefaults(self): - """ - When used in a template (as - layout.template.data.parcats.dimensiondefaults), sets the - default property values to use for elements of - parcats.dimensions - - The 'dimensiondefaults' property is an instance of Dimension - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.Dimension` - - A dict of string/value properties that will be passed - to the Dimension constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.parcats.Dimension - """ - return self["dimensiondefaults"] - - @dimensiondefaults.setter - def dimensiondefaults(self, val): - self["dimensiondefaults"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this parcats trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats - trace (in plot fraction). - y - Sets the vertical domain of this parcats trace - (in plot fraction). - - Returns - ------- - plotly.graph_objs.parcats.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['count', 'probability'] joined with '+' characters - (e.g. 'count+probability') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - Returns - ------- - Any - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Sets the hover interaction mode for the parcats diagram. If - `category`, hover interaction take place per category. If - `color`, hover interactions take place per color per category. - If `dimension`, hover interactions take place across all - categories per dimension. - - The 'hoveron' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['category', 'color', 'dimension'] - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `count`, `probability`, `category`, `categorycount`, - `colorcount` and `bandcolorcount`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # labelfont - # --------- - @property - def labelfont(self): - """ - Sets the font for the `dimension` labels. - - The 'labelfont' property is an instance of Labelfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.Labelfont` - - A dict of string/value properties that will be passed - to the Labelfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcats.Labelfont - """ - return self["labelfont"] - - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcats.line.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `count` and `probability`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - shape - Sets the shape of the paths. If `linear`, paths - are composed of straight lines. If `hspline`, - paths are composed of horizontal curved splines - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.parcats.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # sortpaths - # --------- - @property - def sortpaths(self): - """ - Sets the path sorting algorithm. If `forward`, sort paths based - on dimension categories from left to right. If `backward`, sort - paths based on dimensions categories from right to left. - - The 'sortpaths' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['forward', 'backward'] - - Returns - ------- - Any - """ - return self["sortpaths"] - - @sortpaths.setter - def sortpaths(self, val): - self["sortpaths"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.parcats.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the font for the `category` labels. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcats.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - arrangement - Sets the drag interaction mode for categories and - dimensions. If `perpendicular`, the categories can only - move along a line perpendicular to the paths. If - `freeform`, the categories can freely move on the - plane. If `fixed`, the categories and dimensions are - stationary. - bundlecolors - Sort paths so that like colors are bundled together - within each category. - counts - The number of observations represented by each state. - Defaults to 1 so that each state represents one - observation - countssrc - Sets the source reference on Chart Studio Cloud for - counts . - dimensions - The dimensions (variables) of the parallel categories - diagram. - dimensiondefaults - When used in a template (as - layout.template.data.parcats.dimensiondefaults), sets - the default property values to use for elements of - parcats.dimensions - domain - :class:`plotly.graph_objects.parcats.Domain` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoveron - Sets the hover interaction mode for the parcats - diagram. If `category`, hover interaction take place - per category. If `color`, hover interactions take place - per color per category. If `dimension`, hover - interactions take place across all categories per - dimension. - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `count`, `probability`, - `category`, `categorycount`, `colorcount` and - `bandcolorcount`. Anything contained in tag `` - is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - labelfont - Sets the font for the `dimension` labels. - line - :class:`plotly.graph_objects.parcats.Line` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - sortpaths - Sets the path sorting algorithm. If `forward`, sort - paths based on dimension categories from left to right. - If `backward`, sort paths based on dimensions - categories from right to left. - stream - :class:`plotly.graph_objects.parcats.Stream` instance - or dict with compatible properties - tickfont - Sets the font for the `category` labels. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - arrangement=None, - bundlecolors=None, - counts=None, - countssrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - hoverinfo=None, - hoveron=None, - hovertemplate=None, - labelfont=None, - line=None, - meta=None, - metasrc=None, - name=None, - sortpaths=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new Parcats object - - Parallel categories diagram for multidimensional categorical - data. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Parcats` - arrangement - Sets the drag interaction mode for categories and - dimensions. If `perpendicular`, the categories can only - move along a line perpendicular to the paths. If - `freeform`, the categories can freely move on the - plane. If `fixed`, the categories and dimensions are - stationary. - bundlecolors - Sort paths so that like colors are bundled together - within each category. - counts - The number of observations represented by each state. - Defaults to 1 so that each state represents one - observation - countssrc - Sets the source reference on Chart Studio Cloud for - counts . - dimensions - The dimensions (variables) of the parallel categories - diagram. - dimensiondefaults - When used in a template (as - layout.template.data.parcats.dimensiondefaults), sets - the default property values to use for elements of - parcats.dimensions - domain - :class:`plotly.graph_objects.parcats.Domain` instance - or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoveron - Sets the hover interaction mode for the parcats - diagram. If `category`, hover interaction take place - per category. If `color`, hover interactions take place - per color per category. If `dimension`, hover - interactions take place across all categories per - dimension. - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `count`, `probability`, - `category`, `categorycount`, `colorcount` and - `bandcolorcount`. Anything contained in tag `` - is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - labelfont - Sets the font for the `dimension` labels. - line - :class:`plotly.graph_objects.parcats.Line` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - sortpaths - Sets the path sorting algorithm. If `forward`, sort - paths based on dimension categories from left to right. - If `backward`, sort paths based on dimensions - categories from right to left. - stream - :class:`plotly.graph_objects.parcats.Stream` instance - or dict with compatible properties - tickfont - Sets the font for the `category` labels. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Parcats - """ - super(Parcats, self).__init__("parcats") - - # Validate arg - # ------------ - 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.Parcats -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Parcats`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import parcats as v_parcats - - # Initialize validators - # --------------------- - self._validators["arrangement"] = v_parcats.ArrangementValidator() - self._validators["bundlecolors"] = v_parcats.BundlecolorsValidator() - self._validators["counts"] = v_parcats.CountsValidator() - self._validators["countssrc"] = v_parcats.CountssrcValidator() - self._validators["dimensions"] = v_parcats.DimensionsValidator() - self._validators["dimensiondefaults"] = v_parcats.DimensionValidator() - self._validators["domain"] = v_parcats.DomainValidator() - self._validators["hoverinfo"] = v_parcats.HoverinfoValidator() - self._validators["hoveron"] = v_parcats.HoveronValidator() - self._validators["hovertemplate"] = v_parcats.HovertemplateValidator() - self._validators["labelfont"] = v_parcats.LabelfontValidator() - self._validators["line"] = v_parcats.LineValidator() - self._validators["meta"] = v_parcats.MetaValidator() - self._validators["metasrc"] = v_parcats.MetasrcValidator() - self._validators["name"] = v_parcats.NameValidator() - self._validators["sortpaths"] = v_parcats.SortpathsValidator() - self._validators["stream"] = v_parcats.StreamValidator() - self._validators["tickfont"] = v_parcats.TickfontValidator() - self._validators["uid"] = v_parcats.UidValidator() - self._validators["uirevision"] = v_parcats.UirevisionValidator() - self._validators["visible"] = v_parcats.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arrangement", None) - self["arrangement"] = arrangement if arrangement is not None else _v - _v = arg.pop("bundlecolors", None) - self["bundlecolors"] = bundlecolors if bundlecolors is not None else _v - _v = arg.pop("counts", None) - self["counts"] = counts if counts is not None else _v - _v = arg.pop("countssrc", None) - self["countssrc"] = countssrc if countssrc is not None else _v - _v = arg.pop("dimensions", None) - self["dimensions"] = dimensions if dimensions is not None else _v - _v = arg.pop("dimensiondefaults", None) - self["dimensiondefaults"] = ( - dimensiondefaults if dimensiondefaults is not None else _v - ) - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("sortpaths", None) - self["sortpaths"] = sortpaths if sortpaths is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "parcats" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="parcats", val="parcats" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Ohlc(_BaseTraceType): - - # close - # ----- - @property - def close(self): - """ - Sets the close values. - - The 'close' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["close"] - - @close.setter - def close(self, val): - self["close"] = val - - # closesrc - # -------- - @property - def closesrc(self): - """ - Sets the source reference on Chart Studio Cloud for close . - - The 'closesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["closesrc"] - - @closesrc.setter - def closesrc(self, val): - self["closesrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # decreasing - # ---------- - @property - def decreasing(self): - """ - The 'decreasing' property is an instance of Decreasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.Decreasing` - - A dict of string/value properties that will be passed - to the Decreasing constructor - - Supported dict properties: - - line - :class:`plotly.graph_objects.ohlc.decreasing.Li - ne` instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.ohlc.Decreasing - """ - return self["decreasing"] - - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val - - # high - # ---- - @property - def high(self): - """ - Sets the high values. - - The 'high' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["high"] - - @high.setter - def high(self, val): - self["high"] = val - - # highsrc - # ------- - @property - def highsrc(self): - """ - Sets the source reference on Chart Studio Cloud for high . - - The 'highsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["highsrc"] - - @highsrc.setter - def highsrc(self, val): - self["highsrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - split - Show hover information (open, close, high, low) - in separate labels. - - Returns - ------- - plotly.graph_objs.ohlc.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # increasing - # ---------- - @property - def increasing(self): - """ - The 'increasing' property is an instance of Increasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.Increasing` - - A dict of string/value properties that will be passed - to the Increasing constructor - - Supported dict properties: - - line - :class:`plotly.graph_objects.ohlc.increasing.Li - ne` instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.ohlc.Increasing - """ - return self["increasing"] - - @increasing.setter - def increasing(self, val): - self["increasing"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - Note that this style setting can also be set - per direction via `increasing.line.dash` and - `decreasing.line.dash`. - width - [object Object] Note that this style setting - can also be set per direction via - `increasing.line.width` and - `decreasing.line.width`. - - Returns - ------- - plotly.graph_objs.ohlc.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # low - # --- - @property - def low(self): - """ - Sets the low values. - - The 'low' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["low"] - - @low.setter - def low(self, val): - self["low"] = val - - # lowsrc - # ------ - @property - def lowsrc(self): - """ - Sets the source reference on Chart Studio Cloud for low . - - The 'lowsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lowsrc"] - - @lowsrc.setter - def lowsrc(self, val): - self["lowsrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # open - # ---- - @property - def open(self): - """ - Sets the open values. - - The 'open' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["open"] - - @open.setter - def open(self, val): - self["open"] = val - - # opensrc - # ------- - @property - def opensrc(self): - """ - Sets the source reference on Chart Studio Cloud for open . - - The 'opensrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opensrc"] - - @opensrc.setter - def opensrc(self, val): - self["opensrc"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.ohlc.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets hover text elements associated with each sample point. If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - this trace's sample points. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the width of the open/close tick marks relative to the "x" - minimal interval. - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, 0.5] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. If absent, linear coordinate will be - generated. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud for - close . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - decreasing - :class:`plotly.graph_objects.ohlc.Decreasing` instance - or dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud for - high . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.ohlc.Hoverlabel` instance - or dict with compatible properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - increasing - :class:`plotly.graph_objects.ohlc.Increasing` instance - or dict with compatible properties - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.ohlc.Line` instance or - dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud for - low . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud for - open . - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.ohlc.Stream` instance or - dict with compatible properties - text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - tickwidth - Sets the width of the open/close tick marks relative to - the "x" minimal interval. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - """ - - def __init__( - self, - arg=None, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legendgroup=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - tickwidth=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xcalendar=None, - xsrc=None, - yaxis=None, - **kwargs - ): - """ - Construct a new Ohlc object - - The ohlc (short for Open-High-Low-Close) is a style of - financial chart describing open, high, low and close for a - given `x` coordinate (most likely time). The tip of the lines - represent the `low` and `high` values and the horizontal - segments represent the `open` and `close` values. Sample points - where the close value is higher (lower) then the open value are - called increasing (decreasing). By default, increasing items - are drawn in green whereas decreasing are drawn in red. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Ohlc` - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud for - close . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - decreasing - :class:`plotly.graph_objects.ohlc.Decreasing` instance - or dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud for - high . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.ohlc.Hoverlabel` instance - or dict with compatible properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - increasing - :class:`plotly.graph_objects.ohlc.Increasing` instance - or dict with compatible properties - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.ohlc.Line` instance or - dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud for - low . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud for - open . - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.ohlc.Stream` instance or - dict with compatible properties - text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - tickwidth - Sets the width of the open/close tick marks relative to - the "x" minimal interval. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - - Returns - ------- - Ohlc - """ - super(Ohlc, self).__init__("ohlc") - - # Validate arg - # ------------ - 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.Ohlc -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Ohlc`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import ohlc as v_ohlc - - # Initialize validators - # --------------------- - self._validators["close"] = v_ohlc.CloseValidator() - self._validators["closesrc"] = v_ohlc.ClosesrcValidator() - self._validators["customdata"] = v_ohlc.CustomdataValidator() - self._validators["customdatasrc"] = v_ohlc.CustomdatasrcValidator() - self._validators["decreasing"] = v_ohlc.DecreasingValidator() - self._validators["high"] = v_ohlc.HighValidator() - self._validators["highsrc"] = v_ohlc.HighsrcValidator() - self._validators["hoverinfo"] = v_ohlc.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_ohlc.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_ohlc.HoverlabelValidator() - self._validators["hovertext"] = v_ohlc.HovertextValidator() - self._validators["hovertextsrc"] = v_ohlc.HovertextsrcValidator() - self._validators["ids"] = v_ohlc.IdsValidator() - self._validators["idssrc"] = v_ohlc.IdssrcValidator() - self._validators["increasing"] = v_ohlc.IncreasingValidator() - self._validators["legendgroup"] = v_ohlc.LegendgroupValidator() - self._validators["line"] = v_ohlc.LineValidator() - self._validators["low"] = v_ohlc.LowValidator() - self._validators["lowsrc"] = v_ohlc.LowsrcValidator() - self._validators["meta"] = v_ohlc.MetaValidator() - self._validators["metasrc"] = v_ohlc.MetasrcValidator() - self._validators["name"] = v_ohlc.NameValidator() - self._validators["opacity"] = v_ohlc.OpacityValidator() - self._validators["open"] = v_ohlc.OpenValidator() - self._validators["opensrc"] = v_ohlc.OpensrcValidator() - self._validators["selectedpoints"] = v_ohlc.SelectedpointsValidator() - self._validators["showlegend"] = v_ohlc.ShowlegendValidator() - self._validators["stream"] = v_ohlc.StreamValidator() - self._validators["text"] = v_ohlc.TextValidator() - self._validators["textsrc"] = v_ohlc.TextsrcValidator() - self._validators["tickwidth"] = v_ohlc.TickwidthValidator() - self._validators["uid"] = v_ohlc.UidValidator() - self._validators["uirevision"] = v_ohlc.UirevisionValidator() - self._validators["visible"] = v_ohlc.VisibleValidator() - self._validators["x"] = v_ohlc.XValidator() - self._validators["xaxis"] = v_ohlc.XAxisValidator() - self._validators["xcalendar"] = v_ohlc.XcalendarValidator() - self._validators["xsrc"] = v_ohlc.XsrcValidator() - self._validators["yaxis"] = v_ohlc.YAxisValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("close", None) - self["close"] = close if close is not None else _v - _v = arg.pop("closesrc", None) - self["closesrc"] = closesrc if closesrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("high", None) - self["high"] = high if high is not None else _v - _v = arg.pop("highsrc", None) - self["highsrc"] = highsrc if highsrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("low", None) - self["low"] = low if low is not None else _v - _v = arg.pop("lowsrc", None) - self["lowsrc"] = lowsrc if lowsrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("open", None) - self["open"] = open if open is not None else _v - _v = arg.pop("opensrc", None) - self["opensrc"] = opensrc if opensrc is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "ohlc" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="ohlc", val="ohlc" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Mesh3d(_BaseTraceType): - - # alphahull - # --------- - @property - def alphahull(self): - """ - Determines how the mesh surface triangles are derived from the - set of vertices (points) represented by the `x`, `y` and `z` - arrays, if the `i`, `j`, `k` arrays are not supplied. For - general use of `mesh3d` it is preferred that `i`, `j`, `k` are - supplied. If "-1", Delaunay triangulation is used, which is - mainly suitable if the mesh is a single, more or less layer - surface that is perpendicular to `delaunayaxis`. In case the - `delaunayaxis` intersects the mesh surface at more than one - point it will result triangles that are very long in the - dimension of `delaunayaxis`. If ">0", the alpha-shape algorithm - is used. In this case, the positive `alphahull` value signals - the use of the alpha-shape algorithm, _and_ its value acts as - the parameter for the mesh fitting. If 0, the convex-hull - algorithm is used. It is suitable for convex bodies or if the - intention is to enclose the `x`, `y` and `z` point set into a - convex hull. - - The 'alphahull' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["alphahull"] - - @alphahull.setter - def alphahull(self, val): - self["alphahull"] = val - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here `intensity`) or the bounds set - in `cmin` and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as `intensity` and if set, `cmin` must be set as - well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as `intensity`. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as `intensity` and if set, `cmax` must be set as - well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the color of the whole mesh - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to mesh3d.colorscale - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.mesh3d. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.mesh3d.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of mesh3d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.mesh3d.colorbar.Ti - tle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - mesh3d.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - mesh3d.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.mesh3d.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # contour - # ------- - @property - def contour(self): - """ - The 'contour' property is an instance of Contour - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.Contour` - - A dict of string/value properties that will be passed - to the Contour constructor - - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. - - Returns - ------- - plotly.graph_objs.mesh3d.Contour - """ - return self["contour"] - - @contour.setter - def contour(self, val): - self["contour"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # delaunayaxis - # ------------ - @property - def delaunayaxis(self): - """ - Sets the Delaunay axis, which is the axis that is perpendicular - to the surface of the Delaunay triangulation. It has an effect - if `i`, `j`, `k` are not provided and `alphahull` is set to - indicate Delaunay triangulation. - - The 'delaunayaxis' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['x', 'y', 'z'] - - Returns - ------- - Any - """ - return self["delaunayaxis"] - - @delaunayaxis.setter - def delaunayaxis(self, val): - self["delaunayaxis"] = val - - # facecolor - # --------- - @property - def facecolor(self): - """ - Sets the color of each face Overrides "color" and - "vertexcolor". - - The 'facecolor' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["facecolor"] - - @facecolor.setter - def facecolor(self, val): - self["facecolor"] = val - - # facecolorsrc - # ------------ - @property - def facecolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for facecolor - . - - The 'facecolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["facecolorsrc"] - - @facecolorsrc.setter - def facecolorsrc(self, val): - self["facecolorsrc"] = val - - # flatshading - # ----------- - @property - def flatshading(self): - """ - Determines whether or not normal smoothing is applied to the - meshes, creating meshes with an angular, low-poly look via flat - reflections. - - The 'flatshading' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["flatshading"] - - @flatshading.setter - def flatshading(self, val): - self["flatshading"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.mesh3d.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # i - # - - @property - def i(self): - """ - A vector of vertex indices, i.e. integer values between 0 and - the length of the vertex vectors, representing the "first" - vertex of a triangle. For example, `{i[m], j[m], k[m]}` - together represent face m (triangle m) in the mesh, where `i[m] - = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex - arrays. Therefore, each element in `i` represents a point in - space, which is the first vertex of a triangle. - - The 'i' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["i"] - - @i.setter - def i(self, val): - self["i"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # intensity - # --------- - @property - def intensity(self): - """ - Sets the intensity values for vertices or cells as defined by - `intensitymode`. It can be used for plotting fields on meshes. - - The 'intensity' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["intensity"] - - @intensity.setter - def intensity(self, val): - self["intensity"] = val - - # intensitymode - # ------------- - @property - def intensitymode(self): - """ - Determines the source of `intensity` values. - - The 'intensitymode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['vertex', 'cell'] - - Returns - ------- - Any - """ - return self["intensitymode"] - - @intensitymode.setter - def intensitymode(self, val): - self["intensitymode"] = val - - # intensitysrc - # ------------ - @property - def intensitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for intensity - . - - The 'intensitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["intensitysrc"] - - @intensitysrc.setter - def intensitysrc(self, val): - self["intensitysrc"] = val - - # isrc - # ---- - @property - def isrc(self): - """ - Sets the source reference on Chart Studio Cloud for i . - - The 'isrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["isrc"] - - @isrc.setter - def isrc(self, val): - self["isrc"] = val - - # j - # - - @property - def j(self): - """ - A vector of vertex indices, i.e. integer values between 0 and - the length of the vertex vectors, representing the "second" - vertex of a triangle. For example, `{i[m], j[m], k[m]}` - together represent face m (triangle m) in the mesh, where `j[m] - = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex - arrays. Therefore, each element in `j` represents a point in - space, which is the second vertex of a triangle. - - The 'j' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["j"] - - @j.setter - def j(self, val): - self["j"] = val - - # jsrc - # ---- - @property - def jsrc(self): - """ - Sets the source reference on Chart Studio Cloud for j . - - The 'jsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["jsrc"] - - @jsrc.setter - def jsrc(self, val): - self["jsrc"] = val - - # k - # - - @property - def k(self): - """ - A vector of vertex indices, i.e. integer values between 0 and - the length of the vertex vectors, representing the "third" - vertex of a triangle. For example, `{i[m], j[m], k[m]}` - together represent face m (triangle m) in the mesh, where `k[m] - = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex - arrays. Therefore, each element in `k` represents a point in - space, which is the third vertex of a triangle. - - The 'k' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["k"] - - @k.setter - def k(self, val): - self["k"] = val - - # ksrc - # ---- - @property - def ksrc(self): - """ - Sets the source reference on Chart Studio Cloud for k . - - The 'ksrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ksrc"] - - @ksrc.setter - def ksrc(self, val): - self["ksrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lighting - # -------- - @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.Lighting` - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - - Returns - ------- - plotly.graph_objs.mesh3d.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): - """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.Lightposition` - - A dict of string/value properties that will be passed - to the Lightposition constructor - - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.mesh3d.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.mesh3d.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with the vertices. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # vertexcolor - # ----------- - @property - def vertexcolor(self): - """ - Sets the color of each vertex Overrides "color". While Red, - green and blue colors are in the range of 0 and 255; in the - case of having vertex color data in RGBA format, the alpha - color should be normalized to be between 0 and 1. - - The 'vertexcolor' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["vertexcolor"] - - @vertexcolor.setter - def vertexcolor(self, val): - self["vertexcolor"] = val - - # vertexcolorsrc - # -------------- - @property - def vertexcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - vertexcolor . - - The 'vertexcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["vertexcolorsrc"] - - @vertexcolorsrc.setter - def vertexcolorsrc(self, val): - self["vertexcolorsrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the X coordinates of the vertices. The nth element of - vectors `x`, `y` and `z` jointly represent the X, Y and Z - coordinates of the nth vertex. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the Y coordinates of the vertices. The nth element of - vectors `x`, `y` and `z` jointly represent the X, Y and Z - coordinates of the nth vertex. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the Z coordinates of the vertices. The nth element of - vectors `x`, `y` and `z` jointly represent the X, Y and Z - coordinates of the nth vertex. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zcalendar - # --------- - @property - def zcalendar(self): - """ - Sets the calendar system to use with `z` date data. - - The 'zcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["zcalendar"] - - @zcalendar.setter - def zcalendar(self, val): - self["zcalendar"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alphahull - Determines how the mesh surface triangles are derived - from the set of vertices (points) represented by the - `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays - are not supplied. For general use of `mesh3d` it is - preferred that `i`, `j`, `k` are supplied. If "-1", - Delaunay triangulation is used, which is mainly - suitable if the mesh is a single, more or less layer - surface that is perpendicular to `delaunayaxis`. In - case the `delaunayaxis` intersects the mesh surface at - more than one point it will result triangles that are - very long in the dimension of `delaunayaxis`. If ">0", - the alpha-shape algorithm is used. In this case, the - positive `alphahull` value signals the use of the - alpha-shape algorithm, _and_ its value acts as the - parameter for the mesh fitting. If 0, the convex-hull - algorithm is used. It is suitable for convex bodies or - if the intention is to enclose the `x`, `y` and `z` - point set into a convex hull. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `intensity`) or - the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `intensity` and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `intensity`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `intensity` and if set, `cmax` - must be set as well. - color - Sets the color of the whole mesh - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.mesh3d.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.mesh3d.Contour` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - delaunayaxis - Sets the Delaunay axis, which is the axis that is - perpendicular to the surface of the Delaunay - triangulation. It has an effect if `i`, `j`, `k` are - not provided and `alphahull` is set to indicate - Delaunay triangulation. - facecolor - Sets the color of each face Overrides "color" and - "vertexcolor". - facecolorsrc - Sets the source reference on Chart Studio Cloud for - facecolor . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.mesh3d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - i - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "first" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `i[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `i` represents a point in space, which - is the first vertex of a triangle. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - intensity - Sets the intensity values for vertices or cells as - defined by `intensitymode`. It can be used for plotting - fields on meshes. - intensitymode - Determines the source of `intensity` values. - intensitysrc - Sets the source reference on Chart Studio Cloud for - intensity . - isrc - Sets the source reference on Chart Studio Cloud for i - . - j - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "second" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `j[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `j` represents a point in space, which - is the second vertex of a triangle. - jsrc - Sets the source reference on Chart Studio Cloud for j - . - k - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "third" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `k[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `k` represents a point in space, which - is the third vertex of a triangle. - ksrc - Sets the source reference on Chart Studio Cloud for k - . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.mesh3d.Lighting` instance - or dict with compatible properties - lightposition - :class:`plotly.graph_objects.mesh3d.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.mesh3d.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - vertexcolor - Sets the color of each vertex Overrides "color". While - Red, green and blue colors are in the range of 0 and - 255; in the case of having vertex color data in RGBA - format, the alpha color should be normalized to be - between 0 and 1. - vertexcolorsrc - Sets the source reference on Chart Studio Cloud for - vertexcolor . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the Y coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the Z coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - alphahull=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - delaunayaxis=None, - facecolor=None, - facecolorsrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - i=None, - ids=None, - idssrc=None, - intensity=None, - intensitymode=None, - intensitysrc=None, - isrc=None, - j=None, - jsrc=None, - k=None, - ksrc=None, - legendgroup=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - vertexcolor=None, - vertexcolorsrc=None, - visible=None, - x=None, - xcalendar=None, - xsrc=None, - y=None, - ycalendar=None, - ysrc=None, - z=None, - zcalendar=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Mesh3d object - - Draws sets of triangles with coordinates given by three - 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, - `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- - shape algorithm or (4) the Convex-hull algorithm - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Mesh3d` - alphahull - Determines how the mesh surface triangles are derived - from the set of vertices (points) represented by the - `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays - are not supplied. For general use of `mesh3d` it is - preferred that `i`, `j`, `k` are supplied. If "-1", - Delaunay triangulation is used, which is mainly - suitable if the mesh is a single, more or less layer - surface that is perpendicular to `delaunayaxis`. In - case the `delaunayaxis` intersects the mesh surface at - more than one point it will result triangles that are - very long in the dimension of `delaunayaxis`. If ">0", - the alpha-shape algorithm is used. In this case, the - positive `alphahull` value signals the use of the - alpha-shape algorithm, _and_ its value acts as the - parameter for the mesh fitting. If 0, the convex-hull - algorithm is used. It is suitable for convex bodies or - if the intention is to enclose the `x`, `y` and `z` - point set into a convex hull. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `intensity`) or - the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `intensity` and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `intensity`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `intensity` and if set, `cmax` - must be set as well. - color - Sets the color of the whole mesh - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.mesh3d.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.mesh3d.Contour` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - delaunayaxis - Sets the Delaunay axis, which is the axis that is - perpendicular to the surface of the Delaunay - triangulation. It has an effect if `i`, `j`, `k` are - not provided and `alphahull` is set to indicate - Delaunay triangulation. - facecolor - Sets the color of each face Overrides "color" and - "vertexcolor". - facecolorsrc - Sets the source reference on Chart Studio Cloud for - facecolor . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.mesh3d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - i - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "first" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `i[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `i` represents a point in space, which - is the first vertex of a triangle. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - intensity - Sets the intensity values for vertices or cells as - defined by `intensitymode`. It can be used for plotting - fields on meshes. - intensitymode - Determines the source of `intensity` values. - intensitysrc - Sets the source reference on Chart Studio Cloud for - intensity . - isrc - Sets the source reference on Chart Studio Cloud for i - . - j - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "second" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `j[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `j` represents a point in space, which - is the second vertex of a triangle. - jsrc - Sets the source reference on Chart Studio Cloud for j - . - k - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "third" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `k[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `k` represents a point in space, which - is the third vertex of a triangle. - ksrc - Sets the source reference on Chart Studio Cloud for k - . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.mesh3d.Lighting` instance - or dict with compatible properties - lightposition - :class:`plotly.graph_objects.mesh3d.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.mesh3d.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - vertexcolor - Sets the color of each vertex Overrides "color". While - Red, green and blue colors are in the range of 0 and - 255; in the case of having vertex color data in RGBA - format, the alpha color should be normalized to be - between 0 and 1. - vertexcolorsrc - Sets the source reference on Chart Studio Cloud for - vertexcolor . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the Y coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the Z coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Mesh3d - """ - super(Mesh3d, self).__init__("mesh3d") - - # Validate arg - # ------------ - 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.Mesh3d -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Mesh3d`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import mesh3d as v_mesh3d - - # Initialize validators - # --------------------- - self._validators["alphahull"] = v_mesh3d.AlphahullValidator() - self._validators["autocolorscale"] = v_mesh3d.AutocolorscaleValidator() - self._validators["cauto"] = v_mesh3d.CautoValidator() - self._validators["cmax"] = v_mesh3d.CmaxValidator() - self._validators["cmid"] = v_mesh3d.CmidValidator() - self._validators["cmin"] = v_mesh3d.CminValidator() - self._validators["color"] = v_mesh3d.ColorValidator() - self._validators["coloraxis"] = v_mesh3d.ColoraxisValidator() - self._validators["colorbar"] = v_mesh3d.ColorBarValidator() - self._validators["colorscale"] = v_mesh3d.ColorscaleValidator() - self._validators["contour"] = v_mesh3d.ContourValidator() - self._validators["customdata"] = v_mesh3d.CustomdataValidator() - self._validators["customdatasrc"] = v_mesh3d.CustomdatasrcValidator() - self._validators["delaunayaxis"] = v_mesh3d.DelaunayaxisValidator() - self._validators["facecolor"] = v_mesh3d.FacecolorValidator() - self._validators["facecolorsrc"] = v_mesh3d.FacecolorsrcValidator() - self._validators["flatshading"] = v_mesh3d.FlatshadingValidator() - self._validators["hoverinfo"] = v_mesh3d.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_mesh3d.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_mesh3d.HoverlabelValidator() - self._validators["hovertemplate"] = v_mesh3d.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_mesh3d.HovertemplatesrcValidator() - self._validators["hovertext"] = v_mesh3d.HovertextValidator() - self._validators["hovertextsrc"] = v_mesh3d.HovertextsrcValidator() - self._validators["i"] = v_mesh3d.IValidator() - self._validators["ids"] = v_mesh3d.IdsValidator() - self._validators["idssrc"] = v_mesh3d.IdssrcValidator() - self._validators["intensity"] = v_mesh3d.IntensityValidator() - self._validators["intensitymode"] = v_mesh3d.IntensitymodeValidator() - self._validators["intensitysrc"] = v_mesh3d.IntensitysrcValidator() - self._validators["isrc"] = v_mesh3d.IsrcValidator() - self._validators["j"] = v_mesh3d.JValidator() - self._validators["jsrc"] = v_mesh3d.JsrcValidator() - self._validators["k"] = v_mesh3d.KValidator() - self._validators["ksrc"] = v_mesh3d.KsrcValidator() - self._validators["legendgroup"] = v_mesh3d.LegendgroupValidator() - self._validators["lighting"] = v_mesh3d.LightingValidator() - self._validators["lightposition"] = v_mesh3d.LightpositionValidator() - self._validators["meta"] = v_mesh3d.MetaValidator() - self._validators["metasrc"] = v_mesh3d.MetasrcValidator() - self._validators["name"] = v_mesh3d.NameValidator() - self._validators["opacity"] = v_mesh3d.OpacityValidator() - self._validators["reversescale"] = v_mesh3d.ReversescaleValidator() - self._validators["scene"] = v_mesh3d.SceneValidator() - self._validators["showlegend"] = v_mesh3d.ShowlegendValidator() - self._validators["showscale"] = v_mesh3d.ShowscaleValidator() - self._validators["stream"] = v_mesh3d.StreamValidator() - self._validators["text"] = v_mesh3d.TextValidator() - self._validators["textsrc"] = v_mesh3d.TextsrcValidator() - self._validators["uid"] = v_mesh3d.UidValidator() - self._validators["uirevision"] = v_mesh3d.UirevisionValidator() - self._validators["vertexcolor"] = v_mesh3d.VertexcolorValidator() - self._validators["vertexcolorsrc"] = v_mesh3d.VertexcolorsrcValidator() - self._validators["visible"] = v_mesh3d.VisibleValidator() - self._validators["x"] = v_mesh3d.XValidator() - self._validators["xcalendar"] = v_mesh3d.XcalendarValidator() - self._validators["xsrc"] = v_mesh3d.XsrcValidator() - self._validators["y"] = v_mesh3d.YValidator() - self._validators["ycalendar"] = v_mesh3d.YcalendarValidator() - self._validators["ysrc"] = v_mesh3d.YsrcValidator() - self._validators["z"] = v_mesh3d.ZValidator() - self._validators["zcalendar"] = v_mesh3d.ZcalendarValidator() - self._validators["zsrc"] = v_mesh3d.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alphahull", None) - self["alphahull"] = alphahull if alphahull is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("delaunayaxis", None) - self["delaunayaxis"] = delaunayaxis if delaunayaxis is not None else _v - _v = arg.pop("facecolor", None) - self["facecolor"] = facecolor if facecolor is not None else _v - _v = arg.pop("facecolorsrc", None) - self["facecolorsrc"] = facecolorsrc if facecolorsrc is not None else _v - _v = arg.pop("flatshading", None) - self["flatshading"] = flatshading if flatshading is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("i", None) - self["i"] = i if i is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("intensity", None) - self["intensity"] = intensity if intensity is not None else _v - _v = arg.pop("intensitymode", None) - self["intensitymode"] = intensitymode if intensitymode is not None else _v - _v = arg.pop("intensitysrc", None) - self["intensitysrc"] = intensitysrc if intensitysrc is not None else _v - _v = arg.pop("isrc", None) - self["isrc"] = isrc if isrc is not None else _v - _v = arg.pop("j", None) - self["j"] = j if j is not None else _v - _v = arg.pop("jsrc", None) - self["jsrc"] = jsrc if jsrc is not None else _v - _v = arg.pop("k", None) - self["k"] = k if k is not None else _v - _v = arg.pop("ksrc", None) - self["ksrc"] = ksrc if ksrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("vertexcolor", None) - self["vertexcolor"] = vertexcolor if vertexcolor is not None else _v - _v = arg.pop("vertexcolorsrc", None) - self["vertexcolorsrc"] = vertexcolorsrc if vertexcolorsrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zcalendar", None) - self["zcalendar"] = zcalendar if zcalendar is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "mesh3d" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="mesh3d", val="mesh3d" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Isosurface(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # caps - # ---- - @property - def caps(self): - """ - The 'caps' property is an instance of Caps - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Caps` - - A dict of string/value properties that will be passed - to the Caps constructor - - Supported dict properties: - - x - :class:`plotly.graph_objects.isosurface.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.caps.Z` - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.isosurface.Caps - """ - return self["caps"] - - @caps.setter - def caps(self, val): - self["caps"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here `value`) or the bounds set in - `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` - are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as `value` and if set, `cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as `value`. Has no effect when `cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as `value` and if set, `cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.isosurf - ace.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.isosurface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of isosurface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.isosurface.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - isosurface.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - isosurface.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.isosurface.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # contour - # ------- - @property - def contour(self): - """ - The 'contour' property is an instance of Contour - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Contour` - - A dict of string/value properties that will be passed - to the Contour constructor - - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. - - Returns - ------- - plotly.graph_objs.isosurface.Contour - """ - return self["contour"] - - @contour.setter - def contour(self, val): - self["contour"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # flatshading - # ----------- - @property - def flatshading(self): - """ - Determines whether or not normal smoothing is applied to the - meshes, creating meshes with an angular, low-poly look via flat - reflections. - - The 'flatshading' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["flatshading"] - - @flatshading.setter - def flatshading(self, val): - self["flatshading"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.isosurface.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # isomax - # ------ - @property - def isomax(self): - """ - Sets the maximum boundary for iso-surface plot. - - The 'isomax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["isomax"] - - @isomax.setter - def isomax(self, val): - self["isomax"] = val - - # isomin - # ------ - @property - def isomin(self): - """ - Sets the minimum boundary for iso-surface plot. - - The 'isomin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["isomin"] - - @isomin.setter - def isomin(self, val): - self["isomin"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lighting - # -------- - @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Lighting` - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - - Returns - ------- - plotly.graph_objs.isosurface.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): - """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Lightposition` - - A dict of string/value properties that will be passed - to the Lightposition constructor - - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.isosurface.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # slices - # ------ - @property - def slices(self): - """ - The 'slices' property is an instance of Slices - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Slices` - - A dict of string/value properties that will be passed - to the Slices constructor - - Supported dict properties: - - x - :class:`plotly.graph_objects.isosurface.slices. - X` instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.slices. - Y` instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.slices. - Z` instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.isosurface.Slices - """ - return self["slices"] - - @slices.setter - def slices(self, val): - self["slices"] = val - - # spaceframe - # ---------- - @property - def spaceframe(self): - """ - The 'spaceframe' property is an instance of Spaceframe - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe` - - A dict of string/value properties that will be passed - to the Spaceframe constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 0.15 - meaning that only 15% of the area of every - faces of tetras would be shaded. Applying a - greater `fill` ratio would allow the creation - of stronger elements or could be sued to have - entirely closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. - - Returns - ------- - plotly.graph_objs.isosurface.Spaceframe - """ - return self["spaceframe"] - - @spaceframe.setter - def spaceframe(self, val): - self["spaceframe"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.isosurface.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # surface - # ------- - @property - def surface(self): - """ - The 'surface' property is an instance of Surface - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.Surface` - - A dict of string/value properties that will be passed - to the Surface constructor - - Supported dict properties: - - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. - - Returns - ------- - plotly.graph_objs.isosurface.Surface - """ - return self["surface"] - - @surface.setter - def surface(self, val): - self["surface"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with the vertices. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the 4th dimension (value) of the vertices. - - The 'value' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valuesrc - # -------- - @property - def valuesrc(self): - """ - Sets the source reference on Chart Studio Cloud for value . - - The 'valuesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuesrc"] - - @valuesrc.setter - def valuesrc(self, val): - self["valuesrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the X coordinates of the vertices on X axis. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the Y coordinates of the vertices on Y axis. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the Z coordinates of the vertices on Z axis. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.isosurface.Caps` instance - or dict with compatible properties - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.isosurface.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.isosurface.Contour` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.isosurface.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.isosurface.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.isosurface.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - slices - :class:`plotly.graph_objects.isosurface.Slices` - instance or dict with compatible properties - spaceframe - :class:`plotly.graph_objects.isosurface.Spaceframe` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.isosurface.Stream` - instance or dict with compatible properties - surface - :class:`plotly.graph_objects.isosurface.Surface` - instance or dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on Chart Studio Cloud for - value . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices on X axis. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the Y coordinates of the vertices on Y axis. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the Z coordinates of the vertices on Z axis. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legendgroup=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuesrc=None, - visible=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Isosurface object - - Draws isosurfaces between iso-min and iso-max values with - coordinates given by four 1-dimensional arrays containing the - `value`, `x`, `y` and `z` of every vertex of a uniform or non- - uniform 3-D grid. Horizontal or vertical slices, caps as well - as spaceframe between iso-min and iso-max values could also be - drawn using this trace. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Isosurface` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.isosurface.Caps` instance - or dict with compatible properties - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.isosurface.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.isosurface.Contour` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.isosurface.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.isosurface.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.isosurface.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - slices - :class:`plotly.graph_objects.isosurface.Slices` - instance or dict with compatible properties - spaceframe - :class:`plotly.graph_objects.isosurface.Spaceframe` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.isosurface.Stream` - instance or dict with compatible properties - surface - :class:`plotly.graph_objects.isosurface.Surface` - instance or dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on Chart Studio Cloud for - value . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices on X axis. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the Y coordinates of the vertices on Y axis. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the Z coordinates of the vertices on Z axis. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Isosurface - """ - super(Isosurface, self).__init__("isosurface") - - # Validate arg - # ------------ - 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.Isosurface -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Isosurface`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import isosurface as v_isosurface - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_isosurface.AutocolorscaleValidator() - self._validators["caps"] = v_isosurface.CapsValidator() - self._validators["cauto"] = v_isosurface.CautoValidator() - self._validators["cmax"] = v_isosurface.CmaxValidator() - self._validators["cmid"] = v_isosurface.CmidValidator() - self._validators["cmin"] = v_isosurface.CminValidator() - self._validators["coloraxis"] = v_isosurface.ColoraxisValidator() - self._validators["colorbar"] = v_isosurface.ColorBarValidator() - self._validators["colorscale"] = v_isosurface.ColorscaleValidator() - self._validators["contour"] = v_isosurface.ContourValidator() - self._validators["customdata"] = v_isosurface.CustomdataValidator() - self._validators["customdatasrc"] = v_isosurface.CustomdatasrcValidator() - self._validators["flatshading"] = v_isosurface.FlatshadingValidator() - self._validators["hoverinfo"] = v_isosurface.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_isosurface.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_isosurface.HoverlabelValidator() - self._validators["hovertemplate"] = v_isosurface.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_isosurface.HovertemplatesrcValidator() - self._validators["hovertext"] = v_isosurface.HovertextValidator() - self._validators["hovertextsrc"] = v_isosurface.HovertextsrcValidator() - self._validators["ids"] = v_isosurface.IdsValidator() - self._validators["idssrc"] = v_isosurface.IdssrcValidator() - self._validators["isomax"] = v_isosurface.IsomaxValidator() - self._validators["isomin"] = v_isosurface.IsominValidator() - self._validators["legendgroup"] = v_isosurface.LegendgroupValidator() - self._validators["lighting"] = v_isosurface.LightingValidator() - self._validators["lightposition"] = v_isosurface.LightpositionValidator() - self._validators["meta"] = v_isosurface.MetaValidator() - self._validators["metasrc"] = v_isosurface.MetasrcValidator() - self._validators["name"] = v_isosurface.NameValidator() - self._validators["opacity"] = v_isosurface.OpacityValidator() - self._validators["reversescale"] = v_isosurface.ReversescaleValidator() - self._validators["scene"] = v_isosurface.SceneValidator() - self._validators["showlegend"] = v_isosurface.ShowlegendValidator() - self._validators["showscale"] = v_isosurface.ShowscaleValidator() - self._validators["slices"] = v_isosurface.SlicesValidator() - self._validators["spaceframe"] = v_isosurface.SpaceframeValidator() - self._validators["stream"] = v_isosurface.StreamValidator() - self._validators["surface"] = v_isosurface.SurfaceValidator() - self._validators["text"] = v_isosurface.TextValidator() - self._validators["textsrc"] = v_isosurface.TextsrcValidator() - self._validators["uid"] = v_isosurface.UidValidator() - self._validators["uirevision"] = v_isosurface.UirevisionValidator() - self._validators["value"] = v_isosurface.ValueValidator() - self._validators["valuesrc"] = v_isosurface.ValuesrcValidator() - self._validators["visible"] = v_isosurface.VisibleValidator() - self._validators["x"] = v_isosurface.XValidator() - self._validators["xsrc"] = v_isosurface.XsrcValidator() - self._validators["y"] = v_isosurface.YValidator() - self._validators["ysrc"] = v_isosurface.YsrcValidator() - self._validators["z"] = v_isosurface.ZValidator() - self._validators["zsrc"] = v_isosurface.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("caps", None) - self["caps"] = caps if caps is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("flatshading", None) - self["flatshading"] = flatshading if flatshading is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("isomax", None) - self["isomax"] = isomax if isomax is not None else _v - _v = arg.pop("isomin", None) - self["isomin"] = isomin if isomin is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("slices", None) - self["slices"] = slices if slices is not None else _v - _v = arg.pop("spaceframe", None) - self["spaceframe"] = spaceframe if spaceframe is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("surface", None) - self["surface"] = surface if surface is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valuesrc", None) - self["valuesrc"] = valuesrc if valuesrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "isosurface" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="isosurface", val="isosurface" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Indicator(_BaseTraceType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the `text` within the box. - Note that this attribute has no effect if an angular gauge is - displayed: in this case, it is always centered - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # delta - # ----- - @property - def delta(self): - """ - The 'delta' property is an instance of Delta - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.Delta` - - A dict of string/value properties that will be passed - to the Delta constructor - - Supported dict properties: - - decreasing - :class:`plotly.graph_objects.indicator.delta.De - creasing` instance or dict with compatible - properties - font - Set the font used to display the delta - increasing - :class:`plotly.graph_objects.indicator.delta.In - creasing` instance or dict with compatible - properties - position - Sets the position of delta with respect to the - number. - reference - Sets the reference value to compute the delta. - By default, it is set to the current value. - relative - Show relative change - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - Returns - ------- - plotly.graph_objs.indicator.Delta - """ - return self["delta"] - - @delta.setter - def delta(self, val): - self["delta"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this indicator - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator - trace (in plot fraction). - y - Sets the vertical domain of this indicator - trace (in plot fraction). - - Returns - ------- - plotly.graph_objs.indicator.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # gauge - # ----- - @property - def gauge(self): - """ - The gauge of the Indicator plot. - - The 'gauge' property is an instance of Gauge - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.Gauge` - - A dict of string/value properties that will be passed - to the Gauge constructor - - Supported dict properties: - - axis - :class:`plotly.graph_objects.indicator.gauge.Ax - is` instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the - gauge. - borderwidth - Sets the width (in px) of the border enclosing - the gauge. - shape - Set the shape of the gauge - steps - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.Step` instances or dicts with - compatible properties - stepdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.stepdefaults), sets the - default property values to use for elements of - indicator.gauge.steps - threshold - :class:`plotly.graph_objects.indicator.gauge.Th - reshold` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.indicator.Gauge - """ - return self["gauge"] - - @gauge.setter - def gauge(self, val): - self["gauge"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines how the value is displayed on the graph. `number` - displays the value numerically in text. `delta` displays the - difference to a reference value in text. Finally, `gauge` - displays the value graphically on an axis. - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['number', 'delta', 'gauge'] joined with '+' characters - (e.g. 'number+delta') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # number - # ------ - @property - def number(self): - """ - The 'number' property is an instance of Number - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.Number` - - A dict of string/value properties that will be passed - to the Number constructor - - Supported dict properties: - - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - Returns - ------- - plotly.graph_objs.indicator.Number - """ - return self["number"] - - @number.setter - def number(self, val): - self["number"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.indicator.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the title. It - defaults to `center` except for bullet charts - for which it defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. - - Returns - ------- - plotly.graph_objs.indicator.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the number to be displayed. - - The 'value' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the `text` within the - box. Note that this attribute has no effect if an - angular gauge is displayed: in this case, it is always - centered - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - delta - :class:`plotly.graph_objects.indicator.Delta` instance - or dict with compatible properties - domain - :class:`plotly.graph_objects.indicator.Domain` instance - or dict with compatible properties - gauge - The gauge of the Indicator plot. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines how the value is displayed on the graph. - `number` displays the value numerically in text. - `delta` displays the difference to a reference value in - text. Finally, `gauge` displays the value graphically - on an axis. - name - Sets the trace name. The trace name appear as the - legend item and on hover. - number - :class:`plotly.graph_objects.indicator.Number` instance - or dict with compatible properties - stream - :class:`plotly.graph_objects.indicator.Stream` instance - or dict with compatible properties - title - :class:`plotly.graph_objects.indicator.Title` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the number to be displayed. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - align=None, - customdata=None, - customdatasrc=None, - delta=None, - domain=None, - gauge=None, - ids=None, - idssrc=None, - meta=None, - metasrc=None, - mode=None, - name=None, - number=None, - stream=None, - title=None, - uid=None, - uirevision=None, - value=None, - visible=None, - **kwargs - ): - """ - Construct a new Indicator object - - An indicator is used to visualize a single `value` along with - some contextual information such as `steps` or a `threshold`, - using a combination of three visual elements: a number, a - delta, and/or a gauge. Deltas are taken with respect to a - `reference`. Gauges can be either angular or bullet (aka - linear) gauges. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Indicator` - align - Sets the horizontal alignment of the `text` within the - box. Note that this attribute has no effect if an - angular gauge is displayed: in this case, it is always - centered - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - delta - :class:`plotly.graph_objects.indicator.Delta` instance - or dict with compatible properties - domain - :class:`plotly.graph_objects.indicator.Domain` instance - or dict with compatible properties - gauge - The gauge of the Indicator plot. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - mode - Determines how the value is displayed on the graph. - `number` displays the value numerically in text. - `delta` displays the difference to a reference value in - text. Finally, `gauge` displays the value graphically - on an axis. - name - Sets the trace name. The trace name appear as the - legend item and on hover. - number - :class:`plotly.graph_objects.indicator.Number` instance - or dict with compatible properties - stream - :class:`plotly.graph_objects.indicator.Stream` instance - or dict with compatible properties - title - :class:`plotly.graph_objects.indicator.Title` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the number to be displayed. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Indicator - """ - super(Indicator, self).__init__("indicator") - - # Validate arg - # ------------ - 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.Indicator -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Indicator`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import indicator as v_indicator - - # Initialize validators - # --------------------- - self._validators["align"] = v_indicator.AlignValidator() - self._validators["customdata"] = v_indicator.CustomdataValidator() - self._validators["customdatasrc"] = v_indicator.CustomdatasrcValidator() - self._validators["delta"] = v_indicator.DeltaValidator() - self._validators["domain"] = v_indicator.DomainValidator() - self._validators["gauge"] = v_indicator.GaugeValidator() - self._validators["ids"] = v_indicator.IdsValidator() - self._validators["idssrc"] = v_indicator.IdssrcValidator() - self._validators["meta"] = v_indicator.MetaValidator() - self._validators["metasrc"] = v_indicator.MetasrcValidator() - self._validators["mode"] = v_indicator.ModeValidator() - self._validators["name"] = v_indicator.NameValidator() - self._validators["number"] = v_indicator.NumberValidator() - self._validators["stream"] = v_indicator.StreamValidator() - self._validators["title"] = v_indicator.TitleValidator() - self._validators["uid"] = v_indicator.UidValidator() - self._validators["uirevision"] = v_indicator.UirevisionValidator() - self._validators["value"] = v_indicator.ValueValidator() - self._validators["visible"] = v_indicator.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("delta", None) - self["delta"] = delta if delta is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("gauge", None) - self["gauge"] = gauge if gauge is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("number", None) - self["number"] = number if number is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "indicator" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="indicator", val="indicator" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Image(_BaseTraceType): - - # colormodel - # ---------- - @property - def colormodel(self): - """ - Color model used to map the numerical color components - described in `z` into colors. - - The 'colormodel' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['rgb', 'rgba', 'hsl', 'hsla'] - - Returns - ------- - Any - """ - return self["colormodel"] - - @colormodel.setter - def colormodel(self, val): - self["colormodel"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Set the pixel's horizontal size. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Set the pixel's vertical size - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'color', 'name', 'text'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.image.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.image.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `z`, `color` and `colormodel`. Anything contained in - tag `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.image.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.image.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each z value. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x0 - # -- - @property - def x0(self): - """ - Set the image's x position. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # y0 - # -- - @property - def y0(self): - """ - Set the image's y position. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # z - # - - @property - def z(self): - """ - A 2-dimensional array in which each element is an array of 3 or - 4 numbers representing a color. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Array defining the higher bound for each color component. Note - that the default value will depend on the colormodel. For the - `rgb` colormodel, it is [255, 255, 255]. For the `rgba` - colormodel, it is [255, 255, 255, 1]. For the `hsl` colormodel, - it is [360, 100, 100]. For the `hsla` colormodel, it is [360, - 100, 100, 1]. - - The 'zmax' property is an info array that may be specified as: - - * a list or tuple of 4 elements where: - (0) The 'zmax[0]' property is a number and may be specified as: - - An int or float - (1) The 'zmax[1]' property is a number and may be specified as: - - An int or float - (2) The 'zmax[2]' property is a number and may be specified as: - - An int or float - (3) The 'zmax[3]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Array defining the lower bound for each color component. Note - that the default value will depend on the colormodel. For the - `rgb` colormodel, it is [0, 0, 0]. For the `rgba` colormodel, - it is [0, 0, 0, 0]. For the `hsl` colormodel, it is [0, 0, 0]. - For the `hsla` colormodel, it is [0, 0, 0, 0]. - - The 'zmin' property is an info array that may be specified as: - - * a list or tuple of 4 elements where: - (0) The 'zmin[0]' property is a number and may be specified as: - - An int or float - (1) The 'zmin[1]' property is a number and may be specified as: - - An int or float - (2) The 'zmin[2]' property is a number and may be specified as: - - An int or float - (3) The 'zmin[3]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - colormodel - Color model used to map the numerical color components - described in `z` into colors. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Set the pixel's horizontal size. - dy - Set the pixel's vertical size - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.image.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `z`, `color` and `colormodel`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.image.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x0 - Set the image's x position. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - y0 - Set the image's y position. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - z - A 2-dimensional array in which each element is an array - of 3 or 4 numbers representing a color. - zmax - Array defining the higher bound for each color - component. Note that the default value will depend on - the colormodel. For the `rgb` colormodel, it is [255, - 255, 255]. For the `rgba` colormodel, it is [255, 255, - 255, 1]. For the `hsl` colormodel, it is [360, 100, - 100]. For the `hsla` colormodel, it is [360, 100, 100, - 1]. - zmin - Array defining the lower bound for each color - component. Note that the default value will depend on - the colormodel. For the `rgb` colormodel, it is [0, 0, - 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For - the `hsl` colormodel, it is [0, 0, 0]. For the `hsla` - colormodel, it is [0, 0, 0, 0]. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - colormodel=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x0=None, - xaxis=None, - y0=None, - yaxis=None, - z=None, - zmax=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Image object - - Display an image, i.e. data on a 2D regular raster. By default, - when an image is displayed in a subplot, its y axis will be - reversed (ie. `autorange: 'reversed'`), constrained to the - domain (ie. `constrain: 'domain'`) and it will have the same - scale as its x axis (ie. `scaleanchor: 'x,`) in order for - pixels to be rendered as squares. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Image` - colormodel - Color model used to map the numerical color components - described in `z` into colors. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Set the pixel's horizontal size. - dy - Set the pixel's vertical size - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.image.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `z`, `color` and `colormodel`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.image.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x0 - Set the image's x position. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - y0 - Set the image's y position. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - z - A 2-dimensional array in which each element is an array - of 3 or 4 numbers representing a color. - zmax - Array defining the higher bound for each color - component. Note that the default value will depend on - the colormodel. For the `rgb` colormodel, it is [255, - 255, 255]. For the `rgba` colormodel, it is [255, 255, - 255, 1]. For the `hsl` colormodel, it is [360, 100, - 100]. For the `hsla` colormodel, it is [360, 100, 100, - 1]. - zmin - Array defining the lower bound for each color - component. Note that the default value will depend on - the colormodel. For the `rgb` colormodel, it is [0, 0, - 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For - the `hsl` colormodel, it is [0, 0, 0]. For the `hsla` - colormodel, it is [0, 0, 0, 0]. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Image - """ - super(Image, self).__init__("image") - - # Validate arg - # ------------ - 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.Image -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Image`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import image as v_image - - # Initialize validators - # --------------------- - self._validators["colormodel"] = v_image.ColormodelValidator() - self._validators["customdata"] = v_image.CustomdataValidator() - self._validators["customdatasrc"] = v_image.CustomdatasrcValidator() - self._validators["dx"] = v_image.DxValidator() - self._validators["dy"] = v_image.DyValidator() - self._validators["hoverinfo"] = v_image.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_image.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_image.HoverlabelValidator() - self._validators["hovertemplate"] = v_image.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_image.HovertemplatesrcValidator() - self._validators["hovertext"] = v_image.HovertextValidator() - self._validators["hovertextsrc"] = v_image.HovertextsrcValidator() - self._validators["ids"] = v_image.IdsValidator() - self._validators["idssrc"] = v_image.IdssrcValidator() - self._validators["meta"] = v_image.MetaValidator() - self._validators["metasrc"] = v_image.MetasrcValidator() - self._validators["name"] = v_image.NameValidator() - self._validators["opacity"] = v_image.OpacityValidator() - self._validators["stream"] = v_image.StreamValidator() - self._validators["text"] = v_image.TextValidator() - self._validators["textsrc"] = v_image.TextsrcValidator() - self._validators["uid"] = v_image.UidValidator() - self._validators["uirevision"] = v_image.UirevisionValidator() - self._validators["visible"] = v_image.VisibleValidator() - self._validators["x0"] = v_image.X0Validator() - self._validators["xaxis"] = v_image.XAxisValidator() - self._validators["y0"] = v_image.Y0Validator() - self._validators["yaxis"] = v_image.YAxisValidator() - self._validators["z"] = v_image.ZValidator() - self._validators["zmax"] = v_image.ZmaxValidator() - self._validators["zmin"] = v_image.ZminValidator() - self._validators["zsrc"] = v_image.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colormodel", None) - self["colormodel"] = colormodel if colormodel is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "image" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="image", val="image" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Histogram2dContour(_BaseTraceType): - - # autobinx - # -------- - @property - def autobinx(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobinx` is not needed. However, we accept - `autobinx: true` or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - - The 'autobinx' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobinx"] - - @autobinx.setter - def autobinx(self, val): - self["autobinx"] = val - - # autobiny - # -------- - @property - def autobiny(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobiny` is not needed. However, we accept - `autobiny: true` or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - - The 'autobiny' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobiny"] - - @autobiny.setter - def autobiny(self, val): - self["autobiny"] = val - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # autocontour - # ----------- - @property - def autocontour(self): - """ - Determines whether or not the contour level attributes are - picked by an algorithm. If True, the number of contour levels - can be set in `ncontours`. If False, set the contour level - attributes in `contours`. - - The 'autocontour' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocontour"] - - @autocontour.setter - def autocontour(self, val): - self["autocontour"] = val - - # bingroup - # -------- - @property - def bingroup(self): - """ - Set the `xbingroup` and `ybingroup` default prefix For example, - setting a `bingroup` of 1 on two histogram2d traces will make - them their x-bins and y-bins match separately. - - The 'bingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["bingroup"] - - @bingroup.setter - def bingroup(self, val): - self["bingroup"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2dcontour.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2dcontour.colorbar.tickformatstopdef - aults), sets the default property values to use - for elements of - histogram2dcontour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2dcontour - .colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - histogram2dcontour.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram2dcontour.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.Contours` - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.Contours - """ - return self["contours"] - - @contours.setter - def contours(self, val): - self["contours"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # histfunc - # -------- - @property - def histfunc(self): - """ - Specifies the binning function used for this histogram trace. - If "count", the histogram values are computed by counting the - number of values lying inside each bin. If "sum", "avg", "min", - "max", the histogram values are computed using the sum, the - average, the minimum or the maximum of the values lying inside - each bin respectively. - - The 'histfunc' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['count', 'sum', 'avg', 'min', 'max'] - - Returns - ------- - Any - """ - return self["histfunc"] - - @histfunc.setter - def histfunc(self, val): - self["histfunc"] = val - - # histnorm - # -------- - @property - def histnorm(self): - """ - Specifies the type of normalization used for this histogram - trace. If "", the span of each bar corresponds to the number of - occurrences (i.e. the number of data points lying inside the - bins). If "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences with - respect to the total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", the span of - each bar corresponds to the number of occurrences in a bin - divided by the size of the bin interval (here, the sum of all - bin AREAS equals the total number of sample points). If - *probability density*, the area of each bar corresponds to the - probability that an event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - - The 'histnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'percent', 'probability', 'density', 'probability - density'] - - Returns - ------- - Any - """ - return self["histnorm"] - - @histnorm.setter - def histnorm(self, val): - self["histnorm"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.histogram2dcontour.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `z` Anything contained in tag `` is displayed - in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) - - Returns - ------- - plotly.graph_objs.histogram2dcontour.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - - Returns - ------- - plotly.graph_objs.histogram2dcontour.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # nbinsx - # ------ - @property - def nbinsx(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `xbins.size` is provided. - - The 'nbinsx' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsx"] - - @nbinsx.setter - def nbinsx(self, val): - self["nbinsx"] = val - - # nbinsy - # ------ - @property - def nbinsy(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `ybins.size` is provided. - - The 'nbinsy' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsy"] - - @nbinsy.setter - def nbinsy(self, val): - self["nbinsy"] = val - - # ncontours - # --------- - @property - def ncontours(self): - """ - Sets the maximum number of contour levels. The actual number of - contours will be chosen automatically to be less than or equal - to the value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is missing. - - The 'ncontours' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["ncontours"] - - @ncontours.setter - def ncontours(self, val): - self["ncontours"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the sample data to be binned on the x axis. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xbingroup - # --------- - @property - def xbingroup(self): - """ - Set a group of histogram traces which will have compatible - x-bin settings. Using `xbingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram `bingroup` - - The 'xbingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["xbingroup"] - - @xbingroup.setter - def xbingroup(self, val): - self["xbingroup"] = val - - # xbins - # ----- - @property - def xbins(self): - """ - The 'xbins' property is an instance of XBins - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.XBins` - - A dict of string/value properties that will be passed - to the XBins constructor - - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.XBins - """ - return self["xbins"] - - @xbins.setter - def xbins(self, val): - self["xbins"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the sample data to be binned on the y axis. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ybingroup - # --------- - @property - def ybingroup(self): - """ - Set a group of histogram traces which will have compatible - y-bin settings. Using `ybingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram `bingroup` - - The 'ybingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ybingroup"] - - @ybingroup.setter - def ybingroup(self, val): - self["ybingroup"] = val - - # ybins - # ----- - @property - def ybins(self): - """ - The 'ybins' property is an instance of YBins - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.YBins` - - A dict of string/value properties that will be passed - to the YBins constructor - - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.YBins - """ - return self["ybins"] - - @ybins.setter - def ybins(self, val): - self["ybins"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the aggregation data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.histogram2dcontour.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - :class:`plotly.graph_objects.histogram2dcontour.Contour - s` instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram2dcontour.Hoverla - bel` instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.histogram2dcontour.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.histogram2dcontour.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.histogram2dcontour.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the sample data to be binned on the x axis. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - :class:`plotly.graph_objects.histogram2dcontour.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - :class:`plotly.graph_objects.histogram2dcontour.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autobinx=None, - autobiny=None, - autocolorscale=None, - autocontour=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Histogram2dContour object - - The sample data from which statistics are computed is set in - `x` and `y` (where `x` and `y` represent marginal - distributions, binning is set in `xbins` and `ybins` in this - case) or `z` (where `z` represent the 2D distribution and - binning set, binning is set by `x` and `y` in this case). The - resulting distribution is visualized as a contour plot. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.Histogram2dContour` - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.histogram2dcontour.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - :class:`plotly.graph_objects.histogram2dcontour.Contour - s` instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram2dcontour.Hoverla - bel` instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.histogram2dcontour.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.histogram2dcontour.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.histogram2dcontour.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the sample data to be binned on the x axis. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - :class:`plotly.graph_objects.histogram2dcontour.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - :class:`plotly.graph_objects.histogram2dcontour.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Histogram2dContour - """ - super(Histogram2dContour, self).__init__("histogram2dcontour") - - # Validate arg - # ------------ - 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.Histogram2dContour -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Histogram2dContour`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import histogram2dcontour as v_histogram2dcontour - - # Initialize validators - # --------------------- - self._validators["autobinx"] = v_histogram2dcontour.AutobinxValidator() - self._validators["autobiny"] = v_histogram2dcontour.AutobinyValidator() - self._validators[ - "autocolorscale" - ] = v_histogram2dcontour.AutocolorscaleValidator() - self._validators["autocontour"] = v_histogram2dcontour.AutocontourValidator() - self._validators["bingroup"] = v_histogram2dcontour.BingroupValidator() - self._validators["coloraxis"] = v_histogram2dcontour.ColoraxisValidator() - self._validators["colorbar"] = v_histogram2dcontour.ColorBarValidator() - self._validators["colorscale"] = v_histogram2dcontour.ColorscaleValidator() - self._validators["contours"] = v_histogram2dcontour.ContoursValidator() - self._validators["customdata"] = v_histogram2dcontour.CustomdataValidator() - self._validators[ - "customdatasrc" - ] = v_histogram2dcontour.CustomdatasrcValidator() - self._validators["histfunc"] = v_histogram2dcontour.HistfuncValidator() - self._validators["histnorm"] = v_histogram2dcontour.HistnormValidator() - self._validators["hoverinfo"] = v_histogram2dcontour.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_histogram2dcontour.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_histogram2dcontour.HoverlabelValidator() - self._validators[ - "hovertemplate" - ] = v_histogram2dcontour.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_histogram2dcontour.HovertemplatesrcValidator() - self._validators["ids"] = v_histogram2dcontour.IdsValidator() - self._validators["idssrc"] = v_histogram2dcontour.IdssrcValidator() - self._validators["legendgroup"] = v_histogram2dcontour.LegendgroupValidator() - self._validators["line"] = v_histogram2dcontour.LineValidator() - self._validators["marker"] = v_histogram2dcontour.MarkerValidator() - self._validators["meta"] = v_histogram2dcontour.MetaValidator() - self._validators["metasrc"] = v_histogram2dcontour.MetasrcValidator() - self._validators["name"] = v_histogram2dcontour.NameValidator() - self._validators["nbinsx"] = v_histogram2dcontour.NbinsxValidator() - self._validators["nbinsy"] = v_histogram2dcontour.NbinsyValidator() - self._validators["ncontours"] = v_histogram2dcontour.NcontoursValidator() - self._validators["opacity"] = v_histogram2dcontour.OpacityValidator() - self._validators["reversescale"] = v_histogram2dcontour.ReversescaleValidator() - self._validators["showlegend"] = v_histogram2dcontour.ShowlegendValidator() - self._validators["showscale"] = v_histogram2dcontour.ShowscaleValidator() - self._validators["stream"] = v_histogram2dcontour.StreamValidator() - self._validators["uid"] = v_histogram2dcontour.UidValidator() - self._validators["uirevision"] = v_histogram2dcontour.UirevisionValidator() - self._validators["visible"] = v_histogram2dcontour.VisibleValidator() - self._validators["x"] = v_histogram2dcontour.XValidator() - self._validators["xaxis"] = v_histogram2dcontour.XAxisValidator() - self._validators["xbingroup"] = v_histogram2dcontour.XbingroupValidator() - self._validators["xbins"] = v_histogram2dcontour.XBinsValidator() - self._validators["xcalendar"] = v_histogram2dcontour.XcalendarValidator() - self._validators["xsrc"] = v_histogram2dcontour.XsrcValidator() - self._validators["y"] = v_histogram2dcontour.YValidator() - self._validators["yaxis"] = v_histogram2dcontour.YAxisValidator() - self._validators["ybingroup"] = v_histogram2dcontour.YbingroupValidator() - self._validators["ybins"] = v_histogram2dcontour.YBinsValidator() - self._validators["ycalendar"] = v_histogram2dcontour.YcalendarValidator() - self._validators["ysrc"] = v_histogram2dcontour.YsrcValidator() - self._validators["z"] = v_histogram2dcontour.ZValidator() - self._validators["zauto"] = v_histogram2dcontour.ZautoValidator() - self._validators["zhoverformat"] = v_histogram2dcontour.ZhoverformatValidator() - self._validators["zmax"] = v_histogram2dcontour.ZmaxValidator() - self._validators["zmid"] = v_histogram2dcontour.ZmidValidator() - self._validators["zmin"] = v_histogram2dcontour.ZminValidator() - self._validators["zsrc"] = v_histogram2dcontour.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autobinx", None) - self["autobinx"] = autobinx if autobinx is not None else _v - _v = arg.pop("autobiny", None) - self["autobiny"] = autobiny if autobiny is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("autocontour", None) - self["autocontour"] = autocontour if autocontour is not None else _v - _v = arg.pop("bingroup", None) - self["bingroup"] = bingroup if bingroup is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("histfunc", None) - self["histfunc"] = histfunc if histfunc is not None else _v - _v = arg.pop("histnorm", None) - self["histnorm"] = histnorm if histnorm is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("nbinsx", None) - self["nbinsx"] = nbinsx if nbinsx is not None else _v - _v = arg.pop("nbinsy", None) - self["nbinsy"] = nbinsy if nbinsy is not None else _v - _v = arg.pop("ncontours", None) - self["ncontours"] = ncontours if ncontours is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbingroup", None) - self["xbingroup"] = xbingroup if xbingroup is not None else _v - _v = arg.pop("xbins", None) - self["xbins"] = xbins if xbins is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybingroup", None) - self["ybingroup"] = ybingroup if ybingroup is not None else _v - _v = arg.pop("ybins", None) - self["ybins"] = ybins if ybins is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "histogram2dcontour" - self._validators["type"] = LiteralValidator( - plotly_name="type", - parent_name="histogram2dcontour", - val="histogram2dcontour", - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Histogram2d(_BaseTraceType): - - # autobinx - # -------- - @property - def autobinx(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobinx` is not needed. However, we accept - `autobinx: true` or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - - The 'autobinx' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobinx"] - - @autobinx.setter - def autobinx(self, val): - self["autobinx"] = val - - # autobiny - # -------- - @property - def autobiny(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobiny` is not needed. However, we accept - `autobiny: true` or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - - The 'autobiny' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobiny"] - - @autobiny.setter - def autobiny(self, val): - self["autobiny"] = val - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # bingroup - # -------- - @property - def bingroup(self): - """ - Set the `xbingroup` and `ybingroup` default prefix For example, - setting a `bingroup` of 1 on two histogram2d traces will make - them their x-bins and y-bins match separately. - - The 'bingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["bingroup"] - - @bingroup.setter - def bingroup(self, val): - self["bingroup"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2d.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2d.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - histogram2d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2d.colorb - ar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - histogram2d.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram2d.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.histogram2d.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # histfunc - # -------- - @property - def histfunc(self): - """ - Specifies the binning function used for this histogram trace. - If "count", the histogram values are computed by counting the - number of values lying inside each bin. If "sum", "avg", "min", - "max", the histogram values are computed using the sum, the - average, the minimum or the maximum of the values lying inside - each bin respectively. - - The 'histfunc' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['count', 'sum', 'avg', 'min', 'max'] - - Returns - ------- - Any - """ - return self["histfunc"] - - @histfunc.setter - def histfunc(self, val): - self["histfunc"] = val - - # histnorm - # -------- - @property - def histnorm(self): - """ - Specifies the type of normalization used for this histogram - trace. If "", the span of each bar corresponds to the number of - occurrences (i.e. the number of data points lying inside the - bins). If "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences with - respect to the total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", the span of - each bar corresponds to the number of occurrences in a bin - divided by the size of the bin interval (here, the sum of all - bin AREAS equals the total number of sample points). If - *probability density*, the area of each bar corresponds to the - probability that an event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - - The 'histnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'percent', 'probability', 'density', 'probability - density'] - - Returns - ------- - Any - """ - return self["histnorm"] - - @histnorm.setter - def histnorm(self, val): - self["histnorm"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.histogram2d.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `z` Anything contained in tag `` is displayed - in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - - Returns - ------- - plotly.graph_objs.histogram2d.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # nbinsx - # ------ - @property - def nbinsx(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `xbins.size` is provided. - - The 'nbinsx' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsx"] - - @nbinsx.setter - def nbinsx(self, val): - self["nbinsx"] = val - - # nbinsy - # ------ - @property - def nbinsy(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `ybins.size` is provided. - - The 'nbinsy' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsy"] - - @nbinsy.setter - def nbinsy(self, val): - self["nbinsy"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.histogram2d.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the sample data to be binned on the x axis. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xbingroup - # --------- - @property - def xbingroup(self): - """ - Set a group of histogram traces which will have compatible - x-bin settings. Using `xbingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram `bingroup` - - The 'xbingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["xbingroup"] - - @xbingroup.setter - def xbingroup(self, val): - self["xbingroup"] = val - - # xbins - # ----- - @property - def xbins(self): - """ - The 'xbins' property is an instance of XBins - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.XBins` - - A dict of string/value properties that will be passed - to the XBins constructor - - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - - Returns - ------- - plotly.graph_objs.histogram2d.XBins - """ - return self["xbins"] - - @xbins.setter - def xbins(self, val): - self["xbins"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xgap - # ---- - @property - def xgap(self): - """ - Sets the horizontal gap (in pixels) between bricks. - - The 'xgap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xgap"] - - @xgap.setter - def xgap(self, val): - self["xgap"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the sample data to be binned on the y axis. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ybingroup - # --------- - @property - def ybingroup(self): - """ - Set a group of histogram traces which will have compatible - y-bin settings. Using `ybingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram `bingroup` - - The 'ybingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ybingroup"] - - @ybingroup.setter - def ybingroup(self, val): - self["ybingroup"] = val - - # ybins - # ----- - @property - def ybins(self): - """ - The 'ybins' property is an instance of YBins - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.YBins` - - A dict of string/value properties that will be passed - to the YBins constructor - - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - - Returns - ------- - plotly.graph_objs.histogram2d.YBins - """ - return self["ybins"] - - @ybins.setter - def ybins(self, val): - self["ybins"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ygap - # ---- - @property - def ygap(self): - """ - Sets the vertical gap (in pixels) between bricks. - - The 'ygap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ygap"] - - @ygap.setter - def ygap(self, val): - self["ygap"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the aggregation data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsmooth - # ------- - @property - def zsmooth(self): - """ - Picks a smoothing algorithm use to smooth `z` data. - - The 'zsmooth' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fast', 'best', False] - - Returns - ------- - Any - """ - return self["zsmooth"] - - @zsmooth.setter - def zsmooth(self, val): - self["zsmooth"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.histogram2d.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram2d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.histogram2d.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.histogram2d.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the sample data to be binned on the x axis. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - :class:`plotly.graph_objects.histogram2d.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - :class:`plotly.graph_objects.histogram2d.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autobinx=None, - autobiny=None, - autocolorscale=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xgap=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - ygap=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsmooth=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Histogram2d object - - The sample data from which statistics are computed is set in - `x` and `y` (where `x` and `y` represent marginal - distributions, binning is set in `xbins` and `ybins` in this - case) or `z` (where `z` represent the 2D distribution and - binning set, binning is set by `x` and `y` in this case). The - resulting distribution is visualized as a heatmap. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Histogram2d` - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.histogram2d.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram2d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.histogram2d.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.histogram2d.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the sample data to be binned on the x axis. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - :class:`plotly.graph_objects.histogram2d.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - :class:`plotly.graph_objects.histogram2d.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Histogram2d - """ - super(Histogram2d, self).__init__("histogram2d") - - # Validate arg - # ------------ - 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.Histogram2d -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Histogram2d`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import histogram2d as v_histogram2d - - # Initialize validators - # --------------------- - self._validators["autobinx"] = v_histogram2d.AutobinxValidator() - self._validators["autobiny"] = v_histogram2d.AutobinyValidator() - self._validators["autocolorscale"] = v_histogram2d.AutocolorscaleValidator() - self._validators["bingroup"] = v_histogram2d.BingroupValidator() - self._validators["coloraxis"] = v_histogram2d.ColoraxisValidator() - self._validators["colorbar"] = v_histogram2d.ColorBarValidator() - self._validators["colorscale"] = v_histogram2d.ColorscaleValidator() - self._validators["customdata"] = v_histogram2d.CustomdataValidator() - self._validators["customdatasrc"] = v_histogram2d.CustomdatasrcValidator() - self._validators["histfunc"] = v_histogram2d.HistfuncValidator() - self._validators["histnorm"] = v_histogram2d.HistnormValidator() - self._validators["hoverinfo"] = v_histogram2d.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_histogram2d.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_histogram2d.HoverlabelValidator() - self._validators["hovertemplate"] = v_histogram2d.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_histogram2d.HovertemplatesrcValidator() - self._validators["ids"] = v_histogram2d.IdsValidator() - self._validators["idssrc"] = v_histogram2d.IdssrcValidator() - self._validators["legendgroup"] = v_histogram2d.LegendgroupValidator() - self._validators["marker"] = v_histogram2d.MarkerValidator() - self._validators["meta"] = v_histogram2d.MetaValidator() - self._validators["metasrc"] = v_histogram2d.MetasrcValidator() - self._validators["name"] = v_histogram2d.NameValidator() - self._validators["nbinsx"] = v_histogram2d.NbinsxValidator() - self._validators["nbinsy"] = v_histogram2d.NbinsyValidator() - self._validators["opacity"] = v_histogram2d.OpacityValidator() - self._validators["reversescale"] = v_histogram2d.ReversescaleValidator() - self._validators["showlegend"] = v_histogram2d.ShowlegendValidator() - self._validators["showscale"] = v_histogram2d.ShowscaleValidator() - self._validators["stream"] = v_histogram2d.StreamValidator() - self._validators["uid"] = v_histogram2d.UidValidator() - self._validators["uirevision"] = v_histogram2d.UirevisionValidator() - self._validators["visible"] = v_histogram2d.VisibleValidator() - self._validators["x"] = v_histogram2d.XValidator() - self._validators["xaxis"] = v_histogram2d.XAxisValidator() - self._validators["xbingroup"] = v_histogram2d.XbingroupValidator() - self._validators["xbins"] = v_histogram2d.XBinsValidator() - self._validators["xcalendar"] = v_histogram2d.XcalendarValidator() - self._validators["xgap"] = v_histogram2d.XgapValidator() - self._validators["xsrc"] = v_histogram2d.XsrcValidator() - self._validators["y"] = v_histogram2d.YValidator() - self._validators["yaxis"] = v_histogram2d.YAxisValidator() - self._validators["ybingroup"] = v_histogram2d.YbingroupValidator() - self._validators["ybins"] = v_histogram2d.YBinsValidator() - self._validators["ycalendar"] = v_histogram2d.YcalendarValidator() - self._validators["ygap"] = v_histogram2d.YgapValidator() - self._validators["ysrc"] = v_histogram2d.YsrcValidator() - self._validators["z"] = v_histogram2d.ZValidator() - self._validators["zauto"] = v_histogram2d.ZautoValidator() - self._validators["zhoverformat"] = v_histogram2d.ZhoverformatValidator() - self._validators["zmax"] = v_histogram2d.ZmaxValidator() - self._validators["zmid"] = v_histogram2d.ZmidValidator() - self._validators["zmin"] = v_histogram2d.ZminValidator() - self._validators["zsmooth"] = v_histogram2d.ZsmoothValidator() - self._validators["zsrc"] = v_histogram2d.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autobinx", None) - self["autobinx"] = autobinx if autobinx is not None else _v - _v = arg.pop("autobiny", None) - self["autobiny"] = autobiny if autobiny is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("bingroup", None) - self["bingroup"] = bingroup if bingroup is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("histfunc", None) - self["histfunc"] = histfunc if histfunc is not None else _v - _v = arg.pop("histnorm", None) - self["histnorm"] = histnorm if histnorm is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("nbinsx", None) - self["nbinsx"] = nbinsx if nbinsx is not None else _v - _v = arg.pop("nbinsy", None) - self["nbinsy"] = nbinsy if nbinsy is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbingroup", None) - self["xbingroup"] = xbingroup if xbingroup is not None else _v - _v = arg.pop("xbins", None) - self["xbins"] = xbins if xbins is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xgap", None) - self["xgap"] = xgap if xgap is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybingroup", None) - self["ybingroup"] = ybingroup if ybingroup is not None else _v - _v = arg.pop("ybins", None) - self["ybins"] = ybins if ybins is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ygap", None) - self["ygap"] = ygap if ygap is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsmooth", None) - self["zsmooth"] = zsmooth if zsmooth is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "histogram2d" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="histogram2d", val="histogram2d" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Histogram(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val - - # autobinx - # -------- - @property - def autobinx(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobinx` is not needed. However, we accept - `autobinx: true` or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - - The 'autobinx' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobinx"] - - @autobinx.setter - def autobinx(self, val): - self["autobinx"] = val - - # autobiny - # -------- - @property - def autobiny(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobiny` is not needed. However, we accept - `autobiny: true` or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - - The 'autobiny' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobiny"] - - @autobiny.setter - def autobiny(self, val): - self["autobiny"] = val - - # bingroup - # -------- - @property - def bingroup(self): - """ - Set a group of histogram traces which will have compatible bin - settings. Note that traces on the same subplot and with the - same "orientation" under `barmode` "stack", "relative" and - "group" are forced into the same bingroup, Using `bingroup`, - traces under `barmode` "overlay" and on different axes (of the - same axis type) can have compatible bin settings. Note that - histogram and histogram2d* trace can share the same `bingroup` - - The 'bingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["bingroup"] - - @bingroup.setter - def bingroup(self, val): - self["bingroup"] = val - - # cumulative - # ---------- - @property - def cumulative(self): - """ - The 'cumulative' property is an instance of Cumulative - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.Cumulative` - - A dict of string/value properties that will be passed - to the Cumulative constructor - - Supported dict properties: - - currentbin - Only applies if cumulative is enabled. Sets - whether the current bin is included, excluded, - or has half of its value included in the - current cumulative value. "include" is the - default for compatibility with various other - tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half- - bin bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If - "increasing" (default) we sum all prior bins, - so the result increases from left to right. If - "decreasing" we sum later bins so the result - decreases from left to right. - enabled - If true, display the cumulative distribution by - summing the binned values. Use the `direction` - and `centralbin` attributes to tune the - accumulation method. Note: in this mode, the - "density" `histnorm` settings behave the same - as their equivalents without "density": "" and - "density" both rise to the number of data - points, and "probability" and *probability - density* both rise to the number of sample - points. - - Returns - ------- - plotly.graph_objs.histogram.Cumulative - """ - return self["cumulative"] - - @cumulative.setter - def cumulative(self, val): - self["cumulative"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.ErrorX` - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.histogram.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.ErrorY` - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.histogram.ErrorY - """ - return self["error_y"] - - @error_y.setter - def error_y(self, val): - self["error_y"] = val - - # histfunc - # -------- - @property - def histfunc(self): - """ - Specifies the binning function used for this histogram trace. - If "count", the histogram values are computed by counting the - number of values lying inside each bin. If "sum", "avg", "min", - "max", the histogram values are computed using the sum, the - average, the minimum or the maximum of the values lying inside - each bin respectively. - - The 'histfunc' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['count', 'sum', 'avg', 'min', 'max'] - - Returns - ------- - Any - """ - return self["histfunc"] - - @histfunc.setter - def histfunc(self, val): - self["histfunc"] = val - - # histnorm - # -------- - @property - def histnorm(self): - """ - Specifies the type of normalization used for this histogram - trace. If "", the span of each bar corresponds to the number of - occurrences (i.e. the number of data points lying inside the - bins). If "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences with - respect to the total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", the span of - each bar corresponds to the number of occurrences in a bin - divided by the size of the bin interval (here, the sum of all - bin AREAS equals the total number of sample points). If - *probability density*, the area of each bar corresponds to the - probability that an event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - - The 'histnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'percent', 'probability', 'density', 'probability - density'] - - Returns - ------- - Any - """ - return self["histnorm"] - - @histnorm.setter - def histnorm(self, val): - self["histnorm"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.histogram.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `binNumber` Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.histogram.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.histogram.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # nbinsx - # ------ - @property - def nbinsx(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `xbins.size` is provided. - - The 'nbinsx' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsx"] - - @nbinsx.setter - def nbinsx(self, val): - self["nbinsx"] = val - - # nbinsy - # ------ - @property - def nbinsy(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `ybins.size` is provided. - - The 'nbinsy' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsy"] - - @nbinsy.setter - def nbinsy(self, val): - self["nbinsy"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the bars. With "v" ("h"), the value of - the each bar spans along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.histogram.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.selected - .Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.histogram.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.histogram.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets hover text elements associated with each bar. If a single - string, the same string appears over all bars. If an array of - string, the items are mapped in order to the this trace's - coordinates. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.histogram.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.unselect - ed.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.histogram.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the sample data to be binned on the x axis. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xbins - # ----- - @property - def xbins(self): - """ - The 'xbins' property is an instance of XBins - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.XBins` - - A dict of string/value properties that will be passed - to the XBins constructor - - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. - - Returns - ------- - plotly.graph_objs.histogram.XBins - """ - return self["xbins"] - - @xbins.setter - def xbins(self, val): - self["xbins"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the sample data to be binned on the y axis. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ybins - # ----- - @property - def ybins(self): - """ - The 'ybins' property is an instance of YBins - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.YBins` - - A dict of string/value properties that will be passed - to the YBins constructor - - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. - - Returns - ------- - plotly.graph_objs.histogram.YBins - """ - return self["ybins"] - - @ybins.setter - def ybins(self, val): - self["ybins"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - bingroup - Set a group of histogram traces which will have - compatible bin settings. Note that traces on the same - subplot and with the same "orientation" under `barmode` - "stack", "relative" and "group" are forced into the - same bingroup, Using `bingroup`, traces under `barmode` - "overlay" and on different axes (of the same axis type) - can have compatible bin settings. Note that histogram - and histogram2d* trace can share the same `bingroup` - cumulative - :class:`plotly.graph_objects.histogram.Cumulative` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - error_x - :class:`plotly.graph_objects.histogram.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.histogram.ErrorY` instance - or dict with compatible properties - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `binNumber` Anything contained - in tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.histogram.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - selected - :class:`plotly.graph_objects.histogram.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.histogram.Stream` instance - or dict with compatible properties - text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.histogram.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the sample data to be binned on the x axis. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbins - :class:`plotly.graph_objects.histogram.XBins` instance - or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybins - :class:`plotly.graph_objects.histogram.YBins` instance - or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - alignmentgroup=None, - autobinx=None, - autobiny=None, - bingroup=None, - cumulative=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - offsetgroup=None, - opacity=None, - orientation=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - xaxis=None, - xbins=None, - xcalendar=None, - xsrc=None, - y=None, - yaxis=None, - ybins=None, - ycalendar=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Histogram object - - The sample data from which statistics are computed is set in - `x` for vertically spanning histograms and in `y` for - horizontally spanning histograms. Binning options are set - `xbins` and `ybins` respectively if no aggregation data is - provided. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Histogram` - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - bingroup - Set a group of histogram traces which will have - compatible bin settings. Note that traces on the same - subplot and with the same "orientation" under `barmode` - "stack", "relative" and "group" are forced into the - same bingroup, Using `bingroup`, traces under `barmode` - "overlay" and on different axes (of the same axis type) - can have compatible bin settings. Note that histogram - and histogram2d* trace can share the same `bingroup` - cumulative - :class:`plotly.graph_objects.histogram.Cumulative` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - error_x - :class:`plotly.graph_objects.histogram.ErrorX` instance - or dict with compatible properties - error_y - :class:`plotly.graph_objects.histogram.ErrorY` instance - or dict with compatible properties - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `binNumber` Anything contained - in tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.histogram.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - selected - :class:`plotly.graph_objects.histogram.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.histogram.Stream` instance - or dict with compatible properties - text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.histogram.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the sample data to be binned on the x axis. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbins - :class:`plotly.graph_objects.histogram.XBins` instance - or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybins - :class:`plotly.graph_objects.histogram.YBins` instance - or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Histogram - """ - super(Histogram, self).__init__("histogram") - - # Validate arg - # ------------ - 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.Histogram -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Histogram`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import histogram as v_histogram - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_histogram.AlignmentgroupValidator() - self._validators["autobinx"] = v_histogram.AutobinxValidator() - self._validators["autobiny"] = v_histogram.AutobinyValidator() - self._validators["bingroup"] = v_histogram.BingroupValidator() - self._validators["cumulative"] = v_histogram.CumulativeValidator() - self._validators["customdata"] = v_histogram.CustomdataValidator() - self._validators["customdatasrc"] = v_histogram.CustomdatasrcValidator() - self._validators["error_x"] = v_histogram.ErrorXValidator() - self._validators["error_y"] = v_histogram.ErrorYValidator() - self._validators["histfunc"] = v_histogram.HistfuncValidator() - self._validators["histnorm"] = v_histogram.HistnormValidator() - self._validators["hoverinfo"] = v_histogram.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_histogram.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_histogram.HoverlabelValidator() - self._validators["hovertemplate"] = v_histogram.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_histogram.HovertemplatesrcValidator() - self._validators["hovertext"] = v_histogram.HovertextValidator() - self._validators["hovertextsrc"] = v_histogram.HovertextsrcValidator() - self._validators["ids"] = v_histogram.IdsValidator() - self._validators["idssrc"] = v_histogram.IdssrcValidator() - self._validators["legendgroup"] = v_histogram.LegendgroupValidator() - self._validators["marker"] = v_histogram.MarkerValidator() - self._validators["meta"] = v_histogram.MetaValidator() - self._validators["metasrc"] = v_histogram.MetasrcValidator() - self._validators["name"] = v_histogram.NameValidator() - self._validators["nbinsx"] = v_histogram.NbinsxValidator() - self._validators["nbinsy"] = v_histogram.NbinsyValidator() - self._validators["offsetgroup"] = v_histogram.OffsetgroupValidator() - self._validators["opacity"] = v_histogram.OpacityValidator() - self._validators["orientation"] = v_histogram.OrientationValidator() - self._validators["selected"] = v_histogram.SelectedValidator() - self._validators["selectedpoints"] = v_histogram.SelectedpointsValidator() - self._validators["showlegend"] = v_histogram.ShowlegendValidator() - self._validators["stream"] = v_histogram.StreamValidator() - self._validators["text"] = v_histogram.TextValidator() - self._validators["textsrc"] = v_histogram.TextsrcValidator() - self._validators["uid"] = v_histogram.UidValidator() - self._validators["uirevision"] = v_histogram.UirevisionValidator() - self._validators["unselected"] = v_histogram.UnselectedValidator() - self._validators["visible"] = v_histogram.VisibleValidator() - self._validators["x"] = v_histogram.XValidator() - self._validators["xaxis"] = v_histogram.XAxisValidator() - self._validators["xbins"] = v_histogram.XBinsValidator() - self._validators["xcalendar"] = v_histogram.XcalendarValidator() - self._validators["xsrc"] = v_histogram.XsrcValidator() - self._validators["y"] = v_histogram.YValidator() - self._validators["yaxis"] = v_histogram.YAxisValidator() - self._validators["ybins"] = v_histogram.YBinsValidator() - self._validators["ycalendar"] = v_histogram.YcalendarValidator() - self._validators["ysrc"] = v_histogram.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("autobinx", None) - self["autobinx"] = autobinx if autobinx is not None else _v - _v = arg.pop("autobiny", None) - self["autobiny"] = autobiny if autobiny is not None else _v - _v = arg.pop("bingroup", None) - self["bingroup"] = bingroup if bingroup is not None else _v - _v = arg.pop("cumulative", None) - self["cumulative"] = cumulative if cumulative is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("histfunc", None) - self["histfunc"] = histfunc if histfunc is not None else _v - _v = arg.pop("histnorm", None) - self["histnorm"] = histnorm if histnorm is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("nbinsx", None) - self["nbinsx"] = nbinsx if nbinsx is not None else _v - _v = arg.pop("nbinsy", None) - self["nbinsy"] = nbinsy if nbinsy is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbins", None) - self["xbins"] = xbins if xbins is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybins", None) - self["ybins"] = ybins if ybins is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "histogram" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="histogram", val="histogram" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Heatmapgl(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap - gl.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmapgl.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmapgl.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmapgl.colorbar - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - heatmapgl.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - heatmapgl.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.heatmapgl.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.heatmapgl.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.heatmapgl.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each z value. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # transpose - # --------- - @property - def transpose(self): - """ - Transposes the z data. - - The 'transpose' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["transpose"] - - @transpose.setter - def transpose(self, val): - self["transpose"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # xtype - # ----- - @property - def xtype(self): - """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). - - The 'xtype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["xtype"] - - @xtype.setter - def xtype(self, val): - self["xtype"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # ytype - # ----- - @property - def ytype(self): - """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'ytype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["ytype"] - - @ytype.setter - def ytype(self, val): - self["ytype"] = val - - # z - # - - @property - def z(self): - """ - Sets the z data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.heatmapgl.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.heatmapgl.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.heatmapgl.Stream` instance - or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Heatmapgl object - - WebGL version of the heatmap trace type. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Heatmapgl` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.heatmapgl.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.heatmapgl.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.heatmapgl.Stream` instance - or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Heatmapgl - """ - super(Heatmapgl, self).__init__("heatmapgl") - - # Validate arg - # ------------ - 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.Heatmapgl -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Heatmapgl`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import heatmapgl as v_heatmapgl - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_heatmapgl.AutocolorscaleValidator() - self._validators["coloraxis"] = v_heatmapgl.ColoraxisValidator() - self._validators["colorbar"] = v_heatmapgl.ColorBarValidator() - self._validators["colorscale"] = v_heatmapgl.ColorscaleValidator() - self._validators["customdata"] = v_heatmapgl.CustomdataValidator() - self._validators["customdatasrc"] = v_heatmapgl.CustomdatasrcValidator() - self._validators["dx"] = v_heatmapgl.DxValidator() - self._validators["dy"] = v_heatmapgl.DyValidator() - self._validators["hoverinfo"] = v_heatmapgl.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_heatmapgl.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_heatmapgl.HoverlabelValidator() - self._validators["ids"] = v_heatmapgl.IdsValidator() - self._validators["idssrc"] = v_heatmapgl.IdssrcValidator() - self._validators["meta"] = v_heatmapgl.MetaValidator() - self._validators["metasrc"] = v_heatmapgl.MetasrcValidator() - self._validators["name"] = v_heatmapgl.NameValidator() - self._validators["opacity"] = v_heatmapgl.OpacityValidator() - self._validators["reversescale"] = v_heatmapgl.ReversescaleValidator() - self._validators["showscale"] = v_heatmapgl.ShowscaleValidator() - self._validators["stream"] = v_heatmapgl.StreamValidator() - self._validators["text"] = v_heatmapgl.TextValidator() - self._validators["textsrc"] = v_heatmapgl.TextsrcValidator() - self._validators["transpose"] = v_heatmapgl.TransposeValidator() - self._validators["uid"] = v_heatmapgl.UidValidator() - self._validators["uirevision"] = v_heatmapgl.UirevisionValidator() - self._validators["visible"] = v_heatmapgl.VisibleValidator() - self._validators["x"] = v_heatmapgl.XValidator() - self._validators["x0"] = v_heatmapgl.X0Validator() - self._validators["xaxis"] = v_heatmapgl.XAxisValidator() - self._validators["xsrc"] = v_heatmapgl.XsrcValidator() - self._validators["xtype"] = v_heatmapgl.XtypeValidator() - self._validators["y"] = v_heatmapgl.YValidator() - self._validators["y0"] = v_heatmapgl.Y0Validator() - self._validators["yaxis"] = v_heatmapgl.YAxisValidator() - self._validators["ysrc"] = v_heatmapgl.YsrcValidator() - self._validators["ytype"] = v_heatmapgl.YtypeValidator() - self._validators["z"] = v_heatmapgl.ZValidator() - self._validators["zauto"] = v_heatmapgl.ZautoValidator() - self._validators["zmax"] = v_heatmapgl.ZmaxValidator() - self._validators["zmid"] = v_heatmapgl.ZmidValidator() - self._validators["zmin"] = v_heatmapgl.ZminValidator() - self._validators["zsrc"] = v_heatmapgl.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xtype", None) - self["xtype"] = xtype if xtype is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("ytype", None) - self["ytype"] = ytype if ytype is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "heatmapgl" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="heatmapgl", val="heatmapgl" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Heatmap(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmap.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmap.colorbar.T - itle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - heatmap.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - heatmap.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.heatmap.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data are filled in. It is defaulted to true if `z` - is a one dimensional array and `zsmooth` is not false; - otherwise it is defaulted to false. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.heatmap.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoverongaps - # ----------- - @property - def hoverongaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data have hover labels associated with them. - - The 'hoverongaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["hoverongaps"] - - @hoverongaps.setter - def hoverongaps(self, val): - self["hoverongaps"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.heatmap.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each z value. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # transpose - # --------- - @property - def transpose(self): - """ - Transposes the z data. - - The 'transpose' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["transpose"] - - @transpose.setter - def transpose(self, val): - self["transpose"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xgap - # ---- - @property - def xgap(self): - """ - Sets the horizontal gap (in pixels) between bricks. - - The 'xgap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xgap"] - - @xgap.setter - def xgap(self, val): - self["xgap"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # xtype - # ----- - @property - def xtype(self): - """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). - - The 'xtype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["xtype"] - - @xtype.setter - def xtype(self, val): - self["xtype"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ygap - # ---- - @property - def ygap(self): - """ - Sets the vertical gap (in pixels) between bricks. - - The 'ygap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ygap"] - - @ygap.setter - def ygap(self, val): - self["ygap"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # ytype - # ----- - @property - def ytype(self): - """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'ytype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["ytype"] - - @ytype.setter - def ytype(self, val): - self["ytype"] = val - - # z - # - - @property - def z(self): - """ - Sets the z data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsmooth - # ------- - @property - def zsmooth(self): - """ - Picks a smoothing algorithm use to smooth `z` data. - - The 'zsmooth' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fast', 'best', False] - - Returns - ------- - Any - """ - return self["zsmooth"] - - @zsmooth.setter - def zsmooth(self, val): - self["zsmooth"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.heatmap.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. It is defaulted - to true if `z` is a one dimensional array and `zsmooth` - is not false; otherwise it is defaulted to false. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.heatmap.Hoverlabel` - instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data have hover labels associated - with them. - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.heatmap.Stream` instance - or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xgap=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ygap=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsmooth=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Heatmap object - - The data that describes the heatmap value-to-color mapping is - set in `z`. Data in `z` can either be a 2D list of values - (ragged or not) or a 1D array of values. In the case where `z` - is a 2D list, say that `z` has N rows and M columns. Then, by - default, the resulting heatmap will have N partitions along the - y axis and M partitions along the x axis. In other words, the - i-th row/ j-th column cell in `z` is mapped to the i-th - partition of the y axis (starting from the bottom of the plot) - and the j-th partition of the x-axis (starting from the left of - the plot). This behavior can be flipped by using `transpose`. - Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) - elements. If M (N), then the coordinates correspond to the - center of the heatmap cells and the cells have equal width. If - M+1 (N+1), then the coordinates correspond to the edges of the - heatmap cells. In the case where `z` is a 1D list, the x and y - coordinates must be provided in `x` and `y` respectively to - form data triplets. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Heatmap` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.heatmap.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. It is defaulted - to true if `z` is a one dimensional array and `zsmooth` - is not false; otherwise it is defaulted to false. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.heatmap.Hoverlabel` - instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data have hover labels associated - with them. - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.heatmap.Stream` instance - or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Heatmap - """ - super(Heatmap, self).__init__("heatmap") - - # Validate arg - # ------------ - 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.Heatmap -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Heatmap`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import heatmap as v_heatmap - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_heatmap.AutocolorscaleValidator() - self._validators["coloraxis"] = v_heatmap.ColoraxisValidator() - self._validators["colorbar"] = v_heatmap.ColorBarValidator() - self._validators["colorscale"] = v_heatmap.ColorscaleValidator() - self._validators["connectgaps"] = v_heatmap.ConnectgapsValidator() - self._validators["customdata"] = v_heatmap.CustomdataValidator() - self._validators["customdatasrc"] = v_heatmap.CustomdatasrcValidator() - self._validators["dx"] = v_heatmap.DxValidator() - self._validators["dy"] = v_heatmap.DyValidator() - self._validators["hoverinfo"] = v_heatmap.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_heatmap.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_heatmap.HoverlabelValidator() - self._validators["hoverongaps"] = v_heatmap.HoverongapsValidator() - self._validators["hovertemplate"] = v_heatmap.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_heatmap.HovertemplatesrcValidator() - self._validators["hovertext"] = v_heatmap.HovertextValidator() - self._validators["hovertextsrc"] = v_heatmap.HovertextsrcValidator() - self._validators["ids"] = v_heatmap.IdsValidator() - self._validators["idssrc"] = v_heatmap.IdssrcValidator() - self._validators["legendgroup"] = v_heatmap.LegendgroupValidator() - self._validators["meta"] = v_heatmap.MetaValidator() - self._validators["metasrc"] = v_heatmap.MetasrcValidator() - self._validators["name"] = v_heatmap.NameValidator() - self._validators["opacity"] = v_heatmap.OpacityValidator() - self._validators["reversescale"] = v_heatmap.ReversescaleValidator() - self._validators["showlegend"] = v_heatmap.ShowlegendValidator() - self._validators["showscale"] = v_heatmap.ShowscaleValidator() - self._validators["stream"] = v_heatmap.StreamValidator() - self._validators["text"] = v_heatmap.TextValidator() - self._validators["textsrc"] = v_heatmap.TextsrcValidator() - self._validators["transpose"] = v_heatmap.TransposeValidator() - self._validators["uid"] = v_heatmap.UidValidator() - self._validators["uirevision"] = v_heatmap.UirevisionValidator() - self._validators["visible"] = v_heatmap.VisibleValidator() - self._validators["x"] = v_heatmap.XValidator() - self._validators["x0"] = v_heatmap.X0Validator() - self._validators["xaxis"] = v_heatmap.XAxisValidator() - self._validators["xcalendar"] = v_heatmap.XcalendarValidator() - self._validators["xgap"] = v_heatmap.XgapValidator() - self._validators["xsrc"] = v_heatmap.XsrcValidator() - self._validators["xtype"] = v_heatmap.XtypeValidator() - self._validators["y"] = v_heatmap.YValidator() - self._validators["y0"] = v_heatmap.Y0Validator() - self._validators["yaxis"] = v_heatmap.YAxisValidator() - self._validators["ycalendar"] = v_heatmap.YcalendarValidator() - self._validators["ygap"] = v_heatmap.YgapValidator() - self._validators["ysrc"] = v_heatmap.YsrcValidator() - self._validators["ytype"] = v_heatmap.YtypeValidator() - self._validators["z"] = v_heatmap.ZValidator() - self._validators["zauto"] = v_heatmap.ZautoValidator() - self._validators["zhoverformat"] = v_heatmap.ZhoverformatValidator() - self._validators["zmax"] = v_heatmap.ZmaxValidator() - self._validators["zmid"] = v_heatmap.ZmidValidator() - self._validators["zmin"] = v_heatmap.ZminValidator() - self._validators["zsmooth"] = v_heatmap.ZsmoothValidator() - self._validators["zsrc"] = v_heatmap.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoverongaps", None) - self["hoverongaps"] = hoverongaps if hoverongaps is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xgap", None) - self["xgap"] = xgap if xgap is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xtype", None) - self["xtype"] = xtype if xtype is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ygap", None) - self["ygap"] = ygap if ygap is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("ytype", None) - self["ytype"] = ytype if ytype is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsmooth", None) - self["zsmooth"] = zsmooth if zsmooth is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "heatmap" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="heatmap", val="heatmap" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Funnelarea(_BaseTraceType): - - # aspectratio - # ----------- - @property - def aspectratio(self): - """ - Sets the ratio between height and width - - The 'aspectratio' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["aspectratio"] - - @aspectratio.setter - def aspectratio(self, val): - self["aspectratio"] = val - - # baseratio - # --------- - @property - def baseratio(self): - """ - Sets the ratio between bottom length and maximum top length. - - The 'baseratio' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["baseratio"] - - @baseratio.setter - def baseratio(self, val): - self["baseratio"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dlabel - # ------ - @property - def dlabel(self): - """ - Sets the label step. See `label0` for more info. - - The 'dlabel' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dlabel"] - - @dlabel.setter - def dlabel(self, val): - self["dlabel"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this funnelarea - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this funnelarea trace - . - x - Sets the horizontal domain of this funnelarea - trace (in plot fraction). - y - Sets the vertical domain of this funnelarea - trace (in plot fraction). - - Returns - ------- - plotly.graph_objs.funnelarea.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.funnelarea.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `text` and `percent`. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnelarea.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # label0 - # ------ - @property - def label0(self): - """ - Alternate to `labels`. Builds a numeric set of labels. Use with - `dlabel` where `label0` is the starting label and `dlabel` the - step. - - The 'label0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["label0"] - - @label0.setter - def label0(self, val): - self["label0"] = val - - # labels - # ------ - @property - def labels(self): - """ - Sets the sector labels. If `labels` entries are duplicated, we - sum associated `values` or simply count occurrences if `values` - is not provided. For other array attributes (including color) - we use the first non-empty entry among all occurrences of the - label. - - The 'labels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["labels"] - - @labels.setter - def labels(self, val): - self["labels"] = val - - # labelssrc - # --------- - @property - def labelssrc(self): - """ - Sets the source reference on Chart Studio Cloud for labels . - - The 'labelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["labelssrc"] - - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - line - :class:`plotly.graph_objects.funnelarea.marker. - Line` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.funnelarea.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # scalegroup - # ---------- - @property - def scalegroup(self): - """ - If there are multiple funnelareas that should be sized - according to their totals, link them by providing a non-empty - group id here shared by every trace in the same group. - - The 'scalegroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["scalegroup"] - - @scalegroup.setter - def scalegroup(self, val): - self["scalegroup"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.funnelarea.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `textinfo`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnelarea.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `textinfo`. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, `text` and - `percent`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - position - Specifies the location of the `title`. Note - that the title's position used to be set by the - now deprecated `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no - title is displayed. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - - Returns - ------- - plotly.graph_objs.funnelarea.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the values of the sectors. If omitted, we count - occurrences of each label. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - aspectratio - Sets the ratio between height and width - baseratio - Sets the ratio between bottom length and maximum top - length. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dlabel - Sets the label step. See `label0` for more info. - domain - :class:`plotly.graph_objects.funnelarea.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.funnelarea.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `label`, `color`, `value`, - `text` and `percent`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.funnelarea.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - scalegroup - If there are multiple funnelareas that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnelarea.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `label`, - `color`, `value`, `text` and `percent`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - title - :class:`plotly.graph_objects.funnelarea.Title` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - aspectratio=None, - baseratio=None, - customdata=None, - customdatasrc=None, - dlabel=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - label0=None, - labels=None, - labelssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - scalegroup=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Funnelarea object - - Visualize stages in a process using area-encoded trapezoids. - This trace can be used to show data in a part-to-whole - representation similar to a "pie" trace, wherein each item - appears in a single stage. See also the "funnel" trace type for - a different approach to visualizing funnel data. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Funnelarea` - aspectratio - Sets the ratio between height and width - baseratio - Sets the ratio between bottom length and maximum top - length. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dlabel - Sets the label step. See `label0` for more info. - domain - :class:`plotly.graph_objects.funnelarea.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.funnelarea.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `label`, `color`, `value`, - `text` and `percent`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud for - labels . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.funnelarea.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - scalegroup - If there are multiple funnelareas that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnelarea.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `label`, - `color`, `value`, `text` and `percent`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - title - :class:`plotly.graph_objects.funnelarea.Title` instance - or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Funnelarea - """ - super(Funnelarea, self).__init__("funnelarea") - - # Validate arg - # ------------ - 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.Funnelarea -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Funnelarea`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import funnelarea as v_funnelarea - - # Initialize validators - # --------------------- - self._validators["aspectratio"] = v_funnelarea.AspectratioValidator() - self._validators["baseratio"] = v_funnelarea.BaseratioValidator() - self._validators["customdata"] = v_funnelarea.CustomdataValidator() - self._validators["customdatasrc"] = v_funnelarea.CustomdatasrcValidator() - self._validators["dlabel"] = v_funnelarea.DlabelValidator() - self._validators["domain"] = v_funnelarea.DomainValidator() - self._validators["hoverinfo"] = v_funnelarea.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_funnelarea.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_funnelarea.HoverlabelValidator() - self._validators["hovertemplate"] = v_funnelarea.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_funnelarea.HovertemplatesrcValidator() - self._validators["hovertext"] = v_funnelarea.HovertextValidator() - self._validators["hovertextsrc"] = v_funnelarea.HovertextsrcValidator() - self._validators["ids"] = v_funnelarea.IdsValidator() - self._validators["idssrc"] = v_funnelarea.IdssrcValidator() - self._validators["insidetextfont"] = v_funnelarea.InsidetextfontValidator() - self._validators["label0"] = v_funnelarea.Label0Validator() - self._validators["labels"] = v_funnelarea.LabelsValidator() - self._validators["labelssrc"] = v_funnelarea.LabelssrcValidator() - self._validators["legendgroup"] = v_funnelarea.LegendgroupValidator() - self._validators["marker"] = v_funnelarea.MarkerValidator() - self._validators["meta"] = v_funnelarea.MetaValidator() - self._validators["metasrc"] = v_funnelarea.MetasrcValidator() - self._validators["name"] = v_funnelarea.NameValidator() - self._validators["opacity"] = v_funnelarea.OpacityValidator() - self._validators["scalegroup"] = v_funnelarea.ScalegroupValidator() - self._validators["showlegend"] = v_funnelarea.ShowlegendValidator() - self._validators["stream"] = v_funnelarea.StreamValidator() - self._validators["text"] = v_funnelarea.TextValidator() - self._validators["textfont"] = v_funnelarea.TextfontValidator() - self._validators["textinfo"] = v_funnelarea.TextinfoValidator() - self._validators["textposition"] = v_funnelarea.TextpositionValidator() - self._validators["textpositionsrc"] = v_funnelarea.TextpositionsrcValidator() - self._validators["textsrc"] = v_funnelarea.TextsrcValidator() - self._validators["texttemplate"] = v_funnelarea.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_funnelarea.TexttemplatesrcValidator() - self._validators["title"] = v_funnelarea.TitleValidator() - self._validators["uid"] = v_funnelarea.UidValidator() - self._validators["uirevision"] = v_funnelarea.UirevisionValidator() - self._validators["values"] = v_funnelarea.ValuesValidator() - self._validators["valuessrc"] = v_funnelarea.ValuessrcValidator() - self._validators["visible"] = v_funnelarea.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("aspectratio", None) - self["aspectratio"] = aspectratio if aspectratio is not None else _v - _v = arg.pop("baseratio", None) - self["baseratio"] = baseratio if baseratio is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dlabel", None) - self["dlabel"] = dlabel if dlabel is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("label0", None) - self["label0"] = label0 if label0 is not None else _v - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("scalegroup", None) - self["scalegroup"] = scalegroup if scalegroup is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "funnelarea" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="funnelarea", val="funnelarea" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Funnel(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether the text nodes are clipped about the subplot - axes. To show the text nodes above axis lines and tick labels, - make sure to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # connector - # --------- - @property - def connector(self): - """ - The 'connector' property is an instance of Connector - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Connector` - - A dict of string/value properties that will be passed - to the Connector constructor - - Supported dict properties: - - fillcolor - Sets the fill color. - line - :class:`plotly.graph_objects.funnel.connector.L - ine` instance or dict with compatible - properties - visible - Determines if connector regions and lines are - drawn. - - Returns - ------- - plotly.graph_objs.funnel.Connector - """ - return self["connector"] - - @connector.setter - def connector(self, val): - self["connector"] = val - - # constraintext - # ------------- - @property - def constraintext(self): - """ - Constrain the size of text inside or outside a bar to be no - larger than the bar itself. - - The 'constraintext' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'both', 'none'] - - Returns - ------- - Any - """ - return self["constraintext"] - - @constraintext.setter - def constraintext(self, val): - self["constraintext"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters - (e.g. 'name+x') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.funnel.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `percentInitial`, `percentPrevious` and - `percentTotal`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # insidetextanchor - # ---------------- - @property - def insidetextanchor(self): - """ - Determines if texts are kept at center or start/end points in - `textposition` "inside" mode. - - The 'insidetextanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['end', 'middle', 'start'] - - Returns - ------- - Any - """ - return self["insidetextanchor"] - - @insidetextanchor.setter - def insidetextanchor(self, val): - self["insidetextanchor"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `text` lying inside the bar. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnel.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.funnel.marker.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.funnel.marker.Line - ` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.funnel.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # offset - # ------ - @property - def offset(self): - """ - Shifts the position where the bar is drawn (in position axis - units). In "group" barmode, traces that set "offset" will be - excluded and drawn in "overlay" mode instead. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the funnels. With "v" ("h"), the value - of the each bar spans along the vertical (horizontal). By - default funnels are tend to be oriented horizontally; unless - only "y" array is presented or orientation is set to "v". Also - regarding graphs including only 'horizontal' funnels, - "autorange" on the "y-axis" are set to "reversed". - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `text` lying outside the bar. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Outsidetextfont` - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnel.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.funnel.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textangle - # --------- - @property - def textangle(self): - """ - Sets the angle of the tick labels with respect to the bar. For - example, a `tickangle` of -90 draws the tick labels vertically. - With "auto" the texts may automatically be rotated to fit with - the maximum size in bars. - - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["textangle"] - - @textangle.setter - def textangle(self, val): - self["textangle"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `text`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnel.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. In the - case of having multiple funnels, percentages & totals are - computed separately (per trace). - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `text`. "inside" positions `text` - inside, next to the bar end (rotated and scaled if needed). - "outside" positions `text` outside, next to the bar end (scaled - if needed), unless there is another bar stacked on this one, - then the text gets pushed inside. "auto" tries to position - `text` inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `percentInitial`, `percentPrevious`, - `percentTotal`, `label` and `value`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the bar width (in position axis units). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - :class:`plotly.graph_objects.funnel.Connector` instance - or dict with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.funnel.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `percentInitial`, - `percentPrevious` and `percentTotal`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.funnel.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the funnels. With "v" ("h"), - the value of the each bar spans along the vertical - (horizontal). By default funnels are tend to be - oriented horizontally; unless only "y" array is - presented or orientation is set to "v". Also regarding - graphs including only 'horizontal' funnels, "autorange" - on the "y-axis" are set to "reversed". - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnel.Stream` instance or - dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple funnels, percentages & - totals are computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables - `percentInitial`, `percentPrevious`, `percentTotal`, - `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - alignmentgroup=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Funnel object - - Visualize stages in a process using length-encoded bars. This - trace can be used to show data in either a part-to-whole - representation wherein each item appears in a single stage, or - in a "drop-off" representation wherein each item appears in - each stage it traversed. See also the "funnelarea" trace type - for a different approach to visualizing funnel data. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Funnel` - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - :class:`plotly.graph_objects.funnel.Connector` instance - or dict with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.funnel.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `percentInitial`, - `percentPrevious` and `percentTotal`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.funnel.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the funnels. With "v" ("h"), - the value of the each bar spans along the vertical - (horizontal). By default funnels are tend to be - oriented horizontally; unless only "y" array is - presented or orientation is set to "v". Also regarding - graphs including only 'horizontal' funnels, "autorange" - on the "y-axis" are set to "reversed". - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnel.Stream` instance or - dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple funnels, percentages & - totals are computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables - `percentInitial`, `percentPrevious`, `percentTotal`, - `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Funnel - """ - super(Funnel, self).__init__("funnel") - - # Validate arg - # ------------ - 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.Funnel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Funnel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import funnel as v_funnel - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_funnel.AlignmentgroupValidator() - self._validators["cliponaxis"] = v_funnel.CliponaxisValidator() - self._validators["connector"] = v_funnel.ConnectorValidator() - self._validators["constraintext"] = v_funnel.ConstraintextValidator() - self._validators["customdata"] = v_funnel.CustomdataValidator() - self._validators["customdatasrc"] = v_funnel.CustomdatasrcValidator() - self._validators["dx"] = v_funnel.DxValidator() - self._validators["dy"] = v_funnel.DyValidator() - self._validators["hoverinfo"] = v_funnel.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_funnel.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_funnel.HoverlabelValidator() - self._validators["hovertemplate"] = v_funnel.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_funnel.HovertemplatesrcValidator() - self._validators["hovertext"] = v_funnel.HovertextValidator() - self._validators["hovertextsrc"] = v_funnel.HovertextsrcValidator() - self._validators["ids"] = v_funnel.IdsValidator() - self._validators["idssrc"] = v_funnel.IdssrcValidator() - self._validators["insidetextanchor"] = v_funnel.InsidetextanchorValidator() - self._validators["insidetextfont"] = v_funnel.InsidetextfontValidator() - self._validators["legendgroup"] = v_funnel.LegendgroupValidator() - self._validators["marker"] = v_funnel.MarkerValidator() - self._validators["meta"] = v_funnel.MetaValidator() - self._validators["metasrc"] = v_funnel.MetasrcValidator() - self._validators["name"] = v_funnel.NameValidator() - self._validators["offset"] = v_funnel.OffsetValidator() - self._validators["offsetgroup"] = v_funnel.OffsetgroupValidator() - self._validators["opacity"] = v_funnel.OpacityValidator() - self._validators["orientation"] = v_funnel.OrientationValidator() - self._validators["outsidetextfont"] = v_funnel.OutsidetextfontValidator() - self._validators["selectedpoints"] = v_funnel.SelectedpointsValidator() - self._validators["showlegend"] = v_funnel.ShowlegendValidator() - self._validators["stream"] = v_funnel.StreamValidator() - self._validators["text"] = v_funnel.TextValidator() - self._validators["textangle"] = v_funnel.TextangleValidator() - self._validators["textfont"] = v_funnel.TextfontValidator() - self._validators["textinfo"] = v_funnel.TextinfoValidator() - self._validators["textposition"] = v_funnel.TextpositionValidator() - self._validators["textpositionsrc"] = v_funnel.TextpositionsrcValidator() - self._validators["textsrc"] = v_funnel.TextsrcValidator() - self._validators["texttemplate"] = v_funnel.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_funnel.TexttemplatesrcValidator() - self._validators["uid"] = v_funnel.UidValidator() - self._validators["uirevision"] = v_funnel.UirevisionValidator() - self._validators["visible"] = v_funnel.VisibleValidator() - self._validators["width"] = v_funnel.WidthValidator() - self._validators["x"] = v_funnel.XValidator() - self._validators["x0"] = v_funnel.X0Validator() - self._validators["xaxis"] = v_funnel.XAxisValidator() - self._validators["xsrc"] = v_funnel.XsrcValidator() - self._validators["y"] = v_funnel.YValidator() - self._validators["y0"] = v_funnel.Y0Validator() - self._validators["yaxis"] = v_funnel.YAxisValidator() - self._validators["ysrc"] = v_funnel.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connector", None) - self["connector"] = connector if connector is not None else _v - _v = arg.pop("constraintext", None) - self["constraintext"] = constraintext if constraintext is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextanchor", None) - self["insidetextanchor"] = ( - insidetextanchor if insidetextanchor is not None else _v - ) - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "funnel" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="funnel", val="funnel" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Densitymapbox(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # below - # ----- - @property - def below(self): - """ - Determines if the densitymapbox trace will be inserted before - the layer with the specified ID. By default, densitymapbox - traces are placed below the first layer of type symbol If set - to '', the layer will be inserted above every existing layer. - - The 'below' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["below"] - - @below.setter - def below(self, val): - self["below"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.density - mapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.densitymapbox.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - densitymapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymapbox.colo - rbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - densitymapbox.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - densitymapbox.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.densitymapbox.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'lon+lat') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.densitymapbox.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (lon,lat) pair If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # lat - # --- - @property - def lat(self): - """ - Sets the latitude coordinates (in degrees North). - - The 'lat' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # latsrc - # ------ - @property - def latsrc(self): - """ - Sets the source reference on Chart Studio Cloud for lat . - - The 'latsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["latsrc"] - - @latsrc.setter - def latsrc(self, val): - self["latsrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude coordinates (in degrees East). - - The 'lon' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # lonsrc - # ------ - @property - def lonsrc(self): - """ - Sets the source reference on Chart Studio Cloud for lon . - - The 'lonsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lonsrc"] - - @lonsrc.setter - def lonsrc(self, val): - self["lonsrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # radius - # ------ - @property - def radius(self): - """ - Sets the radius of influence of one `lon` / `lat` point in - pixels. Increasing the value makes the densitymapbox trace - smoother, but less detailed. - - The 'radius' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["radius"] - - @radius.setter - def radius(self, val): - self["radius"] = val - - # radiussrc - # --------- - @property - def radiussrc(self): - """ - Sets the source reference on Chart Studio Cloud for radius . - - The 'radiussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["radiussrc"] - - @radiussrc.setter - def radiussrc(self, val): - self["radiussrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.densitymapbox.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - mapbox subplot. If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data refer to - `layout.mapbox2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'mapbox', that may be specified as the string 'mapbox' - optionally followed by an integer >= 1 - (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (lon,lat) pair If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # z - # - - @property - def z(self): - """ - Sets the points' weight. For example, a value of 10 would be - equivalent to having 10 points of weight 1 in the same spot - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the densitymapbox trace will be inserted - before the layer with the specified ID. By default, - densitymapbox traces are placed below the first layer - of type symbol If set to '', the layer will be inserted - above every existing layer. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.densitymapbox.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.densitymapbox.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on Chart Studio Cloud for - lat . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on Chart Studio Cloud for - lon . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / `lat` point - in pixels. Increasing the value makes the densitymapbox - trace smoother, but less detailed. - radiussrc - Sets the source reference on Chart Studio Cloud for - radius . - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.densitymapbox.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the points' weight. For example, a value of 10 - would be equivalent to having 10 points of weight 1 in - the same spot - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legendgroup=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Densitymapbox object - - Draws a bivariate kernel density estimation with a Gaussian - kernel from `lon` and `lat` coordinates and optional `z` values - using a colorscale. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Densitymapbox` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the densitymapbox trace will be inserted - before the layer with the specified ID. By default, - densitymapbox traces are placed below the first layer - of type symbol If set to '', the layer will be inserted - above every existing layer. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.densitymapbox.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.densitymapbox.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on Chart Studio Cloud for - lat . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on Chart Studio Cloud for - lon . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / `lat` point - in pixels. Increasing the value makes the densitymapbox - trace smoother, but less detailed. - radiussrc - Sets the source reference on Chart Studio Cloud for - radius . - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.densitymapbox.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the points' weight. For example, a value of 10 - would be equivalent to having 10 points of weight 1 in - the same spot - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Densitymapbox - """ - super(Densitymapbox, self).__init__("densitymapbox") - - # Validate arg - # ------------ - 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.Densitymapbox -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Densitymapbox`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import densitymapbox as v_densitymapbox - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_densitymapbox.AutocolorscaleValidator() - self._validators["below"] = v_densitymapbox.BelowValidator() - self._validators["coloraxis"] = v_densitymapbox.ColoraxisValidator() - self._validators["colorbar"] = v_densitymapbox.ColorBarValidator() - self._validators["colorscale"] = v_densitymapbox.ColorscaleValidator() - self._validators["customdata"] = v_densitymapbox.CustomdataValidator() - self._validators["customdatasrc"] = v_densitymapbox.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_densitymapbox.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_densitymapbox.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_densitymapbox.HoverlabelValidator() - self._validators["hovertemplate"] = v_densitymapbox.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_densitymapbox.HovertemplatesrcValidator() - self._validators["hovertext"] = v_densitymapbox.HovertextValidator() - self._validators["hovertextsrc"] = v_densitymapbox.HovertextsrcValidator() - self._validators["ids"] = v_densitymapbox.IdsValidator() - self._validators["idssrc"] = v_densitymapbox.IdssrcValidator() - self._validators["lat"] = v_densitymapbox.LatValidator() - self._validators["latsrc"] = v_densitymapbox.LatsrcValidator() - self._validators["legendgroup"] = v_densitymapbox.LegendgroupValidator() - self._validators["lon"] = v_densitymapbox.LonValidator() - self._validators["lonsrc"] = v_densitymapbox.LonsrcValidator() - self._validators["meta"] = v_densitymapbox.MetaValidator() - self._validators["metasrc"] = v_densitymapbox.MetasrcValidator() - self._validators["name"] = v_densitymapbox.NameValidator() - self._validators["opacity"] = v_densitymapbox.OpacityValidator() - self._validators["radius"] = v_densitymapbox.RadiusValidator() - self._validators["radiussrc"] = v_densitymapbox.RadiussrcValidator() - self._validators["reversescale"] = v_densitymapbox.ReversescaleValidator() - self._validators["showlegend"] = v_densitymapbox.ShowlegendValidator() - self._validators["showscale"] = v_densitymapbox.ShowscaleValidator() - self._validators["stream"] = v_densitymapbox.StreamValidator() - self._validators["subplot"] = v_densitymapbox.SubplotValidator() - self._validators["text"] = v_densitymapbox.TextValidator() - self._validators["textsrc"] = v_densitymapbox.TextsrcValidator() - self._validators["uid"] = v_densitymapbox.UidValidator() - self._validators["uirevision"] = v_densitymapbox.UirevisionValidator() - self._validators["visible"] = v_densitymapbox.VisibleValidator() - self._validators["z"] = v_densitymapbox.ZValidator() - self._validators["zauto"] = v_densitymapbox.ZautoValidator() - self._validators["zmax"] = v_densitymapbox.ZmaxValidator() - self._validators["zmid"] = v_densitymapbox.ZmidValidator() - self._validators["zmin"] = v_densitymapbox.ZminValidator() - self._validators["zsrc"] = v_densitymapbox.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("latsrc", None) - self["latsrc"] = latsrc if latsrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("lonsrc", None) - self["lonsrc"] = lonsrc if lonsrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("radius", None) - self["radius"] = radius if radius is not None else _v - _v = arg.pop("radiussrc", None) - self["radiussrc"] = radiussrc if radiussrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "densitymapbox" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="densitymapbox", val="densitymapbox" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Contourcarpet(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - Sets the x coordinates. - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # a0 - # -- - @property - def a0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'a0' property accepts values of any type - - Returns - ------- - Any - """ - return self["a0"] - - @a0.setter - def a0(self, val): - self["a0"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on Chart Studio Cloud for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val - - # atype - # ----- - @property - def atype(self): - """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). - - The 'atype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["atype"] - - @atype.setter - def atype(self, val): - self["atype"] = val - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # autocontour - # ----------- - @property - def autocontour(self): - """ - Determines whether or not the contour level attributes are - picked by an algorithm. If True, the number of contour levels - can be set in `ncontours`. If False, set the contour level - attributes in `contours`. - - The 'autocontour' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocontour"] - - @autocontour.setter - def autocontour(self, val): - self["autocontour"] = val - - # b - # - - @property - def b(self): - """ - Sets the y coordinates. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # b0 - # -- - @property - def b0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'b0' property accepts values of any type - - Returns - ------- - Any - """ - return self["b0"] - - @b0.setter - def b0(self, val): - self["b0"] = val - - # bsrc - # ---- - @property - def bsrc(self): - """ - Sets the source reference on Chart Studio Cloud for b . - - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bsrc"] - - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val - - # btype - # ----- - @property - def btype(self): - """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'btype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["btype"] - - @btype.setter - def btype(self, val): - self["btype"] = val - - # carpet - # ------ - @property - def carpet(self): - """ - The `carpet` of the carpet axes on which this contour trace - lies - - The 'carpet' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["carpet"] - - @carpet.setter - def carpet(self, val): - self["carpet"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - carpet.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contourcarpet.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - contourcarpet.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contourcarpet.colo - rbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - contourcarpet.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - contourcarpet.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.contourcarpet.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.Contours` - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "lines", - coloring is done on the contour lines. If - "none", no coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - - Returns - ------- - plotly.graph_objs.contourcarpet.Contours - """ - return self["contours"] - - @contours.setter - def contours(self, val): - self["contours"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # da - # -- - @property - def da(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'da' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["da"] - - @da.setter - def da(self, val): - self["da"] = val - - # db - # -- - @property - def db(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'db' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["db"] - - @db.setter - def db(self, val): - self["db"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line color, - marker color, or marker line color, whichever is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to contourcarpet.colorscale - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". - - Returns - ------- - plotly.graph_objs.contourcarpet.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # ncontours - # --------- - @property - def ncontours(self): - """ - Sets the maximum number of contour levels. The actual number of - contours will be chosen automatically to be less than or equal - to the value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is missing. - - The 'ncontours' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["ncontours"] - - @ncontours.setter - def ncontours(self, val): - self["ncontours"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.contourcarpet.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each z value. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # transpose - # --------- - @property - def transpose(self): - """ - Transposes the z data. - - The 'transpose' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["transpose"] - - @transpose.setter - def transpose(self, val): - self["transpose"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # z - # - - @property - def z(self): - """ - Sets the z data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - a - Sets the x coordinates. - a0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - asrc - Sets the source reference on Chart Studio Cloud for a - . - atype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - b - Sets the y coordinates. - b0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - bsrc - Sets the source reference on Chart Studio Cloud for b - . - btype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - carpet - The `carpet` of the carpet axes on which this contour - trace lies - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.contourcarpet.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - :class:`plotly.graph_objects.contourcarpet.Contours` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - da - Sets the x coordinate step. See `x0` for more info. - db - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.contourcarpet.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.contourcarpet.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - a=None, - a0=None, - asrc=None, - atype=None, - autocolorscale=None, - autocontour=None, - b=None, - b0=None, - bsrc=None, - btype=None, - carpet=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - fillcolor=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - xaxis=None, - yaxis=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Contourcarpet object - - Plots contours on either the first carpet axis or the carpet - axis with a matching `carpet` attribute. Data `z` is - interpreted as matching that of the corresponding carpet axis. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Contourcarpet` - a - Sets the x coordinates. - a0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - asrc - Sets the source reference on Chart Studio Cloud for a - . - atype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - b - Sets the y coordinates. - b0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - bsrc - Sets the source reference on Chart Studio Cloud for b - . - btype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - carpet - The `carpet` of the carpet axes on which this contour - trace lies - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.contourcarpet.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - :class:`plotly.graph_objects.contourcarpet.Contours` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - da - Sets the x coordinate step. See `x0` for more info. - db - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.contourcarpet.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.contourcarpet.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Contourcarpet - """ - super(Contourcarpet, self).__init__("contourcarpet") - - # Validate arg - # ------------ - 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.Contourcarpet -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Contourcarpet`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import contourcarpet as v_contourcarpet - - # Initialize validators - # --------------------- - self._validators["a"] = v_contourcarpet.AValidator() - self._validators["a0"] = v_contourcarpet.A0Validator() - self._validators["asrc"] = v_contourcarpet.AsrcValidator() - self._validators["atype"] = v_contourcarpet.AtypeValidator() - self._validators["autocolorscale"] = v_contourcarpet.AutocolorscaleValidator() - self._validators["autocontour"] = v_contourcarpet.AutocontourValidator() - self._validators["b"] = v_contourcarpet.BValidator() - self._validators["b0"] = v_contourcarpet.B0Validator() - self._validators["bsrc"] = v_contourcarpet.BsrcValidator() - self._validators["btype"] = v_contourcarpet.BtypeValidator() - self._validators["carpet"] = v_contourcarpet.CarpetValidator() - self._validators["coloraxis"] = v_contourcarpet.ColoraxisValidator() - self._validators["colorbar"] = v_contourcarpet.ColorBarValidator() - self._validators["colorscale"] = v_contourcarpet.ColorscaleValidator() - self._validators["contours"] = v_contourcarpet.ContoursValidator() - self._validators["customdata"] = v_contourcarpet.CustomdataValidator() - self._validators["customdatasrc"] = v_contourcarpet.CustomdatasrcValidator() - self._validators["da"] = v_contourcarpet.DaValidator() - self._validators["db"] = v_contourcarpet.DbValidator() - self._validators["fillcolor"] = v_contourcarpet.FillcolorValidator() - self._validators["hovertext"] = v_contourcarpet.HovertextValidator() - self._validators["hovertextsrc"] = v_contourcarpet.HovertextsrcValidator() - self._validators["ids"] = v_contourcarpet.IdsValidator() - self._validators["idssrc"] = v_contourcarpet.IdssrcValidator() - self._validators["legendgroup"] = v_contourcarpet.LegendgroupValidator() - self._validators["line"] = v_contourcarpet.LineValidator() - self._validators["meta"] = v_contourcarpet.MetaValidator() - self._validators["metasrc"] = v_contourcarpet.MetasrcValidator() - self._validators["name"] = v_contourcarpet.NameValidator() - self._validators["ncontours"] = v_contourcarpet.NcontoursValidator() - self._validators["opacity"] = v_contourcarpet.OpacityValidator() - self._validators["reversescale"] = v_contourcarpet.ReversescaleValidator() - self._validators["showlegend"] = v_contourcarpet.ShowlegendValidator() - self._validators["showscale"] = v_contourcarpet.ShowscaleValidator() - self._validators["stream"] = v_contourcarpet.StreamValidator() - self._validators["text"] = v_contourcarpet.TextValidator() - self._validators["textsrc"] = v_contourcarpet.TextsrcValidator() - self._validators["transpose"] = v_contourcarpet.TransposeValidator() - self._validators["uid"] = v_contourcarpet.UidValidator() - self._validators["uirevision"] = v_contourcarpet.UirevisionValidator() - self._validators["visible"] = v_contourcarpet.VisibleValidator() - self._validators["xaxis"] = v_contourcarpet.XAxisValidator() - self._validators["yaxis"] = v_contourcarpet.YAxisValidator() - self._validators["z"] = v_contourcarpet.ZValidator() - self._validators["zauto"] = v_contourcarpet.ZautoValidator() - self._validators["zmax"] = v_contourcarpet.ZmaxValidator() - self._validators["zmid"] = v_contourcarpet.ZmidValidator() - self._validators["zmin"] = v_contourcarpet.ZminValidator() - self._validators["zsrc"] = v_contourcarpet.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("a0", None) - self["a0"] = a0 if a0 is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("atype", None) - self["atype"] = atype if atype is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("autocontour", None) - self["autocontour"] = autocontour if autocontour is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("b0", None) - self["b0"] = b0 if b0 is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("btype", None) - self["btype"] = btype if btype is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("da", None) - self["da"] = da if da is not None else _v - _v = arg.pop("db", None) - self["db"] = db if db is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("ncontours", None) - self["ncontours"] = ncontours if ncontours is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "contourcarpet" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="contourcarpet", val="contourcarpet" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Contour(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # autocontour - # ----------- - @property - def autocontour(self): - """ - Determines whether or not the contour level attributes are - picked by an algorithm. If True, the number of contour levels - can be set in `ncontours`. If False, set the contour level - attributes in `contours`. - - The 'autocontour' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocontour"] - - @autocontour.setter - def autocontour(self, val): - self["autocontour"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contour.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of contour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contour.colorbar.T - itle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - contour.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - contour.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.contour.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data are filled in. It is defaulted to true if `z` - is a one dimensional array otherwise it is defaulted to false. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.Contours` - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - - Returns - ------- - plotly.graph_objs.contour.Contours - """ - return self["contours"] - - @contours.setter - def contours(self, val): - self["contours"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line color, - marker color, or marker line color, whichever is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to contour.colorscale - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.contour.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoverongaps - # ----------- - @property - def hoverongaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data have hover labels associated with them. - - The 'hoverongaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["hoverongaps"] - - @hoverongaps.setter - def hoverongaps(self, val): - self["hoverongaps"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". - - Returns - ------- - plotly.graph_objs.contour.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # ncontours - # --------- - @property - def ncontours(self): - """ - Sets the maximum number of contour levels. The actual number of - contours will be chosen automatically to be less than or equal - to the value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is missing. - - The 'ncontours' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["ncontours"] - - @ncontours.setter - def ncontours(self, val): - self["ncontours"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.contour.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each z value. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # transpose - # --------- - @property - def transpose(self): - """ - Transposes the z data. - - The 'transpose' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["transpose"] - - @transpose.setter - def transpose(self, val): - self["transpose"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # xtype - # ----- - @property - def xtype(self): - """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). - - The 'xtype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["xtype"] - - @xtype.setter - def xtype(self, val): - self["xtype"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # ytype - # ----- - @property - def ytype(self): - """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'ytype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["ytype"] - - @ytype.setter - def ytype(self, val): - self["ytype"] = val - - # z - # - - @property - def z(self): - """ - Sets the z data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.contour.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. It is defaulted - to true if `z` is a one dimensional array otherwise it - is defaulted to false. - contours - :class:`plotly.graph_objects.contour.Contours` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.contour.Hoverlabel` - instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data have hover labels associated - with them. - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.contour.Line` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.contour.Stream` instance - or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - autocontour=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Contour object - - The data from which contour lines are computed is set in `z`. - Data in `z` must be a 2D list of numbers. Say that `z` has N - rows and M columns, then by default, these N rows correspond to - N y coordinates (set in `y` or auto-generated) and the M - columns correspond to M x coordinates (set in `x` or auto- - generated). By setting `transpose` to True, the above behavior - is flipped. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Contour` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.contour.ColorBar` instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. It is defaulted - to true if `z` is a one dimensional array otherwise it - is defaulted to false. - contours - :class:`plotly.graph_objects.contour.Contours` instance - or dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.contour.Hoverlabel` - instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data have hover labels associated - with them. - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.contour.Line` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.contour.Stream` instance - or dict with compatible properties - text - Sets the text elements associated with each z value. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Contour - """ - super(Contour, self).__init__("contour") - - # Validate arg - # ------------ - 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.Contour -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Contour`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import contour as v_contour - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_contour.AutocolorscaleValidator() - self._validators["autocontour"] = v_contour.AutocontourValidator() - self._validators["coloraxis"] = v_contour.ColoraxisValidator() - self._validators["colorbar"] = v_contour.ColorBarValidator() - self._validators["colorscale"] = v_contour.ColorscaleValidator() - self._validators["connectgaps"] = v_contour.ConnectgapsValidator() - self._validators["contours"] = v_contour.ContoursValidator() - self._validators["customdata"] = v_contour.CustomdataValidator() - self._validators["customdatasrc"] = v_contour.CustomdatasrcValidator() - self._validators["dx"] = v_contour.DxValidator() - self._validators["dy"] = v_contour.DyValidator() - self._validators["fillcolor"] = v_contour.FillcolorValidator() - self._validators["hoverinfo"] = v_contour.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_contour.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_contour.HoverlabelValidator() - self._validators["hoverongaps"] = v_contour.HoverongapsValidator() - self._validators["hovertemplate"] = v_contour.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_contour.HovertemplatesrcValidator() - self._validators["hovertext"] = v_contour.HovertextValidator() - self._validators["hovertextsrc"] = v_contour.HovertextsrcValidator() - self._validators["ids"] = v_contour.IdsValidator() - self._validators["idssrc"] = v_contour.IdssrcValidator() - self._validators["legendgroup"] = v_contour.LegendgroupValidator() - self._validators["line"] = v_contour.LineValidator() - self._validators["meta"] = v_contour.MetaValidator() - self._validators["metasrc"] = v_contour.MetasrcValidator() - self._validators["name"] = v_contour.NameValidator() - self._validators["ncontours"] = v_contour.NcontoursValidator() - self._validators["opacity"] = v_contour.OpacityValidator() - self._validators["reversescale"] = v_contour.ReversescaleValidator() - self._validators["showlegend"] = v_contour.ShowlegendValidator() - self._validators["showscale"] = v_contour.ShowscaleValidator() - self._validators["stream"] = v_contour.StreamValidator() - self._validators["text"] = v_contour.TextValidator() - self._validators["textsrc"] = v_contour.TextsrcValidator() - self._validators["transpose"] = v_contour.TransposeValidator() - self._validators["uid"] = v_contour.UidValidator() - self._validators["uirevision"] = v_contour.UirevisionValidator() - self._validators["visible"] = v_contour.VisibleValidator() - self._validators["x"] = v_contour.XValidator() - self._validators["x0"] = v_contour.X0Validator() - self._validators["xaxis"] = v_contour.XAxisValidator() - self._validators["xcalendar"] = v_contour.XcalendarValidator() - self._validators["xsrc"] = v_contour.XsrcValidator() - self._validators["xtype"] = v_contour.XtypeValidator() - self._validators["y"] = v_contour.YValidator() - self._validators["y0"] = v_contour.Y0Validator() - self._validators["yaxis"] = v_contour.YAxisValidator() - self._validators["ycalendar"] = v_contour.YcalendarValidator() - self._validators["ysrc"] = v_contour.YsrcValidator() - self._validators["ytype"] = v_contour.YtypeValidator() - self._validators["z"] = v_contour.ZValidator() - self._validators["zauto"] = v_contour.ZautoValidator() - self._validators["zhoverformat"] = v_contour.ZhoverformatValidator() - self._validators["zmax"] = v_contour.ZmaxValidator() - self._validators["zmid"] = v_contour.ZmidValidator() - self._validators["zmin"] = v_contour.ZminValidator() - self._validators["zsrc"] = v_contour.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("autocontour", None) - self["autocontour"] = autocontour if autocontour is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoverongaps", None) - self["hoverongaps"] = hoverongaps if hoverongaps is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("ncontours", None) - self["ncontours"] = ncontours if ncontours is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xtype", None) - self["xtype"] = xtype if xtype is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("ytype", None) - self["ytype"] = ytype if ytype is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "contour" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="contour", val="contour" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Cone(_BaseTraceType): - - # anchor - # ------ - @property - def anchor(self): - """ - Sets the cones' anchor with respect to their x/y/z positions. - Note that "cm" denote the cone's center of mass which - corresponds to 1/4 from the tail to tip. - - The 'anchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['tip', 'tail', 'cm', 'center'] - - Returns - ------- - Any - """ - return self["anchor"] - - @anchor.setter - def anchor(self, val): - self["anchor"] = val - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here u/v/w norm) or the bounds set - in `cmin` and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmin` must be set as - well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as u/v/w norm. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmax` must be set as - well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.cone.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.cone.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of cone.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.cone.colorbar.Titl - e` instance or dict with compatible properties - titlefont - Deprecated: Please use cone.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use cone.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.cone.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.cone.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `norm` Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # lighting - # -------- - @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.Lighting` - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - - Returns - ------- - plotly.graph_objs.cone.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): - """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.Lightposition` - - A dict of string/value properties that will be passed - to the Lightposition constructor - - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.cone.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Determines whether `sizeref` is set as a "scaled" (i.e - unitless) scalar (normalized by the max u/v/w norm in the - vector field) or as "absolute" value (in the same units as the - vector field). - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['scaled', 'absolute'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Adjusts the cone size scaling. The size of the cones is - determined by their u/v/w norm multiplied a factor and - `sizeref`. This factor (computed internally) corresponds to the - minimum "time" to travel across two successive x/y/z positions - at the average velocity of those two successive positions. All - cones in a given trace use the same factor. With `sizemode` set - to "scaled", `sizeref` is unitless, its default value is 0.5 - With `sizemode` set to "absolute", `sizeref` has the same units - as the u/v/w vector field, its the default value is half the - sample's maximum vector norm. - - The 'sizeref' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.cone.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with the cones. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # u - # - - @property - def u(self): - """ - Sets the x components of the vector field. - - The 'u' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["u"] - - @u.setter - def u(self, val): - self["u"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # usrc - # ---- - @property - def usrc(self): - """ - Sets the source reference on Chart Studio Cloud for u . - - The 'usrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["usrc"] - - @usrc.setter - def usrc(self, val): - self["usrc"] = val - - # v - # - - @property - def v(self): - """ - Sets the y components of the vector field. - - The 'v' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["v"] - - @v.setter - def v(self, val): - self["v"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # vsrc - # ---- - @property - def vsrc(self): - """ - Sets the source reference on Chart Studio Cloud for v . - - The 'vsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["vsrc"] - - @vsrc.setter - def vsrc(self, val): - self["vsrc"] = val - - # w - # - - @property - def w(self): - """ - Sets the z components of the vector field. - - The 'w' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["w"] - - @w.setter - def w(self, val): - self["w"] = val - - # wsrc - # ---- - @property - def wsrc(self): - """ - Sets the source reference on Chart Studio Cloud for w . - - The 'wsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["wsrc"] - - @wsrc.setter - def wsrc(self, val): - self["wsrc"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates of the vector field and of the displayed - cones. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates of the vector field and of the displayed - cones. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the z coordinates of the vector field and of the displayed - cones. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - anchor - Sets the cones' anchor with respect to their x/y/z - positions. Note that "cm" denote the cone's center of - mass which corresponds to 1/4 from the tail to tip. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.cone.ColorBar` instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.cone.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `norm` Anything contained in - tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.cone.Lighting` instance or - dict with compatible properties - lightposition - :class:`plotly.graph_objects.cone.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - sizemode - Determines whether `sizeref` is set as a "scaled" (i.e - unitless) scalar (normalized by the max u/v/w norm in - the vector field) or as "absolute" value (in the same - units as the vector field). - sizeref - Adjusts the cone size scaling. The size of the cones is - determined by their u/v/w norm multiplied a factor and - `sizeref`. This factor (computed internally) - corresponds to the minimum "time" to travel across two - successive x/y/z positions at the average velocity of - those two successive positions. All cones in a given - trace use the same factor. With `sizemode` set to - "scaled", `sizeref` is unitless, its default value is - 0.5 With `sizemode` set to "absolute", `sizeref` has - the same units as the u/v/w vector field, its the - default value is half the sample's maximum vector norm. - stream - :class:`plotly.graph_objects.cone.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with the cones. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - u - Sets the x components of the vector field. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud for u - . - v - Sets the y components of the vector field. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - vsrc - Sets the source reference on Chart Studio Cloud for v - . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on Chart Studio Cloud for w - . - x - Sets the x coordinates of the vector field and of the - displayed cones. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates of the vector field and of the - displayed cones. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates of the vector field and of the - displayed cones. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - anchor=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizemode=None, - sizeref=None, - stream=None, - text=None, - textsrc=None, - u=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - visible=None, - vsrc=None, - w=None, - wsrc=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Cone object - - Use cone traces to visualize vector fields. Specify a vector - field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and - 3 vector component arrays `u`, `v`, `w`. The cones are drawn - exactly at the positions given by `x`, `y` and `z`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Cone` - anchor - Sets the cones' anchor with respect to their x/y/z - positions. Note that "cm" denote the cone's center of - mass which corresponds to 1/4 from the tail to tip. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.cone.ColorBar` instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.cone.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `norm` Anything contained in - tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - lighting - :class:`plotly.graph_objects.cone.Lighting` instance or - dict with compatible properties - lightposition - :class:`plotly.graph_objects.cone.Lightposition` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - sizemode - Determines whether `sizeref` is set as a "scaled" (i.e - unitless) scalar (normalized by the max u/v/w norm in - the vector field) or as "absolute" value (in the same - units as the vector field). - sizeref - Adjusts the cone size scaling. The size of the cones is - determined by their u/v/w norm multiplied a factor and - `sizeref`. This factor (computed internally) - corresponds to the minimum "time" to travel across two - successive x/y/z positions at the average velocity of - those two successive positions. All cones in a given - trace use the same factor. With `sizemode` set to - "scaled", `sizeref` is unitless, its default value is - 0.5 With `sizemode` set to "absolute", `sizeref` has - the same units as the u/v/w vector field, its the - default value is half the sample's maximum vector norm. - stream - :class:`plotly.graph_objects.cone.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with the cones. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - u - Sets the x components of the vector field. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud for u - . - v - Sets the y components of the vector field. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - vsrc - Sets the source reference on Chart Studio Cloud for v - . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on Chart Studio Cloud for w - . - x - Sets the x coordinates of the vector field and of the - displayed cones. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates of the vector field and of the - displayed cones. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z coordinates of the vector field and of the - displayed cones. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Cone - """ - super(Cone, self).__init__("cone") - - # Validate arg - # ------------ - 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.Cone -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Cone`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import cone as v_cone - - # Initialize validators - # --------------------- - self._validators["anchor"] = v_cone.AnchorValidator() - self._validators["autocolorscale"] = v_cone.AutocolorscaleValidator() - self._validators["cauto"] = v_cone.CautoValidator() - self._validators["cmax"] = v_cone.CmaxValidator() - self._validators["cmid"] = v_cone.CmidValidator() - self._validators["cmin"] = v_cone.CminValidator() - self._validators["coloraxis"] = v_cone.ColoraxisValidator() - self._validators["colorbar"] = v_cone.ColorBarValidator() - self._validators["colorscale"] = v_cone.ColorscaleValidator() - self._validators["customdata"] = v_cone.CustomdataValidator() - self._validators["customdatasrc"] = v_cone.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_cone.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_cone.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_cone.HoverlabelValidator() - self._validators["hovertemplate"] = v_cone.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_cone.HovertemplatesrcValidator() - self._validators["hovertext"] = v_cone.HovertextValidator() - self._validators["hovertextsrc"] = v_cone.HovertextsrcValidator() - self._validators["ids"] = v_cone.IdsValidator() - self._validators["idssrc"] = v_cone.IdssrcValidator() - self._validators["legendgroup"] = v_cone.LegendgroupValidator() - self._validators["lighting"] = v_cone.LightingValidator() - self._validators["lightposition"] = v_cone.LightpositionValidator() - self._validators["meta"] = v_cone.MetaValidator() - self._validators["metasrc"] = v_cone.MetasrcValidator() - self._validators["name"] = v_cone.NameValidator() - self._validators["opacity"] = v_cone.OpacityValidator() - self._validators["reversescale"] = v_cone.ReversescaleValidator() - self._validators["scene"] = v_cone.SceneValidator() - self._validators["showlegend"] = v_cone.ShowlegendValidator() - self._validators["showscale"] = v_cone.ShowscaleValidator() - self._validators["sizemode"] = v_cone.SizemodeValidator() - self._validators["sizeref"] = v_cone.SizerefValidator() - self._validators["stream"] = v_cone.StreamValidator() - self._validators["text"] = v_cone.TextValidator() - self._validators["textsrc"] = v_cone.TextsrcValidator() - self._validators["u"] = v_cone.UValidator() - self._validators["uid"] = v_cone.UidValidator() - self._validators["uirevision"] = v_cone.UirevisionValidator() - self._validators["usrc"] = v_cone.UsrcValidator() - self._validators["v"] = v_cone.VValidator() - self._validators["visible"] = v_cone.VisibleValidator() - self._validators["vsrc"] = v_cone.VsrcValidator() - self._validators["w"] = v_cone.WValidator() - self._validators["wsrc"] = v_cone.WsrcValidator() - self._validators["x"] = v_cone.XValidator() - self._validators["xsrc"] = v_cone.XsrcValidator() - self._validators["y"] = v_cone.YValidator() - self._validators["ysrc"] = v_cone.YsrcValidator() - self._validators["z"] = v_cone.ZValidator() - self._validators["zsrc"] = v_cone.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("anchor", None) - self["anchor"] = anchor if anchor is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("u", None) - self["u"] = u if u is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("usrc", None) - self["usrc"] = usrc if usrc is not None else _v - _v = arg.pop("v", None) - self["v"] = v if v is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("vsrc", None) - self["vsrc"] = vsrc if vsrc is not None else _v - _v = arg.pop("w", None) - self["w"] = w if w is not None else _v - _v = arg.pop("wsrc", None) - self["wsrc"] = wsrc if wsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "cone" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="cone", val="cone" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Choroplethmapbox(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # below - # ----- - @property - def below(self): - """ - Determines if the choropleth polygons will be inserted before - the layer with the specified ID. By default, choroplethmapbox - traces are placed above the water layers. If set to '', the - layer will be inserted above every existing layer. - - The 'below' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["below"] - - @below.setter - def below(self, val): - self["below"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - ethmapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choroplethmapbox.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - choroplethmapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmapbox.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - choroplethmapbox.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choroplethmapbox.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.choroplethmapbox.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # featureidkey - # ------------ - @property - def featureidkey(self): - """ - Sets the key in GeoJSON features which is used as id to match - the items included in the `locations` array. Support nested - property, for example "properties.name". - - The 'featureidkey' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["featureidkey"] - - @featureidkey.setter - def featureidkey(self, val): - self["featureidkey"] = val - - # geojson - # ------- - @property - def geojson(self): - """ - Sets the GeoJSON data associated with this trace. It can be set - as a valid GeoJSON object or as a URL string. Note that we only - accept GeoJSONs of type "FeatureCollection" or "Feature" with - geometries of type "Polygon" or "MultiPolygon". - - The 'geojson' property accepts values of any type - - Returns - ------- - Any - """ - return self["geojson"] - - @geojson.setter - def geojson(self, val): - self["geojson"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'location+z') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `properties` Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # locations - # --------- - @property - def locations(self): - """ - Sets which features found in "geojson" to plot using their - feature `id` field. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - line - :class:`plotly.graph_objects.choroplethmapbox.m - arker.Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.choroplethmapbox.s - elected.Marker` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - mapbox subplot. If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data refer to - `layout.mapbox2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'mapbox', that may be specified as the string 'mapbox' - optionally followed by an integer >= 1 - (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each location. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.choroplethmapbox.u - nselected.Marker` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # z - # - - @property - def z(self): - """ - Sets the color values. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be inserted - before the layer with the specified ID. By default, - choroplethmapbox traces are placed above the water - layers. If set to '', the layer will be inserted above - every existing layer. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.choroplethmapbox.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - featureidkey - Sets the key in GeoJSON features which is used as id to - match the items included in the `locations` array. - Support nested property, for example "properties.name". - geojson - Sets the GeoJSON data associated with this trace. It - can be set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of type - "FeatureCollection" or "Feature" with geometries of - type "Polygon" or "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe - l` instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `properties` Anything contained - in tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - locations - Sets which features found in "geojson" to plot using - their feature `id` field. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - marker - :class:`plotly.graph_objects.choroplethmapbox.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - :class:`plotly.graph_objects.choroplethmapbox.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.choroplethmapbox.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choroplethmapbox.Unselecte - d` instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Choroplethmapbox object - - GeoJSON features to be filled are set in `geojson` The data - that describes the choropleth value-to-color mapping is set in - `locations` and `z`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.Choroplethmapbox` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be inserted - before the layer with the specified ID. By default, - choroplethmapbox traces are placed above the water - layers. If set to '', the layer will be inserted above - every existing layer. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.choroplethmapbox.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - featureidkey - Sets the key in GeoJSON features which is used as id to - match the items included in the `locations` array. - Support nested property, for example "properties.name". - geojson - Sets the GeoJSON data associated with this trace. It - can be set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of type - "FeatureCollection" or "Feature" with geometries of - type "Polygon" or "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe - l` instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variable `properties` Anything contained - in tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - locations - Sets which features found in "geojson" to plot using - their feature `id` field. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - marker - :class:`plotly.graph_objects.choroplethmapbox.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - :class:`plotly.graph_objects.choroplethmapbox.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.choroplethmapbox.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choroplethmapbox.Unselecte - d` instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Choroplethmapbox - """ - super(Choroplethmapbox, self).__init__("choroplethmapbox") - - # Validate arg - # ------------ - 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.Choroplethmapbox -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Choroplethmapbox`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import choroplethmapbox as v_choroplethmapbox - - # Initialize validators - # --------------------- - self._validators[ - "autocolorscale" - ] = v_choroplethmapbox.AutocolorscaleValidator() - self._validators["below"] = v_choroplethmapbox.BelowValidator() - self._validators["coloraxis"] = v_choroplethmapbox.ColoraxisValidator() - self._validators["colorbar"] = v_choroplethmapbox.ColorBarValidator() - self._validators["colorscale"] = v_choroplethmapbox.ColorscaleValidator() - self._validators["customdata"] = v_choroplethmapbox.CustomdataValidator() - self._validators["customdatasrc"] = v_choroplethmapbox.CustomdatasrcValidator() - self._validators["featureidkey"] = v_choroplethmapbox.FeatureidkeyValidator() - self._validators["geojson"] = v_choroplethmapbox.GeojsonValidator() - self._validators["hoverinfo"] = v_choroplethmapbox.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_choroplethmapbox.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_choroplethmapbox.HoverlabelValidator() - self._validators["hovertemplate"] = v_choroplethmapbox.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_choroplethmapbox.HovertemplatesrcValidator() - self._validators["hovertext"] = v_choroplethmapbox.HovertextValidator() - self._validators["hovertextsrc"] = v_choroplethmapbox.HovertextsrcValidator() - self._validators["ids"] = v_choroplethmapbox.IdsValidator() - self._validators["idssrc"] = v_choroplethmapbox.IdssrcValidator() - self._validators["legendgroup"] = v_choroplethmapbox.LegendgroupValidator() - self._validators["locations"] = v_choroplethmapbox.LocationsValidator() - self._validators["locationssrc"] = v_choroplethmapbox.LocationssrcValidator() - self._validators["marker"] = v_choroplethmapbox.MarkerValidator() - self._validators["meta"] = v_choroplethmapbox.MetaValidator() - self._validators["metasrc"] = v_choroplethmapbox.MetasrcValidator() - self._validators["name"] = v_choroplethmapbox.NameValidator() - self._validators["reversescale"] = v_choroplethmapbox.ReversescaleValidator() - self._validators["selected"] = v_choroplethmapbox.SelectedValidator() - self._validators[ - "selectedpoints" - ] = v_choroplethmapbox.SelectedpointsValidator() - self._validators["showlegend"] = v_choroplethmapbox.ShowlegendValidator() - self._validators["showscale"] = v_choroplethmapbox.ShowscaleValidator() - self._validators["stream"] = v_choroplethmapbox.StreamValidator() - self._validators["subplot"] = v_choroplethmapbox.SubplotValidator() - self._validators["text"] = v_choroplethmapbox.TextValidator() - self._validators["textsrc"] = v_choroplethmapbox.TextsrcValidator() - self._validators["uid"] = v_choroplethmapbox.UidValidator() - self._validators["uirevision"] = v_choroplethmapbox.UirevisionValidator() - self._validators["unselected"] = v_choroplethmapbox.UnselectedValidator() - self._validators["visible"] = v_choroplethmapbox.VisibleValidator() - self._validators["z"] = v_choroplethmapbox.ZValidator() - self._validators["zauto"] = v_choroplethmapbox.ZautoValidator() - self._validators["zmax"] = v_choroplethmapbox.ZmaxValidator() - self._validators["zmid"] = v_choroplethmapbox.ZmidValidator() - self._validators["zmin"] = v_choroplethmapbox.ZminValidator() - self._validators["zsrc"] = v_choroplethmapbox.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("featureidkey", None) - self["featureidkey"] = featureidkey if featureidkey is not None else _v - _v = arg.pop("geojson", None) - self["geojson"] = geojson if geojson is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "choroplethmapbox" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="choroplethmapbox", val="choroplethmapbox" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Choropleth(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - eth.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choropleth.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of choropleth.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choropleth.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - choropleth.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choropleth.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.choropleth.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # featureidkey - # ------------ - @property - def featureidkey(self): - """ - Sets the key in GeoJSON features which is used as id to match - the items included in the `locations` array. Only has an effect - when `geojson` is set. Support nested property, for example - "properties.name". - - The 'featureidkey' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["featureidkey"] - - @featureidkey.setter - def featureidkey(self, val): - self["featureidkey"] = val - - # geo - # --- - @property - def geo(self): - """ - Sets a reference between this trace's geospatial coordinates - and a geographic map. If "geo" (the default value), the - geospatial coordinates refer to `layout.geo`. If "geo2", the - geospatial coordinates refer to `layout.geo2`, and so on. - - The 'geo' property is an identifier of a particular - subplot, of type 'geo', that may be specified as the string 'geo' - optionally followed by an integer >= 1 - (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) - - Returns - ------- - str - """ - return self["geo"] - - @geo.setter - def geo(self, val): - self["geo"] = val - - # geojson - # ------- - @property - def geojson(self): - """ - Sets optional GeoJSON data associated with this trace. If not - given, the features on the base map are used. It can be set as - a valid GeoJSON object or as a URL string. Note that we only - accept GeoJSONs of type "FeatureCollection" or "Feature" with - geometries of type "Polygon" or "MultiPolygon". - - The 'geojson' property accepts values of any type - - Returns - ------- - Any - """ - return self["geojson"] - - @geojson.setter - def geojson(self, val): - self["geojson"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'location+z') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.choropleth.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # locationmode - # ------------ - @property - def locationmode(self): - """ - Determines the set of locations used to match entries in - `locations` to regions on the map. Values "ISO-3", "USA- - states", *country names* correspond to features on the base map - and value "geojson-id" corresponds to features from a custom - GeoJSON linked to the `geojson` attribute. - - The 'locationmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['ISO-3', 'USA-states', 'country names', 'geojson-id'] - - Returns - ------- - Any - """ - return self["locationmode"] - - @locationmode.setter - def locationmode(self, val): - self["locationmode"] = val - - # locations - # --------- - @property - def locations(self): - """ - Sets the coordinates via location IDs or names. See - `locationmode` for more info. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - line - :class:`plotly.graph_objects.choropleth.marker. - Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - - Returns - ------- - plotly.graph_objs.choropleth.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.choropleth.selecte - d.Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.choropleth.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.choropleth.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each location. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.choropleth.unselec - ted.Marker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.choropleth.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # z - # - - @property - def z(self): - """ - Sets the color values. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.choropleth.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - featureidkey - Sets the key in GeoJSON features which is used as id to - match the items included in the `locations` array. Only - has an effect when `geojson` is set. Support nested - property, for example "properties.name". - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this trace. - If not given, the features on the base map are used. It - can be set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of type - "FeatureCollection" or "Feature" with geometries of - type "Polygon" or "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.choropleth.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. Values "ISO-3", - "USA-states", *country names* correspond to features on - the base map and value "geojson-id" corresponds to - features from a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. See - `locationmode` for more info. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - marker - :class:`plotly.graph_objects.choropleth.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - :class:`plotly.graph_objects.choropleth.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.choropleth.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choropleth.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - locationmode=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Choropleth object - - The data that describes the choropleth value-to-color mapping - is set in `z`. The geographic locations corresponding to each - value in `z` are set in `locations`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Choropleth` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.choropleth.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - featureidkey - Sets the key in GeoJSON features which is used as id to - match the items included in the `locations` array. Only - has an effect when `geojson` is set. Support nested - property, for example "properties.name". - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this trace. - If not given, the features on the base map are used. It - can be set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of type - "FeatureCollection" or "Feature" with geometries of - type "Polygon" or "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.choropleth.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. Values "ISO-3", - "USA-states", *country names* correspond to features on - the base map and value "geojson-id" corresponds to - features from a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. See - `locationmode` for more info. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - marker - :class:`plotly.graph_objects.choropleth.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - :class:`plotly.graph_objects.choropleth.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - :class:`plotly.graph_objects.choropleth.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choropleth.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Choropleth - """ - super(Choropleth, self).__init__("choropleth") - - # Validate arg - # ------------ - 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.Choropleth -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Choropleth`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import choropleth as v_choropleth - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_choropleth.AutocolorscaleValidator() - self._validators["coloraxis"] = v_choropleth.ColoraxisValidator() - self._validators["colorbar"] = v_choropleth.ColorBarValidator() - self._validators["colorscale"] = v_choropleth.ColorscaleValidator() - self._validators["customdata"] = v_choropleth.CustomdataValidator() - self._validators["customdatasrc"] = v_choropleth.CustomdatasrcValidator() - self._validators["featureidkey"] = v_choropleth.FeatureidkeyValidator() - self._validators["geo"] = v_choropleth.GeoValidator() - self._validators["geojson"] = v_choropleth.GeojsonValidator() - self._validators["hoverinfo"] = v_choropleth.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_choropleth.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_choropleth.HoverlabelValidator() - self._validators["hovertemplate"] = v_choropleth.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_choropleth.HovertemplatesrcValidator() - self._validators["hovertext"] = v_choropleth.HovertextValidator() - self._validators["hovertextsrc"] = v_choropleth.HovertextsrcValidator() - self._validators["ids"] = v_choropleth.IdsValidator() - self._validators["idssrc"] = v_choropleth.IdssrcValidator() - self._validators["legendgroup"] = v_choropleth.LegendgroupValidator() - self._validators["locationmode"] = v_choropleth.LocationmodeValidator() - self._validators["locations"] = v_choropleth.LocationsValidator() - self._validators["locationssrc"] = v_choropleth.LocationssrcValidator() - self._validators["marker"] = v_choropleth.MarkerValidator() - self._validators["meta"] = v_choropleth.MetaValidator() - self._validators["metasrc"] = v_choropleth.MetasrcValidator() - self._validators["name"] = v_choropleth.NameValidator() - self._validators["reversescale"] = v_choropleth.ReversescaleValidator() - self._validators["selected"] = v_choropleth.SelectedValidator() - self._validators["selectedpoints"] = v_choropleth.SelectedpointsValidator() - self._validators["showlegend"] = v_choropleth.ShowlegendValidator() - self._validators["showscale"] = v_choropleth.ShowscaleValidator() - self._validators["stream"] = v_choropleth.StreamValidator() - self._validators["text"] = v_choropleth.TextValidator() - self._validators["textsrc"] = v_choropleth.TextsrcValidator() - self._validators["uid"] = v_choropleth.UidValidator() - self._validators["uirevision"] = v_choropleth.UirevisionValidator() - self._validators["unselected"] = v_choropleth.UnselectedValidator() - self._validators["visible"] = v_choropleth.VisibleValidator() - self._validators["z"] = v_choropleth.ZValidator() - self._validators["zauto"] = v_choropleth.ZautoValidator() - self._validators["zmax"] = v_choropleth.ZmaxValidator() - self._validators["zmid"] = v_choropleth.ZmidValidator() - self._validators["zmin"] = v_choropleth.ZminValidator() - self._validators["zsrc"] = v_choropleth.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("featureidkey", None) - self["featureidkey"] = featureidkey if featureidkey is not None else _v - _v = arg.pop("geo", None) - self["geo"] = geo if geo is not None else _v - _v = arg.pop("geojson", None) - self["geojson"] = geojson if geojson is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("locationmode", None) - self["locationmode"] = locationmode if locationmode is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "choropleth" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="choropleth", val="choropleth" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Carpet(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - An array containing values of the first parameter value - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # a0 - # -- - @property - def a0(self): - """ - Alternate to `a`. Builds a linear space of a coordinates. Use - with `da` where `a0` is the starting coordinate and `da` the - step. - - The 'a0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["a0"] - - @a0.setter - def a0(self, val): - self["a0"] = val - - # aaxis - # ----- - @property - def aaxis(self): - """ - The 'aaxis' property is an instance of Aaxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.Aaxis` - - A dict of string/value properties that will be passed - to the Aaxis constructor - - Supported dict properties: - - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: We add one item to d3's - date formatter: "%{n}f" for fractional seconds - with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" - would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - aaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.aaxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - title - :class:`plotly.graph_objects.carpet.aaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.aaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be set by the now - deprecated `titlefont` attribute. - titleoffset - Deprecated: Please use - carpet.aaxis.title.offset instead. An - additional amount by which to offset the title - from the tick labels, given in pixels. Note - that this used to be set by the now deprecated - `titleoffset` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - - Returns - ------- - plotly.graph_objs.carpet.Aaxis - """ - return self["aaxis"] - - @aaxis.setter - def aaxis(self, val): - self["aaxis"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on Chart Studio Cloud for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val - - # b - # - - @property - def b(self): - """ - A two dimensional array of y coordinates at each carpet point. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # b0 - # -- - @property - def b0(self): - """ - Alternate to `b`. Builds a linear space of a coordinates. Use - with `db` where `b0` is the starting coordinate and `db` the - step. - - The 'b0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["b0"] - - @b0.setter - def b0(self, val): - self["b0"] = val - - # baxis - # ----- - @property - def baxis(self): - """ - The 'baxis' property is an instance of Baxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.Baxis` - - A dict of string/value properties that will be passed - to the Baxis constructor - - Supported dict properties: - - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: We add one item to d3's - date formatter: "%{n}f" for fractional seconds - with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" - would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - baxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.baxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - title - :class:`plotly.graph_objects.carpet.baxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.baxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be set by the now - deprecated `titlefont` attribute. - titleoffset - Deprecated: Please use - carpet.baxis.title.offset instead. An - additional amount by which to offset the title - from the tick labels, given in pixels. Note - that this used to be set by the now deprecated - `titleoffset` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - - Returns - ------- - plotly.graph_objs.carpet.Baxis - """ - return self["baxis"] - - @baxis.setter - def baxis(self, val): - self["baxis"] = val - - # bsrc - # ---- - @property - def bsrc(self): - """ - Sets the source reference on Chart Studio Cloud for b . - - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bsrc"] - - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val - - # carpet - # ------ - @property - def carpet(self): - """ - An identifier for this carpet, so that `scattercarpet` and - `contourcarpet` traces can specify a carpet plot on which they - lie - - The 'carpet' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["carpet"] - - @carpet.setter - def carpet(self, val): - self["carpet"] = val - - # cheaterslope - # ------------ - @property - def cheaterslope(self): - """ - The shift applied to each successive row of data in creating a - cheater plot. Only used if `x` is been ommitted. - - The 'cheaterslope' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cheaterslope"] - - @cheaterslope.setter - def cheaterslope(self, val): - self["cheaterslope"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # da - # -- - @property - def da(self): - """ - Sets the a coordinate step. See `a0` for more info. - - The 'da' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["da"] - - @da.setter - def da(self, val): - self["da"] = val - - # db - # -- - @property - def db(self): - """ - Sets the b coordinate step. See `b0` for more info. - - The 'db' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["db"] - - @db.setter - def db(self, val): - self["db"] = val - - # font - # ---- - @property - def font(self): - """ - The default font used for axis & tick labels on this carpet - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.carpet.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.carpet.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - A two dimensional array of x coordinates at each carpet point. - If ommitted, the plot is a cheater plot and the xaxis is hidden - by default. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - A two dimensional array of y coordinates at each carpet point. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - a - An array containing values of the first parameter value - a0 - Alternate to `a`. Builds a linear space of a - coordinates. Use with `da` where `a0` is the starting - coordinate and `da` the step. - aaxis - :class:`plotly.graph_objects.carpet.Aaxis` instance or - dict with compatible properties - asrc - Sets the source reference on Chart Studio Cloud for a - . - b - A two dimensional array of y coordinates at each carpet - point. - b0 - Alternate to `b`. Builds a linear space of a - coordinates. Use with `db` where `b0` is the starting - coordinate and `db` the step. - baxis - :class:`plotly.graph_objects.carpet.Baxis` instance or - dict with compatible properties - bsrc - Sets the source reference on Chart Studio Cloud for b - . - carpet - An identifier for this carpet, so that `scattercarpet` - and `contourcarpet` traces can specify a carpet plot on - which they lie - cheaterslope - The shift applied to each successive row of data in - creating a cheater plot. Only used if `x` is been - ommitted. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - da - Sets the a coordinate step. See `a0` for more info. - db - Sets the b coordinate step. See `b0` for more info. - font - The default font used for axis & tick labels on this - carpet - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.carpet.Stream` instance or - dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - A two dimensional array of x coordinates at each carpet - point. If ommitted, the plot is a cheater plot and the - xaxis is hidden by default. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - A two dimensional array of y coordinates at each carpet - point. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - a=None, - a0=None, - aaxis=None, - asrc=None, - b=None, - b0=None, - baxis=None, - bsrc=None, - carpet=None, - cheaterslope=None, - color=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - font=None, - ids=None, - idssrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xsrc=None, - y=None, - yaxis=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Carpet object - - The data describing carpet axis layout is set in `y` and - (optionally) also `x`. If only `y` is present, `x` the plot is - interpreted as a cheater plot and is filled in using the `y` - values. `x` and `y` may either be 2D arrays matching with each - dimension matching that of `a` and `b`, or they may be 1D - arrays with total length equal to that of `a` and `b`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Carpet` - a - An array containing values of the first parameter value - a0 - Alternate to `a`. Builds a linear space of a - coordinates. Use with `da` where `a0` is the starting - coordinate and `da` the step. - aaxis - :class:`plotly.graph_objects.carpet.Aaxis` instance or - dict with compatible properties - asrc - Sets the source reference on Chart Studio Cloud for a - . - b - A two dimensional array of y coordinates at each carpet - point. - b0 - Alternate to `b`. Builds a linear space of a - coordinates. Use with `db` where `b0` is the starting - coordinate and `db` the step. - baxis - :class:`plotly.graph_objects.carpet.Baxis` instance or - dict with compatible properties - bsrc - Sets the source reference on Chart Studio Cloud for b - . - carpet - An identifier for this carpet, so that `scattercarpet` - and `contourcarpet` traces can specify a carpet plot on - which they lie - cheaterslope - The shift applied to each successive row of data in - creating a cheater plot. Only used if `x` is been - ommitted. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - da - Sets the a coordinate step. See `a0` for more info. - db - Sets the b coordinate step. See `b0` for more info. - font - The default font used for axis & tick labels on this - carpet - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.carpet.Stream` instance or - dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - A two dimensional array of x coordinates at each carpet - point. If ommitted, the plot is a cheater plot and the - xaxis is hidden by default. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - A two dimensional array of y coordinates at each carpet - point. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Carpet - """ - super(Carpet, self).__init__("carpet") - - # Validate arg - # ------------ - 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.Carpet -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Carpet`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import carpet as v_carpet - - # Initialize validators - # --------------------- - self._validators["a"] = v_carpet.AValidator() - self._validators["a0"] = v_carpet.A0Validator() - self._validators["aaxis"] = v_carpet.AaxisValidator() - self._validators["asrc"] = v_carpet.AsrcValidator() - self._validators["b"] = v_carpet.BValidator() - self._validators["b0"] = v_carpet.B0Validator() - self._validators["baxis"] = v_carpet.BaxisValidator() - self._validators["bsrc"] = v_carpet.BsrcValidator() - self._validators["carpet"] = v_carpet.CarpetValidator() - self._validators["cheaterslope"] = v_carpet.CheaterslopeValidator() - self._validators["color"] = v_carpet.ColorValidator() - self._validators["customdata"] = v_carpet.CustomdataValidator() - self._validators["customdatasrc"] = v_carpet.CustomdatasrcValidator() - self._validators["da"] = v_carpet.DaValidator() - self._validators["db"] = v_carpet.DbValidator() - self._validators["font"] = v_carpet.FontValidator() - self._validators["ids"] = v_carpet.IdsValidator() - self._validators["idssrc"] = v_carpet.IdssrcValidator() - self._validators["meta"] = v_carpet.MetaValidator() - self._validators["metasrc"] = v_carpet.MetasrcValidator() - self._validators["name"] = v_carpet.NameValidator() - self._validators["opacity"] = v_carpet.OpacityValidator() - self._validators["stream"] = v_carpet.StreamValidator() - self._validators["uid"] = v_carpet.UidValidator() - self._validators["uirevision"] = v_carpet.UirevisionValidator() - self._validators["visible"] = v_carpet.VisibleValidator() - self._validators["x"] = v_carpet.XValidator() - self._validators["xaxis"] = v_carpet.XAxisValidator() - self._validators["xsrc"] = v_carpet.XsrcValidator() - self._validators["y"] = v_carpet.YValidator() - self._validators["yaxis"] = v_carpet.YAxisValidator() - self._validators["ysrc"] = v_carpet.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("a0", None) - self["a0"] = a0 if a0 is not None else _v - _v = arg.pop("aaxis", None) - self["aaxis"] = aaxis if aaxis is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("b0", None) - self["b0"] = b0 if b0 is not None else _v - _v = arg.pop("baxis", None) - self["baxis"] = baxis if baxis is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v - _v = arg.pop("cheaterslope", None) - self["cheaterslope"] = cheaterslope if cheaterslope is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("da", None) - self["da"] = da if da is not None else _v - _v = arg.pop("db", None) - self["db"] = db if db is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "carpet" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="carpet", val="carpet" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Candlestick(_BaseTraceType): - - # close - # ----- - @property - def close(self): - """ - Sets the close values. - - The 'close' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["close"] - - @close.setter - def close(self, val): - self["close"] = val - - # closesrc - # -------- - @property - def closesrc(self): - """ - Sets the source reference on Chart Studio Cloud for close . - - The 'closesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["closesrc"] - - @closesrc.setter - def closesrc(self, val): - self["closesrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # decreasing - # ---------- - @property - def decreasing(self): - """ - The 'decreasing' property is an instance of Decreasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.Decreasing` - - A dict of string/value properties that will be passed - to the Decreasing constructor - - Supported dict properties: - - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.decrea - sing.Line` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.candlestick.Decreasing - """ - return self["decreasing"] - - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val - - # high - # ---- - @property - def high(self): - """ - Sets the high values. - - The 'high' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["high"] - - @high.setter - def high(self, val): - self["high"] = val - - # highsrc - # ------- - @property - def highsrc(self): - """ - Sets the source reference on Chart Studio Cloud for high . - - The 'highsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["highsrc"] - - @highsrc.setter - def highsrc(self, val): - self["highsrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - split - Show hover information (open, close, high, low) - in separate labels. - - Returns - ------- - plotly.graph_objs.candlestick.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # increasing - # ---------- - @property - def increasing(self): - """ - The 'increasing' property is an instance of Increasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.Increasing` - - A dict of string/value properties that will be passed - to the Increasing constructor - - Supported dict properties: - - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.increa - sing.Line` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.candlestick.Increasing - """ - return self["increasing"] - - @increasing.setter - def increasing(self, val): - self["increasing"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - width - Sets the width (in px) of line bounding the - box(es). Note that this style setting can also - be set per direction via - `increasing.line.width` and - `decreasing.line.width`. - - Returns - ------- - plotly.graph_objs.candlestick.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # low - # --- - @property - def low(self): - """ - Sets the low values. - - The 'low' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["low"] - - @low.setter - def low(self, val): - self["low"] = val - - # lowsrc - # ------ - @property - def lowsrc(self): - """ - Sets the source reference on Chart Studio Cloud for low . - - The 'lowsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lowsrc"] - - @lowsrc.setter - def lowsrc(self, val): - self["lowsrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # open - # ---- - @property - def open(self): - """ - Sets the open values. - - The 'open' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["open"] - - @open.setter - def open(self, val): - self["open"] = val - - # opensrc - # ------- - @property - def opensrc(self): - """ - Sets the source reference on Chart Studio Cloud for open . - - The 'opensrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opensrc"] - - @opensrc.setter - def opensrc(self, val): - self["opensrc"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.candlestick.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets hover text elements associated with each sample point. If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - this trace's sample points. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # whiskerwidth - # ------------ - @property - def whiskerwidth(self): - """ - Sets the width of the whiskers relative to the box' width. For - example, with 1, the whiskers are as wide as the box(es). - - The 'whiskerwidth' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["whiskerwidth"] - - @whiskerwidth.setter - def whiskerwidth(self, val): - self["whiskerwidth"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. If absent, linear coordinate will be - generated. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud for - close . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - decreasing - :class:`plotly.graph_objects.candlestick.Decreasing` - instance or dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud for - high . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.candlestick.Hoverlabel` - instance or dict with compatible properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - increasing - :class:`plotly.graph_objects.candlestick.Increasing` - instance or dict with compatible properties - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.candlestick.Line` instance - or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud for - low . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud for - open . - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.candlestick.Stream` - instance or dict with compatible properties - text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). - x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - """ - - def __init__( - self, - arg=None, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legendgroup=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - whiskerwidth=None, - x=None, - xaxis=None, - xcalendar=None, - xsrc=None, - yaxis=None, - **kwargs - ): - """ - Construct a new Candlestick object - - The candlestick is a style of financial chart describing open, - high, low and close for a given `x` coordinate (most likely - time). The boxes represent the spread between the `open` and - `close` values and the lines represent the spread between the - `low` and `high` values Sample points where the close value is - higher (lower) then the open value are called increasing - (decreasing). By default, increasing candles are drawn in green - whereas decreasing are drawn in red. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Candlestick` - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud for - close . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - decreasing - :class:`plotly.graph_objects.candlestick.Decreasing` - instance or dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud for - high . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.candlestick.Hoverlabel` - instance or dict with compatible properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - increasing - :class:`plotly.graph_objects.candlestick.Increasing` - instance or dict with compatible properties - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.candlestick.Line` instance - or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud for - low . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud for - open . - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.candlestick.Stream` - instance or dict with compatible properties - text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). - x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - - Returns - ------- - Candlestick - """ - super(Candlestick, self).__init__("candlestick") - - # Validate arg - # ------------ - 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.Candlestick -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Candlestick`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import candlestick as v_candlestick - - # Initialize validators - # --------------------- - self._validators["close"] = v_candlestick.CloseValidator() - self._validators["closesrc"] = v_candlestick.ClosesrcValidator() - self._validators["customdata"] = v_candlestick.CustomdataValidator() - self._validators["customdatasrc"] = v_candlestick.CustomdatasrcValidator() - self._validators["decreasing"] = v_candlestick.DecreasingValidator() - self._validators["high"] = v_candlestick.HighValidator() - self._validators["highsrc"] = v_candlestick.HighsrcValidator() - self._validators["hoverinfo"] = v_candlestick.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_candlestick.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_candlestick.HoverlabelValidator() - self._validators["hovertext"] = v_candlestick.HovertextValidator() - self._validators["hovertextsrc"] = v_candlestick.HovertextsrcValidator() - self._validators["ids"] = v_candlestick.IdsValidator() - self._validators["idssrc"] = v_candlestick.IdssrcValidator() - self._validators["increasing"] = v_candlestick.IncreasingValidator() - self._validators["legendgroup"] = v_candlestick.LegendgroupValidator() - self._validators["line"] = v_candlestick.LineValidator() - self._validators["low"] = v_candlestick.LowValidator() - self._validators["lowsrc"] = v_candlestick.LowsrcValidator() - self._validators["meta"] = v_candlestick.MetaValidator() - self._validators["metasrc"] = v_candlestick.MetasrcValidator() - self._validators["name"] = v_candlestick.NameValidator() - self._validators["opacity"] = v_candlestick.OpacityValidator() - self._validators["open"] = v_candlestick.OpenValidator() - self._validators["opensrc"] = v_candlestick.OpensrcValidator() - self._validators["selectedpoints"] = v_candlestick.SelectedpointsValidator() - self._validators["showlegend"] = v_candlestick.ShowlegendValidator() - self._validators["stream"] = v_candlestick.StreamValidator() - self._validators["text"] = v_candlestick.TextValidator() - self._validators["textsrc"] = v_candlestick.TextsrcValidator() - self._validators["uid"] = v_candlestick.UidValidator() - self._validators["uirevision"] = v_candlestick.UirevisionValidator() - self._validators["visible"] = v_candlestick.VisibleValidator() - self._validators["whiskerwidth"] = v_candlestick.WhiskerwidthValidator() - self._validators["x"] = v_candlestick.XValidator() - self._validators["xaxis"] = v_candlestick.XAxisValidator() - self._validators["xcalendar"] = v_candlestick.XcalendarValidator() - self._validators["xsrc"] = v_candlestick.XsrcValidator() - self._validators["yaxis"] = v_candlestick.YAxisValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("close", None) - self["close"] = close if close is not None else _v - _v = arg.pop("closesrc", None) - self["closesrc"] = closesrc if closesrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("high", None) - self["high"] = high if high is not None else _v - _v = arg.pop("highsrc", None) - self["highsrc"] = highsrc if highsrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("low", None) - self["low"] = low if low is not None else _v - _v = arg.pop("lowsrc", None) - self["lowsrc"] = lowsrc if lowsrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("open", None) - self["open"] = open if open is not None else _v - _v = arg.pop("opensrc", None) - self["opensrc"] = opensrc if opensrc is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("whiskerwidth", None) - self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "candlestick" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="candlestick", val="candlestick" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Box(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val - - # boxmean - # ------- - @property - def boxmean(self): - """ - If True, the mean of the box(es)' underlying distribution is - drawn as a dashed line inside the box(es). If "sd" the standard - deviation is also drawn. Defaults to True when `mean` is set. - Defaults to "sd" when `sd` is set Otherwise defaults to False. - - The 'boxmean' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'sd', False] - - Returns - ------- - Any - """ - return self["boxmean"] - - @boxmean.setter - def boxmean(self, val): - self["boxmean"] = val - - # boxpoints - # --------- - @property - def boxpoints(self): - """ - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier points - are shown and points either less than 4*Q1-3*Q3 or greater than - 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all - sample points are shown If False, only the box(es) are shown - with no sample points Defaults to "suspectedoutliers" when - `marker.outliercolor` or `marker.line.outliercolor` is set. - Defaults to "all" under the q1/median/q3 signature. Otherwise - defaults to "outliers". - - The 'boxpoints' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'outliers', 'suspectedoutliers', False] - - Returns - ------- - Any - """ - return self["boxpoints"] - - @boxpoints.setter - def boxpoints(self, val): - self["boxpoints"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step for multi-box traces set using - q1/median/q3. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step for multi-box traces set using - q1/median/q3. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.box.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual boxes or sample - points or both? - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['boxes', 'points'] joined with '+' characters - (e.g. 'boxes+points') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # jitter - # ------ - @property - def jitter(self): - """ - Sets the amount of jitter in the sample points drawn. If 0, the - sample points align along the distribution axis. If 1, the - sample points are drawn in a random jitter of width equal to - the width of the box(es). - - The 'jitter' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["jitter"] - - @jitter.setter - def jitter(self, val): - self["jitter"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - - Returns - ------- - plotly.graph_objs.box.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # lowerfence - # ---------- - @property - def lowerfence(self): - """ - Sets the lower fence values. There should be as many items as - the number of boxes desired. This attribute has effect only - under the q1/median/q3 signature. If `lowerfence` is not - provided but a sample (in `y` or `x`) is set, we compute the - lower as the last sample point below 1.5 times the IQR. - - The 'lowerfence' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lowerfence"] - - @lowerfence.setter - def lowerfence(self, val): - self["lowerfence"] = val - - # lowerfencesrc - # ------------- - @property - def lowerfencesrc(self): - """ - Sets the source reference on Chart Studio Cloud for lowerfence - . - - The 'lowerfencesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lowerfencesrc"] - - @lowerfencesrc.setter - def lowerfencesrc(self, val): - self["lowerfencesrc"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.box.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - - Returns - ------- - plotly.graph_objs.box.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # mean - # ---- - @property - def mean(self): - """ - Sets the mean values. There should be as many items as the - number of boxes desired. This attribute has effect only under - the q1/median/q3 signature. If `mean` is not provided but a - sample (in `y` or `x`) is set, we compute the mean for each box - using the sample values. - - The 'mean' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["mean"] - - @mean.setter - def mean(self, val): - self["mean"] = val - - # meansrc - # ------- - @property - def meansrc(self): - """ - Sets the source reference on Chart Studio Cloud for mean . - - The 'meansrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["meansrc"] - - @meansrc.setter - def meansrc(self, val): - self["meansrc"] = val - - # median - # ------ - @property - def median(self): - """ - Sets the median values. There should be as many items as the - number of boxes desired. - - The 'median' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["median"] - - @median.setter - def median(self, val): - self["median"] = val - - # mediansrc - # --------- - @property - def mediansrc(self): - """ - Sets the source reference on Chart Studio Cloud for median . - - The 'mediansrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["mediansrc"] - - @mediansrc.setter - def mediansrc(self, val): - self["mediansrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. For box traces, the name will also be used for - the position coordinate, if `x` and `x0` (`y` and `y0` if - horizontal) are missing and the position axis is categorical - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # notched - # ------- - @property - def notched(self): - """ - Determines whether or not notches are drawn. Notches displays a - confidence interval around the median. We compute the - confidence interval as median +/- 1.57 * IQR / sqrt(N), where - IQR is the interquartile range and N is the sample size. If two - boxes' notches do not overlap there is 95% confidence their - medians differ. See - https://sites.google.com/site/davidsstatistics/home/notched- - box-plots for more info. Defaults to False unless `notchwidth` - or `notchspan` is set. - - The 'notched' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["notched"] - - @notched.setter - def notched(self, val): - self["notched"] = val - - # notchspan - # --------- - @property - def notchspan(self): - """ - Sets the notch span from the boxes' `median` values. There - should be as many items as the number of boxes desired. This - attribute has effect only under the q1/median/q3 signature. If - `notchspan` is not provided but a sample (in `y` or `x`) is - set, we compute it as 1.57 * IQR / sqrt(N), where N is the - sample size. - - The 'notchspan' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["notchspan"] - - @notchspan.setter - def notchspan(self, val): - self["notchspan"] = val - - # notchspansrc - # ------------ - @property - def notchspansrc(self): - """ - Sets the source reference on Chart Studio Cloud for notchspan - . - - The 'notchspansrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["notchspansrc"] - - @notchspansrc.setter - def notchspansrc(self, val): - self["notchspansrc"] = val - - # notchwidth - # ---------- - @property - def notchwidth(self): - """ - Sets the width of the notches relative to the box' width. For - example, with 0, the notches are as wide as the box(es). - - The 'notchwidth' property is a number and may be specified as: - - An int or float in the interval [0, 0.5] - - Returns - ------- - int|float - """ - return self["notchwidth"] - - @notchwidth.setter - def notchwidth(self, val): - self["notchwidth"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the box(es). If "v" ("h"), the - distribution is visualized along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # pointpos - # -------- - @property - def pointpos(self): - """ - Sets the position of the sample points in relation to the - box(es). If 0, the sample points are places over the center of - the box(es). Positive (negative) values correspond to positions - to the right (left) for vertical boxes and above (below) for - horizontal boxes - - The 'pointpos' property is a number and may be specified as: - - An int or float in the interval [-2, 2] - - Returns - ------- - int|float - """ - return self["pointpos"] - - @pointpos.setter - def pointpos(self, val): - self["pointpos"] = val - - # q1 - # -- - @property - def q1(self): - """ - Sets the Quartile 1 values. There should be as many items as - the number of boxes desired. - - The 'q1' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["q1"] - - @q1.setter - def q1(self, val): - self["q1"] = val - - # q1src - # ----- - @property - def q1src(self): - """ - Sets the source reference on Chart Studio Cloud for q1 . - - The 'q1src' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["q1src"] - - @q1src.setter - def q1src(self, val): - self["q1src"] = val - - # q3 - # -- - @property - def q3(self): - """ - Sets the Quartile 3 values. There should be as many items as - the number of boxes desired. - - The 'q3' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["q3"] - - @q3.setter - def q3(self, val): - self["q3"] = val - - # q3src - # ----- - @property - def q3src(self): - """ - Sets the source reference on Chart Studio Cloud for q3 . - - The 'q3src' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["q3src"] - - @q3src.setter - def q3src(self, val): - self["q3src"] = val - - # quartilemethod - # -------------- - @property - def quartilemethod(self): - """ - Sets the method used to compute the sample's Q1 and Q3 - quartiles. The "linear" method uses the 25th percentile for Q1 - and 75th percentile for Q3 as computed using method #10 (listed - on http://www.amstat.org/publications/jse/v14n3/langford.html). - The "exclusive" method uses the median to divide the ordered - dataset into two halves if the sample is odd, it does not - include the median in either half - Q1 is then the median of - the lower half and Q3 the median of the upper half. The - "inclusive" method also uses the median to divide the ordered - dataset into two halves but if the sample is odd, it includes - the median in both halves - Q1 is then the median of the lower - half and Q3 the median of the upper half. - - The 'quartilemethod' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'exclusive', 'inclusive'] - - Returns - ------- - Any - """ - return self["quartilemethod"] - - @quartilemethod.setter - def quartilemethod(self, val): - self["quartilemethod"] = val - - # sd - # -- - @property - def sd(self): - """ - Sets the standard deviation values. There should be as many - items as the number of boxes desired. This attribute has effect - only under the q1/median/q3 signature. If `sd` is not provided - but a sample (in `y` or `x`) is set, we compute the standard - deviation for each box using the sample values. - - The 'sd' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["sd"] - - @sd.setter - def sd(self, val): - self["sd"] = val - - # sdsrc - # ----- - @property - def sdsrc(self): - """ - Sets the source reference on Chart Studio Cloud for sd . - - The 'sdsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sdsrc"] - - @sdsrc.setter - def sdsrc(self, val): - self["sdsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.box.selected.Marke - r` instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.box.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.box.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each sample value. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.box.unselected.Mar - ker` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.box.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # upperfence - # ---------- - @property - def upperfence(self): - """ - Sets the upper fence values. There should be as many items as - the number of boxes desired. This attribute has effect only - under the q1/median/q3 signature. If `upperfence` is not - provided but a sample (in `y` or `x`) is set, we compute the - lower as the last sample point above 1.5 times the IQR. - - The 'upperfence' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["upperfence"] - - @upperfence.setter - def upperfence(self, val): - self["upperfence"] = val - - # upperfencesrc - # ------------- - @property - def upperfencesrc(self): - """ - Sets the source reference on Chart Studio Cloud for upperfence - . - - The 'upperfencesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["upperfencesrc"] - - @upperfencesrc.setter - def upperfencesrc(self, val): - self["upperfencesrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # whiskerwidth - # ------------ - @property - def whiskerwidth(self): - """ - Sets the width of the whiskers relative to the box' width. For - example, with 1, the whiskers are as wide as the box(es). - - The 'whiskerwidth' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["whiskerwidth"] - - @whiskerwidth.setter - def whiskerwidth(self, val): - self["whiskerwidth"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the box in data coordinate If 0 (default - value) the width is automatically selected based on the - positions of other box traces in the same subplot. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # x - # - - @property - def x(self): - """ - Sets the x sample data or coordinates. See overview for more - info. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Sets the x coordinate for single-box traces or the starting - coordinate for multi-box traces set using q1/median/q3. See - overview for more info. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y sample data or coordinates. See overview for more - info. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Sets the y coordinate for single-box traces or the starting - coordinate for multi-box traces set using q1/median/q3. See - overview for more info. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - boxmean - If True, the mean of the box(es)' underlying - distribution is drawn as a dashed line inside the - box(es). If "sd" the standard deviation is also drawn. - Defaults to True when `mean` is set. Defaults to "sd" - when `sd` is set Otherwise defaults to False. - boxpoints - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the box(es) are shown with no sample - points Defaults to "suspectedoutliers" when - `marker.outliercolor` or `marker.line.outliercolor` is - set. Defaults to "all" under the q1/median/q3 - signature. Otherwise defaults to "outliers". - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step for multi-box traces set - using q1/median/q3. - dy - Sets the y coordinate step for multi-box traces set - using q1/median/q3. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.box.Hoverlabel` instance - or dict with compatible properties - hoveron - Do the hover effects highlight individual boxes or - sample points or both? - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the box(es). - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.box.Line` instance or dict - with compatible properties - lowerfence - Sets the lower fence values. There should be as many - items as the number of boxes desired. This attribute - has effect only under the q1/median/q3 signature. If - `lowerfence` is not provided but a sample (in `y` or - `x`) is set, we compute the lower as the last sample - point below 1.5 times the IQR. - lowerfencesrc - Sets the source reference on Chart Studio Cloud for - lowerfence . - marker - :class:`plotly.graph_objects.box.Marker` instance or - dict with compatible properties - mean - Sets the mean values. There should be as many items as - the number of boxes desired. This attribute has effect - only under the q1/median/q3 signature. If `mean` is not - provided but a sample (in `y` or `x`) is set, we - compute the mean for each box using the sample values. - meansrc - Sets the source reference on Chart Studio Cloud for - mean . - median - Sets the median values. There should be as many items - as the number of boxes desired. - mediansrc - Sets the source reference on Chart Studio Cloud for - median . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. For box traces, the name will - also be used for the position coordinate, if `x` and - `x0` (`y` and `y0` if horizontal) are missing and the - position axis is categorical - notched - Determines whether or not notches are drawn. Notches - displays a confidence interval around the median. We - compute the confidence interval as median +/- 1.57 * - IQR / sqrt(N), where IQR is the interquartile range and - N is the sample size. If two boxes' notches do not - overlap there is 95% confidence their medians differ. - See https://sites.google.com/site/davidsstatistics/home - /notched-box-plots for more info. Defaults to False - unless `notchwidth` or `notchspan` is set. - notchspan - Sets the notch span from the boxes' `median` values. - There should be as many items as the number of boxes - desired. This attribute has effect only under the - q1/median/q3 signature. If `notchspan` is not provided - but a sample (in `y` or `x`) is set, we compute it as - 1.57 * IQR / sqrt(N), where N is the sample size. - notchspansrc - Sets the source reference on Chart Studio Cloud for - notchspan . - notchwidth - Sets the width of the notches relative to the box' - width. For example, with 0, the notches are as wide as - the box(es). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the box(es). If "v" ("h"), the - distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the box(es). If 0, the sample points are places over - the center of the box(es). Positive (negative) values - correspond to positions to the right (left) for - vertical boxes and above (below) for horizontal boxes - q1 - Sets the Quartile 1 values. There should be as many - items as the number of boxes desired. - q1src - Sets the source reference on Chart Studio Cloud for q1 - . - q3 - Sets the Quartile 3 values. There should be as many - items as the number of boxes desired. - q3src - Sets the source reference on Chart Studio Cloud for q3 - . - quartilemethod - Sets the method used to compute the sample's Q1 and Q3 - quartiles. The "linear" method uses the 25th percentile - for Q1 and 75th percentile for Q3 as computed using - method #10 (listed on http://www.amstat.org/publication - s/jse/v14n3/langford.html). The "exclusive" method uses - the median to divide the ordered dataset into two - halves if the sample is odd, it does not include the - median in either half - Q1 is then the median of the - lower half and Q3 the median of the upper half. The - "inclusive" method also uses the median to divide the - ordered dataset into two halves but if the sample is - odd, it includes the median in both halves - Q1 is then - the median of the lower half and Q3 the median of the - upper half. - sd - Sets the standard deviation values. There should be as - many items as the number of boxes desired. This - attribute has effect only under the q1/median/q3 - signature. If `sd` is not provided but a sample (in `y` - or `x`) is set, we compute the standard deviation for - each box using the sample values. - sdsrc - Sets the source reference on Chart Studio Cloud for sd - . - selected - :class:`plotly.graph_objects.box.Selected` instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.box.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.box.Unselected` instance - or dict with compatible properties - upperfence - Sets the upper fence values. There should be as many - items as the number of boxes desired. This attribute - has effect only under the q1/median/q3 signature. If - `upperfence` is not provided but a sample (in `y` or - `x`) is set, we compute the lower as the last sample - point above 1.5 times the IQR. - upperfencesrc - Sets the source reference on Chart Studio Cloud for - upperfence . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). - width - Sets the width of the box in data coordinate If 0 - (default value) the width is automatically selected - based on the positions of other box traces in the same - subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - alignmentgroup=None, - boxmean=None, - boxpoints=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legendgroup=None, - line=None, - lowerfence=None, - lowerfencesrc=None, - marker=None, - mean=None, - meansrc=None, - median=None, - mediansrc=None, - meta=None, - metasrc=None, - name=None, - notched=None, - notchspan=None, - notchspansrc=None, - notchwidth=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - q1=None, - q1src=None, - q3=None, - q3src=None, - quartilemethod=None, - sd=None, - sdsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - upperfence=None, - upperfencesrc=None, - visible=None, - whiskerwidth=None, - width=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Box object - - Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The - second quartile (Q2, i.e. the median) is marked by a line - inside the box. The fences grow outward from the boxes' edges, - by default they span +/- 1.5 times the interquartile range - (IQR: Q3-Q1), The sample mean and standard deviation as well as - notches and the sample, outlier and suspected outliers points - can be optionally added to the box plot. The values and - positions corresponding to each boxes can be input using two - signatures. The first signature expects users to supply the - sample values in the `y` data array for vertical boxes (`x` for - horizontal boxes). By supplying an `x` (`y`) array, one box per - distinct `x` (`y`) value is drawn If no `x` (`y`) list is - provided, a single box is drawn. In this case, the box is - positioned with the trace `name` or with `x0` (`y0`) if - provided. The second signature expects users to supply the - boxes corresponding Q1, median and Q3 statistics in the `q1`, - `median` and `q3` data arrays respectively. Other box features - relying on statistics namely `lowerfence`, `upperfence`, - `notchspan` can be set directly by the users. To have plotly - compute them or to show sample points besides the boxes, users - can set the `y` data array for vertical boxes (`x` for - horizontal boxes) to a 2D array with the outer length - corresponding to the number of boxes in the traces and the - inner length corresponding the sample size. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Box` - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - boxmean - If True, the mean of the box(es)' underlying - distribution is drawn as a dashed line inside the - box(es). If "sd" the standard deviation is also drawn. - Defaults to True when `mean` is set. Defaults to "sd" - when `sd` is set Otherwise defaults to False. - boxpoints - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the box(es) are shown with no sample - points Defaults to "suspectedoutliers" when - `marker.outliercolor` or `marker.line.outliercolor` is - set. Defaults to "all" under the q1/median/q3 - signature. Otherwise defaults to "outliers". - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step for multi-box traces set - using q1/median/q3. - dy - Sets the y coordinate step for multi-box traces set - using q1/median/q3. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.box.Hoverlabel` instance - or dict with compatible properties - hoveron - Do the hover effects highlight individual boxes or - sample points or both? - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the box(es). - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - :class:`plotly.graph_objects.box.Line` instance or dict - with compatible properties - lowerfence - Sets the lower fence values. There should be as many - items as the number of boxes desired. This attribute - has effect only under the q1/median/q3 signature. If - `lowerfence` is not provided but a sample (in `y` or - `x`) is set, we compute the lower as the last sample - point below 1.5 times the IQR. - lowerfencesrc - Sets the source reference on Chart Studio Cloud for - lowerfence . - marker - :class:`plotly.graph_objects.box.Marker` instance or - dict with compatible properties - mean - Sets the mean values. There should be as many items as - the number of boxes desired. This attribute has effect - only under the q1/median/q3 signature. If `mean` is not - provided but a sample (in `y` or `x`) is set, we - compute the mean for each box using the sample values. - meansrc - Sets the source reference on Chart Studio Cloud for - mean . - median - Sets the median values. There should be as many items - as the number of boxes desired. - mediansrc - Sets the source reference on Chart Studio Cloud for - median . - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. For box traces, the name will - also be used for the position coordinate, if `x` and - `x0` (`y` and `y0` if horizontal) are missing and the - position axis is categorical - notched - Determines whether or not notches are drawn. Notches - displays a confidence interval around the median. We - compute the confidence interval as median +/- 1.57 * - IQR / sqrt(N), where IQR is the interquartile range and - N is the sample size. If two boxes' notches do not - overlap there is 95% confidence their medians differ. - See https://sites.google.com/site/davidsstatistics/home - /notched-box-plots for more info. Defaults to False - unless `notchwidth` or `notchspan` is set. - notchspan - Sets the notch span from the boxes' `median` values. - There should be as many items as the number of boxes - desired. This attribute has effect only under the - q1/median/q3 signature. If `notchspan` is not provided - but a sample (in `y` or `x`) is set, we compute it as - 1.57 * IQR / sqrt(N), where N is the sample size. - notchspansrc - Sets the source reference on Chart Studio Cloud for - notchspan . - notchwidth - Sets the width of the notches relative to the box' - width. For example, with 0, the notches are as wide as - the box(es). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the box(es). If "v" ("h"), the - distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the box(es). If 0, the sample points are places over - the center of the box(es). Positive (negative) values - correspond to positions to the right (left) for - vertical boxes and above (below) for horizontal boxes - q1 - Sets the Quartile 1 values. There should be as many - items as the number of boxes desired. - q1src - Sets the source reference on Chart Studio Cloud for q1 - . - q3 - Sets the Quartile 3 values. There should be as many - items as the number of boxes desired. - q3src - Sets the source reference on Chart Studio Cloud for q3 - . - quartilemethod - Sets the method used to compute the sample's Q1 and Q3 - quartiles. The "linear" method uses the 25th percentile - for Q1 and 75th percentile for Q3 as computed using - method #10 (listed on http://www.amstat.org/publication - s/jse/v14n3/langford.html). The "exclusive" method uses - the median to divide the ordered dataset into two - halves if the sample is odd, it does not include the - median in either half - Q1 is then the median of the - lower half and Q3 the median of the upper half. The - "inclusive" method also uses the median to divide the - ordered dataset into two halves but if the sample is - odd, it includes the median in both halves - Q1 is then - the median of the lower half and Q3 the median of the - upper half. - sd - Sets the standard deviation values. There should be as - many items as the number of boxes desired. This - attribute has effect only under the q1/median/q3 - signature. If `sd` is not provided but a sample (in `y` - or `x`) is set, we compute the standard deviation for - each box using the sample values. - sdsrc - Sets the source reference on Chart Studio Cloud for sd - . - selected - :class:`plotly.graph_objects.box.Selected` instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.box.Stream` instance or - dict with compatible properties - text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.box.Unselected` instance - or dict with compatible properties - upperfence - Sets the upper fence values. There should be as many - items as the number of boxes desired. This attribute - has effect only under the q1/median/q3 signature. If - `upperfence` is not provided but a sample (in `y` or - `x`) is set, we compute the lower as the last sample - point above 1.5 times the IQR. - upperfencesrc - Sets the source reference on Chart Studio Cloud for - upperfence . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). - width - Sets the width of the box in data coordinate If 0 - (default value) the width is automatically selected - based on the positions of other box traces in the same - subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate for single-box traces or the - starting coordinate for multi-box traces set using - q1/median/q3. See overview for more info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Box - """ - super(Box, self).__init__("box") - - # Validate arg - # ------------ - 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.Box -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Box`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import box as v_box - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_box.AlignmentgroupValidator() - self._validators["boxmean"] = v_box.BoxmeanValidator() - self._validators["boxpoints"] = v_box.BoxpointsValidator() - self._validators["customdata"] = v_box.CustomdataValidator() - self._validators["customdatasrc"] = v_box.CustomdatasrcValidator() - self._validators["dx"] = v_box.DxValidator() - self._validators["dy"] = v_box.DyValidator() - self._validators["fillcolor"] = v_box.FillcolorValidator() - self._validators["hoverinfo"] = v_box.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_box.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_box.HoverlabelValidator() - self._validators["hoveron"] = v_box.HoveronValidator() - self._validators["hovertemplate"] = v_box.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_box.HovertemplatesrcValidator() - self._validators["hovertext"] = v_box.HovertextValidator() - self._validators["hovertextsrc"] = v_box.HovertextsrcValidator() - self._validators["ids"] = v_box.IdsValidator() - self._validators["idssrc"] = v_box.IdssrcValidator() - self._validators["jitter"] = v_box.JitterValidator() - self._validators["legendgroup"] = v_box.LegendgroupValidator() - self._validators["line"] = v_box.LineValidator() - self._validators["lowerfence"] = v_box.LowerfenceValidator() - self._validators["lowerfencesrc"] = v_box.LowerfencesrcValidator() - self._validators["marker"] = v_box.MarkerValidator() - self._validators["mean"] = v_box.MeanValidator() - self._validators["meansrc"] = v_box.MeansrcValidator() - self._validators["median"] = v_box.MedianValidator() - self._validators["mediansrc"] = v_box.MediansrcValidator() - self._validators["meta"] = v_box.MetaValidator() - self._validators["metasrc"] = v_box.MetasrcValidator() - self._validators["name"] = v_box.NameValidator() - self._validators["notched"] = v_box.NotchedValidator() - self._validators["notchspan"] = v_box.NotchspanValidator() - self._validators["notchspansrc"] = v_box.NotchspansrcValidator() - self._validators["notchwidth"] = v_box.NotchwidthValidator() - self._validators["offsetgroup"] = v_box.OffsetgroupValidator() - self._validators["opacity"] = v_box.OpacityValidator() - self._validators["orientation"] = v_box.OrientationValidator() - self._validators["pointpos"] = v_box.PointposValidator() - self._validators["q1"] = v_box.Q1Validator() - self._validators["q1src"] = v_box.Q1SrcValidator() - self._validators["q3"] = v_box.Q3Validator() - self._validators["q3src"] = v_box.Q3SrcValidator() - self._validators["quartilemethod"] = v_box.QuartilemethodValidator() - self._validators["sd"] = v_box.SdValidator() - self._validators["sdsrc"] = v_box.SdsrcValidator() - self._validators["selected"] = v_box.SelectedValidator() - self._validators["selectedpoints"] = v_box.SelectedpointsValidator() - self._validators["showlegend"] = v_box.ShowlegendValidator() - self._validators["stream"] = v_box.StreamValidator() - self._validators["text"] = v_box.TextValidator() - self._validators["textsrc"] = v_box.TextsrcValidator() - self._validators["uid"] = v_box.UidValidator() - self._validators["uirevision"] = v_box.UirevisionValidator() - self._validators["unselected"] = v_box.UnselectedValidator() - self._validators["upperfence"] = v_box.UpperfenceValidator() - self._validators["upperfencesrc"] = v_box.UpperfencesrcValidator() - self._validators["visible"] = v_box.VisibleValidator() - self._validators["whiskerwidth"] = v_box.WhiskerwidthValidator() - self._validators["width"] = v_box.WidthValidator() - self._validators["x"] = v_box.XValidator() - self._validators["x0"] = v_box.X0Validator() - self._validators["xaxis"] = v_box.XAxisValidator() - self._validators["xcalendar"] = v_box.XcalendarValidator() - self._validators["xsrc"] = v_box.XsrcValidator() - self._validators["y"] = v_box.YValidator() - self._validators["y0"] = v_box.Y0Validator() - self._validators["yaxis"] = v_box.YAxisValidator() - self._validators["ycalendar"] = v_box.YcalendarValidator() - self._validators["ysrc"] = v_box.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("boxmean", None) - self["boxmean"] = boxmean if boxmean is not None else _v - _v = arg.pop("boxpoints", None) - self["boxpoints"] = boxpoints if boxpoints is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("jitter", None) - self["jitter"] = jitter if jitter is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("lowerfence", None) - self["lowerfence"] = lowerfence if lowerfence is not None else _v - _v = arg.pop("lowerfencesrc", None) - self["lowerfencesrc"] = lowerfencesrc if lowerfencesrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("mean", None) - self["mean"] = mean if mean is not None else _v - _v = arg.pop("meansrc", None) - self["meansrc"] = meansrc if meansrc is not None else _v - _v = arg.pop("median", None) - self["median"] = median if median is not None else _v - _v = arg.pop("mediansrc", None) - self["mediansrc"] = mediansrc if mediansrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("notched", None) - self["notched"] = notched if notched is not None else _v - _v = arg.pop("notchspan", None) - self["notchspan"] = notchspan if notchspan is not None else _v - _v = arg.pop("notchspansrc", None) - self["notchspansrc"] = notchspansrc if notchspansrc is not None else _v - _v = arg.pop("notchwidth", None) - self["notchwidth"] = notchwidth if notchwidth is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("pointpos", None) - self["pointpos"] = pointpos if pointpos is not None else _v - _v = arg.pop("q1", None) - self["q1"] = q1 if q1 is not None else _v - _v = arg.pop("q1src", None) - self["q1src"] = q1src if q1src is not None else _v - _v = arg.pop("q3", None) - self["q3"] = q3 if q3 is not None else _v - _v = arg.pop("q3src", None) - self["q3src"] = q3src if q3src is not None else _v - _v = arg.pop("quartilemethod", None) - self["quartilemethod"] = quartilemethod if quartilemethod is not None else _v - _v = arg.pop("sd", None) - self["sd"] = sd if sd is not None else _v - _v = arg.pop("sdsrc", None) - self["sdsrc"] = sdsrc if sdsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("upperfence", None) - self["upperfence"] = upperfence if upperfence is not None else _v - _v = arg.pop("upperfencesrc", None) - self["upperfencesrc"] = upperfencesrc if upperfencesrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("whiskerwidth", None) - self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "box" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="box", val="box" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Barpolar(_BaseTraceType): - - # base - # ---- - @property - def base(self): - """ - Sets where the bar base is drawn (in radial axis units). In - "stack" barmode, traces that set "base" will be excluded and - drawn in "overlay" mode instead. - - The 'base' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["base"] - - @base.setter - def base(self, val): - self["base"] = val - - # basesrc - # ------- - @property - def basesrc(self): - """ - Sets the source reference on Chart Studio Cloud for base . - - The 'basesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["basesrc"] - - @basesrc.setter - def basesrc(self, val): - self["basesrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dr - # -- - @property - def dr(self): - """ - Sets the r coordinate step. - - The 'dr' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dr"] - - @dr.setter - def dr(self, val): - self["dr"] = val - - # dtheta - # ------ - @property - def dtheta(self): - """ - Sets the theta coordinate step. By default, the `dtheta` step - equals the subplot's period divided by the length of the `r` - coordinates. - - The 'dtheta' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtheta"] - - @dtheta.setter - def dtheta(self, val): - self["dtheta"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters - (e.g. 'r+theta') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.barpolar.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.barpolar.marker.Co - lorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.barpolar.marker.Li - ne` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.barpolar.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # offset - # ------ - @property - def offset(self): - """ - Shifts the angular position where the bar is drawn (in - "thetatunit" units). - - The 'offset' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # offsetsrc - # --------- - @property - def offsetsrc(self): - """ - Sets the source reference on Chart Studio Cloud for offset . - - The 'offsetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["offsetsrc"] - - @offsetsrc.setter - def offsetsrc(self, val): - self["offsetsrc"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # r - # - - @property - def r(self): - """ - Sets the radial coordinates - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # r0 - # -- - @property - def r0(self): - """ - Alternate to `r`. Builds a linear space of r coordinates. Use - with `dr` where `r0` is the starting coordinate and `dr` the - step. - - The 'r0' property accepts values of any type - - Returns - ------- - Any - """ - return self["r0"] - - @r0.setter - def r0(self, val): - self["r0"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on Chart Studio Cloud for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.barpolar.selected. - Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.selected. - Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.barpolar.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.barpolar.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - polar subplot. If "polar" (the default value), the data refer - to `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'polar', that may be specified as the string 'polar' - optionally followed by an integer >= 1 - (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets hover text elements associated with each bar. If a single - string, the same string appears over all bars. If an array of - string, the items are mapped in order to the this trace's - coordinates. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # theta - # ----- - @property - def theta(self): - """ - Sets the angular coordinates - - The 'theta' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["theta"] - - @theta.setter - def theta(self, val): - self["theta"] = val - - # theta0 - # ------ - @property - def theta0(self): - """ - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the starting - coordinate and `dtheta` the step. - - The 'theta0' property accepts values of any type - - Returns - ------- - Any - """ - return self["theta0"] - - @theta0.setter - def theta0(self, val): - self["theta0"] = val - - # thetasrc - # -------- - @property - def thetasrc(self): - """ - Sets the source reference on Chart Studio Cloud for theta . - - The 'thetasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["thetasrc"] - - @thetasrc.setter - def thetasrc(self, val): - self["thetasrc"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the unit of input "theta" values. Has an effect only when - on "linear" angular axes. - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees', 'gradians'] - - Returns - ------- - Any - """ - return self["thetaunit"] - - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.barpolar.unselecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.unselecte - d.Textfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.barpolar.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the bar angular width (in "thetaunit" units). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - base - Sets where the bar base is drawn (in radial axis - units). In "stack" barmode, traces that set "base" will - be excluded and drawn in "overlay" mode instead. - basesrc - Sets the source reference on Chart Studio Cloud for - base . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.barpolar.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.barpolar.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the angular position where the bar is drawn (in - "thetatunit" units). - offsetsrc - Sets the source reference on Chart Studio Cloud for - offset . - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.barpolar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.barpolar.Stream` instance - or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud for - theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.barpolar.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar angular width (in "thetaunit" units). - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - base=None, - basesrc=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetsrc=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Barpolar object - - The data visualized by the radial span of the bars is set in - `r` - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Barpolar` - base - Sets where the bar base is drawn (in radial axis - units). In "stack" barmode, traces that set "base" will - be excluded and drawn in "overlay" mode instead. - basesrc - Sets the source reference on Chart Studio Cloud for - base . - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.barpolar.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.barpolar.Marker` instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the angular position where the bar is drawn (in - "thetatunit" units). - offsetsrc - Sets the source reference on Chart Studio Cloud for - offset . - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.barpolar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.barpolar.Stream` instance - or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud for - text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud for - theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.barpolar.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar angular width (in "thetaunit" units). - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Barpolar - """ - super(Barpolar, self).__init__("barpolar") - - # Validate arg - # ------------ - 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.Barpolar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Barpolar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import barpolar as v_barpolar - - # Initialize validators - # --------------------- - self._validators["base"] = v_barpolar.BaseValidator() - self._validators["basesrc"] = v_barpolar.BasesrcValidator() - self._validators["customdata"] = v_barpolar.CustomdataValidator() - self._validators["customdatasrc"] = v_barpolar.CustomdatasrcValidator() - self._validators["dr"] = v_barpolar.DrValidator() - self._validators["dtheta"] = v_barpolar.DthetaValidator() - self._validators["hoverinfo"] = v_barpolar.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_barpolar.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_barpolar.HoverlabelValidator() - self._validators["hovertemplate"] = v_barpolar.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_barpolar.HovertemplatesrcValidator() - self._validators["hovertext"] = v_barpolar.HovertextValidator() - self._validators["hovertextsrc"] = v_barpolar.HovertextsrcValidator() - self._validators["ids"] = v_barpolar.IdsValidator() - self._validators["idssrc"] = v_barpolar.IdssrcValidator() - self._validators["legendgroup"] = v_barpolar.LegendgroupValidator() - self._validators["marker"] = v_barpolar.MarkerValidator() - self._validators["meta"] = v_barpolar.MetaValidator() - self._validators["metasrc"] = v_barpolar.MetasrcValidator() - self._validators["name"] = v_barpolar.NameValidator() - self._validators["offset"] = v_barpolar.OffsetValidator() - self._validators["offsetsrc"] = v_barpolar.OffsetsrcValidator() - self._validators["opacity"] = v_barpolar.OpacityValidator() - self._validators["r"] = v_barpolar.RValidator() - self._validators["r0"] = v_barpolar.R0Validator() - self._validators["rsrc"] = v_barpolar.RsrcValidator() - self._validators["selected"] = v_barpolar.SelectedValidator() - self._validators["selectedpoints"] = v_barpolar.SelectedpointsValidator() - self._validators["showlegend"] = v_barpolar.ShowlegendValidator() - self._validators["stream"] = v_barpolar.StreamValidator() - self._validators["subplot"] = v_barpolar.SubplotValidator() - self._validators["text"] = v_barpolar.TextValidator() - self._validators["textsrc"] = v_barpolar.TextsrcValidator() - self._validators["theta"] = v_barpolar.ThetaValidator() - self._validators["theta0"] = v_barpolar.Theta0Validator() - self._validators["thetasrc"] = v_barpolar.ThetasrcValidator() - self._validators["thetaunit"] = v_barpolar.ThetaunitValidator() - self._validators["uid"] = v_barpolar.UidValidator() - self._validators["uirevision"] = v_barpolar.UirevisionValidator() - self._validators["unselected"] = v_barpolar.UnselectedValidator() - self._validators["visible"] = v_barpolar.VisibleValidator() - self._validators["width"] = v_barpolar.WidthValidator() - self._validators["widthsrc"] = v_barpolar.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("base", None) - self["base"] = base if base is not None else _v - _v = arg.pop("basesrc", None) - self["basesrc"] = basesrc if basesrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dr", None) - self["dr"] = dr if dr is not None else _v - _v = arg.pop("dtheta", None) - self["dtheta"] = dtheta if dtheta is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetsrc", None) - self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("r0", None) - self["r0"] = r0 if r0 is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("theta", None) - self["theta"] = theta if theta is not None else _v - _v = arg.pop("theta0", None) - self["theta0"] = theta0 if theta0 is not None else _v - _v = arg.pop("thetasrc", None) - self["thetasrc"] = thetasrc if thetasrc is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "barpolar" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="barpolar", val="barpolar" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Bar(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val - - # base - # ---- - @property - def base(self): - """ - Sets where the bar base is drawn (in position axis units). In - "stack" or "relative" barmode, traces that set "base" will be - excluded and drawn in "overlay" mode instead. - - The 'base' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["base"] - - @base.setter - def base(self, val): - self["base"] = val - - # basesrc - # ------- - @property - def basesrc(self): - """ - Sets the source reference on Chart Studio Cloud for base . - - The 'basesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["basesrc"] - - @basesrc.setter - def basesrc(self, val): - self["basesrc"] = val - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether the text nodes are clipped about the subplot - axes. To show the text nodes above axis lines and tick labels, - make sure to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # constraintext - # ------------- - @property - def constraintext(self): - """ - Constrain the size of text inside or outside a bar to be no - larger than the bar itself. - - The 'constraintext' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'both', 'none'] - - Returns - ------- - Any - """ - return self["constraintext"] - - @constraintext.setter - def constraintext(self, val): - self["constraintext"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.ErrorX` - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.bar.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.ErrorY` - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.bar.ErrorY - """ - return self["error_y"] - - @error_y.setter - def error_y(self, val): - self["error_y"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.bar.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for hovertext - . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # insidetextanchor - # ---------------- - @property - def insidetextanchor(self): - """ - Determines if texts are kept at center or start/end points in - `textposition` "inside" mode. - - The 'insidetextanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['end', 'middle', 'start'] - - Returns - ------- - Any - """ - return self["insidetextanchor"] - - @insidetextanchor.setter - def insidetextanchor(self, val): - self["insidetextanchor"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `text` lying inside the bar. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Insidetextfont` - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.bar.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.bar.marker.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.bar.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.bar.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # offset - # ------ - @property - def offset(self): - """ - Shifts the position where the bar is drawn (in position axis - units). In "group" barmode, traces that set "offset" will be - excluded and drawn in "overlay" mode instead. - - The 'offset' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - - # offsetsrc - # --------- - @property - def offsetsrc(self): - """ - Sets the source reference on Chart Studio Cloud for offset . - - The 'offsetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["offsetsrc"] - - @offsetsrc.setter - def offsetsrc(self, val): - self["offsetsrc"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the bars. With "v" ("h"), the value of - the each bar spans along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `text` lying outside the bar. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Outsidetextfont` - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.bar.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # r - # - - @property - def r(self): - """ - r coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the radial coordinatesfor - legacy polar chart only. - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on Chart Studio Cloud for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Selected` - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.bar.selected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.selected.Textf - ont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.bar.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.bar.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # t - # - - @property - def t(self): - """ - t coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the angular coordinatesfor - legacy polar chart only. - - The 't' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textangle - # --------- - @property - def textangle(self): - """ - Sets the angle of the tick labels with respect to the bar. For - example, a `tickangle` of -90 draws the tick labels vertically. - With "auto" the texts may automatically be rotated to fit with - the maximum size in bars. - - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["textangle"] - - @textangle.setter - def textangle(self, val): - self["textangle"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `text`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.bar.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `text`. "inside" positions `text` - inside, next to the bar end (rotated and scaled if needed). - "outside" positions `text` outside, next to the bar end (scaled - if needed), unless there is another bar stacked on this one, - then the text gets pushed inside. "auto" tries to position - `text` inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on Chart Studio Cloud for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # texttemplate - # ------------ - @property - def texttemplate(self): - """ - Template string used for rendering the information text that - appear on points. Note that this will override `textinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. Every attributes that can be - specified per-point (the ones that are `arrayOk: true`) are - available. variables `value` and `label`. - - The 'texttemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["texttemplate"] - - @texttemplate.setter - def texttemplate(self, val): - self["texttemplate"] = val - - # texttemplatesrc - # --------------- - @property - def texttemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - texttemplate . - - The 'texttemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["texttemplatesrc"] - - @texttemplatesrc.setter - def texttemplatesrc(self, val): - self["texttemplatesrc"] = val - - # tsrc - # ---- - @property - def tsrc(self): - """ - Sets the source reference on Chart Studio Cloud for t . - - The 'tsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tsrc"] - - @tsrc.setter - def tsrc(self, val): - self["tsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.Unselected` - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - :class:`plotly.graph_objects.bar.unselected.Mar - ker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.bar.unselected.Tex - tfont` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.bar.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the bar width (in position axis units). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). In "stack" or "relative" barmode, traces that - set "base" will be excluded and drawn in "overlay" mode - instead. - basesrc - Sets the source reference on Chart Studio Cloud for - base . - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - :class:`plotly.graph_objects.bar.ErrorX` instance or - dict with compatible properties - error_y - :class:`plotly.graph_objects.bar.ErrorY` instance or - dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.bar.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.bar.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on Chart Studio Cloud for - offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.bar.Selected` instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.bar.Stream` instance or - dict with compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `value` and - `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - tsrc - Sets the source reference on Chart Studio Cloud for t - . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.bar.Unselected` instance - or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - alignmentgroup=None, - base=None, - basesrc=None, - cliponaxis=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - r=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - t=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Bar object - - The data visualized by the span of the bars is set in `y` if - `orientation` is set th "v" (the default) and the labels are - set in `x`. By setting `orientation` to "h", the roles are - interchanged. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Bar` - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). In "stack" or "relative" barmode, traces that - set "base" will be excluded and drawn in "overlay" mode - instead. - basesrc - Sets the source reference on Chart Studio Cloud for - base . - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - :class:`plotly.graph_objects.bar.ErrorX` instance or - dict with compatible properties - error_y - :class:`plotly.graph_objects.bar.ErrorY` instance or - dict with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.bar.Hoverlabel` instance - or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud for - hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.bar.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on Chart Studio Cloud for - offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - selected - :class:`plotly.graph_objects.bar.Selected` instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.bar.Stream` instance or - dict with compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud for - textposition . - textsrc - Sets the source reference on Chart Studio Cloud for - text . - texttemplate - Template string used for rendering the information text - that appear on points. Note that this will override - `textinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. Every attributes - that can be specified per-point (the ones that are - `arrayOk: true`) are available. variables `value` and - `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud for - texttemplate . - tsrc - Sets the source reference on Chart Studio Cloud for t - . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - :class:`plotly.graph_objects.bar.Unselected` instance - or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Bar - """ - super(Bar, self).__init__("bar") - - # Validate arg - # ------------ - 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.Bar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Bar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import bar as v_bar - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_bar.AlignmentgroupValidator() - self._validators["base"] = v_bar.BaseValidator() - self._validators["basesrc"] = v_bar.BasesrcValidator() - self._validators["cliponaxis"] = v_bar.CliponaxisValidator() - self._validators["constraintext"] = v_bar.ConstraintextValidator() - self._validators["customdata"] = v_bar.CustomdataValidator() - self._validators["customdatasrc"] = v_bar.CustomdatasrcValidator() - self._validators["dx"] = v_bar.DxValidator() - self._validators["dy"] = v_bar.DyValidator() - self._validators["error_x"] = v_bar.ErrorXValidator() - self._validators["error_y"] = v_bar.ErrorYValidator() - self._validators["hoverinfo"] = v_bar.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_bar.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_bar.HoverlabelValidator() - self._validators["hovertemplate"] = v_bar.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_bar.HovertemplatesrcValidator() - self._validators["hovertext"] = v_bar.HovertextValidator() - self._validators["hovertextsrc"] = v_bar.HovertextsrcValidator() - self._validators["ids"] = v_bar.IdsValidator() - self._validators["idssrc"] = v_bar.IdssrcValidator() - self._validators["insidetextanchor"] = v_bar.InsidetextanchorValidator() - self._validators["insidetextfont"] = v_bar.InsidetextfontValidator() - self._validators["legendgroup"] = v_bar.LegendgroupValidator() - self._validators["marker"] = v_bar.MarkerValidator() - self._validators["meta"] = v_bar.MetaValidator() - self._validators["metasrc"] = v_bar.MetasrcValidator() - self._validators["name"] = v_bar.NameValidator() - self._validators["offset"] = v_bar.OffsetValidator() - self._validators["offsetgroup"] = v_bar.OffsetgroupValidator() - self._validators["offsetsrc"] = v_bar.OffsetsrcValidator() - self._validators["opacity"] = v_bar.OpacityValidator() - self._validators["orientation"] = v_bar.OrientationValidator() - self._validators["outsidetextfont"] = v_bar.OutsidetextfontValidator() - self._validators["r"] = v_bar.RValidator() - self._validators["rsrc"] = v_bar.RsrcValidator() - self._validators["selected"] = v_bar.SelectedValidator() - self._validators["selectedpoints"] = v_bar.SelectedpointsValidator() - self._validators["showlegend"] = v_bar.ShowlegendValidator() - self._validators["stream"] = v_bar.StreamValidator() - self._validators["t"] = v_bar.TValidator() - self._validators["text"] = v_bar.TextValidator() - self._validators["textangle"] = v_bar.TextangleValidator() - self._validators["textfont"] = v_bar.TextfontValidator() - self._validators["textposition"] = v_bar.TextpositionValidator() - self._validators["textpositionsrc"] = v_bar.TextpositionsrcValidator() - self._validators["textsrc"] = v_bar.TextsrcValidator() - self._validators["texttemplate"] = v_bar.TexttemplateValidator() - self._validators["texttemplatesrc"] = v_bar.TexttemplatesrcValidator() - self._validators["tsrc"] = v_bar.TsrcValidator() - self._validators["uid"] = v_bar.UidValidator() - self._validators["uirevision"] = v_bar.UirevisionValidator() - self._validators["unselected"] = v_bar.UnselectedValidator() - self._validators["visible"] = v_bar.VisibleValidator() - self._validators["width"] = v_bar.WidthValidator() - self._validators["widthsrc"] = v_bar.WidthsrcValidator() - self._validators["x"] = v_bar.XValidator() - self._validators["x0"] = v_bar.X0Validator() - self._validators["xaxis"] = v_bar.XAxisValidator() - self._validators["xcalendar"] = v_bar.XcalendarValidator() - self._validators["xsrc"] = v_bar.XsrcValidator() - self._validators["y"] = v_bar.YValidator() - self._validators["y0"] = v_bar.Y0Validator() - self._validators["yaxis"] = v_bar.YAxisValidator() - self._validators["ycalendar"] = v_bar.YcalendarValidator() - self._validators["ysrc"] = v_bar.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("base", None) - self["base"] = base if base is not None else _v - _v = arg.pop("basesrc", None) - self["basesrc"] = basesrc if basesrc is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("constraintext", None) - self["constraintext"] = constraintext if constraintext is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextanchor", None) - self["insidetextanchor"] = ( - insidetextanchor if insidetextanchor is not None else _v - ) - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("offsetsrc", None) - self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("texttemplate", None) - self["texttemplate"] = texttemplate if texttemplate is not None else _v - _v = arg.pop("texttemplatesrc", None) - self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v - _v = arg.pop("tsrc", None) - self["tsrc"] = tsrc if tsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "bar" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="bar", val="bar" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Area(_BaseTraceType): - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on Chart Studio Cloud for hoverinfo - . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.area.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.area.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val - - # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on Chart Studio Cloud for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.area.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets themarkercolor. - It accepts either a specific color or an array - of numbers that are mapped to the colorscale - relative to the max and min values of the array - or relative to `marker.cmin` and `marker.cmax` - if set. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - opacity - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker - opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - size - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker size - (in px). - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker - symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 - is equivalent to appending "-dot" to a symbol - name. Adding 300 is equivalent to appending - "-open-dot" or "dot-open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . - - Returns - ------- - plotly.graph_objs.area.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # name - # ---- - @property - def name(self): - """ - Sets the trace name. The trace name appear as the legend item - and on hover. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # r - # - - @property - def r(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the radial coordinates for legacy polar chart - only. - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on Chart Studio Cloud for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of :class:`plotly.graph_objs.area.Stream` - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - - Returns - ------- - plotly.graph_objs.area.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # t - # - - @property - def t(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the angular coordinates for legacy polar chart - only. - - The 't' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # tsrc - # ---- - @property - def tsrc(self): - """ - Sets the source reference on Chart Studio Cloud for t . - - The 'tsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tsrc"] - - @tsrc.setter - def tsrc(self, val): - self["tsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.area.Hoverlabel` instance - or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.area.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the radial coordinates for - legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.area.Stream` instance or - dict with compatible properties - t - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the angular coordinates for - legacy polar chart only. - tsrc - Sets the source reference on Chart Studio Cloud for t - . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - r=None, - rsrc=None, - showlegend=None, - stream=None, - t=None, - tsrc=None, - uid=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new Area object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Area` - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud for - hoverinfo . - hoverlabel - :class:`plotly.graph_objects.area.Hoverlabel` instance - or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud for - ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - :class:`plotly.graph_objects.area.Marker` instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the radial coordinates for - legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud for r - . - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - :class:`plotly.graph_objects.area.Stream` instance or - dict with compatible properties - t - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the angular coordinates for - legacy polar chart only. - tsrc - Sets the source reference on Chart Studio Cloud for t - . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - - Returns - ------- - Area - """ - super(Area, self).__init__("area") - - # Validate arg - # ------------ - 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.Area -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Area`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import area as v_area - - # Initialize validators - # --------------------- - self._validators["customdata"] = v_area.CustomdataValidator() - self._validators["customdatasrc"] = v_area.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_area.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_area.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_area.HoverlabelValidator() - self._validators["ids"] = v_area.IdsValidator() - self._validators["idssrc"] = v_area.IdssrcValidator() - self._validators["legendgroup"] = v_area.LegendgroupValidator() - self._validators["marker"] = v_area.MarkerValidator() - self._validators["meta"] = v_area.MetaValidator() - self._validators["metasrc"] = v_area.MetasrcValidator() - self._validators["name"] = v_area.NameValidator() - self._validators["opacity"] = v_area.OpacityValidator() - self._validators["r"] = v_area.RValidator() - self._validators["rsrc"] = v_area.RsrcValidator() - self._validators["showlegend"] = v_area.ShowlegendValidator() - self._validators["stream"] = v_area.StreamValidator() - self._validators["t"] = v_area.TValidator() - self._validators["tsrc"] = v_area.TsrcValidator() - self._validators["uid"] = v_area.UidValidator() - self._validators["uirevision"] = v_area.UirevisionValidator() - self._validators["visible"] = v_area.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - _v = arg.pop("tsrc", None) - self["tsrc"] = tsrc if tsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "area" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="area", val="area" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType -import copy as _copy - - -class Layout(_BaseLayoutType): - - _subplotid_prop_names = [ - "coloraxis", - "geo", - "mapbox", - "polar", - "scene", - "ternary", - "xaxis", - "yaxis", - ] - - import re - - _subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + ")(\d+)$") - - @property - def _subplotid_validators(self): - """ - dict of validator classes for each subplot type - - Returns - ------- - dict - """ - from plotly.validators.layout import ( - ColoraxisValidator, - GeoValidator, - MapboxValidator, - PolarValidator, - SceneValidator, - TernaryValidator, - XAxisValidator, - YAxisValidator, - ) - - return { - "coloraxis": ColoraxisValidator, - "geo": GeoValidator, - "mapbox": MapboxValidator, - "polar": PolarValidator, - "scene": SceneValidator, - "ternary": TernaryValidator, - "xaxis": XAxisValidator, - "yaxis": YAxisValidator, - } - - def _subplot_re_match(self, prop): - return self._subplotid_prop_re.match(prop) - - # angularaxis - # ----------- - @property - def angularaxis(self): - """ - The 'angularaxis' property is an instance of AngularAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.AngularAxis` - - A dict of string/value properties that will be passed - to the AngularAxis constructor - - Supported dict properties: - - domain - Polar chart subplots are not supported yet. - This key has currently no effect. - endpadding - Legacy polar charts are deprecated! Please - switch to "polar" subplots. - range - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Defines the start - and end point of this angular axis. - showline - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the line bounding this angular axis will - be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the angular axis ticks will feature tick - labels. - tickcolor - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the color of - the tick lines on this angular axis. - ticklen - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this angular axis. - tickorientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (from the paper perspective) of the - angular axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this angular axis. - visible - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not this axis will be visible. - - Returns - ------- - plotly.graph_objs.layout.AngularAxis - """ - return self["angularaxis"] - - @angularaxis.setter - def angularaxis(self, val): - self["angularaxis"] = val - - # annotations - # ----------- - @property - def annotations(self): - """ - The 'annotations' property is a tuple of instances of - Annotation that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Annotation - - A list or tuple of dicts of string/value properties that - will be passed to the Annotation constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head. If `axref` is `pixel`, a - positive (negative) component corresponds to - an arrow pointing from right to left (left to - right). If `axref` is an axis, this is an - absolute value on that axis, like `x`, NOT a - relative value. - axref - Indicates in what terms the tail of the - annotation (ax,ay) is specified. If `pixel`, - `ax` is a relative offset in pixels from `x`. - If set to an x axis id (e.g. "x" or "x2"), `ax` - is specified in the same terms as that axis. - This is useful for trendline annotations which - should continue to indicate the correct trend - when zoomed. - ay - Sets the y component of the arrow tail about - the arrow head. If `ayref` is `pixel`, a - positive (negative) component corresponds to - an arrow pointing from bottom to top (top to - bottom). If `ayref` is an axis, this is an - absolute value on that axis, like `y`, NOT a - relative value. - ayref - Indicates in what terms the tail of the - annotation (ax,ay) is specified. If `pixel`, - `ay` is a relative offset in pixels from `y`. - If set to a y axis id (e.g. "y" or "y2"), `ay` - is specified in the same terms as that axis. - This is useful for trendline annotations which - should continue to indicate the correct trend - when zoomed. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the - plot. If you click a data point that exactly - matches the `x` and `y` values of this - annotation, and it is hidden (visible: false), - it will appear. In "onoff" mode, you must click - the same point again to make it disappear, so - if you click multiple points, you can show - multiple annotations. In "onout" mode, a click - anywhere else in the plot (on another data - point or not) will hide this annotation. If you - need to show/hide this annotation in response - to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for - example to label the side of a bar. To label - markers though, `standoff` is preferred over - `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.annotation. - Hoverlabel` instance or dict with compatible - properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , are also - supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xclick - Toggle this annotation when clicking a data - point whose `x` value is `xclick` rather than - the annotation's `x` value. - xref - Sets the annotation's x coordinate axis. If set - to an x axis id (e.g. "x" or "x2"), the `x` - position refers to an x coordinate If set to - "paper", the `x` position refers to the - distance from the left side of the plotting - area in normalized coordinates where 0 (1) - corresponds to the left (right) side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yclick - Toggle this annotation when clicking a data - point whose `y` value is `yclick` rather than - the annotation's `y` value. - yref - Sets the annotation's y coordinate axis. If set - to an y axis id (e.g. "y" or "y2"), the `y` - position refers to an y coordinate If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. - - Returns - ------- - tuple[plotly.graph_objs.layout.Annotation] - """ - return self["annotations"] - - @annotations.setter - def annotations(self, val): - self["annotations"] = val - - # annotationdefaults - # ------------------ - @property - def annotationdefaults(self): - """ - When used in a template (as - layout.template.layout.annotationdefaults), sets the default - property values to use for elements of layout.annotations - - The 'annotationdefaults' property is an instance of Annotation - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Annotation` - - A dict of string/value properties that will be passed - to the Annotation constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.Annotation - """ - return self["annotationdefaults"] - - @annotationdefaults.setter - def annotationdefaults(self, val): - self["annotationdefaults"] = val - - # autosize - # -------- - @property - def autosize(self): - """ - Determines whether or not a layout width or height that has - been left undefined by the user is initialized on each - relayout. Note that, regardless of this attribute, an undefined - layout width or height is always initialized on the first call - to plot. - - The 'autosize' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autosize"] - - @autosize.setter - def autosize(self, val): - self["autosize"] = val - - # bargap - # ------ - @property - def bargap(self): - """ - Sets the gap (in plot fraction) between bars of adjacent - location coordinates. - - The 'bargap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["bargap"] - - @bargap.setter - def bargap(self, val): - self["bargap"] = val - - # bargroupgap - # ----------- - @property - def bargroupgap(self): - """ - Sets the gap (in plot fraction) between bars of the same - location coordinate. - - The 'bargroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["bargroupgap"] - - @bargroupgap.setter - def bargroupgap(self, val): - self["bargroupgap"] = val - - # barmode - # ------- - @property - def barmode(self): - """ - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are stacked on - top of one another With "relative", the bars are stacked on top - of one another, with negative values below the axis, positive - values above With "group", the bars are plotted next to one - another centered around the shared location. With "overlay", - the bars are plotted over one another, you might need to an - "opacity" to see multiple bars. - - The 'barmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['stack', 'group', 'overlay', 'relative'] - - Returns - ------- - Any - """ - return self["barmode"] - - @barmode.setter - def barmode(self, val): - self["barmode"] = val - - # barnorm - # ------- - @property - def barnorm(self): - """ - Sets the normalization for bar traces on the graph. With - "fraction", the value of each bar is divided by the sum of all - values at that location coordinate. "percent" is the same but - multiplied by 100 to show percentages. - - The 'barnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'fraction', 'percent'] - - Returns - ------- - Any - """ - return self["barnorm"] - - @barnorm.setter - def barnorm(self, val): - self["barnorm"] = val - - # boxgap - # ------ - @property - def boxgap(self): - """ - Sets the gap (in plot fraction) between boxes of adjacent - location coordinates. Has no effect on traces that have "width" - set. - - The 'boxgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["boxgap"] - - @boxgap.setter - def boxgap(self, val): - self["boxgap"] = val - - # boxgroupgap - # ----------- - @property - def boxgroupgap(self): - """ - Sets the gap (in plot fraction) between boxes of the same - location coordinate. Has no effect on traces that have "width" - set. - - The 'boxgroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["boxgroupgap"] - - @boxgroupgap.setter - def boxgroupgap(self, val): - self["boxgroupgap"] = val - - # boxmode - # ------- - @property - def boxmode(self): - """ - Determines how boxes at the same location coordinate are - displayed on the graph. If "group", the boxes are plotted next - to one another centered around the shared location. If - "overlay", the boxes are plotted over one another, you might - need to set "opacity" to see them multiple boxes. Has no effect - on traces that have "width" set. - - The 'boxmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['group', 'overlay'] - - Returns - ------- - Any - """ - return self["boxmode"] - - @boxmode.setter - def boxmode(self, val): - self["boxmode"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the default calendar system to use for interpreting and - displaying dates throughout the plot. - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # clickmode - # --------- - @property - def clickmode(self): - """ - Determines the mode of single click interactions. "event" is - the default value and emits the `plotly_click` event. In - addition this mode emits the `plotly_selected` event in drag - modes "lasso" and "select", but with no event data attached - (kept for compatibility reasons). The "select" flag enables - selecting single data points via click. This mode also supports - persistent selections, meaning that pressing Shift while - clicking, adds to / subtracts from an existing selection. - "select" with `hovermode`: "x" can be confusing, consider - explicitly setting `hovermode`: "closest" when using this - feature. Selection events are sent accordingly as long as - "event" flag is set as well. When the "event" flag is missing, - `plotly_click` and `plotly_selected` events are not fired. - - The 'clickmode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['event', 'select'] joined with '+' characters - (e.g. 'event+select') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["clickmode"] - - @clickmode.setter - def clickmode(self, val): - self["clickmode"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - The 'coloraxis' property is an instance of Coloraxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Coloraxis` - - A dict of string/value properties that will be passed - to the Coloraxis constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - corresponding trace color array(s)) or the - bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the - user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmin` must be - set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as corresponding trace color array(s). Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmax` must be - set as well. - colorbar - :class:`plotly.graph_objects.layout.coloraxis.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. - - Returns - ------- - plotly.graph_objs.layout.Coloraxis - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - The 'colorscale' property is an instance of Colorscale - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Colorscale` - - A dict of string/value properties that will be passed - to the Colorscale constructor - - Supported dict properties: - - diverging - Sets the default diverging colorscale. Note - that `autocolorscale` must be true for this - attribute to work. - sequential - Sets the default sequential colorscale for - positive values. Note that `autocolorscale` - must be true for this attribute to work. - sequentialminus - Sets the default sequential colorscale for - negative values. Note that `autocolorscale` - must be true for this attribute to work. - - Returns - ------- - plotly.graph_objs.layout.Colorscale - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorway - # -------- - @property - def colorway(self): - """ - Sets the default trace colors. - - The 'colorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings - - Returns - ------- - list - """ - return self["colorway"] - - @colorway.setter - def colorway(self, val): - self["colorway"] = val - - # datarevision - # ------------ - @property - def datarevision(self): - """ - If provided, a changed value tells `Plotly.react` that one or - more data arrays has changed. This way you can modify arrays - in-place rather than making a complete new copy for an - incremental change. If NOT provided, `Plotly.react` assumes - that data arrays are being treated as immutable, thus any data - array with a different identity from its predecessor contains - new data. - - The 'datarevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["datarevision"] - - @datarevision.setter - def datarevision(self, val): - self["datarevision"] = val - - # direction - # --------- - @property - def direction(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the direction corresponding to positive angles - in legacy polar charts. - - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['clockwise', 'counterclockwise'] - - Returns - ------- - Any - """ - return self["direction"] - - @direction.setter - def direction(self, val): - self["direction"] = val - - # dragmode - # -------- - @property - def dragmode(self): - """ - Determines the mode of drag interactions. "select" and "lasso" - apply only to scatter traces with markers or text. "orbit" and - "turntable" apply only to 3D scenes. - - The 'dragmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable', - False] - - Returns - ------- - Any - """ - return self["dragmode"] - - @dragmode.setter - def dragmode(self, val): - self["dragmode"] = val - - # editrevision - # ------------ - @property - def editrevision(self): - """ - Controls persistence of user-driven changes in `editable: true` - configuration, other than trace names and axis titles. Defaults - to `layout.uirevision`. - - The 'editrevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["editrevision"] - - @editrevision.setter - def editrevision(self, val): - self["editrevision"] = val - - # extendfunnelareacolors - # ---------------------- - @property - def extendfunnelareacolors(self): - """ - If `true`, the funnelarea slice colors (whether given by - `funnelareacolorway` or inherited from `colorway`) will be - extended to three times its original length by first repeating - every color 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing the same color - when you have many slices, but you can set `false` to disable. - Colors provided in the trace, using `marker.colors`, are never - extended. - - The 'extendfunnelareacolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["extendfunnelareacolors"] - - @extendfunnelareacolors.setter - def extendfunnelareacolors(self, val): - self["extendfunnelareacolors"] = val - - # extendpiecolors - # --------------- - @property - def extendpiecolors(self): - """ - If `true`, the pie slice colors (whether given by `piecolorway` - or inherited from `colorway`) will be extended to three times - its original length by first repeating every color 20% lighter - then each color 20% darker. This is intended to reduce the - likelihood of reusing the same color when you have many slices, - but you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - - The 'extendpiecolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["extendpiecolors"] - - @extendpiecolors.setter - def extendpiecolors(self, val): - self["extendpiecolors"] = val - - # extendsunburstcolors - # -------------------- - @property - def extendsunburstcolors(self): - """ - If `true`, the sunburst slice colors (whether given by - `sunburstcolorway` or inherited from `colorway`) will be - extended to three times its original length by first repeating - every color 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing the same color - when you have many slices, but you can set `false` to disable. - Colors provided in the trace, using `marker.colors`, are never - extended. - - The 'extendsunburstcolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["extendsunburstcolors"] - - @extendsunburstcolors.setter - def extendsunburstcolors(self, val): - self["extendsunburstcolors"] = val - - # extendtreemapcolors - # ------------------- - @property - def extendtreemapcolors(self): - """ - If `true`, the treemap slice colors (whether given by - `treemapcolorway` or inherited from `colorway`) will be - extended to three times its original length by first repeating - every color 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing the same color - when you have many slices, but you can set `false` to disable. - Colors provided in the trace, using `marker.colors`, are never - extended. - - The 'extendtreemapcolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["extendtreemapcolors"] - - @extendtreemapcolors.setter - def extendtreemapcolors(self, val): - self["extendtreemapcolors"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the global font. Note that fonts used in traces and other - layout components inherit from the global font. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # funnelareacolorway - # ------------------ - @property - def funnelareacolorway(self): - """ - Sets the default funnelarea slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendfunnelareacolors`. - - The 'funnelareacolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings - - Returns - ------- - list - """ - return self["funnelareacolorway"] - - @funnelareacolorway.setter - def funnelareacolorway(self, val): - self["funnelareacolorway"] = val - - # funnelgap - # --------- - @property - def funnelgap(self): - """ - Sets the gap (in plot fraction) between bars of adjacent - location coordinates. - - The 'funnelgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["funnelgap"] - - @funnelgap.setter - def funnelgap(self, val): - self["funnelgap"] = val - - # funnelgroupgap - # -------------- - @property - def funnelgroupgap(self): - """ - Sets the gap (in plot fraction) between bars of the same - location coordinate. - - The 'funnelgroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["funnelgroupgap"] - - @funnelgroupgap.setter - def funnelgroupgap(self, val): - self["funnelgroupgap"] = val - - # funnelmode - # ---------- - @property - def funnelmode(self): - """ - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are stacked on - top of one another With "group", the bars are plotted next to - one another centered around the shared location. With - "overlay", the bars are plotted over one another, you might - need to an "opacity" to see multiple bars. - - The 'funnelmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['stack', 'group', 'overlay'] - - Returns - ------- - Any - """ - return self["funnelmode"] - - @funnelmode.setter - def funnelmode(self, val): - self["funnelmode"] = val - - # geo - # --- - @property - def geo(self): - """ - The 'geo' property is an instance of Geo - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Geo` - - A dict of string/value properties that will be passed - to the Geo constructor - - Supported dict properties: - - bgcolor - Set the background color of the map - center - :class:`plotly.graph_objects.layout.geo.Center` - instance or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country - boundaries. - domain - :class:`plotly.graph_objects.layout.geo.Domain` - instance or dict with compatible properties - fitbounds - Determines if this subplot's view settings are - auto-computed to fit trace data. On scoped - maps, setting `fitbounds` leads to `center.lon` - and `center.lat` getting auto-filled. On maps - with a non-clipped projection, setting - `fitbounds` leads to `center.lon`, - `center.lat`, and `projection.rotation.lon` - getting auto-filled. On maps with a clipped - projection, setting `fitbounds` leads to - `center.lon`, `center.lat`, - `projection.rotation.lon`, - `projection.rotation.lat`, `lonaxis.range` and - `lonaxis.range` getting auto-filled. If - "locations", only the trace's visible locations - are considered in the `fitbounds` computations. - If "geojson", the entire trace input `geojson` - (if provided) is considered in the `fitbounds` - computations, Defaults to False. - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - :class:`plotly.graph_objects.layout.geo.Lataxis - ` instance or dict with compatible properties - lonaxis - :class:`plotly.graph_objects.layout.geo.Lonaxis - ` instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - :class:`plotly.graph_objects.layout.geo.Project - ion` instance or dict with compatible - properties - resolution - Sets the resolution of the base layers. The - values have units of km/mm e.g. 110 corresponds - to a scale ratio of 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are - drawn. - showframe - Sets whether or not a frame is drawn around the - map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in - color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits - within countries (e.g. states, provinces) are - drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in - the view (projection and center). Defaults to - `layout.uirevision`. - visible - Sets the default visibility of the base layers. - - Returns - ------- - plotly.graph_objs.layout.Geo - """ - return self["geo"] - - @geo.setter - def geo(self, val): - self["geo"] = val - - # grid - # ---- - @property - def grid(self): - """ - The 'grid' property is an instance of Grid - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Grid` - - A dict of string/value properties that will be passed - to the Grid constructor - - Supported dict properties: - - columns - The number of columns in the grid. If you - provide a 2D `subplots` array, the length of - its longest row is used as the default. If you - give an `xaxes` array, its length is used as - the default. But it's also possible to have a - different length, if you want to leave a row at - the end for non-cartesian subplots. - domain - :class:`plotly.graph_objects.layout.grid.Domain - ` instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given - but we do have `rows` and `columns`, we can - generate defaults using consecutive axis IDs, - in two ways: "coupled" gives one x axis per - column and one y axis per row. "independent" - uses a new xy pair for each cell, left-to-right - across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note - that columns are always enumerated from left to - right. - rows - The number of rows in the grid. If you provide - a 2D `subplots` array or a `yaxes` array, its - length is used as the default. But it's also - possible to have a different length, if you - want to leave a row at the end for non- - cartesian subplots. - subplots - Used for freeform grids, where some axes may be - shared across subplots but others are not. Each - entry should be a cartesian subplot id, like - "xy" or "x3y2", or "" to leave that cell empty. - You may reuse x axes within the same column, - and y axes within the same row. Non-cartesian - subplots and traces that support `domain` can - place themselves in this grid separately using - the `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an x axis id like "x", "x2", etc., or - "" to not put an x axis in that column. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `yaxes` - is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed - as a fraction of the total width available to - one cell. Defaults to 0.1 for coupled-axes - grids and 0.2 for independent grids. - xside - Sets where the x axis labels and titles go. - "bottom" means the very bottom of the grid. - "bottom plot" is the lowest plot that each x - axis is used in. "top" and "top plot" are - similar. - yaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an y axis id like "y", "y2", etc., or - "" to not put a y axis in that row. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `xaxes` - is present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as - a fraction of the total height available to one - cell. Defaults to 0.1 for coupled-axes grids - and 0.3 for independent grids. - yside - Sets where the y axis labels and titles go. - "left" means the very left edge of the grid. - *left plot* is the leftmost plot that each y - axis is used in. "right" and *right plot* are - similar. - - Returns - ------- - plotly.graph_objs.layout.Grid - """ - return self["grid"] - - @grid.setter - def grid(self, val): - self["grid"] = val - - # height - # ------ - @property - def height(self): - """ - Sets the plot's height (in px). - - The 'height' property is a number and may be specified as: - - An int or float in the interval [10, inf] - - Returns - ------- - int|float - """ - return self["height"] - - @height.setter - def height(self, val): - self["height"] = val - - # hiddenlabels - # ------------ - @property - def hiddenlabels(self): - """ - hiddenlabels is the funnelarea & pie chart analog of - visible:'legendonly' but it can contain many labels, and can - simultaneously hide slices from several pies/funnelarea charts - - The 'hiddenlabels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["hiddenlabels"] - - @hiddenlabels.setter - def hiddenlabels(self, val): - self["hiddenlabels"] = val - - # hiddenlabelssrc - # --------------- - @property - def hiddenlabelssrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hiddenlabels . - - The 'hiddenlabelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hiddenlabelssrc"] - - @hiddenlabelssrc.setter - def hiddenlabelssrc(self, val): - self["hiddenlabelssrc"] = val - - # hidesources - # ----------- - @property - def hidesources(self): - """ - Determines whether or not a text link citing the data source is - placed at the bottom-right cored of the figure. Has only an - effect only on graphs that have been generated via forked - graphs from the Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise). - - The 'hidesources' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["hidesources"] - - @hidesources.setter - def hidesources(self, val): - self["hidesources"] = val - - # hoverdistance - # ------------- - @property - def hoverdistance(self): - """ - Sets the default distance (in pixels) to look for data to add - hover labels (-1 means no cutoff, 0 means no looking for data). - This is only a real distance for hovering on point-like - objects, like scatter points. For area-like objects (bars, - scatter fills, etc) hovering is on inside the area and off - outside, but these objects will not supersede hover on point- - like objects in case of conflict. - - The 'hoverdistance' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - Returns - ------- - int - """ - return self["hoverdistance"] - - @hoverdistance.setter - def hoverdistance(self, val): - self["hoverdistance"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - bgcolor - Sets the background color of all hover labels - on graph - bordercolor - Sets the border color of all hover labels on - graph. - font - Sets the default hover label font used by all - traces on the graph. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - - Returns - ------- - plotly.graph_objs.layout.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovermode - # --------- - @property - def hovermode(self): - """ - Determines the mode of hover interactions. If "closest", a - single hoverlabel will appear for the "closest" point within - the `hoverdistance`. If "x" (or "y"), multiple hoverlabels will - appear for multiple points at the "closest" x- (or y-) - coordinate within the `hoverdistance`, with the caveat that no - more than one hoverlabel will appear per trace. If *x unified* - (or *y unified*), a single hoverlabel will appear multiple - points at the closest x- (or y-) coordinate within the - `hoverdistance` with the caveat that no more than one - hoverlabel will appear per trace. In this mode, spikelines are - enabled by default perpendicular to the specified axis. If - false, hover interactions are disabled. If `clickmode` includes - the "select" flag, `hovermode` defaults to "closest". If - `clickmode` lacks the "select" flag, it defaults to "x" or "y" - (depending on the trace's `orientation` value) for plots based - on cartesian coordinates. For anything else the default value - is "closest". - - The 'hovermode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['x', 'y', 'closest', False, 'x unified', 'y unified'] - - Returns - ------- - Any - """ - return self["hovermode"] - - @hovermode.setter - def hovermode(self, val): - self["hovermode"] = val - - # images - # ------ - @property - def images(self): - """ - The 'images' property is a tuple of instances of - Image that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Image - - A list or tuple of dicts of string/value properties that - will be passed to the Image constructor - - Supported dict properties: - - layer - Specifies whether images are drawn below or - above traces. When `xref` and `yref` are both - set to `paper`, image is drawn below the entire - plot area. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The - image will be sized based on the `position` - value. When `xref` is set to `paper`, units are - sized relative to the plot width. - sizey - Sets the image container size vertically. The - image will be sized based on the `position` - value. When `yref` is set to `paper`, units are - sized relative to the plot height. - sizing - Specifies which dimension of the image to - constrain. - source - Specifies the URL of the image to be used. The - URL must be accessible from the domain where - the plot code is run, and can be either - relative or absolute. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this image is - visible. - x - Sets the image's x position. When `xref` is set - to `paper`, units are sized relative to the - plot height. See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to - a x axis id (e.g. "x" or "x2"), the `x` - position refers to an x data coordinate If set - to "paper", the `x` position refers to the - distance from the left of plot in normalized - coordinates where 0 (1) corresponds to the left - (right). - y - Sets the image's y position. When `yref` is set - to `paper`, units are sized relative to the - plot height. See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to - a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y data coordinate. If set - to "paper", the `y` position refers to the - distance from the bottom of the plot in - normalized coordinates where 0 (1) corresponds - to the bottom (top). - - Returns - ------- - tuple[plotly.graph_objs.layout.Image] - """ - return self["images"] - - @images.setter - def images(self, val): - self["images"] = val - - # imagedefaults - # ------------- - @property - def imagedefaults(self): - """ - When used in a template (as - layout.template.layout.imagedefaults), sets the default - property values to use for elements of layout.images - - The 'imagedefaults' property is an instance of Image - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Image` - - A dict of string/value properties that will be passed - to the Image constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.Image - """ - return self["imagedefaults"] - - @imagedefaults.setter - def imagedefaults(self, val): - self["imagedefaults"] = val - - # legend - # ------ - @property - def legend(self): - """ - The 'legend' property is an instance of Legend - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Legend` - - A dict of string/value properties that will be passed - to the Legend constructor - - Supported dict properties: - - bgcolor - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - bordercolor - Sets the color of the border enclosing the - legend. - borderwidth - Sets the width (in px) of the border enclosing - the legend. - font - Sets the font used to text the legend items. - itemclick - Determines the behavior on legend item click. - "toggle" toggles the visibility of the item - clicked on the graph. "toggleothers" makes the - clicked item the sole visible item on the - graph. False disable legend item click - interactions. - itemdoubleclick - Determines the behavior on legend item double- - click. "toggle" toggles the visibility of the - item clicked on the graph. "toggleothers" makes - the clicked item the sole visible item on the - graph. False disable legend item double-click - interactions. - itemsizing - Determines if the legend items symbols scale - with their corresponding "trace" attributes or - remain "constant" independent of the symbol - size on the graph. - orientation - Sets the orientation of the legend. - title - :class:`plotly.graph_objects.layout.legend.Titl - e` instance or dict with compatible properties - tracegroupgap - Sets the amount of vertical space (in px) - between legend groups. - traceorder - Determines the order at which the legend items - are displayed. If "normal", the items are - displayed top-to-bottom in the same order as - the input data. If "reversed", the items are - displayed in the opposite order as "normal". If - "grouped", the items are displayed in groups - (when a trace `legendgroup` is provided). if - "grouped+reversed", the items are displayed in - the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes - in trace and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with - respect to their associated text. - x - Sets the x position (in normalized coordinates) - of the legend. Defaults to 1.02 for vertical - legends and defaults to 0 for horizontal - legends. - xanchor - Sets the legend's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the legend. - Value "auto" anchors legends to the right for - `x` values greater than or equal to 2/3, - anchors legends to the left for `x` values less - than or equal to 1/3 and anchors legends with - respect to their center otherwise. - y - Sets the y position (in normalized coordinates) - of the legend. Defaults to 1 for vertical - legends, defaults to "-0.1" for horizontal - legends on graphs w/o range sliders and - defaults to 1.1 for horizontal legends on graph - with one or multiple range sliders. - yanchor - Sets the legend's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the legend. Value - "auto" anchors legends at their bottom for `y` - values less than or equal to 1/3, anchors - legends to at their top for `y` values greater - than or equal to 2/3 and anchors legends with - respect to their middle otherwise. - - Returns - ------- - plotly.graph_objs.layout.Legend - """ - return self["legend"] - - @legend.setter - def legend(self, val): - self["legend"] = val - - # mapbox - # ------ - @property - def mapbox(self): - """ - The 'mapbox' property is an instance of Mapbox - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Mapbox` - - A dict of string/value properties that will be passed - to the Mapbox constructor - - Supported dict properties: - - accesstoken - Sets the mapbox access token to be used for - this mapbox map. Alternatively, the mapbox - access token can be set in the configuration - options under `mapboxAccessToken`. Note that - accessToken are only required when `style` (e.g - with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a - layout layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (mapbox.bearing). - center - :class:`plotly.graph_objects.layout.mapbox.Cent - er` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.mapbox.Doma - in` instance or dict with compatible properties - layers - A tuple of :class:`plotly.graph_objects.layout. - mapbox.Layer` instances or dicts with - compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), - sets the default property values to use for - elements of layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (mapbox.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.mapbox.layers`. These layers can be - defined either explicitly as a Mapbox Style - object which can contain multiple layer - definitions that load data from any public or - private Tile Map Service (TMS or XYZ) or Web - Map Service (WMS) or implicitly by using one of - the built-in style objects which use WMSes - which do not require any access tokens, or by - using a default Mapbox style or custom Mapbox - style URL, both of which require a Mapbox - access token Note that Mapbox access token can - be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox - Style objects are of the form described in the - Mapbox GL JS documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec - The built-in plotly.js styles objects are: - open-street-map, white-bg, carto-positron, - carto-darkmatter, stamen-terrain, stamen-toner, - stamen-watercolor The built-in Mapbox styles - are: basic, streets, outdoors, light, dark, - satellite, satellite-streets Mapbox style URLs - are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). - - Returns - ------- - plotly.graph_objs.layout.Mapbox - """ - return self["mapbox"] - - @mapbox.setter - def mapbox(self, val): - self["mapbox"] = val - - # margin - # ------ - @property - def margin(self): - """ - The 'margin' property is an instance of Margin - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Margin` - - A dict of string/value properties that will be passed - to the Margin constructor - - Supported dict properties: - - autoexpand - Turns on/off margin expansion computations. - Legends, colorbars, updatemenus, sliders, axis - rangeselector and rangeslider are allowed to - push the margins by defaults. - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the - plotting area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). - - Returns - ------- - plotly.graph_objs.layout.Margin - """ - return self["margin"] - - @margin.setter - def margin(self, val): - self["margin"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information that can be used in various - `text` attributes. Attributes such as the graph, axis and - colorbar `title.text`, annotation `text` `trace.name` in legend - items, `rangeselector`, `updatemenus` and `sliders` `label` - text all support `meta`. One can access `meta` fields using - template strings: `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an object for - example `{key: value}` which can be accessed %{meta[key]}. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on Chart Studio Cloud for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # modebar - # ------- - @property - def modebar(self): - """ - The 'modebar' property is an instance of Modebar - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Modebar` - - A dict of string/value properties that will be passed - to the Modebar constructor - - Supported dict properties: - - activecolor - Sets the color of the active or hovered on - icons in the modebar. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - uirevision - Controls persistence of user-driven changes - related to the modebar, including `hovermode`, - `dragmode`, and `showspikes` at both the root - level and inside subplots. Defaults to - `layout.uirevision`. - - Returns - ------- - plotly.graph_objs.layout.Modebar - """ - return self["modebar"] - - @modebar.setter - def modebar(self, val): - self["modebar"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Rotates the entire polar by the given angle in legacy - polar charts. - - The 'orientation' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # paper_bgcolor - # ------------- - @property - def paper_bgcolor(self): - """ - Sets the background color of the paper where the graph is - drawn. - - The 'paper_bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["paper_bgcolor"] - - @paper_bgcolor.setter - def paper_bgcolor(self, val): - self["paper_bgcolor"] = val - - # piecolorway - # ----------- - @property - def piecolorway(self): - """ - Sets the default pie slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendpiecolors`. - - The 'piecolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings - - Returns - ------- - list - """ - return self["piecolorway"] - - @piecolorway.setter - def piecolorway(self, val): - self["piecolorway"] = val - - # plot_bgcolor - # ------------ - @property - def plot_bgcolor(self): - """ - Sets the background color of the plotting area in-between x and - y axes. - - The 'plot_bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["plot_bgcolor"] - - @plot_bgcolor.setter - def plot_bgcolor(self, val): - self["plot_bgcolor"] = val - - # polar - # ----- - @property - def polar(self): - """ - The 'polar' property is an instance of Polar - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Polar` - - A dict of string/value properties that will be passed - to the Polar constructor - - Supported dict properties: - - angularaxis - :class:`plotly.graph_objects.layout.polar.Angul - arAxis` instance or dict with compatible - properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they - represent fractions of the minimum difference - in bar positions in the data. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "overlay", the bars are plotted - over one another, you might need to an - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.polar.Domai - n` instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and - angular axis line are drawn as "circular" - sectors or as "linear" (polygon) sectors. Has - an effect only when the angular axis has `type` - "category". Note that `radialaxis.angle` is - snapped to the angle of the closest vertex when - `gridshape` is "circular" (so that radial axis - scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of - the polar subplot. - radialaxis - :class:`plotly.graph_objects.layout.polar.Radia - lAxis` instance or dict with compatible - properties - sector - Sets angular span of this polar subplot with - two angles (in degrees). Sector are assumed to - be spanned in the counterclockwise direction - with 0 corresponding to rightmost limit of the - polar subplot. - uirevision - Controls persistence of user-driven changes in - axis attributes, if not overridden in the - individual axes. Defaults to - `layout.uirevision`. - - Returns - ------- - plotly.graph_objs.layout.Polar - """ - return self["polar"] - - @polar.setter - def polar(self, val): - self["polar"] = val - - # radialaxis - # ---------- - @property - def radialaxis(self): - """ - The 'radialaxis' property is an instance of RadialAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.RadialAxis` - - A dict of string/value properties that will be passed - to the RadialAxis constructor - - Supported dict properties: - - domain - Polar chart subplots are not supported yet. - This key has currently no effect. - endpadding - Legacy polar charts are deprecated! Please - switch to "polar" subplots. - orientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (an angle with respect to the - origin) of the radial axis. - range - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Defines the start - and end point of this radial axis. - showline - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the line bounding this radial axis will - be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the radial axis ticks will feature tick - labels. - tickcolor - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the color of - the tick lines on this radial axis. - ticklen - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this radial axis. - tickorientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (from the paper perspective) of the - radial axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this radial axis. - visible - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not this axis will be visible. - - Returns - ------- - plotly.graph_objs.layout.RadialAxis - """ - return self["radialaxis"] - - @radialaxis.setter - def radialaxis(self, val): - self["radialaxis"] = val - - # scene - # ----- - @property - def scene(self): - """ - The 'scene' property is an instance of Scene - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Scene` - - A dict of string/value properties that will be passed - to the Scene constructor - - Supported dict properties: - - annotations - A tuple of :class:`plotly.graph_objects.layout. - scene.Annotation` instances or dicts with - compatible properties - annotationdefaults - When used in a template (as layout.template.lay - out.scene.annotationdefaults), sets the default - property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a - cube, regardless of the axes' ranges. If - "data", this scene's axes are drawn in - proportion with the axes' ranges. If "manual", - this scene's axes are drawn in proportion with - the input of "aspectratio" (the default - behavior if "aspectratio" is provided). If - "auto", this scene's axes are drawn using the - results of "data" except when one axis is more - than four times the size of the two others, - where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor - - camera - :class:`plotly.graph_objects.layout.scene.Camer - a` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.scene.Domai - n` instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for - this scene. - hovermode - Determines the mode of hover interactions for - this scene. - uirevision - Controls persistence of user-driven changes in - camera attributes. Defaults to - `layout.uirevision`. - xaxis - :class:`plotly.graph_objects.layout.scene.XAxis - ` instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.scene.YAxis - ` instance or dict with compatible properties - zaxis - :class:`plotly.graph_objects.layout.scene.ZAxis - ` instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.layout.Scene - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # selectdirection - # --------------- - @property - def selectdirection(self): - """ - When "dragmode" is set to "select", this limits the selection - of the drag to horizontal, vertical or diagonal. "h" only - allows horizontal selection, "v" only vertical, "d" only - diagonal and "any" sets no limit. - - The 'selectdirection' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['h', 'v', 'd', 'any'] - - Returns - ------- - Any - """ - return self["selectdirection"] - - @selectdirection.setter - def selectdirection(self, val): - self["selectdirection"] = val - - # selectionrevision - # ----------------- - @property - def selectionrevision(self): - """ - Controls persistence of user-driven changes in selected points - from all traces. - - The 'selectionrevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectionrevision"] - - @selectionrevision.setter - def selectionrevision(self, val): - self["selectionrevision"] = val - - # separators - # ---------- - @property - def separators(self): - """ - Sets the decimal and thousand separators. For example, *. * - puts a '.' before decimals and a space between thousands. In - English locales, dflt is ".," but other locales may alter this - default. - - The 'separators' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["separators"] - - @separators.setter - def separators(self, val): - self["separators"] = val - - # shapes - # ------ - @property - def shapes(self): - """ - The 'shapes' property is a tuple of instances of - Shape that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Shape - - A list or tuple of dicts of string/value properties that - will be passed to the Shape constructor - - Supported dict properties: - - fillcolor - Sets the color filling the shape's interior. - layer - Specifies whether shapes are drawn below or - above traces. - line - :class:`plotly.graph_objects.layout.shape.Line` - instance or dict with compatible properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the - pixel values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and - taken unmodified as pixels relative to - `xanchor` and `yanchor` in case of "pixel" size - mode. There are a few restrictions / quirks - only absolute instructions, not relative. So - the allowed segments are: M, L, H, V, Q, C, T, - S, and Z arcs (A) are not allowed because - radius rx and ry are relative. In the future we - could consider supporting relative commands, - but we would have to decide on how to handle - date and log axes. Note that even as is, Q and - C Bezier paths that are smooth on linear axes - may not be smooth on log, and vice versa. no - chained "polybezier" commands - specify the - segment type for each one. On category axes, - values are numbers scaled to the serial numbers - of categories because using the categories - themselves there would be no way to describe - fractional positions On data axes: because - space and T are both normal components of path - strings, we can't use either to separate date - from time parts. Therefore we'll use underscore - for this purpose: 2015-02-21_13:45:56.789 - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If - "line", a line is drawn from (`x0`,`y0`) to - (`x1`,`y1`) with respect to the axes' sizing - mode. If "circle", a circle is drawn from - ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 - -`y0`)|) with respect to the axes' sizing mode. - If "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), - (`x0`,`y1`), (`x0`,`y0`) with respect to the - axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' - sizing mode. - visible - Determines whether or not this shape is - visible. - x0 - Sets the shape's starting x position. See - `type` and `xsizemode` for more info. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - xanchor - Only relevant in conjunction with `xsizemode` - set to "pixel". Specifies the anchor point on - the x axis to which `x0`, `x1` and x - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `xsizemode` - not set to "pixel". - xref - Sets the shape's x coordinate axis. If set to - an x axis id (e.g. "x" or "x2"), the `x` - position refers to an x coordinate. If set to - "paper", the `x` position refers to the - distance from the left side of the plotting - area in normalized coordinates where 0 (1) - corresponds to the left (right) side. If the - axis `type` is "log", then you must take the - log of your desired range. If the axis `type` - is "date", then you must convert the date to - unix time in milliseconds. - xsizemode - Sets the shapes's sizing mode along the x axis. - If set to "scaled", `x0`, `x1` and x - coordinates within `path` refer to data values - on the x axis or a fraction of the plot area's - width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in - terms of data or plot fraction but `x0`, `x1` - and x coordinates within `path` are pixels - relative to `xanchor`. This way, the shape can - have a fixed width while maintaining a position - relative to data or plot fraction. - y0 - Sets the shape's starting y position. See - `type` and `ysizemode` for more info. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - yanchor - Only relevant in conjunction with `ysizemode` - set to "pixel". Specifies the anchor point on - the y axis to which `y0`, `y1` and y - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `ysizemode` - not set to "pixel". - yref - Sets the annotation's y coordinate axis. If set - to an y axis id (e.g. "y" or "y2"), the `y` - position refers to an y coordinate If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). - ysizemode - Sets the shapes's sizing mode along the y axis. - If set to "scaled", `y0`, `y1` and y - coordinates within `path` refer to data values - on the y axis or a fraction of the plot area's - height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in - terms of data or plot fraction but `y0`, `y1` - and y coordinates within `path` are pixels - relative to `yanchor`. This way, the shape can - have a fixed height while maintaining a - position relative to data or plot fraction. - - Returns - ------- - tuple[plotly.graph_objs.layout.Shape] - """ - return self["shapes"] - - @shapes.setter - def shapes(self, val): - self["shapes"] = val - - # shapedefaults - # ------------- - @property - def shapedefaults(self): - """ - When used in a template (as - layout.template.layout.shapedefaults), sets the default - property values to use for elements of layout.shapes - - The 'shapedefaults' property is an instance of Shape - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Shape` - - A dict of string/value properties that will be passed - to the Shape constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.Shape - """ - return self["shapedefaults"] - - @shapedefaults.setter - def shapedefaults(self, val): - self["shapedefaults"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not a legend is drawn. Default is `true` - if there is a trace to show and any of these: a) Two or more - traces would by default be shown in the legend. b) One pie - trace is shown in the legend. c) One trace is explicitly given - with `showlegend: true`. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # sliders - # ------- - @property - def sliders(self): - """ - The 'sliders' property is a tuple of instances of - Slider that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Slider - - A list or tuple of dicts of string/value properties that - will be passed to the Slider constructor - - Supported dict properties: - - active - Determines which button (by index starting from - 0) is considered active. - activebgcolor - Sets the background color of the slider grip - while dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the - slider. - borderwidth - Sets the width (in px) of the border enclosing - the slider. - currentvalue - :class:`plotly.graph_objects.layout.slider.Curr - entvalue` instance or dict with compatible - properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure - excludes the padding of both ends. That is, the - slider's length is this length minus the - padding on both ends. - lenmode - Determines whether this slider length is set in - units of plot "fraction" or in *pixels. Use - `len` to set the value. - minorticklen - Sets the length in pixels of minor step tick - marks - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Set the padding of the slider component along - each side. - steps - A tuple of :class:`plotly.graph_objects.layout. - slider.Step` instances or dicts with compatible - properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), - sets the default property values to use for - elements of layout.slider.steps - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the - slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - :class:`plotly.graph_objects.layout.slider.Tran - sition` instance or dict with compatible - properties - visible - Determines whether or not the slider is - visible. - x - Sets the x position (in normalized coordinates) - of the slider. - xanchor - Sets the slider's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the slider. - yanchor - Sets the slider's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the range selector. - - Returns - ------- - tuple[plotly.graph_objs.layout.Slider] - """ - return self["sliders"] - - @sliders.setter - def sliders(self, val): - self["sliders"] = val - - # sliderdefaults - # -------------- - @property - def sliderdefaults(self): - """ - When used in a template (as - layout.template.layout.sliderdefaults), sets the default - property values to use for elements of layout.sliders - - The 'sliderdefaults' property is an instance of Slider - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Slider` - - A dict of string/value properties that will be passed - to the Slider constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.Slider - """ - return self["sliderdefaults"] - - @sliderdefaults.setter - def sliderdefaults(self, val): - self["sliderdefaults"] = val - - # spikedistance - # ------------- - @property - def spikedistance(self): - """ - Sets the default distance (in pixels) to look for data to draw - spikelines to (-1 means no cutoff, 0 means no looking for - data). As with hoverdistance, distance does not apply to area- - like objects. In addition, some objects can be hovered on but - will not generate spikelines, such as scatter fills. - - The 'spikedistance' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - Returns - ------- - int - """ - return self["spikedistance"] - - @spikedistance.setter - def spikedistance(self, val): - self["spikedistance"] = val - - # sunburstcolorway - # ---------------- - @property - def sunburstcolorway(self): - """ - Sets the default sunburst slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendsunburstcolors`. - - The 'sunburstcolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings - - Returns - ------- - list - """ - return self["sunburstcolorway"] - - @sunburstcolorway.setter - def sunburstcolorway(self, val): - self["sunburstcolorway"] = val - - # template - # -------- - @property - def template(self): - """ - Default attributes to be applied to the plot. This should be a - dict with format: `{'layout': layoutTemplate, 'data': - {trace_type: [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the structure of - `figure.layout` and `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` (e.g. 'scatter'). - Alternatively, this may be specified as an instance of - plotly.graph_objs.layout.Template. 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 this can be used to add 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`. - - The 'template' property is an instance of Template - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Template` - - A dict of string/value properties that will be passed - to the Template constructor - - Supported dict properties: - - data - :class:`plotly.graph_objects.layout.template.Da - ta` instance or dict with compatible properties - layout - :class:`plotly.graph_objects.Layout` instance - or dict with compatible properties - - - The name of a registered template where current registered templates - are stored in the plotly.io.templates configuration object. The names - of all registered templates can be retrieved with: - >>> import plotly.io as pio - >>> list(pio.templates) # doctest: +ELLIPSIS - ['ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', ...] - - - A string containing multiple registered template names, joined on '+' - characters (e.g. 'template1+template2'). In this case the resulting - template is computed by merging together the collection of registered - templates - - Returns - ------- - plotly.graph_objs.layout.Template - """ - return self["template"] - - @template.setter - def template(self, val): - self["template"] = val - - # ternary - # ------- - @property - def ternary(self): - """ - The 'ternary' property is an instance of Ternary - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Ternary` - - A dict of string/value properties that will be passed - to the Ternary constructor - - Supported dict properties: - - aaxis - :class:`plotly.graph_objects.layout.ternary.Aax - is` instance or dict with compatible properties - baxis - :class:`plotly.graph_objects.layout.ternary.Bax - is` instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - :class:`plotly.graph_objects.layout.ternary.Cax - is` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.ternary.Dom - ain` instance or dict with compatible - properties - sum - The number each triplet should sum to, and the - maximum range of each axis - uirevision - Controls persistence of user-driven changes in - axis `min` and `title`, if not overridden in - the individual axes. Defaults to - `layout.uirevision`. - - Returns - ------- - plotly.graph_objs.layout.Ternary - """ - return self["ternary"] - - @ternary.setter - def ternary(self, val): - self["ternary"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets the title font. Note that the title's font - used to be customized by the now deprecated - `titlefont` attribute. - pad - Sets the padding of the title. Each padding - value only applies when the corresponding - `xanchor`/`yanchor` value is set accordingly. - E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined - automatically. Padding is muted if the - respective anchor value is "middle*/*center". - text - Sets the plot's title. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 - (right). - xanchor - Sets the title's horizontal alignment with - respect to its x position. "left" means that - the title starts at x, "right" means that the - title ends at x and "center" means that the - title's center is at x. "auto" divides `xref` - by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 - (top). "auto" places the baseline of the title - onto the vertical center of the top margin. - yanchor - Sets the title's vertical alignment with - respect to its y position. "top" means that the - title's cap line is at y, "bottom" means that - the title's baseline is at y and "middle" means - that the title's midline is at y. "auto" - divides `yref` by three and calculates the - `yanchor` value automatically based on the - value of `y`. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - - Returns - ------- - plotly.graph_objs.layout.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.title.font instead. Sets the - title font. Note that the title's font used to be customized by - the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # transition - # ---------- - @property - def transition(self): - """ - Sets transition options used during Plotly.react updates. - - The 'transition' property is an instance of Transition - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Transition` - - A dict of string/value properties that will be passed - to the Transition constructor - - Supported dict properties: - - duration - The duration of the transition, in - milliseconds. If equal to zero, updates are - synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or - traces smoothly transitions during updates that - make both traces and layout change. - - Returns - ------- - plotly.graph_objs.layout.Transition - """ - return self["transition"] - - @transition.setter - def transition(self, val): - self["transition"] = val - - # treemapcolorway - # --------------- - @property - def treemapcolorway(self): - """ - Sets the default treemap slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendtreemapcolors`. - - The 'treemapcolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings - - Returns - ------- - list - """ - return self["treemapcolorway"] - - @treemapcolorway.setter - def treemapcolorway(self, val): - self["treemapcolorway"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Used to allow user interactions with the plot to persist after - `Plotly.react` calls that are unaware of these interactions. If - `uirevision` is omitted, or if it is given and it changed from - the previous `Plotly.react` call, the exact new figure is used. - If `uirevision` is truthy and did NOT change, any attribute - that has been affected by user interactions and did not receive - a different value in the new figure will keep the interaction - value. `layout.uirevision` attribute serves as the default for - `uirevision` attributes in various sub-containers. For finer - control you can set these sub-attributes directly. For example, - if your app separately controls the data on the x and y axes - you might set `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y data is changed, - you can update `yaxis.uirevision=*quantity*` and the y axis - range will reset but the x axis range will retain any user- - driven zoom. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # uniformtext - # ----------- - @property - def uniformtext(self): - """ - The 'uniformtext' property is an instance of Uniformtext - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Uniformtext` - - A dict of string/value properties that will be passed - to the Uniformtext constructor - - Supported dict properties: - - minsize - Sets the minimum text size between traces of - the same type. - mode - Determines how the font size for various text - elements are uniformed between each trace type. - If the computed text sizes were smaller than - the minimum size defined by - `uniformtext.minsize` using "hide" option hides - the text; and using "show" option shows the - text without further downscaling. Please note - that if the size defined by `minsize` is - greater than the font size defined by trace, - then the `minsize` is used. - - Returns - ------- - plotly.graph_objs.layout.Uniformtext - """ - return self["uniformtext"] - - @uniformtext.setter - def uniformtext(self, val): - self["uniformtext"] = val - - # updatemenus - # ----------- - @property - def updatemenus(self): - """ - The 'updatemenus' property is a tuple of instances of - Updatemenu that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Updatemenu - - A list or tuple of dicts of string/value properties that - will be passed to the Updatemenu constructor - - Supported dict properties: - - active - Determines which button (by index starting from - 0) is considered active. - bgcolor - Sets the background color of the update menu - buttons. - bordercolor - Sets the color of the border enclosing the - update menu. - borderwidth - Sets the width (in px) of the border enclosing - the update menu. - buttons - A tuple of :class:`plotly.graph_objects.layout. - updatemenu.Button` instances or dicts with - compatible properties - buttondefaults - When used in a template (as layout.template.lay - out.updatemenu.buttondefaults), sets the - default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons - are laid out, whether in a dropdown menu or a - row/column of buttons. For `left` and `up`, the - buttons will still appear in left-to-right or - top-to-bottom order respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Sets the padding around the buttons or dropdown - menu. - showactive - Highlights active dropdown item or active - button if true. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible - via a dropdown menu or whether the buttons are - stacked horizontally or vertically - visible - Determines whether or not the update menu is - visible. - x - Sets the x position (in normalized coordinates) - of the update menu. - xanchor - Sets the update menu's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the update menu. - yanchor - Sets the update menu's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the range - selector. - - Returns - ------- - tuple[plotly.graph_objs.layout.Updatemenu] - """ - return self["updatemenus"] - - @updatemenus.setter - def updatemenus(self, val): - self["updatemenus"] = val - - # updatemenudefaults - # ------------------ - @property - def updatemenudefaults(self): - """ - When used in a template (as - layout.template.layout.updatemenudefaults), sets the default - property values to use for elements of layout.updatemenus - - The 'updatemenudefaults' property is an instance of Updatemenu - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.Updatemenu` - - A dict of string/value properties that will be passed - to the Updatemenu constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.Updatemenu - """ - return self["updatemenudefaults"] - - @updatemenudefaults.setter - def updatemenudefaults(self, val): - self["updatemenudefaults"] = val - - # violingap - # --------- - @property - def violingap(self): - """ - Sets the gap (in plot fraction) between violins of adjacent - location coordinates. Has no effect on traces that have "width" - set. - - The 'violingap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["violingap"] - - @violingap.setter - def violingap(self, val): - self["violingap"] = val - - # violingroupgap - # -------------- - @property - def violingroupgap(self): - """ - Sets the gap (in plot fraction) between violins of the same - location coordinate. Has no effect on traces that have "width" - set. - - The 'violingroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["violingroupgap"] - - @violingroupgap.setter - def violingroupgap(self, val): - self["violingroupgap"] = val - - # violinmode - # ---------- - @property - def violinmode(self): - """ - Determines how violins at the same location coordinate are - displayed on the graph. If "group", the violins are plotted - next to one another centered around the shared location. If - "overlay", the violins are plotted over one another, you might - need to set "opacity" to see them multiple violins. Has no - effect on traces that have "width" set. - - The 'violinmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['group', 'overlay'] - - Returns - ------- - Any - """ - return self["violinmode"] - - @violinmode.setter - def violinmode(self, val): - self["violinmode"] = val - - # waterfallgap - # ------------ - @property - def waterfallgap(self): - """ - Sets the gap (in plot fraction) between bars of adjacent - location coordinates. - - The 'waterfallgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["waterfallgap"] - - @waterfallgap.setter - def waterfallgap(self, val): - self["waterfallgap"] = val - - # waterfallgroupgap - # ----------------- - @property - def waterfallgroupgap(self): - """ - Sets the gap (in plot fraction) between bars of the same - location coordinate. - - The 'waterfallgroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["waterfallgroupgap"] - - @waterfallgroupgap.setter - def waterfallgroupgap(self, val): - self["waterfallgroupgap"] = val - - # waterfallmode - # ------------- - @property - def waterfallmode(self): - """ - Determines how bars at the same location coordinate are - displayed on the graph. With "group", the bars are plotted next - to one another centered around the shared location. With - "overlay", the bars are plotted over one another, you might - need to an "opacity" to see multiple bars. - - The 'waterfallmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['group', 'overlay'] - - Returns - ------- - Any - """ - return self["waterfallmode"] - - @waterfallmode.setter - def waterfallmode(self, val): - self["waterfallmode"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the plot's width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [10, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - The 'xaxis' property is an instance of XAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.XAxis` - - A dict of string/value properties that will be passed - to the XAxis constructor - - Supported dict properties: - - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range" (default), - or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.xaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.xaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - rangeselector - :class:`plotly.graph_objects.layout.xaxis.Range - selector` instance or dict with compatible - properties - rangeslider - :class:`plotly.graph_objects.layout.xaxis.Range - slider` instance or dict with compatible - properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.xaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.xaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.xaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be customized by the - now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - plotly.graph_objs.layout.XAxis - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - The 'yaxis' property is an instance of YAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.YAxis` - - A dict of string/value properties that will be passed - to the YAxis constructor - - Supported dict properties: - - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range" (default), - or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.yaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.yaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.yaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.yaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.yaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be customized by the - now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - plotly.graph_objs.layout.YAxis - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - angularaxis - :class:`plotly.graph_objects.layout.AngularAxis` - instance or dict with compatible properties - annotations - A tuple of - :class:`plotly.graph_objects.layout.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), sets the - default property values to use for elements of - layout.annotations - autosize - Determines whether or not a layout width or height that - has been left undefined by the user is initialized on - each relayout. Note that, regardless of this attribute, - an undefined layout width or height is always - initialized on the first call to plot. - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - barmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "relative", the bars - are stacked on top of one another, with negative values - below the axis, positive values above With "group", the - bars are plotted next to one another centered around - the shared location. With "overlay", the bars are - plotted over one another, you might need to an - "opacity" to see multiple bars. - barnorm - Sets the normalization for bar traces on the graph. - With "fraction", the value of each bar is divided by - the sum of all values at that location coordinate. - "percent" is the same but multiplied by 100 to show - percentages. - boxgap - Sets the gap (in plot fraction) between boxes of - adjacent location coordinates. Has no effect on traces - that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes of the - same location coordinate. Has no effect on traces that - have "width" set. - boxmode - Determines how boxes at the same location coordinate - are displayed on the graph. If "group", the boxes are - plotted next to one another centered around the shared - location. If "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see them - multiple boxes. Has no effect on traces that have - "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout the plot. - clickmode - Determines the mode of single click interactions. - "event" is the default value and emits the - `plotly_click` event. In addition this mode emits the - `plotly_selected` event in drag modes "lasso" and - "select", but with no event data attached (kept for - compatibility reasons). The "select" flag enables - selecting single data points via click. This mode also - supports persistent selections, meaning that pressing - Shift while clicking, adds to / subtracts from an - existing selection. "select" with `hovermode`: "x" can - be confusing, consider explicitly setting `hovermode`: - "closest" when using this feature. Selection events are - sent accordingly as long as "event" flag is set as - well. When the "event" flag is missing, `plotly_click` - and `plotly_selected` events are not fired. - coloraxis - :class:`plotly.graph_objects.layout.Coloraxis` instance - or dict with compatible properties - colorscale - :class:`plotly.graph_objects.layout.Colorscale` - instance or dict with compatible properties - colorway - Sets the default trace colors. - datarevision - If provided, a changed value tells `Plotly.react` that - one or more data arrays has changed. This way you can - modify arrays in-place rather than making a complete - new copy for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are being - treated as immutable, thus any data array with a - different identity from its predecessor contains new - data. - direction - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the direction corresponding to - positive angles in legacy polar charts. - dragmode - Determines the mode of drag interactions. "select" and - "lasso" apply only to scatter traces with markers or - text. "orbit" and "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than trace names - and axis titles. Defaults to `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether given - by `funnelareacolorway` or inherited from `colorway`) - will be extended to three times its original length by - first repeating every color 20% lighter then each color - 20% darker. This is intended to reduce the likelihood - of reusing the same color when you have many slices, - but you can set `false` to disable. Colors provided in - the trace, using `marker.colors`, are never extended. - extendpiecolors - If `true`, the pie slice colors (whether given by - `piecolorway` or inherited from `colorway`) will be - extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether given by - `sunburstcolorway` or inherited from `colorway`) will - be extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - extendtreemapcolors - If `true`, the treemap slice colors (whether given by - `treemapcolorway` or inherited from `colorway`) will be - extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - font - Sets the global font. Note that fonts used in traces - and other layout components inherit from the global - font. - funnelareacolorway - Sets the default funnelarea slice colors. Defaults to - the main `colorway` used for trace colors. If you - specify a new list here it can still be extended with - lighter and darker colors, see - `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - funnelmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "group", the bars - are plotted next to one another centered around the - shared location. With "overlay", the bars are plotted - over one another, you might need to an "opacity" to see - multiple bars. - geo - :class:`plotly.graph_objects.layout.Geo` instance or - dict with compatible properties - grid - :class:`plotly.graph_objects.layout.Grid` instance or - dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart analog of - visible:'legendonly' but it can contain many labels, - and can simultaneously hide slices from several - pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on Chart Studio Cloud for - hiddenlabels . - hidesources - Determines whether or not a text link citing the data - source is placed at the bottom-right cored of the - figure. Has only an effect only on graphs that have - been generated via forked graphs from the Chart Studio - Cloud (at https://chart-studio.plotly.com or on- - premise). - hoverdistance - Sets the default distance (in pixels) to look for data - to add hover labels (-1 means no cutoff, 0 means no - looking for data). This is only a real distance for - hovering on point-like objects, like scatter points. - For area-like objects (bars, scatter fills, etc) - hovering is on inside the area and off outside, but - these objects will not supersede hover on point-like - objects in case of conflict. - hoverlabel - :class:`plotly.graph_objects.layout.Hoverlabel` - instance or dict with compatible properties - hovermode - Determines the mode of hover interactions. If - "closest", a single hoverlabel will appear for the - "closest" point within the `hoverdistance`. If "x" (or - "y"), multiple hoverlabels will appear for multiple - points at the "closest" x- (or y-) coordinate within - the `hoverdistance`, with the caveat that no more than - one hoverlabel will appear per trace. If *x unified* - (or *y unified*), a single hoverlabel will appear - multiple points at the closest x- (or y-) coordinate - within the `hoverdistance` with the caveat that no more - than one hoverlabel will appear per trace. In this - mode, spikelines are enabled by default perpendicular - to the specified axis. If false, hover interactions are - disabled. If `clickmode` includes the "select" flag, - `hovermode` defaults to "closest". If `clickmode` lacks - the "select" flag, it defaults to "x" or "y" (depending - on the trace's `orientation` value) for plots based on - cartesian coordinates. For anything else the default - value is "closest". - images - A tuple of :class:`plotly.graph_objects.layout.Image` - instances or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the default - property values to use for elements of layout.images - legend - :class:`plotly.graph_objects.layout.Legend` instance or - dict with compatible properties - mapbox - :class:`plotly.graph_objects.layout.Mapbox` instance or - dict with compatible properties - margin - :class:`plotly.graph_objects.layout.Margin` instance or - dict with compatible properties - meta - Assigns extra meta information that can be used in - various `text` attributes. Attributes such as the - graph, axis and colorbar `title.text`, annotation - `text` `trace.name` in legend items, `rangeselector`, - `updatemenus` and `sliders` `label` text all support - `meta`. One can access `meta` fields using template - strings: `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an object - for example `{key: value}` which can be accessed - %{meta[key]}. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - modebar - :class:`plotly.graph_objects.layout.Modebar` instance - or dict with compatible properties - orientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Rotates the entire polar by the given - angle in legacy polar charts. - paper_bgcolor - Sets the background color of the paper where the graph - is drawn. - piecolorway - Sets the default pie slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new - list here it can still be extended with lighter and - darker colors, see `extendpiecolors`. - plot_bgcolor - Sets the background color of the plotting area in- - between x and y axes. - polar - :class:`plotly.graph_objects.layout.Polar` instance or - dict with compatible properties - radialaxis - :class:`plotly.graph_objects.layout.RadialAxis` - instance or dict with compatible properties - scene - :class:`plotly.graph_objects.layout.Scene` instance or - dict with compatible properties - selectdirection - When "dragmode" is set to "select", this limits the - selection of the drag to horizontal, vertical or - diagonal. "h" only allows horizontal selection, "v" - only vertical, "d" only diagonal and "any" sets no - limit. - selectionrevision - Controls persistence of user-driven changes in selected - points from all traces. - separators - Sets the decimal and thousand separators. For example, - *. * puts a '.' before decimals and a space between - thousands. In English locales, dflt is ".," but other - locales may alter this default. - shapes - A tuple of :class:`plotly.graph_objects.layout.Shape` - instances or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the default - property values to use for elements of layout.shapes - showlegend - Determines whether or not a legend is drawn. Default is - `true` if there is a trace to show and any of these: a) - Two or more traces would by default be shown in the - legend. b) One pie trace is shown in the legend. c) One - trace is explicitly given with `showlegend: true`. - sliders - A tuple of :class:`plotly.graph_objects.layout.Slider` - instances or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets the - default property values to use for elements of - layout.sliders - spikedistance - Sets the default distance (in pixels) to look for data - to draw spikelines to (-1 means no cutoff, 0 means no - looking for data). As with hoverdistance, distance does - not apply to area-like objects. In addition, some - objects can be hovered on but will not generate - spikelines, such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. Defaults to the - main `colorway` used for trace colors. If you specify a - new list here it can still be extended with lighter and - darker colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. This - should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: [traceTemplate, - ...], ...}}` where `layoutTemplate` is a dict matching - the structure of `figure.layout` and `traceTemplate` is - a dict matching the structure of the trace with type - `trace_type` (e.g. 'scatter'). Alternatively, this may - be specified as an instance of - plotly.graph_objs.layout.Template. 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 this can be - used to add 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`. - ternary - :class:`plotly.graph_objects.layout.Ternary` instance - or dict with compatible properties - title - :class:`plotly.graph_objects.layout.Title` instance or - dict with compatible properties - titlefont - Deprecated: Please use layout.title.font instead. Sets - the title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - transition - Sets transition options used during Plotly.react - updates. - treemapcolorway - Sets the default treemap slice colors. Defaults to the - main `colorway` used for trace colors. If you specify a - new list here it can still be extended with lighter and - darker colors, see `extendtreemapcolors`. - uirevision - Used to allow user interactions with the plot to - persist after `Plotly.react` calls that are unaware of - these interactions. If `uirevision` is omitted, or if - it is given and it changed from the previous - `Plotly.react` call, the exact new figure is used. If - `uirevision` is truthy and did NOT change, any - attribute that has been affected by user interactions - and did not receive a different value in the new figure - will keep the interaction value. `layout.uirevision` - attribute serves as the default for `uirevision` - attributes in various sub-containers. For finer control - you can set these sub-attributes directly. For example, - if your app separately controls the data on the x and y - axes you might set `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y data is - changed, you can update `yaxis.uirevision=*quantity*` - and the y axis range will reset but the x axis range - will retain any user-driven zoom. - uniformtext - :class:`plotly.graph_objects.layout.Uniformtext` - instance or dict with compatible properties - updatemenus - A tuple of - :class:`plotly.graph_objects.layout.Updatemenu` - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), sets the - default property values to use for elements of - layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins of - adjacent location coordinates. Has no effect on traces - that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins of the - same location coordinate. Has no effect on traces that - have "width" set. - violinmode - Determines how violins at the same location coordinate - are displayed on the graph. If "group", the violins are - plotted next to one another centered around the shared - location. If "overlay", the violins are plotted over - one another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces that - have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - waterfallmode - Determines how bars at the same location coordinate are - displayed on the graph. With "group", the bars are - plotted next to one another centered around the shared - location. With "overlay", the bars are plotted over one - another, you might need to an "opacity" to see multiple - bars. - width - Sets the plot's width (in px). - xaxis - :class:`plotly.graph_objects.layout.XAxis` instance or - dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.YAxis` instance or - dict with compatible properties - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - angularaxis=None, - annotations=None, - annotationdefaults=None, - autosize=None, - bargap=None, - bargroupgap=None, - barmode=None, - barnorm=None, - boxgap=None, - boxgroupgap=None, - boxmode=None, - calendar=None, - clickmode=None, - coloraxis=None, - colorscale=None, - colorway=None, - datarevision=None, - direction=None, - dragmode=None, - editrevision=None, - extendfunnelareacolors=None, - extendpiecolors=None, - extendsunburstcolors=None, - extendtreemapcolors=None, - font=None, - funnelareacolorway=None, - funnelgap=None, - funnelgroupgap=None, - funnelmode=None, - geo=None, - grid=None, - height=None, - hiddenlabels=None, - hiddenlabelssrc=None, - hidesources=None, - hoverdistance=None, - hoverlabel=None, - hovermode=None, - images=None, - imagedefaults=None, - legend=None, - mapbox=None, - margin=None, - meta=None, - metasrc=None, - modebar=None, - orientation=None, - paper_bgcolor=None, - piecolorway=None, - plot_bgcolor=None, - polar=None, - radialaxis=None, - scene=None, - selectdirection=None, - selectionrevision=None, - separators=None, - shapes=None, - shapedefaults=None, - showlegend=None, - sliders=None, - sliderdefaults=None, - spikedistance=None, - sunburstcolorway=None, - template=None, - ternary=None, - title=None, - titlefont=None, - transition=None, - treemapcolorway=None, - uirevision=None, - uniformtext=None, - updatemenus=None, - updatemenudefaults=None, - violingap=None, - violingroupgap=None, - violinmode=None, - waterfallgap=None, - waterfallgroupgap=None, - waterfallmode=None, - width=None, - xaxis=None, - yaxis=None, - **kwargs - ): - """ - Construct a new Layout object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Layout` - angularaxis - :class:`plotly.graph_objects.layout.AngularAxis` - instance or dict with compatible properties - annotations - A tuple of - :class:`plotly.graph_objects.layout.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), sets the - default property values to use for elements of - layout.annotations - autosize - Determines whether or not a layout width or height that - has been left undefined by the user is initialized on - each relayout. Note that, regardless of this attribute, - an undefined layout width or height is always - initialized on the first call to plot. - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - barmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "relative", the bars - are stacked on top of one another, with negative values - below the axis, positive values above With "group", the - bars are plotted next to one another centered around - the shared location. With "overlay", the bars are - plotted over one another, you might need to an - "opacity" to see multiple bars. - barnorm - Sets the normalization for bar traces on the graph. - With "fraction", the value of each bar is divided by - the sum of all values at that location coordinate. - "percent" is the same but multiplied by 100 to show - percentages. - boxgap - Sets the gap (in plot fraction) between boxes of - adjacent location coordinates. Has no effect on traces - that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes of the - same location coordinate. Has no effect on traces that - have "width" set. - boxmode - Determines how boxes at the same location coordinate - are displayed on the graph. If "group", the boxes are - plotted next to one another centered around the shared - location. If "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see them - multiple boxes. Has no effect on traces that have - "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout the plot. - clickmode - Determines the mode of single click interactions. - "event" is the default value and emits the - `plotly_click` event. In addition this mode emits the - `plotly_selected` event in drag modes "lasso" and - "select", but with no event data attached (kept for - compatibility reasons). The "select" flag enables - selecting single data points via click. This mode also - supports persistent selections, meaning that pressing - Shift while clicking, adds to / subtracts from an - existing selection. "select" with `hovermode`: "x" can - be confusing, consider explicitly setting `hovermode`: - "closest" when using this feature. Selection events are - sent accordingly as long as "event" flag is set as - well. When the "event" flag is missing, `plotly_click` - and `plotly_selected` events are not fired. - coloraxis - :class:`plotly.graph_objects.layout.Coloraxis` instance - or dict with compatible properties - colorscale - :class:`plotly.graph_objects.layout.Colorscale` - instance or dict with compatible properties - colorway - Sets the default trace colors. - datarevision - If provided, a changed value tells `Plotly.react` that - one or more data arrays has changed. This way you can - modify arrays in-place rather than making a complete - new copy for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are being - treated as immutable, thus any data array with a - different identity from its predecessor contains new - data. - direction - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the direction corresponding to - positive angles in legacy polar charts. - dragmode - Determines the mode of drag interactions. "select" and - "lasso" apply only to scatter traces with markers or - text. "orbit" and "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than trace names - and axis titles. Defaults to `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether given - by `funnelareacolorway` or inherited from `colorway`) - will be extended to three times its original length by - first repeating every color 20% lighter then each color - 20% darker. This is intended to reduce the likelihood - of reusing the same color when you have many slices, - but you can set `false` to disable. Colors provided in - the trace, using `marker.colors`, are never extended. - extendpiecolors - If `true`, the pie slice colors (whether given by - `piecolorway` or inherited from `colorway`) will be - extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether given by - `sunburstcolorway` or inherited from `colorway`) will - be extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - extendtreemapcolors - If `true`, the treemap slice colors (whether given by - `treemapcolorway` or inherited from `colorway`) will be - extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - font - Sets the global font. Note that fonts used in traces - and other layout components inherit from the global - font. - funnelareacolorway - Sets the default funnelarea slice colors. Defaults to - the main `colorway` used for trace colors. If you - specify a new list here it can still be extended with - lighter and darker colors, see - `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - funnelmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "group", the bars - are plotted next to one another centered around the - shared location. With "overlay", the bars are plotted - over one another, you might need to an "opacity" to see - multiple bars. - geo - :class:`plotly.graph_objects.layout.Geo` instance or - dict with compatible properties - grid - :class:`plotly.graph_objects.layout.Grid` instance or - dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart analog of - visible:'legendonly' but it can contain many labels, - and can simultaneously hide slices from several - pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on Chart Studio Cloud for - hiddenlabels . - hidesources - Determines whether or not a text link citing the data - source is placed at the bottom-right cored of the - figure. Has only an effect only on graphs that have - been generated via forked graphs from the Chart Studio - Cloud (at https://chart-studio.plotly.com or on- - premise). - hoverdistance - Sets the default distance (in pixels) to look for data - to add hover labels (-1 means no cutoff, 0 means no - looking for data). This is only a real distance for - hovering on point-like objects, like scatter points. - For area-like objects (bars, scatter fills, etc) - hovering is on inside the area and off outside, but - these objects will not supersede hover on point-like - objects in case of conflict. - hoverlabel - :class:`plotly.graph_objects.layout.Hoverlabel` - instance or dict with compatible properties - hovermode - Determines the mode of hover interactions. If - "closest", a single hoverlabel will appear for the - "closest" point within the `hoverdistance`. If "x" (or - "y"), multiple hoverlabels will appear for multiple - points at the "closest" x- (or y-) coordinate within - the `hoverdistance`, with the caveat that no more than - one hoverlabel will appear per trace. If *x unified* - (or *y unified*), a single hoverlabel will appear - multiple points at the closest x- (or y-) coordinate - within the `hoverdistance` with the caveat that no more - than one hoverlabel will appear per trace. In this - mode, spikelines are enabled by default perpendicular - to the specified axis. If false, hover interactions are - disabled. If `clickmode` includes the "select" flag, - `hovermode` defaults to "closest". If `clickmode` lacks - the "select" flag, it defaults to "x" or "y" (depending - on the trace's `orientation` value) for plots based on - cartesian coordinates. For anything else the default - value is "closest". - images - A tuple of :class:`plotly.graph_objects.layout.Image` - instances or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the default - property values to use for elements of layout.images - legend - :class:`plotly.graph_objects.layout.Legend` instance or - dict with compatible properties - mapbox - :class:`plotly.graph_objects.layout.Mapbox` instance or - dict with compatible properties - margin - :class:`plotly.graph_objects.layout.Margin` instance or - dict with compatible properties - meta - Assigns extra meta information that can be used in - various `text` attributes. Attributes such as the - graph, axis and colorbar `title.text`, annotation - `text` `trace.name` in legend items, `rangeselector`, - `updatemenus` and `sliders` `label` text all support - `meta`. One can access `meta` fields using template - strings: `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an object - for example `{key: value}` which can be accessed - %{meta[key]}. - metasrc - Sets the source reference on Chart Studio Cloud for - meta . - modebar - :class:`plotly.graph_objects.layout.Modebar` instance - or dict with compatible properties - orientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Rotates the entire polar by the given - angle in legacy polar charts. - paper_bgcolor - Sets the background color of the paper where the graph - is drawn. - piecolorway - Sets the default pie slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new - list here it can still be extended with lighter and - darker colors, see `extendpiecolors`. - plot_bgcolor - Sets the background color of the plotting area in- - between x and y axes. - polar - :class:`plotly.graph_objects.layout.Polar` instance or - dict with compatible properties - radialaxis - :class:`plotly.graph_objects.layout.RadialAxis` - instance or dict with compatible properties - scene - :class:`plotly.graph_objects.layout.Scene` instance or - dict with compatible properties - selectdirection - When "dragmode" is set to "select", this limits the - selection of the drag to horizontal, vertical or - diagonal. "h" only allows horizontal selection, "v" - only vertical, "d" only diagonal and "any" sets no - limit. - selectionrevision - Controls persistence of user-driven changes in selected - points from all traces. - separators - Sets the decimal and thousand separators. For example, - *. * puts a '.' before decimals and a space between - thousands. In English locales, dflt is ".," but other - locales may alter this default. - shapes - A tuple of :class:`plotly.graph_objects.layout.Shape` - instances or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the default - property values to use for elements of layout.shapes - showlegend - Determines whether or not a legend is drawn. Default is - `true` if there is a trace to show and any of these: a) - Two or more traces would by default be shown in the - legend. b) One pie trace is shown in the legend. c) One - trace is explicitly given with `showlegend: true`. - sliders - A tuple of :class:`plotly.graph_objects.layout.Slider` - instances or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets the - default property values to use for elements of - layout.sliders - spikedistance - Sets the default distance (in pixels) to look for data - to draw spikelines to (-1 means no cutoff, 0 means no - looking for data). As with hoverdistance, distance does - not apply to area-like objects. In addition, some - objects can be hovered on but will not generate - spikelines, such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. Defaults to the - main `colorway` used for trace colors. If you specify a - new list here it can still be extended with lighter and - darker colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. This - should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: [traceTemplate, - ...], ...}}` where `layoutTemplate` is a dict matching - the structure of `figure.layout` and `traceTemplate` is - a dict matching the structure of the trace with type - `trace_type` (e.g. 'scatter'). Alternatively, this may - be specified as an instance of - plotly.graph_objs.layout.Template. 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 this can be - used to add 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`. - ternary - :class:`plotly.graph_objects.layout.Ternary` instance - or dict with compatible properties - title - :class:`plotly.graph_objects.layout.Title` instance or - dict with compatible properties - titlefont - Deprecated: Please use layout.title.font instead. Sets - the title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - transition - Sets transition options used during Plotly.react - updates. - treemapcolorway - Sets the default treemap slice colors. Defaults to the - main `colorway` used for trace colors. If you specify a - new list here it can still be extended with lighter and - darker colors, see `extendtreemapcolors`. - uirevision - Used to allow user interactions with the plot to - persist after `Plotly.react` calls that are unaware of - these interactions. If `uirevision` is omitted, or if - it is given and it changed from the previous - `Plotly.react` call, the exact new figure is used. If - `uirevision` is truthy and did NOT change, any - attribute that has been affected by user interactions - and did not receive a different value in the new figure - will keep the interaction value. `layout.uirevision` - attribute serves as the default for `uirevision` - attributes in various sub-containers. For finer control - you can set these sub-attributes directly. For example, - if your app separately controls the data on the x and y - axes you might set `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y data is - changed, you can update `yaxis.uirevision=*quantity*` - and the y axis range will reset but the x axis range - will retain any user-driven zoom. - uniformtext - :class:`plotly.graph_objects.layout.Uniformtext` - instance or dict with compatible properties - updatemenus - A tuple of - :class:`plotly.graph_objects.layout.Updatemenu` - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), sets the - default property values to use for elements of - layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins of - adjacent location coordinates. Has no effect on traces - that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins of the - same location coordinate. Has no effect on traces that - have "width" set. - violinmode - Determines how violins at the same location coordinate - are displayed on the graph. If "group", the violins are - plotted next to one another centered around the shared - location. If "overlay", the violins are plotted over - one another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces that - have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - waterfallmode - Determines how bars at the same location coordinate are - displayed on the graph. With "group", the bars are - plotted next to one another centered around the shared - location. With "overlay", the bars are plotted over one - another, you might need to an "opacity" to see multiple - bars. - width - Sets the plot's width (in px). - xaxis - :class:`plotly.graph_objects.layout.XAxis` instance or - dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.YAxis` instance or - dict with compatible properties - - Returns - ------- - Layout - """ - super(Layout, self).__init__("layout") - - # Validate arg - # ------------ - 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 -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Layout`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import layout as v_layout - - # Initialize validators - # --------------------- - self._validators["angularaxis"] = v_layout.AngularAxisValidator() - self._validators["annotations"] = v_layout.AnnotationsValidator() - self._validators["annotationdefaults"] = v_layout.AnnotationValidator() - self._validators["autosize"] = v_layout.AutosizeValidator() - self._validators["bargap"] = v_layout.BargapValidator() - self._validators["bargroupgap"] = v_layout.BargroupgapValidator() - self._validators["barmode"] = v_layout.BarmodeValidator() - self._validators["barnorm"] = v_layout.BarnormValidator() - self._validators["boxgap"] = v_layout.BoxgapValidator() - self._validators["boxgroupgap"] = v_layout.BoxgroupgapValidator() - self._validators["boxmode"] = v_layout.BoxmodeValidator() - self._validators["calendar"] = v_layout.CalendarValidator() - self._validators["clickmode"] = v_layout.ClickmodeValidator() - self._validators["coloraxis"] = v_layout.ColoraxisValidator() - self._validators["colorscale"] = v_layout.ColorscaleValidator() - self._validators["colorway"] = v_layout.ColorwayValidator() - self._validators["datarevision"] = v_layout.DatarevisionValidator() - self._validators["direction"] = v_layout.DirectionValidator() - self._validators["dragmode"] = v_layout.DragmodeValidator() - self._validators["editrevision"] = v_layout.EditrevisionValidator() - self._validators[ - "extendfunnelareacolors" - ] = v_layout.ExtendfunnelareacolorsValidator() - self._validators["extendpiecolors"] = v_layout.ExtendpiecolorsValidator() - self._validators[ - "extendsunburstcolors" - ] = v_layout.ExtendsunburstcolorsValidator() - self._validators[ - "extendtreemapcolors" - ] = v_layout.ExtendtreemapcolorsValidator() - self._validators["font"] = v_layout.FontValidator() - self._validators["funnelareacolorway"] = v_layout.FunnelareacolorwayValidator() - self._validators["funnelgap"] = v_layout.FunnelgapValidator() - self._validators["funnelgroupgap"] = v_layout.FunnelgroupgapValidator() - self._validators["funnelmode"] = v_layout.FunnelmodeValidator() - self._validators["geo"] = v_layout.GeoValidator() - self._validators["grid"] = v_layout.GridValidator() - self._validators["height"] = v_layout.HeightValidator() - self._validators["hiddenlabels"] = v_layout.HiddenlabelsValidator() - self._validators["hiddenlabelssrc"] = v_layout.HiddenlabelssrcValidator() - self._validators["hidesources"] = v_layout.HidesourcesValidator() - self._validators["hoverdistance"] = v_layout.HoverdistanceValidator() - self._validators["hoverlabel"] = v_layout.HoverlabelValidator() - self._validators["hovermode"] = v_layout.HovermodeValidator() - self._validators["images"] = v_layout.ImagesValidator() - self._validators["imagedefaults"] = v_layout.ImageValidator() - self._validators["legend"] = v_layout.LegendValidator() - self._validators["mapbox"] = v_layout.MapboxValidator() - self._validators["margin"] = v_layout.MarginValidator() - self._validators["meta"] = v_layout.MetaValidator() - self._validators["metasrc"] = v_layout.MetasrcValidator() - self._validators["modebar"] = v_layout.ModebarValidator() - self._validators["orientation"] = v_layout.OrientationValidator() - self._validators["paper_bgcolor"] = v_layout.PaperBgcolorValidator() - self._validators["piecolorway"] = v_layout.PiecolorwayValidator() - self._validators["plot_bgcolor"] = v_layout.PlotBgcolorValidator() - self._validators["polar"] = v_layout.PolarValidator() - self._validators["radialaxis"] = v_layout.RadialAxisValidator() - self._validators["scene"] = v_layout.SceneValidator() - self._validators["selectdirection"] = v_layout.SelectdirectionValidator() - self._validators["selectionrevision"] = v_layout.SelectionrevisionValidator() - self._validators["separators"] = v_layout.SeparatorsValidator() - self._validators["shapes"] = v_layout.ShapesValidator() - self._validators["shapedefaults"] = v_layout.ShapeValidator() - self._validators["showlegend"] = v_layout.ShowlegendValidator() - self._validators["sliders"] = v_layout.SlidersValidator() - self._validators["sliderdefaults"] = v_layout.SliderValidator() - self._validators["spikedistance"] = v_layout.SpikedistanceValidator() - self._validators["sunburstcolorway"] = v_layout.SunburstcolorwayValidator() - self._validators["template"] = v_layout.TemplateValidator() - self._validators["ternary"] = v_layout.TernaryValidator() - self._validators["title"] = v_layout.TitleValidator() - self._validators["transition"] = v_layout.TransitionValidator() - self._validators["treemapcolorway"] = v_layout.TreemapcolorwayValidator() - self._validators["uirevision"] = v_layout.UirevisionValidator() - self._validators["uniformtext"] = v_layout.UniformtextValidator() - self._validators["updatemenus"] = v_layout.UpdatemenusValidator() - self._validators["updatemenudefaults"] = v_layout.UpdatemenuValidator() - self._validators["violingap"] = v_layout.ViolingapValidator() - self._validators["violingroupgap"] = v_layout.ViolingroupgapValidator() - self._validators["violinmode"] = v_layout.ViolinmodeValidator() - self._validators["waterfallgap"] = v_layout.WaterfallgapValidator() - self._validators["waterfallgroupgap"] = v_layout.WaterfallgroupgapValidator() - self._validators["waterfallmode"] = v_layout.WaterfallmodeValidator() - self._validators["width"] = v_layout.WidthValidator() - self._validators["xaxis"] = v_layout.XAxisValidator() - self._validators["yaxis"] = v_layout.YAxisValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angularaxis", None) - self["angularaxis"] = angularaxis if angularaxis is not None else _v - _v = arg.pop("annotations", None) - self["annotations"] = annotations if annotations is not None else _v - _v = arg.pop("annotationdefaults", None) - self["annotationdefaults"] = ( - annotationdefaults if annotationdefaults is not None else _v - ) - _v = arg.pop("autosize", None) - self["autosize"] = autosize if autosize is not None else _v - _v = arg.pop("bargap", None) - self["bargap"] = bargap if bargap is not None else _v - _v = arg.pop("bargroupgap", None) - self["bargroupgap"] = bargroupgap if bargroupgap is not None else _v - _v = arg.pop("barmode", None) - self["barmode"] = barmode if barmode is not None else _v - _v = arg.pop("barnorm", None) - self["barnorm"] = barnorm if barnorm is not None else _v - _v = arg.pop("boxgap", None) - self["boxgap"] = boxgap if boxgap is not None else _v - _v = arg.pop("boxgroupgap", None) - self["boxgroupgap"] = boxgroupgap if boxgroupgap is not None else _v - _v = arg.pop("boxmode", None) - self["boxmode"] = boxmode if boxmode is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("clickmode", None) - self["clickmode"] = clickmode if clickmode is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorway", None) - self["colorway"] = colorway if colorway is not None else _v - _v = arg.pop("datarevision", None) - self["datarevision"] = datarevision if datarevision is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("dragmode", None) - self["dragmode"] = dragmode if dragmode is not None else _v - _v = arg.pop("editrevision", None) - self["editrevision"] = editrevision if editrevision is not None else _v - _v = arg.pop("extendfunnelareacolors", None) - self["extendfunnelareacolors"] = ( - extendfunnelareacolors if extendfunnelareacolors is not None else _v - ) - _v = arg.pop("extendpiecolors", None) - self["extendpiecolors"] = extendpiecolors if extendpiecolors is not None else _v - _v = arg.pop("extendsunburstcolors", None) - self["extendsunburstcolors"] = ( - extendsunburstcolors if extendsunburstcolors is not None else _v - ) - _v = arg.pop("extendtreemapcolors", None) - self["extendtreemapcolors"] = ( - extendtreemapcolors if extendtreemapcolors is not None else _v - ) - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("funnelareacolorway", None) - self["funnelareacolorway"] = ( - funnelareacolorway if funnelareacolorway is not None else _v - ) - _v = arg.pop("funnelgap", None) - self["funnelgap"] = funnelgap if funnelgap is not None else _v - _v = arg.pop("funnelgroupgap", None) - self["funnelgroupgap"] = funnelgroupgap if funnelgroupgap is not None else _v - _v = arg.pop("funnelmode", None) - self["funnelmode"] = funnelmode if funnelmode is not None else _v - _v = arg.pop("geo", None) - self["geo"] = geo if geo is not None else _v - _v = arg.pop("grid", None) - self["grid"] = grid if grid is not None else _v - _v = arg.pop("height", None) - self["height"] = height if height is not None else _v - _v = arg.pop("hiddenlabels", None) - self["hiddenlabels"] = hiddenlabels if hiddenlabels is not None else _v - _v = arg.pop("hiddenlabelssrc", None) - self["hiddenlabelssrc"] = hiddenlabelssrc if hiddenlabelssrc is not None else _v - _v = arg.pop("hidesources", None) - self["hidesources"] = hidesources if hidesources is not None else _v - _v = arg.pop("hoverdistance", None) - self["hoverdistance"] = hoverdistance if hoverdistance is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovermode", None) - self["hovermode"] = hovermode if hovermode is not None else _v - _v = arg.pop("images", None) - self["images"] = images if images is not None else _v - _v = arg.pop("imagedefaults", None) - self["imagedefaults"] = imagedefaults if imagedefaults is not None else _v - _v = arg.pop("legend", None) - self["legend"] = legend if legend is not None else _v - _v = arg.pop("mapbox", None) - self["mapbox"] = mapbox if mapbox is not None else _v - _v = arg.pop("margin", None) - self["margin"] = margin if margin is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("modebar", None) - self["modebar"] = modebar if modebar is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("paper_bgcolor", None) - self["paper_bgcolor"] = paper_bgcolor if paper_bgcolor is not None else _v - _v = arg.pop("piecolorway", None) - self["piecolorway"] = piecolorway if piecolorway is not None else _v - _v = arg.pop("plot_bgcolor", None) - self["plot_bgcolor"] = plot_bgcolor if plot_bgcolor is not None else _v - _v = arg.pop("polar", None) - self["polar"] = polar if polar is not None else _v - _v = arg.pop("radialaxis", None) - self["radialaxis"] = radialaxis if radialaxis is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("selectdirection", None) - self["selectdirection"] = selectdirection if selectdirection is not None else _v - _v = arg.pop("selectionrevision", None) - self["selectionrevision"] = ( - selectionrevision if selectionrevision is not None else _v - ) - _v = arg.pop("separators", None) - self["separators"] = separators if separators is not None else _v - _v = arg.pop("shapes", None) - self["shapes"] = shapes if shapes is not None else _v - _v = arg.pop("shapedefaults", None) - self["shapedefaults"] = shapedefaults if shapedefaults is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("sliders", None) - self["sliders"] = sliders if sliders is not None else _v - _v = arg.pop("sliderdefaults", None) - self["sliderdefaults"] = sliderdefaults if sliderdefaults is not None else _v - _v = arg.pop("spikedistance", None) - self["spikedistance"] = spikedistance if spikedistance is not None else _v - _v = arg.pop("sunburstcolorway", None) - self["sunburstcolorway"] = ( - sunburstcolorway if sunburstcolorway is not None else _v - ) - _v = arg.pop("template", None) - _v = template if template is not None else _v - if _v is not None: - self["template"] = _v - _v = arg.pop("ternary", None) - self["ternary"] = ternary if ternary is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("transition", None) - self["transition"] = transition if transition is not None else _v - _v = arg.pop("treemapcolorway", None) - self["treemapcolorway"] = treemapcolorway if treemapcolorway is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("uniformtext", None) - self["uniformtext"] = uniformtext if uniformtext is not None else _v - _v = arg.pop("updatemenus", None) - self["updatemenus"] = updatemenus if updatemenus is not None else _v - _v = arg.pop("updatemenudefaults", None) - self["updatemenudefaults"] = ( - updatemenudefaults if updatemenudefaults is not None else _v - ) - _v = arg.pop("violingap", None) - self["violingap"] = violingap if violingap is not None else _v - _v = arg.pop("violingroupgap", None) - self["violingroupgap"] = violingroupgap if violingroupgap is not None else _v - _v = arg.pop("violinmode", None) - self["violinmode"] = violinmode if violinmode is not None else _v - _v = arg.pop("waterfallgap", None) - self["waterfallgap"] = waterfallgap if waterfallgap is not None else _v - _v = arg.pop("waterfallgroupgap", None) - self["waterfallgroupgap"] = ( - waterfallgroupgap if waterfallgroupgap is not None else _v - ) - _v = arg.pop("waterfallmode", None) - self["waterfallmode"] = waterfallmode if waterfallmode is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType -import copy as _copy - - -class Frame(_BaseFrameHierarchyType): - - # baseframe - # --------- - @property - def baseframe(self): - """ - The name of the frame into which this frame's properties are - merged before applying. This is used to unify properties and - avoid needing to specify the same values for the same - properties in multiple frames. - - The 'baseframe' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["baseframe"] - - @baseframe.setter - def baseframe(self, val): - self["baseframe"] = val - - # data - # ---- - @property - def data(self): - """ - A list of traces this frame modifies. The format is identical - to the normal trace definition. - - Returns - ------- - Any - """ - return self["data"] - - @data.setter - def data(self, val): - self["data"] = val - - # group - # ----- - @property - def group(self): - """ - An identifier that specifies the group to which the frame - belongs, used by animate to select a subset of frames. - - The 'group' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["group"] - - @group.setter - def group(self, val): - self["group"] = val - - # layout - # ------ - @property - def layout(self): - """ - Layout properties which this frame modifies. The format is - identical to the normal layout definition. - - Returns - ------- - Any - """ - return self["layout"] - - @layout.setter - def layout(self, val): - self["layout"] = val - - # name - # ---- - @property - def name(self): - """ - A label by which to identify the frame - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # traces - # ------ - @property - def traces(self): - """ - A list of trace indices that identify the respective traces in - the data attribute - - The 'traces' property accepts values of any type - - Returns - ------- - Any - """ - return self["traces"] - - @traces.setter - def traces(self, val): - self["traces"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - baseframe - The name of the frame into which this frame's - properties are merged before applying. This is used to - unify properties and avoid needing to specify the same - values for the same properties in multiple frames. - data - A list of traces this frame modifies. The format is - identical to the normal trace definition. - group - An identifier that specifies the group to which the - frame belongs, used by animate to select a subset of - frames. - layout - Layout properties which this frame modifies. The format - is identical to the normal layout definition. - name - A label by which to identify the frame - traces - A list of trace indices that identify the respective - traces in the data attribute - """ - - def __init__( - self, - arg=None, - baseframe=None, - data=None, - group=None, - layout=None, - name=None, - traces=None, - **kwargs - ): - """ - Construct a new Frame object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.Frame` - baseframe - The name of the frame into which this frame's - properties are merged before applying. This is used to - unify properties and avoid needing to specify the same - values for the same properties in multiple frames. - data - A list of traces this frame modifies. The format is - identical to the normal trace definition. - group - An identifier that specifies the group to which the - frame belongs, used by animate to select a subset of - frames. - layout - Layout properties which this frame modifies. The format - is identical to the normal layout definition. - name - A label by which to identify the frame - traces - A list of trace indices that identify the respective - traces in the data attribute - - Returns - ------- - Frame - """ - super(Frame, self).__init__("frames") - - # Validate arg - # ------------ - 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.Frame -constructor must be a dict or -an instance of :class:`plotly.graph_objs.Frame`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import frame as v_frame - - # Initialize validators - # --------------------- - self._validators["baseframe"] = v_frame.BaseframeValidator() - self._validators["data"] = v_frame.DataValidator() - self._validators["group"] = v_frame.GroupValidator() - self._validators["layout"] = v_frame.LayoutValidator() - self._validators["name"] = v_frame.NameValidator() - self._validators["traces"] = v_frame.TracesValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("baseframe", None) - self["baseframe"] = baseframe if baseframe is not None else _v - _v = arg.pop("data", None) - self["data"] = data if data is not None else _v - _v = arg.pop("group", None) - self["group"] = group if group is not None else _v - _v = arg.pop("layout", None) - self["layout"] = layout if layout is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("traces", None) - self["traces"] = traces if traces is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.graph_objs import waterfall -from plotly.graph_objs import volume -from plotly.graph_objs import violin -from plotly.graph_objs import treemap -from plotly.graph_objs import table -from plotly.graph_objs import surface -from plotly.graph_objs import sunburst -from plotly.graph_objs import streamtube -from plotly.graph_objs import splom -from plotly.graph_objs import scatterternary -from plotly.graph_objs import scatterpolargl -from plotly.graph_objs import scatterpolar -from plotly.graph_objs import scattermapbox -from plotly.graph_objs import scattergl -from plotly.graph_objs import scattergeo -from plotly.graph_objs import scattercarpet -from plotly.graph_objs import scatter3d -from plotly.graph_objs import scatter -from plotly.graph_objs import sankey -from plotly.graph_objs import pointcloud -from plotly.graph_objs import pie -from plotly.graph_objs import parcoords -from plotly.graph_objs import parcats -from plotly.graph_objs import ohlc -from plotly.graph_objs import mesh3d -from plotly.graph_objs import isosurface -from plotly.graph_objs import indicator -from plotly.graph_objs import image -from plotly.graph_objs import histogram2dcontour -from plotly.graph_objs import histogram2d -from plotly.graph_objs import histogram -from plotly.graph_objs import heatmapgl -from plotly.graph_objs import heatmap -from plotly.graph_objs import funnelarea -from plotly.graph_objs import funnel -from plotly.graph_objs import densitymapbox -from plotly.graph_objs import contourcarpet -from plotly.graph_objs import contour -from plotly.graph_objs import cone -from plotly.graph_objs import choroplethmapbox -from plotly.graph_objs import choropleth -from plotly.graph_objs import carpet -from plotly.graph_objs import candlestick -from plotly.graph_objs import box -from plotly.graph_objs import barpolar -from plotly.graph_objs import bar -from plotly.graph_objs import area -from plotly.graph_objs import layout -from ._figure import Figure -from ._deprecations import ( - Data, - Annotations, - Frames, - AngularAxis, - Annotation, - ColorBar, - Contours, - ErrorX, - ErrorY, - ErrorZ, - Font, - Legend, - Line, - Margin, - Marker, - RadialAxis, - Scene, - Stream, - XAxis, - YAxis, - ZAxis, - XBins, - YBins, - Trace, - Histogram2dcontour, -) - -__all__ = [ - "AngularAxis", - "Annotation", - "Annotations", - "Area", - "Bar", - "Barpolar", - "Box", - "Candlestick", - "Carpet", - "Choropleth", - "Choroplethmapbox", - "ColorBar", - "Cone", - "Contour", - "Contourcarpet", - "Contours", - "Data", - "Densitymapbox", - "ErrorX", - "ErrorY", - "ErrorZ", - "Figure", - "Font", - "Frame", - "Frames", - "Funnel", - "Funnelarea", - "Heatmap", - "Heatmapgl", - "Histogram", - "Histogram2d", - "Histogram2dContour", - "Histogram2dcontour", - "Image", - "Indicator", - "Isosurface", - "Layout", - "Legend", - "Line", - "Margin", - "Marker", - "Mesh3d", - "Ohlc", - "Parcats", - "Parcoords", - "Pie", - "Pointcloud", - "RadialAxis", - "Sankey", - "Scatter", - "Scatter3d", - "Scattercarpet", - "Scattergeo", - "Scattergl", - "Scattermapbox", - "Scatterpolar", - "Scatterpolargl", - "Scatterternary", - "Scene", - "Splom", - "Stream", - "Streamtube", - "Sunburst", - "Surface", - "Table", - "Trace", - "Treemap", - "Violin", - "Volume", - "Waterfall", - "XAxis", - "XBins", - "YAxis", - "YBins", - "ZAxis", - "area", - "bar", - "barpolar", - "box", - "candlestick", - "carpet", - "choropleth", - "choroplethmapbox", - "cone", - "contour", - "contourcarpet", - "densitymapbox", - "funnel", - "funnelarea", - "heatmap", - "heatmapgl", - "histogram", - "histogram2d", - "histogram2dcontour", - "image", - "indicator", - "isosurface", - "layout", - "mesh3d", - "ohlc", - "parcats", - "parcoords", - "pie", - "pointcloud", - "sankey", - "scatter", - "scatter3d", - "scattercarpet", - "scattergeo", - "scattergl", - "scattermapbox", - "scatterpolar", - "scatterpolargl", - "scatterternary", - "splom", - "streamtube", - "sunburst", - "surface", - "table", - "treemap", - "violin", - "volume", - "waterfall", -] -try: - import ipywidgets - from distutils.version import LooseVersion - - if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): - from ._figurewidget import FigureWidget - - __all__.append("FigureWidget") - del LooseVersion - del ipywidgets -except ImportError: - pass +import sys + +if sys.version_info < (3, 7): + from ._waterfall import Waterfall + from ._volume import Volume + from ._violin import Violin + from ._treemap import Treemap + from ._table import Table + from ._surface import Surface + from ._sunburst import Sunburst + from ._streamtube import Streamtube + from ._splom import Splom + from ._scatterternary import Scatterternary + from ._scatterpolargl import Scatterpolargl + from ._scatterpolar import Scatterpolar + from ._scattermapbox import Scattermapbox + from ._scattergl import Scattergl + from ._scattergeo import Scattergeo + from ._scattercarpet import Scattercarpet + from ._scatter3d import Scatter3d + from ._scatter import Scatter + from ._sankey import Sankey + from ._pointcloud import Pointcloud + from ._pie import Pie + from ._parcoords import Parcoords + from ._parcats import Parcats + from ._ohlc import Ohlc + from ._mesh3d import Mesh3d + from ._isosurface import Isosurface + from ._indicator import Indicator + from ._image import Image + from ._histogram2dcontour import Histogram2dContour + from ._histogram2d import Histogram2d + from ._histogram import Histogram + from ._heatmapgl import Heatmapgl + from ._heatmap import Heatmap + from ._funnelarea import Funnelarea + from ._funnel import Funnel + from ._densitymapbox import Densitymapbox + from ._contourcarpet import Contourcarpet + from ._contour import Contour + from ._cone import Cone + from ._choroplethmapbox import Choroplethmapbox + from ._choropleth import Choropleth + from ._carpet import Carpet + from ._candlestick import Candlestick + from ._box import Box + from ._barpolar import Barpolar + from ._bar import Bar + from ._area import Area + from ._layout import Layout + from ._frame import Frame + from ._figure import Figure + from ._deprecations import Data + from ._deprecations import Annotations + from ._deprecations import Frames + from ._deprecations import AngularAxis + from ._deprecations import Annotation + from ._deprecations import ColorBar + from ._deprecations import Contours + from ._deprecations import ErrorX + from ._deprecations import ErrorY + from ._deprecations import ErrorZ + from ._deprecations import Font + from ._deprecations import Legend + from ._deprecations import Line + from ._deprecations import Margin + from ._deprecations import Marker + from ._deprecations import RadialAxis + from ._deprecations import Scene + from ._deprecations import Stream + from ._deprecations import XAxis + from ._deprecations import YAxis + from ._deprecations import ZAxis + from ._deprecations import XBins + from ._deprecations import YBins + from ._deprecations import Trace + from ._deprecations import Histogram2dcontour + from . import waterfall + from . import volume + from . import violin + from . import treemap + from . import table + from . import surface + from . import sunburst + from . import streamtube + from . import splom + from . import scatterternary + from . import scatterpolargl + from . import scatterpolar + from . import scattermapbox + from . import scattergl + from . import scattergeo + from . import scattercarpet + from . import scatter3d + from . import scatter + from . import sankey + from . import pointcloud + from . import pie + from . import parcoords + from . import parcats + from . import ohlc + from . import mesh3d + from . import isosurface + from . import indicator + from . import image + from . import histogram2dcontour + from . import histogram2d + from . import histogram + from . import heatmapgl + from . import heatmap + from . import funnelarea + from . import funnel + from . import densitymapbox + from . import contourcarpet + from . import contour + from . import cone + from . import choroplethmapbox + from . import choropleth + from . import carpet + from . import candlestick + from . import box + from . import barpolar + from . import bar + from . import area + from . import layout +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".waterfall", + ".volume", + ".violin", + ".treemap", + ".table", + ".surface", + ".sunburst", + ".streamtube", + ".splom", + ".scatterternary", + ".scatterpolargl", + ".scatterpolar", + ".scattermapbox", + ".scattergl", + ".scattergeo", + ".scattercarpet", + ".scatter3d", + ".scatter", + ".sankey", + ".pointcloud", + ".pie", + ".parcoords", + ".parcats", + ".ohlc", + ".mesh3d", + ".isosurface", + ".indicator", + ".image", + ".histogram2dcontour", + ".histogram2d", + ".histogram", + ".heatmapgl", + ".heatmap", + ".funnelarea", + ".funnel", + ".densitymapbox", + ".contourcarpet", + ".contour", + ".cone", + ".choroplethmapbox", + ".choropleth", + ".carpet", + ".candlestick", + ".box", + ".barpolar", + ".bar", + ".area", + ".layout", + ], + [ + "._waterfall.Waterfall", + "._volume.Volume", + "._violin.Violin", + "._treemap.Treemap", + "._table.Table", + "._surface.Surface", + "._sunburst.Sunburst", + "._streamtube.Streamtube", + "._splom.Splom", + "._scatterternary.Scatterternary", + "._scatterpolargl.Scatterpolargl", + "._scatterpolar.Scatterpolar", + "._scattermapbox.Scattermapbox", + "._scattergl.Scattergl", + "._scattergeo.Scattergeo", + "._scattercarpet.Scattercarpet", + "._scatter3d.Scatter3d", + "._scatter.Scatter", + "._sankey.Sankey", + "._pointcloud.Pointcloud", + "._pie.Pie", + "._parcoords.Parcoords", + "._parcats.Parcats", + "._ohlc.Ohlc", + "._mesh3d.Mesh3d", + "._isosurface.Isosurface", + "._indicator.Indicator", + "._image.Image", + "._histogram2dcontour.Histogram2dContour", + "._histogram2d.Histogram2d", + "._histogram.Histogram", + "._heatmapgl.Heatmapgl", + "._heatmap.Heatmap", + "._funnelarea.Funnelarea", + "._funnel.Funnel", + "._densitymapbox.Densitymapbox", + "._contourcarpet.Contourcarpet", + "._contour.Contour", + "._cone.Cone", + "._choroplethmapbox.Choroplethmapbox", + "._choropleth.Choropleth", + "._carpet.Carpet", + "._candlestick.Candlestick", + "._box.Box", + "._barpolar.Barpolar", + "._bar.Bar", + "._area.Area", + "._layout.Layout", + "._frame.Frame", + "._figure.Figure", + "._deprecations.Data", + "._deprecations.Annotations", + "._deprecations.Frames", + "._deprecations.AngularAxis", + "._deprecations.Annotation", + "._deprecations.ColorBar", + "._deprecations.Contours", + "._deprecations.ErrorX", + "._deprecations.ErrorY", + "._deprecations.ErrorZ", + "._deprecations.Font", + "._deprecations.Legend", + "._deprecations.Line", + "._deprecations.Margin", + "._deprecations.Marker", + "._deprecations.RadialAxis", + "._deprecations.Scene", + "._deprecations.Stream", + "._deprecations.XAxis", + "._deprecations.YAxis", + "._deprecations.ZAxis", + "._deprecations.XBins", + "._deprecations.YBins", + "._deprecations.Trace", + "._deprecations.Histogram2dcontour", + ], + ) + +from .._validate import validate + +if sys.version_info < (3, 7): + try: + import ipywidgets + from distutils.version import LooseVersion + + if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + del LooseVersion + del ipywidgets + except ImportError: + pass +else: + __all__.append("FigureWidget") + orig_getattr = __getattr__ + + def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from distutils.version import LooseVersion + + if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + + return FigureWidget + except ImportError: + pass + + return orig_getattr(import_name) diff --git a/packages/python/plotly/plotly/graph_objs/_area.py b/packages/python/plotly/plotly/graph_objs/_area.py new file mode 100644 index 00000000000..a81a5e662fd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_area.py @@ -0,0 +1,1002 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Area(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "area" + _valid_props = { + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "ids", + "idssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "r", + "rsrc", + "showlegend", + "stream", + "t", + "tsrc", + "type", + "uid", + "uirevision", + "visible", + } + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.area.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.area.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.area.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets themarkercolor. + It accepts either a specific color or an array + of numbers that are mapped to the colorscale + relative to the max and min values of the array + or relative to `marker.cmin` and `marker.cmax` + if set. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + opacity + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker + opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + size + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker size + (in px). + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker + symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 + is equivalent to appending "-dot" to a symbol + name. Adding 300 is equivalent to appending + "-open-dot" or "dot-open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.area.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # r + # - + @property + def r(self): + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the radial coordinates for legacy polar chart + only. + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.area.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.area.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # t + # - + @property + def t(self): + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the angular coordinates for legacy polar chart + only. + + The 't' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # tsrc + # ---- + @property + def tsrc(self): + """ + Sets the source reference on Chart Studio Cloud for t . + + The 'tsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tsrc"] + + @tsrc.setter + def tsrc(self, val): + self["tsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.area.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.area.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the radial coordinates for + legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.area.Stream` instance or + dict with compatible properties + t + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the angular coordinates for + legacy polar chart only. + tsrc + Sets the source reference on Chart Studio Cloud for t + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + r=None, + rsrc=None, + showlegend=None, + stream=None, + t=None, + tsrc=None, + uid=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new Area object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Area` + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.area.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.area.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the radial coordinates for + legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.area.Stream` instance or + dict with compatible properties + t + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the angular coordinates for + legacy polar chart only. + tsrc + Sets the source reference on Chart Studio Cloud for t + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Area + """ + super(Area, self).__init__("area") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Area +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Area`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("rsrc", None) + _v = rsrc if rsrc is not None else _v + if _v is not None: + self["rsrc"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + _v = arg.pop("tsrc", None) + _v = tsrc if tsrc is not None else _v + if _v is not None: + self["tsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "area" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_bar.py b/packages/python/plotly/plotly/graph_objs/_bar.py new file mode 100644 index 00000000000..18ad7a68e25 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_bar.py @@ -0,0 +1,2928 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Bar(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "bar" + _valid_props = { + "alignmentgroup", + "base", + "basesrc", + "cliponaxis", + "constraintext", + "customdata", + "customdatasrc", + "dx", + "dy", + "error_x", + "error_y", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextanchor", + "insidetextfont", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "offset", + "offsetgroup", + "offsetsrc", + "opacity", + "orientation", + "outsidetextfont", + "r", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "t", + "text", + "textangle", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "tsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "width", + "widthsrc", + "x", + "x0", + "xaxis", + "xcalendar", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "ysrc", + } + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # base + # ---- + @property + def base(self): + """ + Sets where the bar base is drawn (in position axis units). In + "stack" or "relative" barmode, traces that set "base" will be + excluded and drawn in "overlay" mode instead. + + The 'base' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + # basesrc + # ------- + @property + def basesrc(self): + """ + Sets the source reference on Chart Studio Cloud for base . + + The 'basesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["basesrc"] + + @basesrc.setter + def basesrc(self, val): + self["basesrc"] = val + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # constraintext + # ------------- + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.bar.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.bar.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.bar.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextanchor + # ---------------- + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.bar.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.bar.marker.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.bar.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.bar.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # offset + # ------ + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # offsetsrc + # --------- + @property + def offsetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for offset . + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.bar.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # r + # - + @property + def r(self): + """ + r coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the radial coordinatesfor + legacy polar chart only. + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.bar.selected.Marke + r` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.selected.Textf + ont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.bar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.bar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # t + # - + @property + def t(self): + """ + t coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the angular coordinatesfor + legacy polar chart only. + + The 't' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.bar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `value` and `label`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # tsrc + # ---- + @property + def tsrc(self): + """ + Sets the source reference on Chart Studio Cloud for t . + + The 'tsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tsrc"] + + @tsrc.setter + def tsrc(self, val): + self["tsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.bar.unselected.Mar + ker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.bar.unselected.Tex + tfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.bar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on Chart Studio Cloud for + base . + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` instance or + dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.bar.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.bar.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` instance or + dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `value` and + `label`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + tsrc + Sets the source reference on Chart Studio Cloud for t + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + base=None, + basesrc=None, + cliponaxis=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + r=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + t=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Bar object + + The data visualized by the span of the bars is set in `y` if + `orientation` is set th "v" (the default) and the labels are + set in `x`. By setting `orientation` to "h", the roles are + interchanged. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Bar` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on Chart Studio Cloud for + base . + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` instance or + dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.bar.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.bar.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` instance or + dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `value` and + `label`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + tsrc + Sets the source reference on Chart Studio Cloud for t + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Bar + """ + super(Bar, self).__init__("bar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Bar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Bar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + _v = alignmentgroup if alignmentgroup is not None else _v + if _v is not None: + self["alignmentgroup"] = _v + _v = arg.pop("base", None) + _v = base if base is not None else _v + if _v is not None: + self["base"] = _v + _v = arg.pop("basesrc", None) + _v = basesrc if basesrc is not None else _v + if _v is not None: + self["basesrc"] = _v + _v = arg.pop("cliponaxis", None) + _v = cliponaxis if cliponaxis is not None else _v + if _v is not None: + self["cliponaxis"] = _v + _v = arg.pop("constraintext", None) + _v = constraintext if constraintext is not None else _v + if _v is not None: + self["constraintext"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("error_x", None) + _v = error_x if error_x is not None else _v + if _v is not None: + self["error_x"] = _v + _v = arg.pop("error_y", None) + _v = error_y if error_y is not None else _v + if _v is not None: + self["error_y"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("insidetextanchor", None) + _v = insidetextanchor if insidetextanchor is not None else _v + if _v is not None: + self["insidetextanchor"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("offsetgroup", None) + _v = offsetgroup if offsetgroup is not None else _v + if _v is not None: + self["offsetgroup"] = _v + _v = arg.pop("offsetsrc", None) + _v = offsetsrc if offsetsrc is not None else _v + if _v is not None: + self["offsetsrc"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("outsidetextfont", None) + _v = outsidetextfont if outsidetextfont is not None else _v + if _v is not None: + self["outsidetextfont"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("rsrc", None) + _v = rsrc if rsrc is not None else _v + if _v is not None: + self["rsrc"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textangle", None) + _v = textangle if textangle is not None else _v + if _v is not None: + self["textangle"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("tsrc", None) + _v = tsrc if tsrc is not None else _v + if _v is not None: + self["tsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "bar" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_barpolar.py b/packages/python/plotly/plotly/graph_objs/_barpolar.py new file mode 100644 index 00000000000..c1b7597f455 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_barpolar.py @@ -0,0 +1,1855 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Barpolar(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "barpolar" + _valid_props = { + "base", + "basesrc", + "customdata", + "customdatasrc", + "dr", + "dtheta", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "offset", + "offsetsrc", + "opacity", + "r", + "r0", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textsrc", + "theta", + "theta0", + "thetasrc", + "thetaunit", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "width", + "widthsrc", + } + + # base + # ---- + @property + def base(self): + """ + Sets where the bar base is drawn (in radial axis units). In + "stack" barmode, traces that set "base" will be excluded and + drawn in "overlay" mode instead. + + The 'base' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + # basesrc + # ------- + @property + def basesrc(self): + """ + Sets the source reference on Chart Studio Cloud for base . + + The 'basesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["basesrc"] + + @basesrc.setter + def basesrc(self, val): + self["basesrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dr + # -- + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + # dtheta + # ------ + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.barpolar.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.barpolar.marker.Co + lorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.barpolar.marker.Li + ne` instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.barpolar.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # offset + # ------ + @property + def offset(self): + """ + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # offsetsrc + # --------- + @property + def offsetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for offset . + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # r + # - + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # r0 + # -- + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.barpolar.selected. + Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.barpolar.selected. + Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.barpolar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.barpolar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as the string 'polar' + optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets hover text elements associated with each bar. If a single + string, the same string appears over all bars. If an array of + string, the items are mapped in order to the this trace's + coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # theta + # ----- + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + # theta0 + # ------ + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + # thetasrc + # -------- + @property + def thetasrc(self): + """ + Sets the source reference on Chart Studio Cloud for theta . + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + # thetaunit + # --------- + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.barpolar.unselecte + d.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.barpolar.unselecte + d.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.barpolar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the bar angular width (in "thetaunit" units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud for + base . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.barpolar.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud for + offset . + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + base=None, + basesrc=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetsrc=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Barpolar object + + The data visualized by the radial span of the bars is set in + `r` + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Barpolar` + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud for + base . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.barpolar.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud for + offset . + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Barpolar + """ + super(Barpolar, self).__init__("barpolar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Barpolar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Barpolar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("base", None) + _v = base if base is not None else _v + if _v is not None: + self["base"] = _v + _v = arg.pop("basesrc", None) + _v = basesrc if basesrc is not None else _v + if _v is not None: + self["basesrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dr", None) + _v = dr if dr is not None else _v + if _v is not None: + self["dr"] = _v + _v = arg.pop("dtheta", None) + _v = dtheta if dtheta is not None else _v + if _v is not None: + self["dtheta"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("offsetsrc", None) + _v = offsetsrc if offsetsrc is not None else _v + if _v is not None: + self["offsetsrc"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("r0", None) + _v = r0 if r0 is not None else _v + if _v is not None: + self["r0"] = _v + _v = arg.pop("rsrc", None) + _v = rsrc if rsrc is not None else _v + if _v is not None: + self["rsrc"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("theta", None) + _v = theta if theta is not None else _v + if _v is not None: + self["theta"] = _v + _v = arg.pop("theta0", None) + _v = theta0 if theta0 is not None else _v + if _v is not None: + self["theta0"] = _v + _v = arg.pop("thetasrc", None) + _v = thetasrc if thetasrc is not None else _v + if _v is not None: + self["thetasrc"] = _v + _v = arg.pop("thetaunit", None) + _v = thetaunit if thetaunit is not None else _v + if _v is not None: + self["thetaunit"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "barpolar" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_box.py b/packages/python/plotly/plotly/graph_objs/_box.py new file mode 100644 index 00000000000..c0f5d6af551 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_box.py @@ -0,0 +1,2943 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Box(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "box" + _valid_props = { + "alignmentgroup", + "boxmean", + "boxpoints", + "customdata", + "customdatasrc", + "dx", + "dy", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "jitter", + "legendgroup", + "line", + "lowerfence", + "lowerfencesrc", + "marker", + "mean", + "meansrc", + "median", + "mediansrc", + "meta", + "metasrc", + "name", + "notched", + "notchspan", + "notchspansrc", + "notchwidth", + "offsetgroup", + "opacity", + "orientation", + "pointpos", + "q1", + "q1src", + "q3", + "q3src", + "quartilemethod", + "sd", + "sdsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "upperfence", + "upperfencesrc", + "visible", + "whiskerwidth", + "width", + "x", + "x0", + "xaxis", + "xcalendar", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "ysrc", + } + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # boxmean + # ------- + @property + def boxmean(self): + """ + If True, the mean of the box(es)' underlying distribution is + drawn as a dashed line inside the box(es). If "sd" the standard + deviation is also drawn. Defaults to True when `mean` is set. + Defaults to "sd" when `sd` is set Otherwise defaults to False. + + The 'boxmean' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'sd', False] + + Returns + ------- + Any + """ + return self["boxmean"] + + @boxmean.setter + def boxmean(self, val): + self["boxmean"] = val + + # boxpoints + # --------- + @property + def boxpoints(self): + """ + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier points + are shown and points either less than 4*Q1-3*Q3 or greater than + 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all + sample points are shown If False, only the box(es) are shown + with no sample points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is set. + Defaults to "all" under the q1/median/q3 signature. Otherwise + defaults to "outliers". + + The 'boxpoints' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'outliers', 'suspectedoutliers', False] + + Returns + ------- + Any + """ + return self["boxpoints"] + + @boxpoints.setter + def boxpoints(self, val): + self["boxpoints"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step for multi-box traces set using + q1/median/q3. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step for multi-box traces set using + q1/median/q3. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.box.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual boxes or sample + points or both? + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['boxes', 'points'] joined with '+' characters + (e.g. 'boxes+points') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # jitter + # ------ + @property + def jitter(self): + """ + Sets the amount of jitter in the sample points drawn. If 0, the + sample points align along the distribution axis. If 1, the + sample points are drawn in a random jitter of width equal to + the width of the box(es). + + The 'jitter' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["jitter"] + + @jitter.setter + def jitter(self, val): + self["jitter"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). + + Returns + ------- + plotly.graph_objs.box.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # lowerfence + # ---------- + @property + def lowerfence(self): + """ + Sets the lower fence values. There should be as many items as + the number of boxes desired. This attribute has effect only + under the q1/median/q3 signature. If `lowerfence` is not + provided but a sample (in `y` or `x`) is set, we compute the + lower as the last sample point below 1.5 times the IQR. + + The 'lowerfence' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lowerfence"] + + @lowerfence.setter + def lowerfence(self, val): + self["lowerfence"] = val + + # lowerfencesrc + # ------------- + @property + def lowerfencesrc(self): + """ + Sets the source reference on Chart Studio Cloud for lowerfence + . + + The 'lowerfencesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowerfencesrc"] + + @lowerfencesrc.setter + def lowerfencesrc(self, val): + self["lowerfencesrc"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + line + :class:`plotly.graph_objects.box.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + plotly.graph_objs.box.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # mean + # ---- + @property + def mean(self): + """ + Sets the mean values. There should be as many items as the + number of boxes desired. This attribute has effect only under + the q1/median/q3 signature. If `mean` is not provided but a + sample (in `y` or `x`) is set, we compute the mean for each box + using the sample values. + + The 'mean' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["mean"] + + @mean.setter + def mean(self, val): + self["mean"] = val + + # meansrc + # ------- + @property + def meansrc(self): + """ + Sets the source reference on Chart Studio Cloud for mean . + + The 'meansrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["meansrc"] + + @meansrc.setter + def meansrc(self, val): + self["meansrc"] = val + + # median + # ------ + @property + def median(self): + """ + Sets the median values. There should be as many items as the + number of boxes desired. + + The 'median' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["median"] + + @median.setter + def median(self, val): + self["median"] = val + + # mediansrc + # --------- + @property + def mediansrc(self): + """ + Sets the source reference on Chart Studio Cloud for median . + + The 'mediansrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["mediansrc"] + + @mediansrc.setter + def mediansrc(self, val): + self["mediansrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. For box traces, the name will also be used for + the position coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis is categorical + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # notched + # ------- + @property + def notched(self): + """ + Determines whether or not notches are drawn. Notches displays a + confidence interval around the median. We compute the + confidence interval as median +/- 1.57 * IQR / sqrt(N), where + IQR is the interquartile range and N is the sample size. If two + boxes' notches do not overlap there is 95% confidence their + medians differ. See + https://sites.google.com/site/davidsstatistics/home/notched- + box-plots for more info. Defaults to False unless `notchwidth` + or `notchspan` is set. + + The 'notched' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["notched"] + + @notched.setter + def notched(self, val): + self["notched"] = val + + # notchspan + # --------- + @property + def notchspan(self): + """ + Sets the notch span from the boxes' `median` values. There + should be as many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 signature. If + `notchspan` is not provided but a sample (in `y` or `x`) is + set, we compute it as 1.57 * IQR / sqrt(N), where N is the + sample size. + + The 'notchspan' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["notchspan"] + + @notchspan.setter + def notchspan(self, val): + self["notchspan"] = val + + # notchspansrc + # ------------ + @property + def notchspansrc(self): + """ + Sets the source reference on Chart Studio Cloud for notchspan + . + + The 'notchspansrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["notchspansrc"] + + @notchspansrc.setter + def notchspansrc(self, val): + self["notchspansrc"] = val + + # notchwidth + # ---------- + @property + def notchwidth(self): + """ + Sets the width of the notches relative to the box' width. For + example, with 0, the notches are as wide as the box(es). + + The 'notchwidth' property is a number and may be specified as: + - An int or float in the interval [0, 0.5] + + Returns + ------- + int|float + """ + return self["notchwidth"] + + @notchwidth.setter + def notchwidth(self, val): + self["notchwidth"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # pointpos + # -------- + @property + def pointpos(self): + """ + Sets the position of the sample points in relation to the + box(es). If 0, the sample points are places over the center of + the box(es). Positive (negative) values correspond to positions + to the right (left) for vertical boxes and above (below) for + horizontal boxes + + The 'pointpos' property is a number and may be specified as: + - An int or float in the interval [-2, 2] + + Returns + ------- + int|float + """ + return self["pointpos"] + + @pointpos.setter + def pointpos(self, val): + self["pointpos"] = val + + # q1 + # -- + @property + def q1(self): + """ + Sets the Quartile 1 values. There should be as many items as + the number of boxes desired. + + The 'q1' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["q1"] + + @q1.setter + def q1(self, val): + self["q1"] = val + + # q1src + # ----- + @property + def q1src(self): + """ + Sets the source reference on Chart Studio Cloud for q1 . + + The 'q1src' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["q1src"] + + @q1src.setter + def q1src(self, val): + self["q1src"] = val + + # q3 + # -- + @property + def q3(self): + """ + Sets the Quartile 3 values. There should be as many items as + the number of boxes desired. + + The 'q3' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["q3"] + + @q3.setter + def q3(self, val): + self["q3"] = val + + # q3src + # ----- + @property + def q3src(self): + """ + Sets the source reference on Chart Studio Cloud for q3 . + + The 'q3src' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["q3src"] + + @q3src.setter + def q3src(self, val): + self["q3src"] = val + + # quartilemethod + # -------------- + @property + def quartilemethod(self): + """ + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile for Q1 + and 75th percentile for Q3 as computed using method #10 (listed + on http://www.amstat.org/publications/jse/v14n3/langford.html). + The "exclusive" method uses the median to divide the ordered + dataset into two halves if the sample is odd, it does not + include the median in either half - Q1 is then the median of + the lower half and Q3 the median of the upper half. The + "inclusive" method also uses the median to divide the ordered + dataset into two halves but if the sample is odd, it includes + the median in both halves - Q1 is then the median of the lower + half and Q3 the median of the upper half. + + The 'quartilemethod' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'exclusive', 'inclusive'] + + Returns + ------- + Any + """ + return self["quartilemethod"] + + @quartilemethod.setter + def quartilemethod(self, val): + self["quartilemethod"] = val + + # sd + # -- + @property + def sd(self): + """ + Sets the standard deviation values. There should be as many + items as the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `sd` is not provided + but a sample (in `y` or `x`) is set, we compute the standard + deviation for each box using the sample values. + + The 'sd' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["sd"] + + @sd.setter + def sd(self, val): + self["sd"] = val + + # sdsrc + # ----- + @property + def sdsrc(self): + """ + Sets the source reference on Chart Studio Cloud for sd . + + The 'sdsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sdsrc"] + + @sdsrc.setter + def sdsrc(self, val): + self["sdsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.box.selected.Marke + r` instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.box.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.box.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each sample value. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.box.unselected.Mar + ker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.box.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # upperfence + # ---------- + @property + def upperfence(self): + """ + Sets the upper fence values. There should be as many items as + the number of boxes desired. This attribute has effect only + under the q1/median/q3 signature. If `upperfence` is not + provided but a sample (in `y` or `x`) is set, we compute the + lower as the last sample point above 1.5 times the IQR. + + The 'upperfence' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["upperfence"] + + @upperfence.setter + def upperfence(self, val): + self["upperfence"] = val + + # upperfencesrc + # ------------- + @property + def upperfencesrc(self): + """ + Sets the source reference on Chart Studio Cloud for upperfence + . + + The 'upperfencesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["upperfencesrc"] + + @upperfencesrc.setter + def upperfencesrc(self, val): + self["upperfencesrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # whiskerwidth + # ------------ + @property + def whiskerwidth(self): + """ + Sets the width of the whiskers relative to the box' width. For + example, with 1, the whiskers are as wide as the box(es). + + The 'whiskerwidth' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["whiskerwidth"] + + @whiskerwidth.setter + def whiskerwidth(self, val): + self["whiskerwidth"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the box in data coordinate If 0 (default + value) the width is automatically selected based on the + positions of other box traces in the same subplot. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # x + # - + @property + def x(self): + """ + Sets the x sample data or coordinates. See overview for more + info. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Sets the x coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y sample data or coordinates. See overview for more + info. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Sets the y coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + Defaults to True when `mean` is set. Defaults to "sd" + when `sd` is set Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set. Defaults to "all" under the q1/median/q3 + signature. Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step for multi-box traces set + using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces set + using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.box.Line` instance or dict + with compatible properties + lowerfence + Sets the lower fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `lowerfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud for + lowerfence . + marker + :class:`plotly.graph_objects.box.Marker` instance or + dict with compatible properties + mean + Sets the mean values. There should be as many items as + the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, we + compute the mean for each box using the sample values. + meansrc + Sets the source reference on Chart Studio Cloud for + mean . + median + Sets the median values. There should be as many items + as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud for + median . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches are drawn. Notches + displays a confidence interval around the median. We + compute the confidence interval as median +/- 1.57 * + IQR / sqrt(N), where IQR is the interquartile range and + N is the sample size. If two boxes' notches do not + overlap there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatistics/home + /notched-box-plots for more info. Defaults to False + unless `notchwidth` or `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` values. + There should be as many items as the number of boxes + desired. This attribute has effect only under the + q1/median/q3 signature. If `notchspan` is not provided + but a sample (in `y` or `x`) is set, we compute it as + 1.57 * IQR / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud for + notchspan . + notchwidth + Sets the width of the notches relative to the box' + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as many + items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud for q1 + . + q3 + Sets the Quartile 3 values. There should be as many + items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud for q3 + . + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on http://www.amstat.org/publication + s/jse/v14n3/langford.html). The "exclusive" method uses + the median to divide the ordered dataset into two + halves if the sample is odd, it does not include the + median in either half - Q1 is then the median of the + lower half and Q3 the median of the upper half. The + "inclusive" method also uses the median to divide the + ordered dataset into two halves but if the sample is + odd, it includes the median in both halves - Q1 is then + the median of the lower half and Q3 the median of the + upper half. + sd + Sets the standard deviation values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 + signature. If `sd` is not provided but a sample (in `y` + or `x`) is set, we compute the standard deviation for + each box using the sample values. + sdsrc + Sets the source reference on Chart Studio Cloud for sd + . + selected + :class:`plotly.graph_objects.box.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.box.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` instance + or dict with compatible properties + upperfence + Sets the upper fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `upperfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud for + upperfence . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + boxmean=None, + boxpoints=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legendgroup=None, + line=None, + lowerfence=None, + lowerfencesrc=None, + marker=None, + mean=None, + meansrc=None, + median=None, + mediansrc=None, + meta=None, + metasrc=None, + name=None, + notched=None, + notchspan=None, + notchspansrc=None, + notchwidth=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + q1=None, + q1src=None, + q3=None, + q3src=None, + quartilemethod=None, + sd=None, + sdsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + upperfence=None, + upperfencesrc=None, + visible=None, + whiskerwidth=None, + width=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Box object + + Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The + second quartile (Q2, i.e. the median) is marked by a line + inside the box. The fences grow outward from the boxes' edges, + by default they span +/- 1.5 times the interquartile range + (IQR: Q3-Q1), The sample mean and standard deviation as well as + notches and the sample, outlier and suspected outliers points + can be optionally added to the box plot. The values and + positions corresponding to each boxes can be input using two + signatures. The first signature expects users to supply the + sample values in the `y` data array for vertical boxes (`x` for + horizontal boxes). By supplying an `x` (`y`) array, one box per + distinct `x` (`y`) value is drawn If no `x` (`y`) list is + provided, a single box is drawn. In this case, the box is + positioned with the trace `name` or with `x0` (`y0`) if + provided. The second signature expects users to supply the + boxes corresponding Q1, median and Q3 statistics in the `q1`, + `median` and `q3` data arrays respectively. Other box features + relying on statistics namely `lowerfence`, `upperfence`, + `notchspan` can be set directly by the users. To have plotly + compute them or to show sample points besides the boxes, users + can set the `y` data array for vertical boxes (`x` for + horizontal boxes) to a 2D array with the outer length + corresponding to the number of boxes in the traces and the + inner length corresponding the sample size. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Box` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + Defaults to True when `mean` is set. Defaults to "sd" + when `sd` is set Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set. Defaults to "all" under the q1/median/q3 + signature. Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step for multi-box traces set + using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces set + using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.box.Line` instance or dict + with compatible properties + lowerfence + Sets the lower fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `lowerfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud for + lowerfence . + marker + :class:`plotly.graph_objects.box.Marker` instance or + dict with compatible properties + mean + Sets the mean values. There should be as many items as + the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, we + compute the mean for each box using the sample values. + meansrc + Sets the source reference on Chart Studio Cloud for + mean . + median + Sets the median values. There should be as many items + as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud for + median . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches are drawn. Notches + displays a confidence interval around the median. We + compute the confidence interval as median +/- 1.57 * + IQR / sqrt(N), where IQR is the interquartile range and + N is the sample size. If two boxes' notches do not + overlap there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatistics/home + /notched-box-plots for more info. Defaults to False + unless `notchwidth` or `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` values. + There should be as many items as the number of boxes + desired. This attribute has effect only under the + q1/median/q3 signature. If `notchspan` is not provided + but a sample (in `y` or `x`) is set, we compute it as + 1.57 * IQR / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud for + notchspan . + notchwidth + Sets the width of the notches relative to the box' + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as many + items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud for q1 + . + q3 + Sets the Quartile 3 values. There should be as many + items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud for q3 + . + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on http://www.amstat.org/publication + s/jse/v14n3/langford.html). The "exclusive" method uses + the median to divide the ordered dataset into two + halves if the sample is odd, it does not include the + median in either half - Q1 is then the median of the + lower half and Q3 the median of the upper half. The + "inclusive" method also uses the median to divide the + ordered dataset into two halves but if the sample is + odd, it includes the median in both halves - Q1 is then + the median of the lower half and Q3 the median of the + upper half. + sd + Sets the standard deviation values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 + signature. If `sd` is not provided but a sample (in `y` + or `x`) is set, we compute the standard deviation for + each box using the sample values. + sdsrc + Sets the source reference on Chart Studio Cloud for sd + . + selected + :class:`plotly.graph_objects.box.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.box.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` instance + or dict with compatible properties + upperfence + Sets the upper fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `upperfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud for + upperfence . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Box + """ + super(Box, self).__init__("box") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Box +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Box`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + _v = alignmentgroup if alignmentgroup is not None else _v + if _v is not None: + self["alignmentgroup"] = _v + _v = arg.pop("boxmean", None) + _v = boxmean if boxmean is not None else _v + if _v is not None: + self["boxmean"] = _v + _v = arg.pop("boxpoints", None) + _v = boxpoints if boxpoints is not None else _v + if _v is not None: + self["boxpoints"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("jitter", None) + _v = jitter if jitter is not None else _v + if _v is not None: + self["jitter"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("lowerfence", None) + _v = lowerfence if lowerfence is not None else _v + if _v is not None: + self["lowerfence"] = _v + _v = arg.pop("lowerfencesrc", None) + _v = lowerfencesrc if lowerfencesrc is not None else _v + if _v is not None: + self["lowerfencesrc"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("mean", None) + _v = mean if mean is not None else _v + if _v is not None: + self["mean"] = _v + _v = arg.pop("meansrc", None) + _v = meansrc if meansrc is not None else _v + if _v is not None: + self["meansrc"] = _v + _v = arg.pop("median", None) + _v = median if median is not None else _v + if _v is not None: + self["median"] = _v + _v = arg.pop("mediansrc", None) + _v = mediansrc if mediansrc is not None else _v + if _v is not None: + self["mediansrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("notched", None) + _v = notched if notched is not None else _v + if _v is not None: + self["notched"] = _v + _v = arg.pop("notchspan", None) + _v = notchspan if notchspan is not None else _v + if _v is not None: + self["notchspan"] = _v + _v = arg.pop("notchspansrc", None) + _v = notchspansrc if notchspansrc is not None else _v + if _v is not None: + self["notchspansrc"] = _v + _v = arg.pop("notchwidth", None) + _v = notchwidth if notchwidth is not None else _v + if _v is not None: + self["notchwidth"] = _v + _v = arg.pop("offsetgroup", None) + _v = offsetgroup if offsetgroup is not None else _v + if _v is not None: + self["offsetgroup"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("pointpos", None) + _v = pointpos if pointpos is not None else _v + if _v is not None: + self["pointpos"] = _v + _v = arg.pop("q1", None) + _v = q1 if q1 is not None else _v + if _v is not None: + self["q1"] = _v + _v = arg.pop("q1src", None) + _v = q1src if q1src is not None else _v + if _v is not None: + self["q1src"] = _v + _v = arg.pop("q3", None) + _v = q3 if q3 is not None else _v + if _v is not None: + self["q3"] = _v + _v = arg.pop("q3src", None) + _v = q3src if q3src is not None else _v + if _v is not None: + self["q3src"] = _v + _v = arg.pop("quartilemethod", None) + _v = quartilemethod if quartilemethod is not None else _v + if _v is not None: + self["quartilemethod"] = _v + _v = arg.pop("sd", None) + _v = sd if sd is not None else _v + if _v is not None: + self["sd"] = _v + _v = arg.pop("sdsrc", None) + _v = sdsrc if sdsrc is not None else _v + if _v is not None: + self["sdsrc"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("upperfence", None) + _v = upperfence if upperfence is not None else _v + if _v is not None: + self["upperfence"] = _v + _v = arg.pop("upperfencesrc", None) + _v = upperfencesrc if upperfencesrc is not None else _v + if _v is not None: + self["upperfencesrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("whiskerwidth", None) + _v = whiskerwidth if whiskerwidth is not None else _v + if _v is not None: + self["whiskerwidth"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "box" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_candlestick.py b/packages/python/plotly/plotly/graph_objs/_candlestick.py new file mode 100644 index 00000000000..bfc9c8fe85f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_candlestick.py @@ -0,0 +1,1584 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Candlestick(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "candlestick" + _valid_props = { + "close", + "closesrc", + "customdata", + "customdatasrc", + "decreasing", + "high", + "highsrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "increasing", + "legendgroup", + "line", + "low", + "lowsrc", + "meta", + "metasrc", + "name", + "opacity", + "open", + "opensrc", + "selectedpoints", + "showlegend", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "whiskerwidth", + "x", + "xaxis", + "xcalendar", + "xsrc", + "yaxis", + } + + # close + # ----- + @property + def close(self): + """ + Sets the close values. + + The 'close' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["close"] + + @close.setter + def close(self, val): + self["close"] = val + + # closesrc + # -------- + @property + def closesrc(self): + """ + Sets the source reference on Chart Studio Cloud for close . + + The 'closesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["closesrc"] + + @closesrc.setter + def closesrc(self, val): + self["closesrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # decreasing + # ---------- + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Supported dict properties: + + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + line + :class:`plotly.graph_objects.candlestick.decrea + sing.Line` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.candlestick.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + # high + # ---- + @property + def high(self): + """ + Sets the high values. + + The 'high' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["high"] + + @high.setter + def high(self, val): + self["high"] = val + + # highsrc + # ------- + @property + def highsrc(self): + """ + Sets the source reference on Chart Studio Cloud for high . + + The 'highsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["highsrc"] + + @highsrc.setter + def highsrc(self, val): + self["highsrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + split + Show hover information (open, close, high, low) + in separate labels. + + Returns + ------- + plotly.graph_objs.candlestick.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # increasing + # ---------- + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Supported dict properties: + + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + line + :class:`plotly.graph_objects.candlestick.increa + sing.Line` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.candlestick.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + width + Sets the width (in px) of line bounding the + box(es). Note that this style setting can also + be set per direction via + `increasing.line.width` and + `decreasing.line.width`. + + Returns + ------- + plotly.graph_objs.candlestick.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # low + # --- + @property + def low(self): + """ + Sets the low values. + + The 'low' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["low"] + + @low.setter + def low(self, val): + self["low"] = val + + # lowsrc + # ------ + @property + def lowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for low . + + The 'lowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowsrc"] + + @lowsrc.setter + def lowsrc(self, val): + self["lowsrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # open + # ---- + @property + def open(self): + """ + Sets the open values. + + The 'open' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["open"] + + @open.setter + def open(self, val): + self["open"] = val + + # opensrc + # ------- + @property + def opensrc(self): + """ + Sets the source reference on Chart Studio Cloud for open . + + The 'opensrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opensrc"] + + @opensrc.setter + def opensrc(self, val): + self["opensrc"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.candlestick.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets hover text elements associated with each sample point. If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + this trace's sample points. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # whiskerwidth + # ------------ + @property + def whiskerwidth(self): + """ + Sets the width of the whiskers relative to the box' width. For + example, with 1, the whiskers are as wide as the box(es). + + The 'whiskerwidth' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["whiskerwidth"] + + @whiskerwidth.setter + def whiskerwidth(self, val): + self["whiskerwidth"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. If absent, linear coordinate will be + generated. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + close . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + decreasing + :class:`plotly.graph_objects.candlestick.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + high . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverlabel` + instance or dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + increasing + :class:`plotly.graph_objects.candlestick.Increasing` + instance or dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.candlestick.Line` instance + or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + low . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + """ + + def __init__( + self, + arg=None, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legendgroup=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + whiskerwidth=None, + x=None, + xaxis=None, + xcalendar=None, + xsrc=None, + yaxis=None, + **kwargs + ): + """ + Construct a new Candlestick object + + The candlestick is a style of financial chart describing open, + high, low and close for a given `x` coordinate (most likely + time). The boxes represent the spread between the `open` and + `close` values and the lines represent the spread between the + `low` and `high` values Sample points where the close value is + higher (lower) then the open value are called increasing + (decreasing). By default, increasing candles are drawn in green + whereas decreasing are drawn in red. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Candlestick` + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + close . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + decreasing + :class:`plotly.graph_objects.candlestick.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + high . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverlabel` + instance or dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + increasing + :class:`plotly.graph_objects.candlestick.Increasing` + instance or dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.candlestick.Line` instance + or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + low . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + + Returns + ------- + Candlestick + """ + super(Candlestick, self).__init__("candlestick") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Candlestick +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Candlestick`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("close", None) + _v = close if close is not None else _v + if _v is not None: + self["close"] = _v + _v = arg.pop("closesrc", None) + _v = closesrc if closesrc is not None else _v + if _v is not None: + self["closesrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("decreasing", None) + _v = decreasing if decreasing is not None else _v + if _v is not None: + self["decreasing"] = _v + _v = arg.pop("high", None) + _v = high if high is not None else _v + if _v is not None: + self["high"] = _v + _v = arg.pop("highsrc", None) + _v = highsrc if highsrc is not None else _v + if _v is not None: + self["highsrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("increasing", None) + _v = increasing if increasing is not None else _v + if _v is not None: + self["increasing"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("low", None) + _v = low if low is not None else _v + if _v is not None: + self["low"] = _v + _v = arg.pop("lowsrc", None) + _v = lowsrc if lowsrc is not None else _v + if _v is not None: + self["lowsrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("open", None) + _v = open if open is not None else _v + if _v is not None: + self["open"] = _v + _v = arg.pop("opensrc", None) + _v = opensrc if opensrc is not None else _v + if _v is not None: + self["opensrc"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("whiskerwidth", None) + _v = whiskerwidth if whiskerwidth is not None else _v + if _v is not None: + self["whiskerwidth"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "candlestick" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_carpet.py b/packages/python/plotly/plotly/graph_objs/_carpet.py new file mode 100644 index 00000000000..78a52f6556e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_carpet.py @@ -0,0 +1,1759 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Carpet(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "carpet" + _valid_props = { + "a", + "a0", + "aaxis", + "asrc", + "b", + "b0", + "baxis", + "bsrc", + "carpet", + "cheaterslope", + "color", + "customdata", + "customdatasrc", + "da", + "db", + "font", + "ids", + "idssrc", + "meta", + "metasrc", + "name", + "opacity", + "stream", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xsrc", + "y", + "yaxis", + "ysrc", + } + + # a + # - + @property + def a(self): + """ + An array containing values of the first parameter value + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + # a0 + # -- + @property + def a0(self): + """ + Alternate to `a`. Builds a linear space of a coordinates. Use + with `da` where `a0` is the starting coordinate and `da` the + step. + + The 'a0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["a0"] + + @a0.setter + def a0(self, val): + self["a0"] = val + + # aaxis + # ----- + @property + def aaxis(self): + """ + The 'aaxis' property is an instance of Aaxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Aaxis` + - A dict of string/value properties that will be passed + to the Aaxis constructor + + Supported dict properties: + + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at + along the final value of this axis. If True, + the end line is drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major + grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether axis labels are drawn on the + low side, the high side, both, or neither side + of the axis. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at + along the starting value of this axis. If True, + the start line is drawn on top of the grid + lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: We add one item to d3's + date formatter: "%{n}f" for fractional seconds + with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" + would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet. + aaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.carpet.aaxis.tickformatstopdefaults), sets + the default property values to use for elements + of carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + title + :class:`plotly.graph_objects.carpet.aaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.aaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be set by the now + deprecated `titlefont` attribute. + titleoffset + Deprecated: Please use + carpet.aaxis.title.offset instead. An + additional amount by which to offset the title + from the tick labels, given in pixels. Note + that this used to be set by the now deprecated + `titleoffset` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + + Returns + ------- + plotly.graph_objs.carpet.Aaxis + """ + return self["aaxis"] + + @aaxis.setter + def aaxis(self, val): + self["aaxis"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # b + # - + @property + def b(self): + """ + A two dimensional array of y coordinates at each carpet point. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # b0 + # -- + @property + def b0(self): + """ + Alternate to `b`. Builds a linear space of a coordinates. Use + with `db` where `b0` is the starting coordinate and `db` the + step. + + The 'b0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["b0"] + + @b0.setter + def b0(self, val): + self["b0"] = val + + # baxis + # ----- + @property + def baxis(self): + """ + The 'baxis' property is an instance of Baxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Baxis` + - A dict of string/value properties that will be passed + to the Baxis constructor + + Supported dict properties: + + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at + along the final value of this axis. If True, + the end line is drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major + grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether axis labels are drawn on the + low side, the high side, both, or neither side + of the axis. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at + along the starting value of this axis. If True, + the start line is drawn on top of the grid + lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: We add one item to d3's + date formatter: "%{n}f" for fractional seconds + with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" + would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet. + baxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.carpet.baxis.tickformatstopdefaults), sets + the default property values to use for elements + of carpet.baxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + title + :class:`plotly.graph_objects.carpet.baxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.baxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be set by the now + deprecated `titlefont` attribute. + titleoffset + Deprecated: Please use + carpet.baxis.title.offset instead. An + additional amount by which to offset the title + from the tick labels, given in pixels. Note + that this used to be set by the now deprecated + `titleoffset` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + + Returns + ------- + plotly.graph_objs.carpet.Baxis + """ + return self["baxis"] + + @baxis.setter + def baxis(self, val): + self["baxis"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + # carpet + # ------ + @property + def carpet(self): + """ + An identifier for this carpet, so that `scattercarpet` and + `contourcarpet` traces can specify a carpet plot on which they + lie + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + # cheaterslope + # ------------ + @property + def cheaterslope(self): + """ + The shift applied to each successive row of data in creating a + cheater plot. Only used if `x` is been ommitted. + + The 'cheaterslope' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cheaterslope"] + + @cheaterslope.setter + def cheaterslope(self, val): + self["cheaterslope"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # da + # -- + @property + def da(self): + """ + Sets the a coordinate step. See `a0` for more info. + + The 'da' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["da"] + + @da.setter + def da(self, val): + self["da"] = val + + # db + # -- + @property + def db(self): + """ + Sets the b coordinate step. See `b0` for more info. + + The 'db' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["db"] + + @db.setter + def db(self, val): + self["db"] = val + + # font + # ---- + @property + def font(self): + """ + The default font used for axis & tick labels on this carpet + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.carpet.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.carpet.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + A two dimensional array of x coordinates at each carpet point. + If ommitted, the plot is a cheater plot and the xaxis is hidden + by default. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + A two dimensional array of y coordinates at each carpet point. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` instance or + dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud for a + . + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` instance or + dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud for b + . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + ommitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If ommitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + a=None, + a0=None, + aaxis=None, + asrc=None, + b=None, + b0=None, + baxis=None, + bsrc=None, + carpet=None, + cheaterslope=None, + color=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + font=None, + ids=None, + idssrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xsrc=None, + y=None, + yaxis=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Carpet object + + The data describing carpet axis layout is set in `y` and + (optionally) also `x`. If only `y` is present, `x` the plot is + interpreted as a cheater plot and is filled in using the `y` + values. `x` and `y` may either be 2D arrays matching with each + dimension matching that of `a` and `b`, or they may be 1D + arrays with total length equal to that of `a` and `b`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Carpet` + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` instance or + dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud for a + . + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` instance or + dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud for b + . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + ommitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If ommitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Carpet + """ + super(Carpet, self).__init__("carpet") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Carpet +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Carpet`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("a", None) + _v = a if a is not None else _v + if _v is not None: + self["a"] = _v + _v = arg.pop("a0", None) + _v = a0 if a0 is not None else _v + if _v is not None: + self["a0"] = _v + _v = arg.pop("aaxis", None) + _v = aaxis if aaxis is not None else _v + if _v is not None: + self["aaxis"] = _v + _v = arg.pop("asrc", None) + _v = asrc if asrc is not None else _v + if _v is not None: + self["asrc"] = _v + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("b0", None) + _v = b0 if b0 is not None else _v + if _v is not None: + self["b0"] = _v + _v = arg.pop("baxis", None) + _v = baxis if baxis is not None else _v + if _v is not None: + self["baxis"] = _v + _v = arg.pop("bsrc", None) + _v = bsrc if bsrc is not None else _v + if _v is not None: + self["bsrc"] = _v + _v = arg.pop("carpet", None) + _v = carpet if carpet is not None else _v + if _v is not None: + self["carpet"] = _v + _v = arg.pop("cheaterslope", None) + _v = cheaterslope if cheaterslope is not None else _v + if _v is not None: + self["cheaterslope"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("da", None) + _v = da if da is not None else _v + if _v is not None: + self["da"] = _v + _v = arg.pop("db", None) + _v = db if db is not None else _v + if _v is not None: + self["db"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "carpet" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_choropleth.py b/packages/python/plotly/plotly/graph_objs/_choropleth.py new file mode 100644 index 00000000000..e22ea8152ef --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_choropleth.py @@ -0,0 +1,2128 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Choropleth(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "choropleth" + _valid_props = { + "autocolorscale", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "featureidkey", + "geo", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "locationmode", + "locations", + "locationssrc", + "marker", + "meta", + "metasrc", + "name", + "reversescale", + "selected", + "selectedpoints", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropl + eth.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.choropleth.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of choropleth.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choropleth.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + choropleth.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + choropleth.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.choropleth.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # featureidkey + # ------------ + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Only has an effect + when `geojson` is set. Support nested property, for example + "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + # geo + # --- + @property + def geo(self): + """ + Sets a reference between this trace's geospatial coordinates + and a geographic map. If "geo" (the default value), the + geospatial coordinates refer to `layout.geo`. If "geo2", the + geospatial coordinates refer to `layout.geo2`, and so on. + + The 'geo' property is an identifier of a particular + subplot, of type 'geo', that may be specified as the string 'geo' + optionally followed by an integer >= 1 + (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + + Returns + ------- + str + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + + # geojson + # ------- + @property + def geojson(self): + """ + Sets optional GeoJSON data associated with this trace. If not + given, the features on the base map are used. It can be set as + a valid GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or "Feature" with + geometries of type "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.choropleth.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # locationmode + # ------------ + @property + def locationmode(self): + """ + Determines the set of locations used to match entries in + `locations` to regions on the map. Values "ISO-3", "USA- + states", *country names* correspond to features on the base map + and value "geojson-id" corresponds to features from a custom + GeoJSON linked to the `geojson` attribute. + + The 'locationmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['ISO-3', 'USA-states', 'country names', 'geojson-id'] + + Returns + ------- + Any + """ + return self["locationmode"] + + @locationmode.setter + def locationmode(self, val): + self["locationmode"] = val + + # locations + # --------- + @property + def locations(self): + """ + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + line + :class:`plotly.graph_objects.choropleth.marker. + Line` instance or dict with compatible + properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + + Returns + ------- + plotly.graph_objs.choropleth.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.choropleth.selecte + d.Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.choropleth.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.choropleth.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each location. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.choropleth.unselec + ted.Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.choropleth.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # z + # - + @property + def z(self): + """ + Sets the color values. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. Values "ISO-3", + "USA-states", *country names* correspond to features on + the base map and value "geojson-id" corresponds to + features from a custom GeoJSON linked to the `geojson` + attribute. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choropleth.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + locationmode=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Choropleth object + + The data that describes the choropleth value-to-color mapping + is set in `z`. The geographic locations corresponding to each + value in `z` are set in `locations`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Choropleth` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. Values "ISO-3", + "USA-states", *country names* correspond to features on + the base map and value "geojson-id" corresponds to + features from a custom GeoJSON linked to the `geojson` + attribute. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choropleth.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Choropleth + """ + super(Choropleth, self).__init__("choropleth") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Choropleth +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Choropleth`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("featureidkey", None) + _v = featureidkey if featureidkey is not None else _v + if _v is not None: + self["featureidkey"] = _v + _v = arg.pop("geo", None) + _v = geo if geo is not None else _v + if _v is not None: + self["geo"] = _v + _v = arg.pop("geojson", None) + _v = geojson if geojson is not None else _v + if _v is not None: + self["geojson"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("locationmode", None) + _v = locationmode if locationmode is not None else _v + if _v is not None: + self["locationmode"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "choropleth" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_choroplethmapbox.py b/packages/python/plotly/plotly/graph_objs/_choroplethmapbox.py new file mode 100644 index 00000000000..a6731287907 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_choroplethmapbox.py @@ -0,0 +1,2121 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Choroplethmapbox(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "choroplethmapbox" + _valid_props = { + "autocolorscale", + "below", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "featureidkey", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "locations", + "locationssrc", + "marker", + "meta", + "metasrc", + "name", + "reversescale", + "selected", + "selectedpoints", + "showlegend", + "showscale", + "stream", + "subplot", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # below + # ----- + @property + def below(self): + """ + Determines if the choropleth polygons will be inserted before + the layer with the specified ID. By default, choroplethmapbox + traces are placed above the water layers. If set to '', the + layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropl + ethmapbox.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.choroplethmapbox.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + choroplethmapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmapbox.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + choroplethmapbox.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + choroplethmapbox.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.choroplethmapbox.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # featureidkey + # ------------ + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Support nested + property, for example "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + # geojson + # ------- + @property + def geojson(self): + """ + Sets the GeoJSON data associated with this trace. It can be set + as a valid GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or "Feature" with + geometries of type "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `properties` Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # locations + # --------- + @property + def locations(self): + """ + Sets which features found in "geojson" to plot using their + feature `id` field. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + line + :class:`plotly.graph_objects.choroplethmapbox.m + arker.Line` instance or dict with compatible + properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.choroplethmapbox.s + elected.Marker` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + mapbox subplot. If "mapbox" (the default value), the data refer + to `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as the string 'mapbox' + optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each location. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.choroplethmapbox.u + nselected.Marker` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # z + # - + @property + def z(self): + """ + Sets the color values. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `properties` Anything contained + in tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + marker + :class:`plotly.graph_objects.choroplethmapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Choroplethmapbox object + + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Choroplethmapbox` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `properties` Anything contained + in tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + marker + :class:`plotly.graph_objects.choroplethmapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Choroplethmapbox + """ + super(Choroplethmapbox, self).__init__("choroplethmapbox") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Choroplethmapbox +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Choroplethmapbox`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("below", None) + _v = below if below is not None else _v + if _v is not None: + self["below"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("featureidkey", None) + _v = featureidkey if featureidkey is not None else _v + if _v is not None: + self["featureidkey"] = _v + _v = arg.pop("geojson", None) + _v = geojson if geojson is not None else _v + if _v is not None: + self["geojson"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "choroplethmapbox" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_cone.py b/packages/python/plotly/plotly/graph_objs/_cone.py new file mode 100644 index 00000000000..b36f6bd6784 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_cone.py @@ -0,0 +1,2383 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Cone(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "cone" + _valid_props = { + "anchor", + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "sizemode", + "sizeref", + "stream", + "text", + "textsrc", + "type", + "u", + "uid", + "uirevision", + "usrc", + "v", + "visible", + "vsrc", + "w", + "wsrc", + "x", + "xsrc", + "y", + "ysrc", + "z", + "zsrc", + } + + # anchor + # ------ + @property + def anchor(self): + """ + Sets the cones' anchor with respect to their x/y/z positions. + Note that "cm" denote the cone's center of mass which + corresponds to 1/4 from the tail to tip. + + The 'anchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['tip', 'tail', 'cm', 'center'] + + Returns + ------- + Any + """ + return self["anchor"] + + @anchor.setter + def anchor(self, val): + self["anchor"] = val + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here u/v/w norm) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmin` must be set as + well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as u/v/w norm. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmax` must be set as + well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.cone.co + lorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.cone.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of cone.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.cone.colorbar.Titl + e` instance or dict with compatible properties + titlefont + Deprecated: Please use cone.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use cone.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.cone.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.cone.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `norm` Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. + + Returns + ------- + plotly.graph_objs.cone.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.cone.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in the + vector field) or as "absolute" value (in the same units as the + vector field). + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['scaled', 'absolute'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) corresponds to the + minimum "time" to travel across two successive x/y/z positions + at the average velocity of those two successive positions. All + cones in a given trace use the same factor. With `sizemode` set + to "scaled", `sizeref` is unitless, its default value is 0.5 + With `sizemode` set to "absolute", `sizeref` has the same units + as the u/v/w vector field, its the default value is half the + sample's maximum vector norm. + + The 'sizeref' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.cone.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with the cones. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # u + # - + @property + def u(self): + """ + Sets the x components of the vector field. + + The 'u' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["u"] + + @u.setter + def u(self, val): + self["u"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # usrc + # ---- + @property + def usrc(self): + """ + Sets the source reference on Chart Studio Cloud for u . + + The 'usrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["usrc"] + + @usrc.setter + def usrc(self, val): + self["usrc"] = val + + # v + # - + @property + def v(self): + """ + Sets the y components of the vector field. + + The 'v' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["v"] + + @v.setter + def v(self, val): + self["v"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # vsrc + # ---- + @property + def vsrc(self): + """ + Sets the source reference on Chart Studio Cloud for v . + + The 'vsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vsrc"] + + @vsrc.setter + def vsrc(self, val): + self["vsrc"] = val + + # w + # - + @property + def w(self): + """ + Sets the z components of the vector field. + + The 'w' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["w"] + + @w.setter + def w(self, val): + self["w"] = val + + # wsrc + # ---- + @property + def wsrc(self): + """ + Sets the source reference on Chart Studio Cloud for w . + + The 'wsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["wsrc"] + + @wsrc.setter + def wsrc(self, val): + self["wsrc"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates of the vector field and of the displayed + cones. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates of the vector field and of the displayed + cones. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the z coordinates of the vector field and of the displayed + cones. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `norm` Anything contained in + tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.cone.Lighting` instance or + dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5 With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + u + Sets the x components of the vector field. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for u + . + v + Sets the y components of the vector field. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for v + . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on Chart Studio Cloud for w + . + x + Sets the x coordinates of the vector field and of the + displayed cones. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates of the vector field and of the + displayed cones. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates of the vector field and of the + displayed cones. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + anchor=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizemode=None, + sizeref=None, + stream=None, + text=None, + textsrc=None, + u=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + visible=None, + vsrc=None, + w=None, + wsrc=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Cone object + + Use cone traces to visualize vector fields. Specify a vector + field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and + 3 vector component arrays `u`, `v`, `w`. The cones are drawn + exactly at the positions given by `x`, `y` and `z`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Cone` + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `norm` Anything contained in + tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.cone.Lighting` instance or + dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5 With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + u + Sets the x components of the vector field. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for u + . + v + Sets the y components of the vector field. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for v + . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on Chart Studio Cloud for w + . + x + Sets the x coordinates of the vector field and of the + displayed cones. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates of the vector field and of the + displayed cones. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates of the vector field and of the + displayed cones. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Cone + """ + super(Cone, self).__init__("cone") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Cone +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Cone`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("anchor", None) + _v = anchor if anchor is not None else _v + if _v is not None: + self["anchor"] = _v + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lighting", None) + _v = lighting if lighting is not None else _v + if _v is not None: + self["lighting"] = _v + _v = arg.pop("lightposition", None) + _v = lightposition if lightposition is not None else _v + if _v is not None: + self["lightposition"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("u", None) + _v = u if u is not None else _v + if _v is not None: + self["u"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("usrc", None) + _v = usrc if usrc is not None else _v + if _v is not None: + self["usrc"] = _v + _v = arg.pop("v", None) + _v = v if v is not None else _v + if _v is not None: + self["v"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("vsrc", None) + _v = vsrc if vsrc is not None else _v + if _v is not None: + self["vsrc"] = _v + _v = arg.pop("w", None) + _v = w if w is not None else _v + if _v is not None: + self["w"] = _v + _v = arg.pop("wsrc", None) + _v = wsrc if wsrc is not None else _v + if _v is not None: + self["wsrc"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "cone" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_contour.py b/packages/python/plotly/plotly/graph_objs/_contour.py new file mode 100644 index 00000000000..41a55d3a193 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_contour.py @@ -0,0 +1,2695 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Contour(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "contour" + _valid_props = { + "autocolorscale", + "autocontour", + "coloraxis", + "colorbar", + "colorscale", + "connectgaps", + "contours", + "customdata", + "customdatasrc", + "dx", + "dy", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoverongaps", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "meta", + "metasrc", + "name", + "ncontours", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xsrc", + "xtype", + "y", + "y0", + "yaxis", + "ycalendar", + "ysrc", + "ytype", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # autocontour + # ----------- + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour + .colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.contour.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of contour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contour.colorbar.T + itle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + contour.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + contour.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.contour.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. It is defaulted to true if `z` + is a one dimensional array otherwise it is defaulted to false. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # contours + # -------- + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Supported dict properties: + + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "heatmap", + a heatmap gradient coloring is applied between + each contour level. If "lines", coloring is + done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. + + Returns + ------- + plotly.graph_objs.contour.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line color, + marker color, or marker line color, whichever is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to contour.colorscale + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.contour.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoverongaps + # ----------- + @property + def hoverongaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data have hover labels associated with them. + + The 'hoverongaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["hoverongaps"] + + @hoverongaps.setter + def hoverongaps(self, val): + self["hoverongaps"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". + + Returns + ------- + plotly.graph_objs.contour.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # ncontours + # --------- + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.contour.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # xtype + # ----- + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # ytype + # ----- + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + + # z + # - + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zhoverformat + # ------------ + @property + def zhoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array otherwise it + is defaulted to false. + contours + :class:`plotly.graph_objects.contour.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.contour.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contour.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + autocontour=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Contour object + + The data from which contour lines are computed is set in `z`. + Data in `z` must be a 2D list of numbers. Say that `z` has N + rows and M columns, then by default, these N rows correspond to + N y coordinates (set in `y` or auto-generated) and the M + columns correspond to M x coordinates (set in `x` or auto- + generated). By setting `transpose` to True, the above behavior + is flipped. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Contour` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array otherwise it + is defaulted to false. + contours + :class:`plotly.graph_objects.contour.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.contour.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contour.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Contour + """ + super(Contour, self).__init__("contour") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Contour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Contour`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("autocontour", None) + _v = autocontour if autocontour is not None else _v + if _v is not None: + self["autocontour"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("contours", None) + _v = contours if contours is not None else _v + if _v is not None: + self["contours"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoverongaps", None) + _v = hoverongaps if hoverongaps is not None else _v + if _v is not None: + self["hoverongaps"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("ncontours", None) + _v = ncontours if ncontours is not None else _v + if _v is not None: + self["ncontours"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("transpose", None) + _v = transpose if transpose is not None else _v + if _v is not None: + self["transpose"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("xtype", None) + _v = xtype if xtype is not None else _v + if _v is not None: + self["xtype"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("ytype", None) + _v = ytype if ytype is not None else _v + if _v is not None: + self["ytype"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zhoverformat", None) + _v = zhoverformat if zhoverformat is not None else _v + if _v is not None: + self["zhoverformat"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "contour" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_contourcarpet.py b/packages/python/plotly/plotly/graph_objs/_contourcarpet.py new file mode 100644 index 00000000000..11469fdec12 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_contourcarpet.py @@ -0,0 +1,2271 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Contourcarpet(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "contourcarpet" + _valid_props = { + "a", + "a0", + "asrc", + "atype", + "autocolorscale", + "autocontour", + "b", + "b0", + "bsrc", + "btype", + "carpet", + "coloraxis", + "colorbar", + "colorscale", + "contours", + "customdata", + "customdatasrc", + "da", + "db", + "fillcolor", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "meta", + "metasrc", + "name", + "ncontours", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "xaxis", + "yaxis", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # a + # - + @property + def a(self): + """ + Sets the x coordinates. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + # a0 + # -- + @property + def a0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'a0' property accepts values of any type + + Returns + ------- + Any + """ + return self["a0"] + + @a0.setter + def a0(self, val): + self["a0"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # atype + # ----- + @property + def atype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'atype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["atype"] + + @atype.setter + def atype(self, val): + self["atype"] = val + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # autocontour + # ----------- + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + # b + # - + @property + def b(self): + """ + Sets the y coordinates. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # b0 + # -- + @property + def b0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'b0' property accepts values of any type + + Returns + ------- + Any + """ + return self["b0"] + + @b0.setter + def b0(self, val): + self["b0"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + # btype + # ----- + @property + def btype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'btype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["btype"] + + @btype.setter + def btype(self, val): + self["btype"] = val + + # carpet + # ------ + @property + def carpet(self): + """ + The `carpet` of the carpet axes on which this contour trace + lies + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour + carpet.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.contourcarpet.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + contourcarpet.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contourcarpet.colo + rbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + contourcarpet.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + contourcarpet.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.contourcarpet.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # contours + # -------- + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Supported dict properties: + + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "lines", + coloring is done on the contour lines. If + "none", no coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. + + Returns + ------- + plotly.graph_objs.contourcarpet.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # da + # -- + @property + def da(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'da' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["da"] + + @da.setter + def da(self, val): + self["da"] = val + + # db + # -- + @property + def db(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'db' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["db"] + + @db.setter + def db(self, val): + self["db"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line color, + marker color, or marker line color, whichever is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to contourcarpet.colorscale + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". + + Returns + ------- + plotly.graph_objs.contourcarpet.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # ncontours + # --------- + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.contourcarpet.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # z + # - + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud for a + . + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud for b + . + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + :class:`plotly.graph_objects.contourcarpet.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + da + Sets the x coordinate step. See `x0` for more info. + db + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.contourcarpet.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + a=None, + a0=None, + asrc=None, + atype=None, + autocolorscale=None, + autocontour=None, + b=None, + b0=None, + bsrc=None, + btype=None, + carpet=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + fillcolor=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + xaxis=None, + yaxis=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Contourcarpet object + + Plots contours on either the first carpet axis or the carpet + axis with a matching `carpet` attribute. Data `z` is + interpreted as matching that of the corresponding carpet axis. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Contourcarpet` + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud for a + . + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud for b + . + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + :class:`plotly.graph_objects.contourcarpet.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + da + Sets the x coordinate step. See `x0` for more info. + db + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.contourcarpet.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Contourcarpet + """ + super(Contourcarpet, self).__init__("contourcarpet") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Contourcarpet +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Contourcarpet`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("a", None) + _v = a if a is not None else _v + if _v is not None: + self["a"] = _v + _v = arg.pop("a0", None) + _v = a0 if a0 is not None else _v + if _v is not None: + self["a0"] = _v + _v = arg.pop("asrc", None) + _v = asrc if asrc is not None else _v + if _v is not None: + self["asrc"] = _v + _v = arg.pop("atype", None) + _v = atype if atype is not None else _v + if _v is not None: + self["atype"] = _v + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("autocontour", None) + _v = autocontour if autocontour is not None else _v + if _v is not None: + self["autocontour"] = _v + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("b0", None) + _v = b0 if b0 is not None else _v + if _v is not None: + self["b0"] = _v + _v = arg.pop("bsrc", None) + _v = bsrc if bsrc is not None else _v + if _v is not None: + self["bsrc"] = _v + _v = arg.pop("btype", None) + _v = btype if btype is not None else _v + if _v is not None: + self["btype"] = _v + _v = arg.pop("carpet", None) + _v = carpet if carpet is not None else _v + if _v is not None: + self["carpet"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("contours", None) + _v = contours if contours is not None else _v + if _v is not None: + self["contours"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("da", None) + _v = da if da is not None else _v + if _v is not None: + self["da"] = _v + _v = arg.pop("db", None) + _v = db if db is not None else _v + if _v is not None: + self["db"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("ncontours", None) + _v = ncontours if ncontours is not None else _v + if _v is not None: + self["ncontours"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("transpose", None) + _v = transpose if transpose is not None else _v + if _v is not None: + self["transpose"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "contourcarpet" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_densitymapbox.py b/packages/python/plotly/plotly/graph_objs/_densitymapbox.py new file mode 100644 index 00000000000..f99061d2275 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_densitymapbox.py @@ -0,0 +1,2065 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Densitymapbox(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "densitymapbox" + _valid_props = { + "autocolorscale", + "below", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legendgroup", + "lon", + "lonsrc", + "meta", + "metasrc", + "name", + "opacity", + "radius", + "radiussrc", + "reversescale", + "showlegend", + "showscale", + "stream", + "subplot", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # below + # ----- + @property + def below(self): + """ + Determines if the densitymapbox trace will be inserted before + the layer with the specified ID. By default, densitymapbox + traces are placed below the first layer of type symbol If set + to '', the layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.density + mapbox.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.densitymapbox.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + densitymapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymapbox.colo + rbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + densitymapbox.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + densitymapbox.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.densitymapbox.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.densitymapbox.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # lat + # --- + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # latsrc + # ------ + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for lat . + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lon + # --- + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # lonsrc + # ------ + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for lon . + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # radius + # ------ + @property + def radius(self): + """ + Sets the radius of influence of one `lon` / `lat` point in + pixels. Increasing the value makes the densitymapbox trace + smoother, but less detailed. + + The 'radius' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["radius"] + + @radius.setter + def radius(self, val): + self["radius"] = val + + # radiussrc + # --------- + @property + def radiussrc(self): + """ + Sets the source reference on Chart Studio Cloud for radius . + + The 'radiussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["radiussrc"] + + @radiussrc.setter + def radiussrc(self, val): + self["radiussrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.densitymapbox.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + mapbox subplot. If "mapbox" (the default value), the data refer + to `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as the string 'mapbox' + optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # z + # - + @property + def z(self): + """ + Sets the points' weight. For example, a value of 10 would be + equivalent to having 10 points of weight 1 in the same spot + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + lat . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + lon . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + radius . + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legendgroup=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Densitymapbox object + + Draws a bivariate kernel density estimation with a Gaussian + kernel from `lon` and `lat` coordinates and optional `z` values + using a colorscale. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Densitymapbox` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + lat . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + lon . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + radius . + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Densitymapbox + """ + super(Densitymapbox, self).__init__("densitymapbox") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Densitymapbox +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Densitymapbox`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("below", None) + _v = below if below is not None else _v + if _v is not None: + self["below"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("lat", None) + _v = lat if lat is not None else _v + if _v is not None: + self["lat"] = _v + _v = arg.pop("latsrc", None) + _v = latsrc if latsrc is not None else _v + if _v is not None: + self["latsrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lon", None) + _v = lon if lon is not None else _v + if _v is not None: + self["lon"] = _v + _v = arg.pop("lonsrc", None) + _v = lonsrc if lonsrc is not None else _v + if _v is not None: + self["lonsrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("radius", None) + _v = radius if radius is not None else _v + if _v is not None: + self["radius"] = _v + _v = arg.pop("radiussrc", None) + _v = radiussrc if radiussrc is not None else _v + if _v is not None: + self["radiussrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "densitymapbox" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_figure.py b/packages/python/plotly/plotly/graph_objs/_figure.py index 696a3eb0a9c..1491b97e4e4 100644 --- a/packages/python/plotly/plotly/graph_objs/_figure.py +++ b/packages/python/plotly/plotly/graph_objs/_figure.py @@ -1,54 +1,4 @@ from plotly.basedatatypes import BaseFigure -from plotly.graph_objs import ( - Area, - Bar, - Barpolar, - Box, - Candlestick, - Carpet, - Choropleth, - Choroplethmapbox, - Cone, - Contour, - Contourcarpet, - Densitymapbox, - Funnel, - Funnelarea, - Heatmap, - Heatmapgl, - Histogram, - Histogram2d, - Histogram2dContour, - Image, - Indicator, - Isosurface, - Mesh3d, - Ohlc, - Parcats, - Parcoords, - Pie, - Pointcloud, - Sankey, - Scatter, - Scatter3d, - Scattercarpet, - Scattergeo, - Scattergl, - Scattermapbox, - Scatterpolar, - Scatterpolargl, - Scatterternary, - Splom, - Streamtube, - Sunburst, - Surface, - Table, - Treemap, - Violin, - Volume, - Waterfall, - layout as _layout, -) class Figure(BaseFigure): @@ -774,6 +724,8 @@ def add_area( ------- Figure """ + from plotly.graph_objs import Area + new_trace = Area( customdata=customdata, customdatasrc=customdatasrc, @@ -1199,6 +1151,8 @@ def add_bar( ------- Figure """ + from plotly.graph_objs import Bar + new_trace = Bar( alignmentgroup=alignmentgroup, base=base, @@ -1528,6 +1482,8 @@ def add_barpolar( ------- Figure """ + from plotly.graph_objs import Barpolar + new_trace = Barpolar( base=base, basesrc=basesrc, @@ -2046,6 +2002,8 @@ def add_box( ------- Figure """ + from plotly.graph_objs import Box + new_trace = Box( alignmentgroup=alignmentgroup, boxmean=boxmean, @@ -2359,6 +2317,8 @@ def add_candlestick( ------- Figure """ + from plotly.graph_objs import Candlestick + new_trace = Candlestick( close=close, closesrc=closesrc, @@ -2611,6 +2571,8 @@ def add_carpet( ------- Figure """ + from plotly.graph_objs import Carpet + new_trace = Carpet( a=a, a0=a0, @@ -2944,6 +2906,8 @@ def add_choropleth( ------- Figure """ + from plotly.graph_objs import Choropleth + new_trace = Choropleth( autocolorscale=autocolorscale, coloraxis=coloraxis, @@ -3286,6 +3250,8 @@ def add_choroplethmapbox( ------- Figure """ + from plotly.graph_objs import Choroplethmapbox + new_trace = Choroplethmapbox( autocolorscale=autocolorscale, below=below, @@ -3665,6 +3631,8 @@ def add_cone( ------- Figure """ + from plotly.graph_objs import Cone + new_trace = Cone( anchor=anchor, autocolorscale=autocolorscale, @@ -4087,6 +4055,8 @@ def add_contour( ------- Figure """ + from plotly.graph_objs import Contour + new_trace = Contour( autocolorscale=autocolorscale, autocontour=autocontour, @@ -4451,6 +4421,8 @@ def add_contourcarpet( ------- Figure """ + from plotly.graph_objs import Contourcarpet + new_trace = Contourcarpet( a=a, a0=a0, @@ -4796,6 +4768,8 @@ def add_densitymapbox( ------- Figure """ + from plotly.graph_objs import Densitymapbox + new_trace = Densitymapbox( autocolorscale=autocolorscale, below=below, @@ -5201,6 +5175,8 @@ def add_funnel( ------- Figure """ + from plotly.graph_objs import Funnel + new_trace = Funnel( alignmentgroup=alignmentgroup, cliponaxis=cliponaxis, @@ -5533,6 +5509,8 @@ def add_funnelarea( ------- Figure """ + from plotly.graph_objs import Funnelarea + new_trace = Funnelarea( aspectratio=aspectratio, baseratio=baseratio, @@ -5938,6 +5916,8 @@ def add_heatmap( ------- Figure """ + from plotly.graph_objs import Heatmap + new_trace = Heatmap( autocolorscale=autocolorscale, coloraxis=coloraxis, @@ -6265,6 +6245,8 @@ def add_heatmapgl( ------- Figure """ + from plotly.graph_objs import Heatmapgl + new_trace = Heatmapgl( autocolorscale=autocolorscale, coloraxis=coloraxis, @@ -6653,6 +6635,8 @@ def add_histogram( ------- Figure """ + from plotly.graph_objs import Histogram + new_trace = Histogram( alignmentgroup=alignmentgroup, autobinx=autobinx, @@ -7087,6 +7071,8 @@ def add_histogram2d( ------- Figure """ + from plotly.graph_objs import Histogram2d + new_trace = Histogram2d( autobinx=autobinx, autobiny=autobiny, @@ -7538,6 +7524,8 @@ def add_histogram2dcontour( ------- Figure """ + from plotly.graph_objs import Histogram2dContour + new_trace = Histogram2dContour( autobinx=autobinx, autobiny=autobiny, @@ -7829,6 +7817,8 @@ def add_image( ------- Figure """ + from plotly.graph_objs import Image + new_trace = Image( colormodel=colormodel, customdata=customdata, @@ -8007,6 +7997,8 @@ def add_indicator( ------- Figure """ + from plotly.graph_objs import Indicator + new_trace = Indicator( align=align, customdata=customdata, @@ -8352,6 +8344,8 @@ def add_isosurface( ------- Figure """ + from plotly.graph_objs import Isosurface + new_trace = Isosurface( autocolorscale=autocolorscale, caps=caps, @@ -8817,6 +8811,8 @@ def add_mesh3d( ------- Figure """ + from plotly.graph_objs import Mesh3d + new_trace = Mesh3d( alphahull=alphahull, autocolorscale=autocolorscale, @@ -9122,6 +9118,8 @@ def add_ohlc( ------- Figure """ + from plotly.graph_objs import Ohlc + new_trace = Ohlc( close=close, closesrc=closesrc, @@ -9340,6 +9338,8 @@ def add_parcats( ------- Figure """ + from plotly.graph_objs import Parcats + new_trace = Parcats( arrangement=arrangement, bundlecolors=bundlecolors, @@ -9510,6 +9510,8 @@ def add_parcoords( ------- Figure """ + from plotly.graph_objs import Parcoords + new_trace = Parcoords( customdata=customdata, customdatasrc=customdatasrc, @@ -9856,6 +9858,8 @@ def add_pie( ------- Figure """ + from plotly.graph_objs import Pie + new_trace = Pie( automargin=automargin, customdata=customdata, @@ -10138,6 +10142,8 @@ def add_pointcloud( ------- Figure """ + from plotly.graph_objs import Pointcloud + new_trace = Pointcloud( customdata=customdata, customdatasrc=customdatasrc, @@ -10337,6 +10343,8 @@ def add_sankey( ------- Figure """ + from plotly.graph_objs import Sankey + new_trace = Sankey( arrangement=arrangement, customdata=customdata, @@ -10791,6 +10799,8 @@ def add_scatter( ------- Figure """ + from plotly.graph_objs import Scatter + new_trace = Scatter( cliponaxis=cliponaxis, connectgaps=connectgaps, @@ -11156,6 +11166,8 @@ def add_scatter3d( ------- Figure """ + from plotly.graph_objs import Scatter3d + new_trace = Scatter3d( connectgaps=connectgaps, customdata=customdata, @@ -11524,6 +11536,8 @@ def add_scattercarpet( ------- Figure """ + from plotly.graph_objs import Scattercarpet + new_trace = Scattercarpet( a=a, asrc=asrc, @@ -11891,6 +11905,8 @@ def add_scattergeo( ------- Figure """ + from plotly.graph_objs import Scattergeo + new_trace = Scattergeo( connectgaps=connectgaps, customdata=customdata, @@ -12285,6 +12301,8 @@ def add_scattergl( ------- Figure """ + from plotly.graph_objs import Scattergl + new_trace = Scattergl( connectgaps=connectgaps, customdata=customdata, @@ -12626,6 +12644,8 @@ def add_scattermapbox( ------- Figure """ + from plotly.graph_objs import Scattermapbox + new_trace = Scattermapbox( below=below, connectgaps=connectgaps, @@ -13001,6 +13021,8 @@ def add_scatterpolar( ------- Figure """ + from plotly.graph_objs import Scatterpolar + new_trace = Scatterpolar( cliponaxis=cliponaxis, connectgaps=connectgaps, @@ -13380,6 +13402,8 @@ def add_scatterpolargl( ------- Figure """ + from plotly.graph_objs import Scatterpolargl + new_trace = Scatterpolargl( connectgaps=connectgaps, customdata=customdata, @@ -13761,6 +13785,8 @@ def add_scatterternary( ------- Figure """ + from plotly.graph_objs import Scatterternary + new_trace = Scatterternary( a=a, asrc=asrc, @@ -14053,6 +14079,8 @@ def add_splom( ------- Figure """ + from plotly.graph_objs import Splom + new_trace = Splom( customdata=customdata, customdatasrc=customdatasrc, @@ -14406,6 +14434,8 @@ def add_streamtube( ------- Figure """ + from plotly.graph_objs import Streamtube + new_trace = Streamtube( autocolorscale=autocolorscale, cauto=cauto, @@ -14749,6 +14779,8 @@ def add_sunburst( ------- Figure """ + from plotly.graph_objs import Sunburst + new_trace = Sunburst( branchvalues=branchvalues, count=count, @@ -15124,6 +15156,8 @@ def add_surface( ------- Figure """ + from plotly.graph_objs import Surface + new_trace = Surface( autocolorscale=autocolorscale, cauto=cauto, @@ -15330,6 +15364,8 @@ def add_table( ------- Figure """ + from plotly.graph_objs import Table + new_trace = Table( cells=cells, columnorder=columnorder, @@ -15642,6 +15678,8 @@ def add_treemap( ------- Figure """ + from plotly.graph_objs import Treemap + new_trace = Treemap( branchvalues=branchvalues, count=count, @@ -16053,6 +16091,8 @@ def add_violin( ------- Figure """ + from plotly.graph_objs import Violin + new_trace = Violin( alignmentgroup=alignmentgroup, bandwidth=bandwidth, @@ -16444,6 +16484,8 @@ def add_volume( ------- Figure """ + from plotly.graph_objs import Volume + new_trace = Volume( autocolorscale=autocolorscale, caps=caps, @@ -16884,6 +16926,8 @@ def add_waterfall( ------- Figure """ + from plotly.graph_objs import Waterfall + new_trace = Waterfall( alignmentgroup=alignmentgroup, base=base, @@ -18245,6 +18289,8 @@ def add_annotation( ------- Figure """ + from plotly.graph_objs import layout as _layout + new_obj = _layout.Annotation( arg, align=align, @@ -18552,6 +18598,8 @@ def add_layout_image( ------- Figure """ + from plotly.graph_objs import layout as _layout + new_obj = _layout.Image( arg, layer=layer, @@ -18889,6 +18937,8 @@ def add_shape( ------- Figure """ + from plotly.graph_objs import layout as _layout + new_obj = _layout.Shape( arg, fillcolor=fillcolor, diff --git a/packages/python/plotly/plotly/graph_objs/_figurewidget.py b/packages/python/plotly/plotly/graph_objs/_figurewidget.py index cb41f9c981c..390a4629bc4 100644 --- a/packages/python/plotly/plotly/graph_objs/_figurewidget.py +++ b/packages/python/plotly/plotly/graph_objs/_figurewidget.py @@ -1,54 +1,4 @@ from plotly.basewidget import BaseFigureWidget -from plotly.graph_objs import ( - Area, - Bar, - Barpolar, - Box, - Candlestick, - Carpet, - Choropleth, - Choroplethmapbox, - Cone, - Contour, - Contourcarpet, - Densitymapbox, - Funnel, - Funnelarea, - Heatmap, - Heatmapgl, - Histogram, - Histogram2d, - Histogram2dContour, - Image, - Indicator, - Isosurface, - Mesh3d, - Ohlc, - Parcats, - Parcoords, - Pie, - Pointcloud, - Sankey, - Scatter, - Scatter3d, - Scattercarpet, - Scattergeo, - Scattergl, - Scattermapbox, - Scatterpolar, - Scatterpolargl, - Scatterternary, - Splom, - Streamtube, - Sunburst, - Surface, - Table, - Treemap, - Violin, - Volume, - Waterfall, - layout as _layout, -) class FigureWidget(BaseFigureWidget): @@ -774,6 +724,8 @@ def add_area( ------- FigureWidget """ + from plotly.graph_objs import Area + new_trace = Area( customdata=customdata, customdatasrc=customdatasrc, @@ -1199,6 +1151,8 @@ def add_bar( ------- FigureWidget """ + from plotly.graph_objs import Bar + new_trace = Bar( alignmentgroup=alignmentgroup, base=base, @@ -1528,6 +1482,8 @@ def add_barpolar( ------- FigureWidget """ + from plotly.graph_objs import Barpolar + new_trace = Barpolar( base=base, basesrc=basesrc, @@ -2046,6 +2002,8 @@ def add_box( ------- FigureWidget """ + from plotly.graph_objs import Box + new_trace = Box( alignmentgroup=alignmentgroup, boxmean=boxmean, @@ -2359,6 +2317,8 @@ def add_candlestick( ------- FigureWidget """ + from plotly.graph_objs import Candlestick + new_trace = Candlestick( close=close, closesrc=closesrc, @@ -2611,6 +2571,8 @@ def add_carpet( ------- FigureWidget """ + from plotly.graph_objs import Carpet + new_trace = Carpet( a=a, a0=a0, @@ -2944,6 +2906,8 @@ def add_choropleth( ------- FigureWidget """ + from plotly.graph_objs import Choropleth + new_trace = Choropleth( autocolorscale=autocolorscale, coloraxis=coloraxis, @@ -3286,6 +3250,8 @@ def add_choroplethmapbox( ------- FigureWidget """ + from plotly.graph_objs import Choroplethmapbox + new_trace = Choroplethmapbox( autocolorscale=autocolorscale, below=below, @@ -3665,6 +3631,8 @@ def add_cone( ------- FigureWidget """ + from plotly.graph_objs import Cone + new_trace = Cone( anchor=anchor, autocolorscale=autocolorscale, @@ -4087,6 +4055,8 @@ def add_contour( ------- FigureWidget """ + from plotly.graph_objs import Contour + new_trace = Contour( autocolorscale=autocolorscale, autocontour=autocontour, @@ -4451,6 +4421,8 @@ def add_contourcarpet( ------- FigureWidget """ + from plotly.graph_objs import Contourcarpet + new_trace = Contourcarpet( a=a, a0=a0, @@ -4796,6 +4768,8 @@ def add_densitymapbox( ------- FigureWidget """ + from plotly.graph_objs import Densitymapbox + new_trace = Densitymapbox( autocolorscale=autocolorscale, below=below, @@ -5201,6 +5175,8 @@ def add_funnel( ------- FigureWidget """ + from plotly.graph_objs import Funnel + new_trace = Funnel( alignmentgroup=alignmentgroup, cliponaxis=cliponaxis, @@ -5533,6 +5509,8 @@ def add_funnelarea( ------- FigureWidget """ + from plotly.graph_objs import Funnelarea + new_trace = Funnelarea( aspectratio=aspectratio, baseratio=baseratio, @@ -5938,6 +5916,8 @@ def add_heatmap( ------- FigureWidget """ + from plotly.graph_objs import Heatmap + new_trace = Heatmap( autocolorscale=autocolorscale, coloraxis=coloraxis, @@ -6265,6 +6245,8 @@ def add_heatmapgl( ------- FigureWidget """ + from plotly.graph_objs import Heatmapgl + new_trace = Heatmapgl( autocolorscale=autocolorscale, coloraxis=coloraxis, @@ -6653,6 +6635,8 @@ def add_histogram( ------- FigureWidget """ + from plotly.graph_objs import Histogram + new_trace = Histogram( alignmentgroup=alignmentgroup, autobinx=autobinx, @@ -7087,6 +7071,8 @@ def add_histogram2d( ------- FigureWidget """ + from plotly.graph_objs import Histogram2d + new_trace = Histogram2d( autobinx=autobinx, autobiny=autobiny, @@ -7538,6 +7524,8 @@ def add_histogram2dcontour( ------- FigureWidget """ + from plotly.graph_objs import Histogram2dContour + new_trace = Histogram2dContour( autobinx=autobinx, autobiny=autobiny, @@ -7829,6 +7817,8 @@ def add_image( ------- FigureWidget """ + from plotly.graph_objs import Image + new_trace = Image( colormodel=colormodel, customdata=customdata, @@ -8007,6 +7997,8 @@ def add_indicator( ------- FigureWidget """ + from plotly.graph_objs import Indicator + new_trace = Indicator( align=align, customdata=customdata, @@ -8352,6 +8344,8 @@ def add_isosurface( ------- FigureWidget """ + from plotly.graph_objs import Isosurface + new_trace = Isosurface( autocolorscale=autocolorscale, caps=caps, @@ -8817,6 +8811,8 @@ def add_mesh3d( ------- FigureWidget """ + from plotly.graph_objs import Mesh3d + new_trace = Mesh3d( alphahull=alphahull, autocolorscale=autocolorscale, @@ -9122,6 +9118,8 @@ def add_ohlc( ------- FigureWidget """ + from plotly.graph_objs import Ohlc + new_trace = Ohlc( close=close, closesrc=closesrc, @@ -9340,6 +9338,8 @@ def add_parcats( ------- FigureWidget """ + from plotly.graph_objs import Parcats + new_trace = Parcats( arrangement=arrangement, bundlecolors=bundlecolors, @@ -9510,6 +9510,8 @@ def add_parcoords( ------- FigureWidget """ + from plotly.graph_objs import Parcoords + new_trace = Parcoords( customdata=customdata, customdatasrc=customdatasrc, @@ -9856,6 +9858,8 @@ def add_pie( ------- FigureWidget """ + from plotly.graph_objs import Pie + new_trace = Pie( automargin=automargin, customdata=customdata, @@ -10138,6 +10142,8 @@ def add_pointcloud( ------- FigureWidget """ + from plotly.graph_objs import Pointcloud + new_trace = Pointcloud( customdata=customdata, customdatasrc=customdatasrc, @@ -10337,6 +10343,8 @@ def add_sankey( ------- FigureWidget """ + from plotly.graph_objs import Sankey + new_trace = Sankey( arrangement=arrangement, customdata=customdata, @@ -10791,6 +10799,8 @@ def add_scatter( ------- FigureWidget """ + from plotly.graph_objs import Scatter + new_trace = Scatter( cliponaxis=cliponaxis, connectgaps=connectgaps, @@ -11156,6 +11166,8 @@ def add_scatter3d( ------- FigureWidget """ + from plotly.graph_objs import Scatter3d + new_trace = Scatter3d( connectgaps=connectgaps, customdata=customdata, @@ -11524,6 +11536,8 @@ def add_scattercarpet( ------- FigureWidget """ + from plotly.graph_objs import Scattercarpet + new_trace = Scattercarpet( a=a, asrc=asrc, @@ -11891,6 +11905,8 @@ def add_scattergeo( ------- FigureWidget """ + from plotly.graph_objs import Scattergeo + new_trace = Scattergeo( connectgaps=connectgaps, customdata=customdata, @@ -12285,6 +12301,8 @@ def add_scattergl( ------- FigureWidget """ + from plotly.graph_objs import Scattergl + new_trace = Scattergl( connectgaps=connectgaps, customdata=customdata, @@ -12626,6 +12644,8 @@ def add_scattermapbox( ------- FigureWidget """ + from plotly.graph_objs import Scattermapbox + new_trace = Scattermapbox( below=below, connectgaps=connectgaps, @@ -13001,6 +13021,8 @@ def add_scatterpolar( ------- FigureWidget """ + from plotly.graph_objs import Scatterpolar + new_trace = Scatterpolar( cliponaxis=cliponaxis, connectgaps=connectgaps, @@ -13380,6 +13402,8 @@ def add_scatterpolargl( ------- FigureWidget """ + from plotly.graph_objs import Scatterpolargl + new_trace = Scatterpolargl( connectgaps=connectgaps, customdata=customdata, @@ -13761,6 +13785,8 @@ def add_scatterternary( ------- FigureWidget """ + from plotly.graph_objs import Scatterternary + new_trace = Scatterternary( a=a, asrc=asrc, @@ -14053,6 +14079,8 @@ def add_splom( ------- FigureWidget """ + from plotly.graph_objs import Splom + new_trace = Splom( customdata=customdata, customdatasrc=customdatasrc, @@ -14406,6 +14434,8 @@ def add_streamtube( ------- FigureWidget """ + from plotly.graph_objs import Streamtube + new_trace = Streamtube( autocolorscale=autocolorscale, cauto=cauto, @@ -14749,6 +14779,8 @@ def add_sunburst( ------- FigureWidget """ + from plotly.graph_objs import Sunburst + new_trace = Sunburst( branchvalues=branchvalues, count=count, @@ -15124,6 +15156,8 @@ def add_surface( ------- FigureWidget """ + from plotly.graph_objs import Surface + new_trace = Surface( autocolorscale=autocolorscale, cauto=cauto, @@ -15330,6 +15364,8 @@ def add_table( ------- FigureWidget """ + from plotly.graph_objs import Table + new_trace = Table( cells=cells, columnorder=columnorder, @@ -15642,6 +15678,8 @@ def add_treemap( ------- FigureWidget """ + from plotly.graph_objs import Treemap + new_trace = Treemap( branchvalues=branchvalues, count=count, @@ -16053,6 +16091,8 @@ def add_violin( ------- FigureWidget """ + from plotly.graph_objs import Violin + new_trace = Violin( alignmentgroup=alignmentgroup, bandwidth=bandwidth, @@ -16444,6 +16484,8 @@ def add_volume( ------- FigureWidget """ + from plotly.graph_objs import Volume + new_trace = Volume( autocolorscale=autocolorscale, caps=caps, @@ -16884,6 +16926,8 @@ def add_waterfall( ------- FigureWidget """ + from plotly.graph_objs import Waterfall + new_trace = Waterfall( alignmentgroup=alignmentgroup, base=base, @@ -18245,6 +18289,8 @@ def add_annotation( ------- FigureWidget """ + from plotly.graph_objs import layout as _layout + new_obj = _layout.Annotation( arg, align=align, @@ -18552,6 +18598,8 @@ def add_layout_image( ------- FigureWidget """ + from plotly.graph_objs import layout as _layout + new_obj = _layout.Image( arg, layer=layer, @@ -18889,6 +18937,8 @@ def add_shape( ------- FigureWidget """ + from plotly.graph_objs import layout as _layout + new_obj = _layout.Shape( arg, fillcolor=fillcolor, diff --git a/packages/python/plotly/plotly/graph_objs/_frame.py b/packages/python/plotly/plotly/graph_objs/_frame.py new file mode 100644 index 00000000000..1b5457ef5e8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_frame.py @@ -0,0 +1,266 @@ +from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType +import copy as _copy + + +class Frame(_BaseFrameHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "frame" + _valid_props = {"baseframe", "data", "group", "layout", "name", "traces"} + + # baseframe + # --------- + @property + def baseframe(self): + """ + The name of the frame into which this frame's properties are + merged before applying. This is used to unify properties and + avoid needing to specify the same values for the same + properties in multiple frames. + + The 'baseframe' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["baseframe"] + + @baseframe.setter + def baseframe(self, val): + self["baseframe"] = val + + # data + # ---- + @property + def data(self): + """ + A list of traces this frame modifies. The format is identical + to the normal trace definition. + + Returns + ------- + Any + """ + return self["data"] + + @data.setter + def data(self, val): + self["data"] = val + + # group + # ----- + @property + def group(self): + """ + An identifier that specifies the group to which the frame + belongs, used by animate to select a subset of frames. + + The 'group' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["group"] + + @group.setter + def group(self, val): + self["group"] = val + + # layout + # ------ + @property + def layout(self): + """ + Layout properties which this frame modifies. The format is + identical to the normal layout definition. + + Returns + ------- + Any + """ + return self["layout"] + + @layout.setter + def layout(self, val): + self["layout"] = val + + # name + # ---- + @property + def name(self): + """ + A label by which to identify the frame + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # traces + # ------ + @property + def traces(self): + """ + A list of trace indices that identify the respective traces in + the data attribute + + The 'traces' property accepts values of any type + + Returns + ------- + Any + """ + return self["traces"] + + @traces.setter + def traces(self, val): + self["traces"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + baseframe + The name of the frame into which this frame's + properties are merged before applying. This is used to + unify properties and avoid needing to specify the same + values for the same properties in multiple frames. + data + A list of traces this frame modifies. The format is + identical to the normal trace definition. + group + An identifier that specifies the group to which the + frame belongs, used by animate to select a subset of + frames. + layout + Layout properties which this frame modifies. The format + is identical to the normal layout definition. + name + A label by which to identify the frame + traces + A list of trace indices that identify the respective + traces in the data attribute + """ + + def __init__( + self, + arg=None, + baseframe=None, + data=None, + group=None, + layout=None, + name=None, + traces=None, + **kwargs + ): + """ + Construct a new Frame object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Frame` + baseframe + The name of the frame into which this frame's + properties are merged before applying. This is used to + unify properties and avoid needing to specify the same + values for the same properties in multiple frames. + data + A list of traces this frame modifies. The format is + identical to the normal trace definition. + group + An identifier that specifies the group to which the + frame belongs, used by animate to select a subset of + frames. + layout + Layout properties which this frame modifies. The format + is identical to the normal layout definition. + name + A label by which to identify the frame + traces + A list of trace indices that identify the respective + traces in the data attribute + + Returns + ------- + Frame + """ + super(Frame, self).__init__("frames") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Frame +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Frame`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("baseframe", None) + _v = baseframe if baseframe is not None else _v + if _v is not None: + self["baseframe"] = _v + _v = arg.pop("data", None) + _v = data if data is not None else _v + if _v is not None: + self["data"] = _v + _v = arg.pop("group", None) + _v = group if group is not None else _v + if _v is not None: + self["group"] = _v + _v = arg.pop("layout", None) + _v = layout if layout is not None else _v + if _v is not None: + self["layout"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("traces", None) + _v = traces if traces is not None else _v + if _v is not None: + self["traces"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_funnel.py b/packages/python/plotly/plotly/graph_objs/_funnel.py new file mode 100644 index 00000000000..607b67124fa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_funnel.py @@ -0,0 +1,2423 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Funnel(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "funnel" + _valid_props = { + "alignmentgroup", + "cliponaxis", + "connector", + "constraintext", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextanchor", + "insidetextfont", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "offset", + "offsetgroup", + "opacity", + "orientation", + "outsidetextfont", + "selectedpoints", + "showlegend", + "stream", + "text", + "textangle", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "visible", + "width", + "x", + "x0", + "xaxis", + "xsrc", + "y", + "y0", + "yaxis", + "ysrc", + } + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connector + # --------- + @property + def connector(self): + """ + The 'connector' property is an instance of Connector + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Connector` + - A dict of string/value properties that will be passed + to the Connector constructor + + Supported dict properties: + + fillcolor + Sets the fill color. + line + :class:`plotly.graph_objects.funnel.connector.L + ine` instance or dict with compatible + properties + visible + Determines if connector regions and lines are + drawn. + + Returns + ------- + plotly.graph_objs.funnel.Connector + """ + return self["connector"] + + @connector.setter + def connector(self, val): + self["connector"] = val + + # constraintext + # ------------- + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters + (e.g. 'name+x') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.funnel.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `percentInitial`, `percentPrevious` and + `percentTotal`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextanchor + # ---------------- + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnel.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.funnel.marker.Colo + rBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.funnel.marker.Line + ` instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.funnel.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # offset + # ------ + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the funnels. With "v" ("h"), the value + of the each bar spans along the vertical (horizontal). By + default funnels are tend to be oriented horizontally; unless + only "y" array is presented or orientation is set to "v". Also + regarding graphs including only 'horizontal' funnels, + "autorange" on the "y-axis" are set to "reversed". + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnel.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.funnel.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnel.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. In the + case of having multiple funnels, percentages & totals are + computed separately (per trace). + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `percentInitial`, `percentPrevious`, + `percentTotal`, `label` and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` instance + or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `percentInitial`, + `percentPrevious` and `percentTotal`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.funnel.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `percentInitial`, `percentPrevious`, `percentTotal`, + `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Funnel object + + Visualize stages in a process using length-encoded bars. This + trace can be used to show data in either a part-to-whole + representation wherein each item appears in a single stage, or + in a "drop-off" representation wherein each item appears in + each stage it traversed. See also the "funnelarea" trace type + for a different approach to visualizing funnel data. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Funnel` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` instance + or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `percentInitial`, + `percentPrevious` and `percentTotal`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.funnel.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `percentInitial`, `percentPrevious`, `percentTotal`, + `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Funnel + """ + super(Funnel, self).__init__("funnel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Funnel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Funnel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + _v = alignmentgroup if alignmentgroup is not None else _v + if _v is not None: + self["alignmentgroup"] = _v + _v = arg.pop("cliponaxis", None) + _v = cliponaxis if cliponaxis is not None else _v + if _v is not None: + self["cliponaxis"] = _v + _v = arg.pop("connector", None) + _v = connector if connector is not None else _v + if _v is not None: + self["connector"] = _v + _v = arg.pop("constraintext", None) + _v = constraintext if constraintext is not None else _v + if _v is not None: + self["constraintext"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("insidetextanchor", None) + _v = insidetextanchor if insidetextanchor is not None else _v + if _v is not None: + self["insidetextanchor"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("offsetgroup", None) + _v = offsetgroup if offsetgroup is not None else _v + if _v is not None: + self["offsetgroup"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("outsidetextfont", None) + _v = outsidetextfont if outsidetextfont is not None else _v + if _v is not None: + self["outsidetextfont"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textangle", None) + _v = textangle if textangle is not None else _v + if _v is not None: + self["textangle"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textinfo", None) + _v = textinfo if textinfo is not None else _v + if _v is not None: + self["textinfo"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "funnel" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_funnelarea.py b/packages/python/plotly/plotly/graph_objs/_funnelarea.py new file mode 100644 index 00000000000..bfcd1551969 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_funnelarea.py @@ -0,0 +1,1876 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Funnelarea(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "funnelarea" + _valid_props = { + "aspectratio", + "baseratio", + "customdata", + "customdatasrc", + "dlabel", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "label0", + "labels", + "labelssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "scalegroup", + "showlegend", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "title", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + # aspectratio + # ----------- + @property + def aspectratio(self): + """ + Sets the ratio between height and width + + The 'aspectratio' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["aspectratio"] + + @aspectratio.setter + def aspectratio(self, val): + self["aspectratio"] = val + + # baseratio + # --------- + @property + def baseratio(self): + """ + Sets the ratio between bottom length and maximum top length. + + The 'baseratio' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["baseratio"] + + @baseratio.setter + def baseratio(self, val): + self["baseratio"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dlabel + # ------ + @property + def dlabel(self): + """ + Sets the label step. See `label0` for more info. + + The 'dlabel' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dlabel"] + + @dlabel.setter + def dlabel(self, val): + self["dlabel"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this funnelarea + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this funnelarea trace + . + x + Sets the horizontal domain of this funnelarea + trace (in plot fraction). + y + Sets the vertical domain of this funnelarea + trace (in plot fraction). + + Returns + ------- + plotly.graph_objs.funnelarea.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.funnelarea.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `label`, `color`, `value`, `text` and `percent`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnelarea.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # label0 + # ------ + @property + def label0(self): + """ + Alternate to `labels`. Builds a numeric set of labels. Use with + `dlabel` where `label0` is the starting label and `dlabel` the + step. + + The 'label0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["label0"] + + @label0.setter + def label0(self, val): + self["label0"] = val + + # labels + # ------ + @property + def labels(self): + """ + Sets the sector labels. If `labels` entries are duplicated, we + sum associated `values` or simply count occurrences if `values` + is not provided. For other array attributes (including color) + we use the first non-empty entry among all occurrences of the + label. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + colors + Sets the color of each sector. If not + specified, the default trace color set is used + to pick the sector colors. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + line + :class:`plotly.graph_objects.funnelarea.marker. + Line` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.funnelarea.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # scalegroup + # ---------- + @property + def scalegroup(self): + """ + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a non-empty + group id here shared by every trace in the same group. + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.funnelarea.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnelarea.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `textinfo`. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, `text` and + `percent`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + position + Specifies the location of the `title`. Note + that the title's position used to be set by the + now deprecated `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no + title is displayed. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. + + Returns + ------- + plotly.graph_objs.funnelarea.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the values of the sectors. If omitted, we count + occurrences of each label. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `label`, `color`, `value`, + `text` and `percent`. Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `text` and `percent`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + title + :class:`plotly.graph_objects.funnelarea.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + aspectratio=None, + baseratio=None, + customdata=None, + customdatasrc=None, + dlabel=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + label0=None, + labels=None, + labelssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + scalegroup=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Funnelarea object + + Visualize stages in a process using area-encoded trapezoids. + This trace can be used to show data in a part-to-whole + representation similar to a "pie" trace, wherein each item + appears in a single stage. See also the "funnel" trace type for + a different approach to visualizing funnel data. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Funnelarea` + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `label`, `color`, `value`, + `text` and `percent`. Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `text` and `percent`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + title + :class:`plotly.graph_objects.funnelarea.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Funnelarea + """ + super(Funnelarea, self).__init__("funnelarea") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Funnelarea +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Funnelarea`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("aspectratio", None) + _v = aspectratio if aspectratio is not None else _v + if _v is not None: + self["aspectratio"] = _v + _v = arg.pop("baseratio", None) + _v = baseratio if baseratio is not None else _v + if _v is not None: + self["baseratio"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dlabel", None) + _v = dlabel if dlabel is not None else _v + if _v is not None: + self["dlabel"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("label0", None) + _v = label0 if label0 is not None else _v + if _v is not None: + self["label0"] = _v + _v = arg.pop("labels", None) + _v = labels if labels is not None else _v + if _v is not None: + self["labels"] = _v + _v = arg.pop("labelssrc", None) + _v = labelssrc if labelssrc is not None else _v + if _v is not None: + self["labelssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("scalegroup", None) + _v = scalegroup if scalegroup is not None else _v + if _v is not None: + self["scalegroup"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textinfo", None) + _v = textinfo if textinfo is not None else _v + if _v is not None: + self["textinfo"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "funnelarea" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_heatmap.py b/packages/python/plotly/plotly/graph_objs/_heatmap.py new file mode 100644 index 00000000000..ec6cf07e68f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_heatmap.py @@ -0,0 +1,2485 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Heatmap(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "heatmap" + _valid_props = { + "autocolorscale", + "coloraxis", + "colorbar", + "colorscale", + "connectgaps", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoverongaps", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xgap", + "xsrc", + "xtype", + "y", + "y0", + "yaxis", + "ycalendar", + "ygap", + "ysrc", + "ytype", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zsmooth", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmap + .colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.heatmap.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of heatmap.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmap.colorbar.T + itle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + heatmap.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + heatmap.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.heatmap.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. It is defaulted to true if `z` + is a one dimensional array and `zsmooth` is not false; + otherwise it is defaulted to false. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.heatmap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoverongaps + # ----------- + @property + def hoverongaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data have hover labels associated with them. + + The 'hoverongaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["hoverongaps"] + + @hoverongaps.setter + def hoverongaps(self, val): + self["hoverongaps"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.heatmap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xgap + # ---- + @property + def xgap(self): + """ + Sets the horizontal gap (in pixels) between bricks. + + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # xtype + # ----- + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ygap + # ---- + @property + def ygap(self): + """ + Sets the vertical gap (in pixels) between bricks. + + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ygap"] + + @ygap.setter + def ygap(self, val): + self["ygap"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # ytype + # ----- + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + + # z + # - + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zhoverformat + # ------------ + @property + def zhoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsmooth + # ------- + @property + def zsmooth(self): + """ + Picks a smoothing algorithm use to smooth `z` data. + + The 'zsmooth' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fast', 'best', False] + + Returns + ------- + Any + """ + return self["zsmooth"] + + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array and `zsmooth` + is not false; otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xgap=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ygap=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Heatmap object + + The data that describes the heatmap value-to-color mapping is + set in `z`. Data in `z` can either be a 2D list of values + (ragged or not) or a 1D array of values. In the case where `z` + is a 2D list, say that `z` has N rows and M columns. Then, by + default, the resulting heatmap will have N partitions along the + y axis and M partitions along the x axis. In other words, the + i-th row/ j-th column cell in `z` is mapped to the i-th + partition of the y axis (starting from the bottom of the plot) + and the j-th partition of the x-axis (starting from the left of + the plot). This behavior can be flipped by using `transpose`. + Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) + elements. If M (N), then the coordinates correspond to the + center of the heatmap cells and the cells have equal width. If + M+1 (N+1), then the coordinates correspond to the edges of the + heatmap cells. In the case where `z` is a 1D list, the x and y + coordinates must be provided in `x` and `y` respectively to + form data triplets. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Heatmap` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array and `zsmooth` + is not false; otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Heatmap + """ + super(Heatmap, self).__init__("heatmap") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Heatmap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Heatmap`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoverongaps", None) + _v = hoverongaps if hoverongaps is not None else _v + if _v is not None: + self["hoverongaps"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("transpose", None) + _v = transpose if transpose is not None else _v + if _v is not None: + self["transpose"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xgap", None) + _v = xgap if xgap is not None else _v + if _v is not None: + self["xgap"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("xtype", None) + _v = xtype if xtype is not None else _v + if _v is not None: + self["xtype"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ygap", None) + _v = ygap if ygap is not None else _v + if _v is not None: + self["ygap"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("ytype", None) + _v = ytype if ytype is not None else _v + if _v is not None: + self["ytype"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zhoverformat", None) + _v = zhoverformat if zhoverformat is not None else _v + if _v is not None: + self["zhoverformat"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsmooth", None) + _v = zsmooth if zsmooth is not None else _v + if _v is not None: + self["zsmooth"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "heatmap" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_heatmapgl.py b/packages/python/plotly/plotly/graph_objs/_heatmapgl.py new file mode 100644 index 00000000000..1de1d19171b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_heatmapgl.py @@ -0,0 +1,1937 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Heatmapgl(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "heatmapgl" + _valid_props = { + "autocolorscale", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "ids", + "idssrc", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "showscale", + "stream", + "text", + "textsrc", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "x", + "x0", + "xaxis", + "xsrc", + "xtype", + "y", + "y0", + "yaxis", + "ysrc", + "ytype", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmap + gl.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.heatmapgl.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of heatmapgl.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmapgl.colorbar + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + heatmapgl.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + heatmapgl.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.heatmapgl.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.heatmapgl.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.heatmapgl.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # xtype + # ----- + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # ytype + # ----- + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + + # z + # - + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmapgl.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.heatmapgl.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmapgl.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Heatmapgl object + + WebGL version of the heatmap trace type. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Heatmapgl` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmapgl.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.heatmapgl.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmapgl.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Heatmapgl + """ + super(Heatmapgl, self).__init__("heatmapgl") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Heatmapgl +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Heatmapgl`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("transpose", None) + _v = transpose if transpose is not None else _v + if _v is not None: + self["transpose"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("xtype", None) + _v = xtype if xtype is not None else _v + if _v is not None: + self["xtype"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("ytype", None) + _v = ytype if ytype is not None else _v + if _v is not None: + self["ytype"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "heatmapgl" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_histogram.py b/packages/python/plotly/plotly/graph_objs/_histogram.py new file mode 100644 index 00000000000..ff2667b32a7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_histogram.py @@ -0,0 +1,2461 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Histogram(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "histogram" + _valid_props = { + "alignmentgroup", + "autobinx", + "autobiny", + "bingroup", + "cumulative", + "customdata", + "customdatasrc", + "error_x", + "error_y", + "histfunc", + "histnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "nbinsx", + "nbinsy", + "offsetgroup", + "opacity", + "orientation", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "x", + "xaxis", + "xbins", + "xcalendar", + "xsrc", + "y", + "yaxis", + "ybins", + "ycalendar", + "ysrc", + } + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # autobinx + # -------- + @property + def autobinx(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + + The 'autobinx' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autobinx"] + + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val + + # autobiny + # -------- + @property + def autobiny(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + + The 'autobiny' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autobiny"] + + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val + + # bingroup + # -------- + @property + def bingroup(self): + """ + Set a group of histogram traces which will have compatible bin + settings. Note that traces on the same subplot and with the + same "orientation" under `barmode` "stack", "relative" and + "group" are forced into the same bingroup, Using `bingroup`, + traces under `barmode` "overlay" and on different axes (of the + same axis type) can have compatible bin settings. Note that + histogram and histogram2d* trace can share the same `bingroup` + + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["bingroup"] + + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val + + # cumulative + # ---------- + @property + def cumulative(self): + """ + The 'cumulative' property is an instance of Cumulative + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Cumulative` + - A dict of string/value properties that will be passed + to the Cumulative constructor + + Supported dict properties: + + currentbin + Only applies if cumulative is enabled. Sets + whether the current bin is included, excluded, + or has half of its value included in the + current cumulative value. "include" is the + default for compatibility with various other + tools, however it introduces a half-bin bias to + the results. "exclude" makes the opposite half- + bin bias, and "half" removes it. + direction + Only applies if cumulative is enabled. If + "increasing" (default) we sum all prior bins, + so the result increases from left to right. If + "decreasing" we sum later bins so the result + decreases from left to right. + enabled + If true, display the cumulative distribution by + summing the binned values. Use the `direction` + and `centralbin` attributes to tune the + accumulation method. Note: in this mode, the + "density" `histnorm` settings behave the same + as their equivalents without "density": "" and + "density" both rise to the number of data + points, and "probability" and *probability + density* both rise to the number of sample + points. + + Returns + ------- + plotly.graph_objs.histogram.Cumulative + """ + return self["cumulative"] + + @cumulative.setter + def cumulative(self, val): + self["cumulative"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.histogram.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.histogram.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + # histfunc + # -------- + @property + def histfunc(self): + """ + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. + + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] + + Returns + ------- + Any + """ + return self["histfunc"] + + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val + + # histnorm + # -------- + @property + def histnorm(self): + """ + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] + + Returns + ------- + Any + """ + return self["histnorm"] + + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.histogram.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `binNumber` Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.histogram.marker.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.histogram.marker.L + ine` instance or dict with compatible + properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.histogram.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # nbinsx + # ------ + @property + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsx"] + + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + # nbinsy + # ------ + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.histogram.selected + .Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.histogram.selected + .Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.histogram.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.histogram.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets hover text elements associated with each bar. If a single + string, the same string appears over all bars. If an array of + string, the items are mapped in order to the this trace's + coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.histogram.unselect + ed.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.histogram.unselect + ed.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.histogram.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xbins + # ----- + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.XBins` + - A dict of string/value properties that will be passed + to the XBins constructor + + Supported dict properties: + + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). If multiple non-overlaying histograms + share a subplot, the first explicit `size` is + used and all others discarded. If no `size` is + provided,the sample data from all traces is + combined to determine `size` as described + above. + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. If multiple non- + overlaying histograms share a subplot, the + first explicit `start` is used exactly and all + others are shifted down (if necessary) to + differ from that one by an integer number of + bins. + + Returns + ------- + plotly.graph_objs.histogram.XBins + """ + return self["xbins"] + + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ybins + # ----- + @property + def ybins(self): + """ + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.YBins` + - A dict of string/value properties that will be passed + to the YBins constructor + + Supported dict properties: + + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). If multiple non-overlaying histograms + share a subplot, the first explicit `size` is + used and all others discarded. If no `size` is + provided,the sample data from all traces is + combined to determine `size` as described + above. + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. If multiple non- + overlaying histograms share a subplot, the + first explicit `start` is used exactly and all + others are shifted down (if necessary) to + differ from that one by an integer number of + bins. + + Returns + ------- + plotly.graph_objs.histogram.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cumulative + :class:`plotly.graph_objects.histogram.Cumulative` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + error_x + :class:`plotly.graph_objects.histogram.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` instance + or dict with compatible properties + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `binNumber` Anything contained + in tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.histogram.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + selected + :class:`plotly.graph_objects.histogram.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` instance + or dict with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + autobinx=None, + autobiny=None, + bingroup=None, + cumulative=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + offsetgroup=None, + opacity=None, + orientation=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + xaxis=None, + xbins=None, + xcalendar=None, + xsrc=None, + y=None, + yaxis=None, + ybins=None, + ycalendar=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Histogram object + + The sample data from which statistics are computed is set in + `x` for vertically spanning histograms and in `y` for + horizontally spanning histograms. Binning options are set + `xbins` and `ybins` respectively if no aggregation data is + provided. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Histogram` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cumulative + :class:`plotly.graph_objects.histogram.Cumulative` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + error_x + :class:`plotly.graph_objects.histogram.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` instance + or dict with compatible properties + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `binNumber` Anything contained + in tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.histogram.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + selected + :class:`plotly.graph_objects.histogram.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` instance + or dict with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Histogram + """ + super(Histogram, self).__init__("histogram") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Histogram +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Histogram`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + _v = alignmentgroup if alignmentgroup is not None else _v + if _v is not None: + self["alignmentgroup"] = _v + _v = arg.pop("autobinx", None) + _v = autobinx if autobinx is not None else _v + if _v is not None: + self["autobinx"] = _v + _v = arg.pop("autobiny", None) + _v = autobiny if autobiny is not None else _v + if _v is not None: + self["autobiny"] = _v + _v = arg.pop("bingroup", None) + _v = bingroup if bingroup is not None else _v + if _v is not None: + self["bingroup"] = _v + _v = arg.pop("cumulative", None) + _v = cumulative if cumulative is not None else _v + if _v is not None: + self["cumulative"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("error_x", None) + _v = error_x if error_x is not None else _v + if _v is not None: + self["error_x"] = _v + _v = arg.pop("error_y", None) + _v = error_y if error_y is not None else _v + if _v is not None: + self["error_y"] = _v + _v = arg.pop("histfunc", None) + _v = histfunc if histfunc is not None else _v + if _v is not None: + self["histfunc"] = _v + _v = arg.pop("histnorm", None) + _v = histnorm if histnorm is not None else _v + if _v is not None: + self["histnorm"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("nbinsx", None) + _v = nbinsx if nbinsx is not None else _v + if _v is not None: + self["nbinsx"] = _v + _v = arg.pop("nbinsy", None) + _v = nbinsy if nbinsy is not None else _v + if _v is not None: + self["nbinsy"] = _v + _v = arg.pop("offsetgroup", None) + _v = offsetgroup if offsetgroup is not None else _v + if _v is not None: + self["offsetgroup"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xbins", None) + _v = xbins if xbins is not None else _v + if _v is not None: + self["xbins"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ybins", None) + _v = ybins if ybins is not None else _v + if _v is not None: + self["ybins"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "histogram" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_histogram2d.py b/packages/python/plotly/plotly/graph_objs/_histogram2d.py new file mode 100644 index 00000000000..54e9259dd30 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_histogram2d.py @@ -0,0 +1,2632 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Histogram2d(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "histogram2d" + _valid_props = { + "autobinx", + "autobiny", + "autocolorscale", + "bingroup", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "histfunc", + "histnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "ids", + "idssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "nbinsx", + "nbinsy", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xbingroup", + "xbins", + "xcalendar", + "xgap", + "xsrc", + "y", + "yaxis", + "ybingroup", + "ybins", + "ycalendar", + "ygap", + "ysrc", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zsmooth", + "zsrc", + } + + # autobinx + # -------- + @property + def autobinx(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + + The 'autobinx' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autobinx"] + + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val + + # autobiny + # -------- + @property + def autobiny(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + + The 'autobiny' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autobiny"] + + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # bingroup + # -------- + @property + def bingroup(self): + """ + Set the `xbingroup` and `ybingroup` default prefix For example, + setting a `bingroup` of 1 on two histogram2d traces will make + them their x-bins and y-bins match separately. + + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["bingroup"] + + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogr + am2d.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram2d.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of + histogram2d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2d.colorb + ar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + histogram2d.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram2d.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.histogram2d.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # histfunc + # -------- + @property + def histfunc(self): + """ + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. + + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] + + Returns + ------- + Any + """ + return self["histfunc"] + + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val + + # histnorm + # -------- + @property + def histnorm(self): + """ + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] + + Returns + ------- + Any + """ + return self["histnorm"] + + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.histogram2d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `z` Anything contained in tag `` is displayed + in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + + Returns + ------- + plotly.graph_objs.histogram2d.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # nbinsx + # ------ + @property + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsx"] + + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + # nbinsy + # ------ + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.histogram2d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xbingroup + # --------- + @property + def xbingroup(self): + """ + Set a group of histogram traces which will have compatible + x-bin settings. Using `xbingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram `bingroup` + + The 'xbingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xbingroup"] + + @xbingroup.setter + def xbingroup(self, val): + self["xbingroup"] = val + + # xbins + # ----- + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.XBins` + - A dict of string/value properties that will be passed + to the XBins constructor + + Supported dict properties: + + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. + + Returns + ------- + plotly.graph_objs.histogram2d.XBins + """ + return self["xbins"] + + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xgap + # ---- + @property + def xgap(self): + """ + Sets the horizontal gap (in pixels) between bricks. + + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ybingroup + # --------- + @property + def ybingroup(self): + """ + Set a group of histogram traces which will have compatible + y-bin settings. Using `ybingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram `bingroup` + + The 'ybingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ybingroup"] + + @ybingroup.setter + def ybingroup(self, val): + self["ybingroup"] = val + + # ybins + # ----- + @property + def ybins(self): + """ + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.YBins` + - A dict of string/value properties that will be passed + to the YBins constructor + + Supported dict properties: + + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. + + Returns + ------- + plotly.graph_objs.histogram2d.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ygap + # ---- + @property + def ygap(self): + """ + Sets the vertical gap (in pixels) between bricks. + + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ygap"] + + @ygap.setter + def ygap(self, val): + self["ygap"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the aggregation data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zhoverformat + # ------------ + @property + def zhoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsmooth + # ------- + @property + def zsmooth(self): + """ + Picks a smoothing algorithm use to smooth `z` data. + + The 'zsmooth' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fast', 'best', False] + + Returns + ------- + Any + """ + return self["zsmooth"] + + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.histogram2d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autobinx=None, + autobiny=None, + autocolorscale=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xgap=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ygap=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Histogram2d object + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a heatmap. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Histogram2d` + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.histogram2d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Histogram2d + """ + super(Histogram2d, self).__init__("histogram2d") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Histogram2d +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Histogram2d`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autobinx", None) + _v = autobinx if autobinx is not None else _v + if _v is not None: + self["autobinx"] = _v + _v = arg.pop("autobiny", None) + _v = autobiny if autobiny is not None else _v + if _v is not None: + self["autobiny"] = _v + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("bingroup", None) + _v = bingroup if bingroup is not None else _v + if _v is not None: + self["bingroup"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("histfunc", None) + _v = histfunc if histfunc is not None else _v + if _v is not None: + self["histfunc"] = _v + _v = arg.pop("histnorm", None) + _v = histnorm if histnorm is not None else _v + if _v is not None: + self["histnorm"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("nbinsx", None) + _v = nbinsx if nbinsx is not None else _v + if _v is not None: + self["nbinsx"] = _v + _v = arg.pop("nbinsy", None) + _v = nbinsy if nbinsy is not None else _v + if _v is not None: + self["nbinsy"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xbingroup", None) + _v = xbingroup if xbingroup is not None else _v + if _v is not None: + self["xbingroup"] = _v + _v = arg.pop("xbins", None) + _v = xbins if xbins is not None else _v + if _v is not None: + self["xbins"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xgap", None) + _v = xgap if xgap is not None else _v + if _v is not None: + self["xgap"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ybingroup", None) + _v = ybingroup if ybingroup is not None else _v + if _v is not None: + self["ybingroup"] = _v + _v = arg.pop("ybins", None) + _v = ybins if ybins is not None else _v + if _v is not None: + self["ybins"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ygap", None) + _v = ygap if ygap is not None else _v + if _v is not None: + self["ygap"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zhoverformat", None) + _v = zhoverformat if zhoverformat is not None else _v + if _v is not None: + self["zhoverformat"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsmooth", None) + _v = zsmooth if zsmooth is not None else _v + if _v is not None: + self["zsmooth"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "histogram2d" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_histogram2dcontour.py b/packages/python/plotly/plotly/graph_objs/_histogram2dcontour.py new file mode 100644 index 00000000000..90075f3d977 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_histogram2dcontour.py @@ -0,0 +1,2772 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Histogram2dContour(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "histogram2dcontour" + _valid_props = { + "autobinx", + "autobiny", + "autocolorscale", + "autocontour", + "bingroup", + "coloraxis", + "colorbar", + "colorscale", + "contours", + "customdata", + "customdatasrc", + "histfunc", + "histnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "name", + "nbinsx", + "nbinsy", + "ncontours", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xbingroup", + "xbins", + "xcalendar", + "xsrc", + "y", + "yaxis", + "ybingroup", + "ybins", + "ycalendar", + "ysrc", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + # autobinx + # -------- + @property + def autobinx(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + + The 'autobinx' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autobinx"] + + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val + + # autobiny + # -------- + @property + def autobiny(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + + The 'autobiny' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autobiny"] + + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # autocontour + # ----------- + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + # bingroup + # -------- + @property + def bingroup(self): + """ + Set the `xbingroup` and `ybingroup` default prefix For example, + setting a `bingroup` of 1 on two histogram2d traces will make + them their x-bins and y-bins match separately. + + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["bingroup"] + + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogr + am2dcontour.colorbar.Tickformatstop` instances + or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram2dcontour.colorbar.tickformatstopdef + aults), sets the default property values to use + for elements of + histogram2dcontour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2dcontour + .colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + histogram2dcontour.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram2dcontour.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.histogram2dcontour.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # contours + # -------- + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Supported dict properties: + + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "heatmap", + a heatmap gradient coloring is applied between + each contour level. If "lines", coloring is + done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # histfunc + # -------- + @property + def histfunc(self): + """ + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. + + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] + + Returns + ------- + Any + """ + return self["histfunc"] + + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val + + # histnorm + # -------- + @property + def histnorm(self): + """ + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] + + Returns + ------- + Any + """ + return self["histnorm"] + + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `z` Anything contained in tag `` is displayed + in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # nbinsx + # ------ + @property + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsx"] + + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + # nbinsy + # ------ + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + # ncontours + # --------- + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xbingroup + # --------- + @property + def xbingroup(self): + """ + Set a group of histogram traces which will have compatible + x-bin settings. Using `xbingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram `bingroup` + + The 'xbingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xbingroup"] + + @xbingroup.setter + def xbingroup(self, val): + self["xbingroup"] = val + + # xbins + # ----- + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.XBins` + - A dict of string/value properties that will be passed + to the XBins constructor + + Supported dict properties: + + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. + + Returns + ------- + plotly.graph_objs.histogram2dcontour.XBins + """ + return self["xbins"] + + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ybingroup + # --------- + @property + def ybingroup(self): + """ + Set a group of histogram traces which will have compatible + y-bin settings. Using `ybingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram `bingroup` + + The 'ybingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ybingroup"] + + @ybingroup.setter + def ybingroup(self, val): + self["ybingroup"] = val + + # ybins + # ----- + @property + def ybins(self): + """ + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.YBins` + - A dict of string/value properties that will be passed + to the YBins constructor + + Supported dict properties: + + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. + + Returns + ------- + plotly.graph_objs.histogram2dcontour.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the aggregation data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zhoverformat + # ------------ + @property + def zhoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + :class:`plotly.graph_objects.histogram2dcontour.Contour + s` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour.Hoverla + bel` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.histogram2dcontour.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.histogram2dcontour.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour.Stream` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autobinx=None, + autobiny=None, + autocolorscale=None, + autocontour=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Histogram2dContour object + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a contour plot. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Histogram2dContour` + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + :class:`plotly.graph_objects.histogram2dcontour.Contour + s` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour.Hoverla + bel` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.histogram2dcontour.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.histogram2dcontour.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour.Stream` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Histogram2dContour + """ + super(Histogram2dContour, self).__init__("histogram2dcontour") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Histogram2dContour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Histogram2dContour`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autobinx", None) + _v = autobinx if autobinx is not None else _v + if _v is not None: + self["autobinx"] = _v + _v = arg.pop("autobiny", None) + _v = autobiny if autobiny is not None else _v + if _v is not None: + self["autobiny"] = _v + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("autocontour", None) + _v = autocontour if autocontour is not None else _v + if _v is not None: + self["autocontour"] = _v + _v = arg.pop("bingroup", None) + _v = bingroup if bingroup is not None else _v + if _v is not None: + self["bingroup"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("contours", None) + _v = contours if contours is not None else _v + if _v is not None: + self["contours"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("histfunc", None) + _v = histfunc if histfunc is not None else _v + if _v is not None: + self["histfunc"] = _v + _v = arg.pop("histnorm", None) + _v = histnorm if histnorm is not None else _v + if _v is not None: + self["histnorm"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("nbinsx", None) + _v = nbinsx if nbinsx is not None else _v + if _v is not None: + self["nbinsx"] = _v + _v = arg.pop("nbinsy", None) + _v = nbinsy if nbinsy is not None else _v + if _v is not None: + self["nbinsy"] = _v + _v = arg.pop("ncontours", None) + _v = ncontours if ncontours is not None else _v + if _v is not None: + self["ncontours"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xbingroup", None) + _v = xbingroup if xbingroup is not None else _v + if _v is not None: + self["xbingroup"] = _v + _v = arg.pop("xbins", None) + _v = xbins if xbins is not None else _v + if _v is not None: + self["xbins"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ybingroup", None) + _v = ybingroup if ybingroup is not None else _v + if _v is not None: + self["ybingroup"] = _v + _v = arg.pop("ybins", None) + _v = ybins if ybins is not None else _v + if _v is not None: + self["ybins"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zauto", None) + _v = zauto if zauto is not None else _v + if _v is not None: + self["zauto"] = _v + _v = arg.pop("zhoverformat", None) + _v = zhoverformat if zhoverformat is not None else _v + if _v is not None: + self["zhoverformat"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmid", None) + _v = zmid if zmid is not None else _v + if _v is not None: + self["zmid"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "histogram2dcontour" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_image.py b/packages/python/plotly/plotly/graph_objs/_image.py new file mode 100644 index 00000000000..8574374c113 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_image.py @@ -0,0 +1,1392 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Image(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "image" + _valid_props = { + "colormodel", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "meta", + "metasrc", + "name", + "opacity", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "x0", + "xaxis", + "y0", + "yaxis", + "z", + "zmax", + "zmin", + "zsrc", + } + + # colormodel + # ---------- + @property + def colormodel(self): + """ + Color model used to map the numerical color components + described in `z` into colors. + + The 'colormodel' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['rgb', 'rgba', 'hsl', 'hsla'] + + Returns + ------- + Any + """ + return self["colormodel"] + + @colormodel.setter + def colormodel(self, val): + self["colormodel"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Set the pixel's horizontal size. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Set the pixel's vertical size + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'color', 'name', 'text'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.image.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.image.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `z`, `color` and `colormodel`. Anything contained in + tag `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.image.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.image.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x0 + # -- + @property + def x0(self): + """ + Set the image's x position. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # y0 + # -- + @property + def y0(self): + """ + Set the image's y position. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # z + # - + @property + def z(self): + """ + A 2-dimensional array in which each element is an array of 3 or + 4 numbers representing a color. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Array defining the higher bound for each color component. Note + that the default value will depend on the colormodel. For the + `rgb` colormodel, it is [255, 255, 255]. For the `rgba` + colormodel, it is [255, 255, 255, 1]. For the `hsl` colormodel, + it is [360, 100, 100]. For the `hsla` colormodel, it is [360, + 100, 100, 1]. + + The 'zmax' property is an info array that may be specified as: + + * a list or tuple of 4 elements where: + (0) The 'zmax[0]' property is a number and may be specified as: + - An int or float + (1) The 'zmax[1]' property is a number and may be specified as: + - An int or float + (2) The 'zmax[2]' property is a number and may be specified as: + - An int or float + (3) The 'zmax[3]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Array defining the lower bound for each color component. Note + that the default value will depend on the colormodel. For the + `rgb` colormodel, it is [0, 0, 0]. For the `rgba` colormodel, + it is [0, 0, 0, 0]. For the `hsl` colormodel, it is [0, 0, 0]. + For the `hsla` colormodel, it is [0, 0, 0, 0]. + + The 'zmin' property is an info array that may be specified as: + + * a list or tuple of 4 elements where: + (0) The 'zmin[0]' property is a number and may be specified as: + - An int or float + (1) The 'zmin[1]' property is a number and may be specified as: + - An int or float + (2) The 'zmin[2]' property is a number and may be specified as: + - An int or float + (3) The 'zmin[3]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + colormodel + Color model used to map the numerical color components + described in `z` into colors. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `z`, `color` and `colormodel`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.image.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Set the image's x position. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is an array + of 3 or 4 numbers representing a color. + zmax + Array defining the higher bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [255, + 255, 255]. For the `rgba` colormodel, it is [255, 255, + 255, 1]. For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, 100, 100, + 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [0, 0, + 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For + the `hsl` colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + colormodel=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x0=None, + xaxis=None, + y0=None, + yaxis=None, + z=None, + zmax=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Image object + + Display an image, i.e. data on a 2D regular raster. By default, + when an image is displayed in a subplot, its y axis will be + reversed (ie. `autorange: 'reversed'`), constrained to the + domain (ie. `constrain: 'domain'`) and it will have the same + scale as its x axis (ie. `scaleanchor: 'x,`) in order for + pixels to be rendered as squares. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Image` + colormodel + Color model used to map the numerical color components + described in `z` into colors. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `z`, `color` and `colormodel`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.image.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Set the image's x position. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is an array + of 3 or 4 numbers representing a color. + zmax + Array defining the higher bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [255, + 255, 255]. For the `rgba` colormodel, it is [255, 255, + 255, 1]. For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, 100, 100, + 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [0, 0, + 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For + the `hsl` colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Image + """ + super(Image, self).__init__("image") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Image +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Image`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("colormodel", None) + _v = colormodel if colormodel is not None else _v + if _v is not None: + self["colormodel"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zmax", None) + _v = zmax if zmax is not None else _v + if _v is not None: + self["zmax"] = _v + _v = arg.pop("zmin", None) + _v = zmin if zmin is not None else _v + if _v is not None: + self["zmin"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "image" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_indicator.py b/packages/python/plotly/plotly/graph_objs/_indicator.py new file mode 100644 index 00000000000..5e11dff9b0a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_indicator.py @@ -0,0 +1,932 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Indicator(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "indicator" + _valid_props = { + "align", + "customdata", + "customdatasrc", + "delta", + "domain", + "gauge", + "ids", + "idssrc", + "meta", + "metasrc", + "mode", + "name", + "number", + "stream", + "title", + "type", + "uid", + "uirevision", + "value", + "visible", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the `text` within the box. + Note that this attribute has no effect if an angular gauge is + displayed: in this case, it is always centered + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # delta + # ----- + @property + def delta(self): + """ + The 'delta' property is an instance of Delta + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Delta` + - A dict of string/value properties that will be passed + to the Delta constructor + + Supported dict properties: + + decreasing + :class:`plotly.graph_objects.indicator.delta.De + creasing` instance or dict with compatible + properties + font + Set the font used to display the delta + increasing + :class:`plotly.graph_objects.indicator.delta.In + creasing` instance or dict with compatible + properties + position + Sets the position of delta with respect to the + number. + reference + Sets the reference value to compute the delta. + By default, it is set to the current value. + relative + Show relative change + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + Returns + ------- + plotly.graph_objs.indicator.Delta + """ + return self["delta"] + + @delta.setter + def delta(self, val): + self["delta"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this indicator + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this indicator trace . + x + Sets the horizontal domain of this indicator + trace (in plot fraction). + y + Sets the vertical domain of this indicator + trace (in plot fraction). + + Returns + ------- + plotly.graph_objs.indicator.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # gauge + # ----- + @property + def gauge(self): + """ + The gauge of the Indicator plot. + + The 'gauge' property is an instance of Gauge + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Gauge` + - A dict of string/value properties that will be passed + to the Gauge constructor + + Supported dict properties: + + axis + :class:`plotly.graph_objects.indicator.gauge.Ax + is` instance or dict with compatible properties + bar + Set the appearance of the gauge's value + bgcolor + Sets the gauge background color. + bordercolor + Sets the color of the border enclosing the + gauge. + borderwidth + Sets the width (in px) of the border enclosing + the gauge. + shape + Set the shape of the gauge + steps + A tuple of :class:`plotly.graph_objects.indicat + or.gauge.Step` instances or dicts with + compatible properties + stepdefaults + When used in a template (as layout.template.dat + a.indicator.gauge.stepdefaults), sets the + default property values to use for elements of + indicator.gauge.steps + threshold + :class:`plotly.graph_objects.indicator.gauge.Th + reshold` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.indicator.Gauge + """ + return self["gauge"] + + @gauge.setter + def gauge(self, val): + self["gauge"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines how the value is displayed on the graph. `number` + displays the value numerically in text. `delta` displays the + difference to a reference value in text. Finally, `gauge` + displays the value graphically on an axis. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['number', 'delta', 'gauge'] joined with '+' characters + (e.g. 'number+delta') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # number + # ------ + @property + def number(self): + """ + The 'number' property is an instance of Number + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Number` + - A dict of string/value properties that will be passed + to the Number constructor + + Supported dict properties: + + font + Set the font used to display main number + prefix + Sets a prefix appearing before the number. + suffix + Sets a suffix appearing next to the number. + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + Returns + ------- + plotly.graph_objs.indicator.Number + """ + return self["number"] + + @number.setter + def number(self, val): + self["number"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.indicator.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the title. It + defaults to `center` except for bullet charts + for which it defaults to right. + font + Set the font used to display the title + text + Sets the title of this indicator. + + Returns + ------- + plotly.graph_objs.indicator.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the number to be displayed. + + The 'value' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + delta + :class:`plotly.graph_objects.indicator.Delta` instance + or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` instance + or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + align=None, + customdata=None, + customdatasrc=None, + delta=None, + domain=None, + gauge=None, + ids=None, + idssrc=None, + meta=None, + metasrc=None, + mode=None, + name=None, + number=None, + stream=None, + title=None, + uid=None, + uirevision=None, + value=None, + visible=None, + **kwargs + ): + """ + Construct a new Indicator object + + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Indicator` + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + delta + :class:`plotly.graph_objects.indicator.Delta` instance + or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` instance + or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Indicator + """ + super(Indicator, self).__init__("indicator") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Indicator +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Indicator`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("delta", None) + _v = delta if delta is not None else _v + if _v is not None: + self["delta"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("gauge", None) + _v = gauge if gauge is not None else _v + if _v is not None: + self["gauge"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("number", None) + _v = number if number is not None else _v + if _v is not None: + self["number"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "indicator" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_isosurface.py b/packages/python/plotly/plotly/graph_objs/_isosurface.py new file mode 100644 index 00000000000..52be8ee6d74 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_isosurface.py @@ -0,0 +1,2454 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Isosurface(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "isosurface" + _valid_props = { + "autocolorscale", + "caps", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "contour", + "customdata", + "customdatasrc", + "flatshading", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "isomax", + "isomin", + "legendgroup", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "slices", + "spaceframe", + "stream", + "surface", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "value", + "valuesrc", + "visible", + "x", + "xsrc", + "y", + "ysrc", + "z", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # caps + # ---- + @property + def caps(self): + """ + The 'caps' property is an instance of Caps + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Caps` + - A dict of string/value properties that will be passed + to the Caps constructor + + Supported dict properties: + + x + :class:`plotly.graph_objects.isosurface.caps.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.caps.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.caps.Z` + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.isosurface.Caps + """ + return self["caps"] + + @caps.setter + def caps(self, val): + self["caps"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `value`) or the bounds set in + `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `value` and if set, `cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `value`. Has no effect when `cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `value` and if set, `cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.isosurf + ace.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.isosurface.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of isosurface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.isosurface.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + isosurface.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + isosurface.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.isosurface.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # contour + # ------- + @property + def contour(self): + """ + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Contour` + - A dict of string/value properties that will be passed + to the Contour constructor + + Supported dict properties: + + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.isosurface.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # flatshading + # ----------- + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.isosurface.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # isomax + # ------ + @property + def isomax(self): + """ + Sets the maximum boundary for iso-surface plot. + + The 'isomax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomax"] + + @isomax.setter + def isomax(self, val): + self["isomax"] = val + + # isomin + # ------ + @property + def isomin(self): + """ + Sets the minimum boundary for iso-surface plot. + + The 'isomin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomin"] + + @isomin.setter + def isomin(self, val): + self["isomin"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. + + Returns + ------- + plotly.graph_objs.isosurface.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.isosurface.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # slices + # ------ + @property + def slices(self): + """ + The 'slices' property is an instance of Slices + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Slices` + - A dict of string/value properties that will be passed + to the Slices constructor + + Supported dict properties: + + x + :class:`plotly.graph_objects.isosurface.slices. + X` instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.slices. + Y` instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.slices. + Z` instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.isosurface.Slices + """ + return self["slices"] + + @slices.setter + def slices(self, val): + self["slices"] = val + + # spaceframe + # ---------- + @property + def spaceframe(self): + """ + The 'spaceframe' property is an instance of Spaceframe + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe` + - A dict of string/value properties that will be passed + to the Spaceframe constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `spaceframe` + elements. The default fill value is 0.15 + meaning that only 15% of the area of every + faces of tetras would be shaded. Applying a + greater `fill` ratio would allow the creation + of stronger elements or could be sued to have + entirely closed areas (in case of using 1). + show + Displays/hides tetrahedron shapes between + minimum and maximum iso-values. Often useful + when either caps or surfaces are disabled or + filled with values less than 1. + + Returns + ------- + plotly.graph_objs.isosurface.Spaceframe + """ + return self["spaceframe"] + + @spaceframe.setter + def spaceframe(self, val): + self["spaceframe"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.isosurface.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # surface + # ------- + @property + def surface(self): + """ + The 'surface' property is an instance of Surface + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Surface` + - A dict of string/value properties that will be passed + to the Surface constructor + + Supported dict properties: + + count + Sets the number of iso-surfaces between minimum + and maximum iso-values. By default this value + is 2 meaning that only minimum and maximum + surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The + default fill value of the surface is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is + `all` meaning that the rest of surface elements + would be shaded. The check options (either 1 or + 2) could be used to draw half of the squares on + the surface. Using various combinations of + capital `A`, `B`, `C`, `D` and `E` may also be + used to reduce the number of triangles on the + iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and + maximum iso-values. + + Returns + ------- + plotly.graph_objs.isosurface.Surface + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the 4th dimension (value) of the vertices. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valuesrc + # -------- + @property + def valuesrc(self): + """ + Sets the source reference on Chart Studio Cloud for value . + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the X coordinates of the vertices on X axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the Y coordinates of the vertices on Y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the Z coordinates of the vertices on Z axis. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` instance + or dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.isosurface.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.isosurface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on Chart Studio Cloud for + value . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legendgroup=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuesrc=None, + visible=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Isosurface object + + Draws isosurfaces between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Isosurface` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` instance + or dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.isosurface.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.isosurface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on Chart Studio Cloud for + value . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Isosurface + """ + super(Isosurface, self).__init__("isosurface") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Isosurface +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Isosurface`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("caps", None) + _v = caps if caps is not None else _v + if _v is not None: + self["caps"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("contour", None) + _v = contour if contour is not None else _v + if _v is not None: + self["contour"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("flatshading", None) + _v = flatshading if flatshading is not None else _v + if _v is not None: + self["flatshading"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("isomax", None) + _v = isomax if isomax is not None else _v + if _v is not None: + self["isomax"] = _v + _v = arg.pop("isomin", None) + _v = isomin if isomin is not None else _v + if _v is not None: + self["isomin"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lighting", None) + _v = lighting if lighting is not None else _v + if _v is not None: + self["lighting"] = _v + _v = arg.pop("lightposition", None) + _v = lightposition if lightposition is not None else _v + if _v is not None: + self["lightposition"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("slices", None) + _v = slices if slices is not None else _v + if _v is not None: + self["slices"] = _v + _v = arg.pop("spaceframe", None) + _v = spaceframe if spaceframe is not None else _v + if _v is not None: + self["spaceframe"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("surface", None) + _v = surface if surface is not None else _v + if _v is not None: + self["surface"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valuesrc", None) + _v = valuesrc if valuesrc is not None else _v + if _v is not None: + self["valuesrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "isosurface" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_layout.py b/packages/python/plotly/plotly/graph_objs/_layout.py new file mode 100644 index 00000000000..5f2677f6fc5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_layout.py @@ -0,0 +1,5964 @@ +from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType +import copy as _copy + + +class Layout(_BaseLayoutType): + + _subplotid_prop_names = [ + "coloraxis", + "geo", + "mapbox", + "polar", + "scene", + "ternary", + "xaxis", + "yaxis", + ] + + import re + + _subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + ")(\d+)$") + + @property + def _subplotid_validators(self): + """ + dict of validator classes for each subplot type + + Returns + ------- + dict + """ + from plotly.validators.layout import ( + ColoraxisValidator, + GeoValidator, + MapboxValidator, + PolarValidator, + SceneValidator, + TernaryValidator, + XaxisValidator, + YaxisValidator, + ) + + return { + "coloraxis": ColoraxisValidator, + "geo": GeoValidator, + "mapbox": MapboxValidator, + "polar": PolarValidator, + "scene": SceneValidator, + "ternary": TernaryValidator, + "xaxis": XaxisValidator, + "yaxis": YaxisValidator, + } + + def _subplot_re_match(self, prop): + return self._subplotid_prop_re.match(prop) + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "layout" + _valid_props = { + "angularaxis", + "annotationdefaults", + "annotations", + "autosize", + "bargap", + "bargroupgap", + "barmode", + "barnorm", + "boxgap", + "boxgroupgap", + "boxmode", + "calendar", + "clickmode", + "coloraxis", + "colorscale", + "colorway", + "datarevision", + "direction", + "dragmode", + "editrevision", + "extendfunnelareacolors", + "extendpiecolors", + "extendsunburstcolors", + "extendtreemapcolors", + "font", + "funnelareacolorway", + "funnelgap", + "funnelgroupgap", + "funnelmode", + "geo", + "grid", + "height", + "hiddenlabels", + "hiddenlabelssrc", + "hidesources", + "hoverdistance", + "hoverlabel", + "hovermode", + "imagedefaults", + "images", + "legend", + "mapbox", + "margin", + "meta", + "metasrc", + "modebar", + "orientation", + "paper_bgcolor", + "piecolorway", + "plot_bgcolor", + "polar", + "radialaxis", + "scene", + "selectdirection", + "selectionrevision", + "separators", + "shapedefaults", + "shapes", + "showlegend", + "sliderdefaults", + "sliders", + "spikedistance", + "sunburstcolorway", + "template", + "ternary", + "title", + "titlefont", + "transition", + "treemapcolorway", + "uirevision", + "uniformtext", + "updatemenudefaults", + "updatemenus", + "violingap", + "violingroupgap", + "violinmode", + "waterfallgap", + "waterfallgroupgap", + "waterfallmode", + "width", + "xaxis", + "yaxis", + } + + # angularaxis + # ----------- + @property + def angularaxis(self): + """ + The 'angularaxis' property is an instance of AngularAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.AngularAxis` + - A dict of string/value properties that will be passed + to the AngularAxis constructor + + Supported dict properties: + + domain + Polar chart subplots are not supported yet. + This key has currently no effect. + endpadding + Legacy polar charts are deprecated! Please + switch to "polar" subplots. + range + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Defines the start + and end point of this angular axis. + showline + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the line bounding this angular axis will + be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the angular axis ticks will feature tick + labels. + tickcolor + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the color of + the tick lines on this angular axis. + ticklen + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this angular axis. + tickorientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (from the paper perspective) of the + angular axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this angular axis. + visible + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not this axis will be visible. + + Returns + ------- + plotly.graph_objs.layout.AngularAxis + """ + return self["angularaxis"] + + @angularaxis.setter + def angularaxis(self, val): + self["angularaxis"] = val + + # annotations + # ----------- + @property + def annotations(self): + """ + The 'annotations' property is a tuple of instances of + Annotation that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Annotation + - A list or tuple of dicts of string/value properties that + will be passed to the Annotation constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + arrowwidth + Sets the width (in px) of annotation arrow + line. + ax + Sets the x component of the arrow tail about + the arrow head. If `axref` is `pixel`, a + positive (negative) component corresponds to + an arrow pointing from right to left (left to + right). If `axref` is an axis, this is an + absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the + annotation (ax,ay) is specified. If `pixel`, + `ax` is a relative offset in pixels from `x`. + If set to an x axis id (e.g. "x" or "x2"), `ax` + is specified in the same terms as that axis. + This is useful for trendline annotations which + should continue to indicate the correct trend + when zoomed. + ay + Sets the y component of the arrow tail about + the arrow head. If `ayref` is `pixel`, a + positive (negative) component corresponds to + an arrow pointing from bottom to top (top to + bottom). If `ayref` is an axis, this is an + absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the + annotation (ax,ay) is specified. If `pixel`, + `ay` is a relative offset in pixels from `y`. + If set to a y axis id (e.g. "y" or "y2"), `ay` + is specified in the same terms as that axis. + This is useful for trendline annotations which + should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the + annotation `text`. + borderpad + Sets the padding (in px) between the `text` and + the enclosing border. + borderwidth + Sets the width (in px) of the border enclosing + the annotation `text`. + captureevents + Determines whether the annotation text box + captures mouse move and click events, or allows + those events to pass through to data points in + the plot that may be behind the annotation. By + default `captureevents` is False unless + `hovertext` is provided. If you use the event + `plotly_clickannotation` without `hovertext` + you must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the + plot. If you click a data point that exactly + matches the `x` and `y` values of this + annotation, and it is hidden (visible: false), + it will appear. In "onoff" mode, you must click + the same point again to make it disappear, so + if you click multiple points, you can show + multiple annotations. In "onout" mode, a click + anywhere else in the plot (on another data + point or not) will hide this annotation. If you + need to show/hide this annotation in response + to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for + example to label the side of a bar. To label + markers though, `standoff` is preferred over + `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. + Taller text will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.annotation. + Hoverlabel` instance or dict with compatible + properties + hovertext + Sets text to appear when hovering over this + annotation. If omitted or blank, no hover label + will appear. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the annotation (text + + arrow). + showarrow + Determines whether or not the annotation is + drawn with an arrow. If True, `text` is placed + near the arrow's tail. If False, `text` lines + up with the `x` and `y` provided. + standoff + Sets a distance, in pixels, to move the end + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow + head, relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + startstandoff + Sets a distance, in pixels, to move the start + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. + Plotly uses a subset of HTML tags to do things + like newline (
), bold (), italics + (), hyperlinks (). + Tags , , are also + supported. + textangle + Sets the angle at which the `text` is drawn + with respect to the horizontal. + valign + Sets the vertical alignment of the `text` + within the box. Has an effect only if an + explicit height is set to override the text + height. + visible + Determines whether or not this annotation is + visible. + width + Sets an explicit width for the text box. null + (default) lets the text set the box width. + Wider text will be clipped. There is no + automatic wrapping; use
to start a new + line. + x + Sets the annotation's x position. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + xanchor + Sets the text box's horizontal position anchor + This anchor binds the `x` position to the + "left", "center" or "right" of the annotation. + For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the + right-most portion of the annotation lines up + with the right-most edge of the plotting area. + If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + xclick + Toggle this annotation when clicking a data + point whose `x` value is `xclick` rather than + the annotation's `x` value. + xref + Sets the annotation's x coordinate axis. If set + to an x axis id (e.g. "x" or "x2"), the `x` + position refers to an x coordinate If set to + "paper", the `x` position refers to the + distance from the left side of the plotting + area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and + arrow to the right (positive) or left + (negative) by this many pixels. + y + Sets the annotation's y position. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + yanchor + Sets the text box's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the annotation. + For example, if `y` is set to 1, `yref` to + "paper" and `yanchor` to "top" then the top- + most portion of the annotation lines up with + the top-most edge of the plotting area. If + "auto", the anchor is equivalent to "middle" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + yclick + Toggle this annotation when clicking a data + point whose `y` value is `yclick` rather than + the annotation's `y` value. + yref + Sets the annotation's y coordinate axis. If set + to an y axis id (e.g. "y" or "y2"), the `y` + position refers to an y coordinate If set to + "paper", the `y` position refers to the + distance from the bottom of the plotting area + in normalized coordinates where 0 (1) + corresponds to the bottom (top). + yshift + Shifts the position of the whole annotation and + arrow up (positive) or down (negative) by this + many pixels. + + Returns + ------- + tuple[plotly.graph_objs.layout.Annotation] + """ + return self["annotations"] + + @annotations.setter + def annotations(self, val): + self["annotations"] = val + + # annotationdefaults + # ------------------ + @property + def annotationdefaults(self): + """ + When used in a template (as + layout.template.layout.annotationdefaults), sets the default + property values to use for elements of layout.annotations + + The 'annotationdefaults' property is an instance of Annotation + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Annotation` + - A dict of string/value properties that will be passed + to the Annotation constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.Annotation + """ + return self["annotationdefaults"] + + @annotationdefaults.setter + def annotationdefaults(self, val): + self["annotationdefaults"] = val + + # autosize + # -------- + @property + def autosize(self): + """ + Determines whether or not a layout width or height that has + been left undefined by the user is initialized on each + relayout. Note that, regardless of this attribute, an undefined + layout width or height is always initialized on the first call + to plot. + + The 'autosize' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autosize"] + + @autosize.setter + def autosize(self, val): + self["autosize"] = val + + # bargap + # ------ + @property + def bargap(self): + """ + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. + + The 'bargap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["bargap"] + + @bargap.setter + def bargap(self, val): + self["bargap"] = val + + # bargroupgap + # ----------- + @property + def bargroupgap(self): + """ + Sets the gap (in plot fraction) between bars of the same + location coordinate. + + The 'bargroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["bargroupgap"] + + @bargroupgap.setter + def bargroupgap(self, val): + self["bargroupgap"] = val + + # barmode + # ------- + @property + def barmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "relative", the bars are stacked on top + of one another, with negative values below the axis, positive + values above With "group", the bars are plotted next to one + another centered around the shared location. With "overlay", + the bars are plotted over one another, you might need to an + "opacity" to see multiple bars. + + The 'barmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['stack', 'group', 'overlay', 'relative'] + + Returns + ------- + Any + """ + return self["barmode"] + + @barmode.setter + def barmode(self, val): + self["barmode"] = val + + # barnorm + # ------- + @property + def barnorm(self): + """ + Sets the normalization for bar traces on the graph. With + "fraction", the value of each bar is divided by the sum of all + values at that location coordinate. "percent" is the same but + multiplied by 100 to show percentages. + + The 'barnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'fraction', 'percent'] + + Returns + ------- + Any + """ + return self["barnorm"] + + @barnorm.setter + def barnorm(self, val): + self["barnorm"] = val + + # boxgap + # ------ + @property + def boxgap(self): + """ + Sets the gap (in plot fraction) between boxes of adjacent + location coordinates. Has no effect on traces that have "width" + set. + + The 'boxgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["boxgap"] + + @boxgap.setter + def boxgap(self, val): + self["boxgap"] = val + + # boxgroupgap + # ----------- + @property + def boxgroupgap(self): + """ + Sets the gap (in plot fraction) between boxes of the same + location coordinate. Has no effect on traces that have "width" + set. + + The 'boxgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["boxgroupgap"] + + @boxgroupgap.setter + def boxgroupgap(self, val): + self["boxgroupgap"] = val + + # boxmode + # ------- + @property + def boxmode(self): + """ + Determines how boxes at the same location coordinate are + displayed on the graph. If "group", the boxes are plotted next + to one another centered around the shared location. If + "overlay", the boxes are plotted over one another, you might + need to set "opacity" to see them multiple boxes. Has no effect + on traces that have "width" set. + + The 'boxmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["boxmode"] + + @boxmode.setter + def boxmode(self, val): + self["boxmode"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the default calendar system to use for interpreting and + displaying dates throughout the plot. + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # clickmode + # --------- + @property + def clickmode(self): + """ + Determines the mode of single click interactions. "event" is + the default value and emits the `plotly_click` event. In + addition this mode emits the `plotly_selected` event in drag + modes "lasso" and "select", but with no event data attached + (kept for compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also supports + persistent selections, meaning that pressing Shift while + clicking, adds to / subtracts from an existing selection. + "select" with `hovermode`: "x" can be confusing, consider + explicitly setting `hovermode`: "closest" when using this + feature. Selection events are sent accordingly as long as + "event" flag is set as well. When the "event" flag is missing, + `plotly_click` and `plotly_selected` events are not fired. + + The 'clickmode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['event', 'select'] joined with '+' characters + (e.g. 'event+select') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["clickmode"] + + @clickmode.setter + def clickmode(self, val): + self["clickmode"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + The 'coloraxis' property is an instance of Coloraxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Coloraxis` + - A dict of string/value properties that will be passed + to the Coloraxis constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + corresponding trace color array(s)) or the + bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the + user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as corresponding + trace color array(s) and if set, `cmin` must be + set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as corresponding trace color array(s). Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as corresponding + trace color array(s) and if set, `cmax` must be + set as well. + colorbar + :class:`plotly.graph_objects.layout.coloraxis.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. + + Returns + ------- + plotly.graph_objs.layout.Coloraxis + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + The 'colorscale' property is an instance of Colorscale + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Colorscale` + - A dict of string/value properties that will be passed + to the Colorscale constructor + + Supported dict properties: + + diverging + Sets the default diverging colorscale. Note + that `autocolorscale` must be true for this + attribute to work. + sequential + Sets the default sequential colorscale for + positive values. Note that `autocolorscale` + must be true for this attribute to work. + sequentialminus + Sets the default sequential colorscale for + negative values. Note that `autocolorscale` + must be true for this attribute to work. + + Returns + ------- + plotly.graph_objs.layout.Colorscale + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorway + # -------- + @property + def colorway(self): + """ + Sets the default trace colors. + + The 'colorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["colorway"] + + @colorway.setter + def colorway(self, val): + self["colorway"] = val + + # datarevision + # ------------ + @property + def datarevision(self): + """ + If provided, a changed value tells `Plotly.react` that one or + more data arrays has changed. This way you can modify arrays + in-place rather than making a complete new copy for an + incremental change. If NOT provided, `Plotly.react` assumes + that data arrays are being treated as immutable, thus any data + array with a different identity from its predecessor contains + new data. + + The 'datarevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["datarevision"] + + @datarevision.setter + def datarevision(self, val): + self["datarevision"] = val + + # direction + # --------- + @property + def direction(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the direction corresponding to positive angles + in legacy polar charts. + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['clockwise', 'counterclockwise'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + + # dragmode + # -------- + @property + def dragmode(self): + """ + Determines the mode of drag interactions. "select" and "lasso" + apply only to scatter traces with markers or text. "orbit" and + "turntable" apply only to 3D scenes. + + The 'dragmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable', + False] + + Returns + ------- + Any + """ + return self["dragmode"] + + @dragmode.setter + def dragmode(self, val): + self["dragmode"] = val + + # editrevision + # ------------ + @property + def editrevision(self): + """ + Controls persistence of user-driven changes in `editable: true` + configuration, other than trace names and axis titles. Defaults + to `layout.uirevision`. + + The 'editrevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["editrevision"] + + @editrevision.setter + def editrevision(self, val): + self["editrevision"] = val + + # extendfunnelareacolors + # ---------------------- + @property + def extendfunnelareacolors(self): + """ + If `true`, the funnelarea slice colors (whether given by + `funnelareacolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. + + The 'extendfunnelareacolors' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["extendfunnelareacolors"] + + @extendfunnelareacolors.setter + def extendfunnelareacolors(self, val): + self["extendfunnelareacolors"] = val + + # extendpiecolors + # --------------- + @property + def extendpiecolors(self): + """ + If `true`, the pie slice colors (whether given by `piecolorway` + or inherited from `colorway`) will be extended to three times + its original length by first repeating every color 20% lighter + then each color 20% darker. This is intended to reduce the + likelihood of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + + The 'extendpiecolors' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["extendpiecolors"] + + @extendpiecolors.setter + def extendpiecolors(self, val): + self["extendpiecolors"] = val + + # extendsunburstcolors + # -------------------- + @property + def extendsunburstcolors(self): + """ + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. + + The 'extendsunburstcolors' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["extendsunburstcolors"] + + @extendsunburstcolors.setter + def extendsunburstcolors(self, val): + self["extendsunburstcolors"] = val + + # extendtreemapcolors + # ------------------- + @property + def extendtreemapcolors(self): + """ + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. + + The 'extendtreemapcolors' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["extendtreemapcolors"] + + @extendtreemapcolors.setter + def extendtreemapcolors(self, val): + self["extendtreemapcolors"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the global font. Note that fonts used in traces and other + layout components inherit from the global font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # funnelareacolorway + # ------------------ + @property + def funnelareacolorway(self): + """ + Sets the default funnelarea slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendfunnelareacolors`. + + The 'funnelareacolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["funnelareacolorway"] + + @funnelareacolorway.setter + def funnelareacolorway(self, val): + self["funnelareacolorway"] = val + + # funnelgap + # --------- + @property + def funnelgap(self): + """ + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. + + The 'funnelgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["funnelgap"] + + @funnelgap.setter + def funnelgap(self, val): + self["funnelgap"] = val + + # funnelgroupgap + # -------------- + @property + def funnelgroupgap(self): + """ + Sets the gap (in plot fraction) between bars of the same + location coordinate. + + The 'funnelgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["funnelgroupgap"] + + @funnelgroupgap.setter + def funnelgroupgap(self, val): + self["funnelgroupgap"] = val + + # funnelmode + # ---------- + @property + def funnelmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "group", the bars are plotted next to + one another centered around the shared location. With + "overlay", the bars are plotted over one another, you might + need to an "opacity" to see multiple bars. + + The 'funnelmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['stack', 'group', 'overlay'] + + Returns + ------- + Any + """ + return self["funnelmode"] + + @funnelmode.setter + def funnelmode(self, val): + self["funnelmode"] = val + + # geo + # --- + @property + def geo(self): + """ + The 'geo' property is an instance of Geo + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Geo` + - A dict of string/value properties that will be passed + to the Geo constructor + + Supported dict properties: + + bgcolor + Set the background color of the map + center + :class:`plotly.graph_objects.layout.geo.Center` + instance or dict with compatible properties + coastlinecolor + Sets the coastline color. + coastlinewidth + Sets the coastline stroke width (in px). + countrycolor + Sets line color of the country boundaries. + countrywidth + Sets line width (in px) of the country + boundaries. + domain + :class:`plotly.graph_objects.layout.geo.Domain` + instance or dict with compatible properties + fitbounds + Determines if this subplot's view settings are + auto-computed to fit trace data. On scoped + maps, setting `fitbounds` leads to `center.lon` + and `center.lat` getting auto-filled. On maps + with a non-clipped projection, setting + `fitbounds` leads to `center.lon`, + `center.lat`, and `projection.rotation.lon` + getting auto-filled. On maps with a clipped + projection, setting `fitbounds` leads to + `center.lon`, `center.lat`, + `projection.rotation.lon`, + `projection.rotation.lat`, `lonaxis.range` and + `lonaxis.range` getting auto-filled. If + "locations", only the trace's visible locations + are considered in the `fitbounds` computations. + If "geojson", the entire trace input `geojson` + (if provided) is considered in the `fitbounds` + computations, Defaults to False. + framecolor + Sets the color the frame. + framewidth + Sets the stroke width (in px) of the frame. + lakecolor + Sets the color of the lakes. + landcolor + Sets the land mass color. + lataxis + :class:`plotly.graph_objects.layout.geo.Lataxis + ` instance or dict with compatible properties + lonaxis + :class:`plotly.graph_objects.layout.geo.Lonaxis + ` instance or dict with compatible properties + oceancolor + Sets the ocean color + projection + :class:`plotly.graph_objects.layout.geo.Project + ion` instance or dict with compatible + properties + resolution + Sets the resolution of the base layers. The + values have units of km/mm e.g. 110 corresponds + to a scale ratio of 1:110,000,000. + rivercolor + Sets color of the rivers. + riverwidth + Sets the stroke width (in px) of the rivers. + scope + Set the scope of the map. + showcoastlines + Sets whether or not the coastlines are drawn. + showcountries + Sets whether or not country boundaries are + drawn. + showframe + Sets whether or not a frame is drawn around the + map. + showlakes + Sets whether or not lakes are drawn. + showland + Sets whether or not land masses are filled in + color. + showocean + Sets whether or not oceans are filled in color. + showrivers + Sets whether or not rivers are drawn. + showsubunits + Sets whether or not boundaries of subunits + within countries (e.g. states, provinces) are + drawn. + subunitcolor + Sets the color of the subunits boundaries. + subunitwidth + Sets the stroke width (in px) of the subunits + boundaries. + uirevision + Controls persistence of user-driven changes in + the view (projection and center). Defaults to + `layout.uirevision`. + visible + Sets the default visibility of the base layers. + + Returns + ------- + plotly.graph_objs.layout.Geo + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + + # grid + # ---- + @property + def grid(self): + """ + The 'grid' property is an instance of Grid + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Grid` + - A dict of string/value properties that will be passed + to the Grid constructor + + Supported dict properties: + + columns + The number of columns in the grid. If you + provide a 2D `subplots` array, the length of + its longest row is used as the default. If you + give an `xaxes` array, its length is used as + the default. But it's also possible to have a + different length, if you want to leave a row at + the end for non-cartesian subplots. + domain + :class:`plotly.graph_objects.layout.grid.Domain + ` instance or dict with compatible properties + pattern + If no `subplots`, `xaxes`, or `yaxes` are given + but we do have `rows` and `columns`, we can + generate defaults using consecutive axis IDs, + in two ways: "coupled" gives one x axis per + column and one y axis per row. "independent" + uses a new xy pair for each cell, left-to-right + across each row then iterating rows according + to `roworder`. + roworder + Is the first row the top or the bottom? Note + that columns are always enumerated from left to + right. + rows + The number of rows in the grid. If you provide + a 2D `subplots` array or a `yaxes` array, its + length is used as the default. But it's also + possible to have a different length, if you + want to leave a row at the end for non- + cartesian subplots. + subplots + Used for freeform grids, where some axes may be + shared across subplots but others are not. Each + entry should be a cartesian subplot id, like + "xy" or "x3y2", or "" to leave that cell empty. + You may reuse x axes within the same column, + and y axes within the same row. Non-cartesian + subplots and traces that support `domain` can + place themselves in this grid separately using + the `gridcell` attribute. + xaxes + Used with `yaxes` when the x and y axes are + shared across columns and rows. Each entry + should be an x axis id like "x", "x2", etc., or + "" to not put an x axis in that column. Entries + other than "" must be unique. Ignored if + `subplots` is present. If missing but `yaxes` + is present, will generate consecutive IDs. + xgap + Horizontal space between grid cells, expressed + as a fraction of the total width available to + one cell. Defaults to 0.1 for coupled-axes + grids and 0.2 for independent grids. + xside + Sets where the x axis labels and titles go. + "bottom" means the very bottom of the grid. + "bottom plot" is the lowest plot that each x + axis is used in. "top" and "top plot" are + similar. + yaxes + Used with `yaxes` when the x and y axes are + shared across columns and rows. Each entry + should be an y axis id like "y", "y2", etc., or + "" to not put a y axis in that row. Entries + other than "" must be unique. Ignored if + `subplots` is present. If missing but `xaxes` + is present, will generate consecutive IDs. + ygap + Vertical space between grid cells, expressed as + a fraction of the total height available to one + cell. Defaults to 0.1 for coupled-axes grids + and 0.3 for independent grids. + yside + Sets where the y axis labels and titles go. + "left" means the very left edge of the grid. + *left plot* is the leftmost plot that each y + axis is used in. "right" and *right plot* are + similar. + + Returns + ------- + plotly.graph_objs.layout.Grid + """ + return self["grid"] + + @grid.setter + def grid(self, val): + self["grid"] = val + + # height + # ------ + @property + def height(self): + """ + Sets the plot's height (in px). + + The 'height' property is a number and may be specified as: + - An int or float in the interval [10, inf] + + Returns + ------- + int|float + """ + return self["height"] + + @height.setter + def height(self, val): + self["height"] = val + + # hiddenlabels + # ------------ + @property + def hiddenlabels(self): + """ + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, and can + simultaneously hide slices from several pies/funnelarea charts + + The 'hiddenlabels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hiddenlabels"] + + @hiddenlabels.setter + def hiddenlabels(self, val): + self["hiddenlabels"] = val + + # hiddenlabelssrc + # --------------- + @property + def hiddenlabelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hiddenlabels . + + The 'hiddenlabelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hiddenlabelssrc"] + + @hiddenlabelssrc.setter + def hiddenlabelssrc(self, val): + self["hiddenlabelssrc"] = val + + # hidesources + # ----------- + @property + def hidesources(self): + """ + Determines whether or not a text link citing the data source is + placed at the bottom-right cored of the figure. Has only an + effect only on graphs that have been generated via forked + graphs from the Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise). + + The 'hidesources' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["hidesources"] + + @hidesources.setter + def hidesources(self, val): + self["hidesources"] = val + + # hoverdistance + # ------------- + @property + def hoverdistance(self): + """ + Sets the default distance (in pixels) to look for data to add + hover labels (-1 means no cutoff, 0 means no looking for data). + This is only a real distance for hovering on point-like + objects, like scatter points. For area-like objects (bars, + scatter fills, etc) hovering is on inside the area and off + outside, but these objects will not supersede hover on point- + like objects in case of conflict. + + The 'hoverdistance' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + + Returns + ------- + int + """ + return self["hoverdistance"] + + @hoverdistance.setter + def hoverdistance(self, val): + self["hoverdistance"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + bgcolor + Sets the background color of all hover labels + on graph + bordercolor + Sets the border color of all hover labels on + graph. + font + Sets the default hover label font used by all + traces on the graph. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + + Returns + ------- + plotly.graph_objs.layout.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovermode + # --------- + @property + def hovermode(self): + """ + Determines the mode of hover interactions. If "closest", a + single hoverlabel will appear for the "closest" point within + the `hoverdistance`. If "x" (or "y"), multiple hoverlabels will + appear for multiple points at the "closest" x- (or y-) + coordinate within the `hoverdistance`, with the caveat that no + more than one hoverlabel will appear per trace. If *x unified* + (or *y unified*), a single hoverlabel will appear multiple + points at the closest x- (or y-) coordinate within the + `hoverdistance` with the caveat that no more than one + hoverlabel will appear per trace. In this mode, spikelines are + enabled by default perpendicular to the specified axis. If + false, hover interactions are disabled. If `clickmode` includes + the "select" flag, `hovermode` defaults to "closest". If + `clickmode` lacks the "select" flag, it defaults to "x" or "y" + (depending on the trace's `orientation` value) for plots based + on cartesian coordinates. For anything else the default value + is "closest". + + The 'hovermode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['x', 'y', 'closest', False, 'x unified', 'y unified'] + + Returns + ------- + Any + """ + return self["hovermode"] + + @hovermode.setter + def hovermode(self, val): + self["hovermode"] = val + + # images + # ------ + @property + def images(self): + """ + The 'images' property is a tuple of instances of + Image that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Image + - A list or tuple of dicts of string/value properties that + will be passed to the Image constructor + + Supported dict properties: + + layer + Specifies whether images are drawn below or + above traces. When `xref` and `yref` are both + set to `paper`, image is drawn below the entire + plot area. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The + image will be sized based on the `position` + value. When `xref` is set to `paper`, units are + sized relative to the plot width. + sizey + Sets the image container size vertically. The + image will be sized based on the `position` + value. When `yref` is set to `paper`, units are + sized relative to the plot height. + sizing + Specifies which dimension of the image to + constrain. + source + Specifies the URL of the image to be used. The + URL must be accessible from the domain where + the plot code is run, and can be either + relative or absolute. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this image is + visible. + x + Sets the image's x position. When `xref` is set + to `paper`, units are sized relative to the + plot height. See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to + a x axis id (e.g. "x" or "x2"), the `x` + position refers to an x data coordinate If set + to "paper", the `x` position refers to the + distance from the left of plot in normalized + coordinates where 0 (1) corresponds to the left + (right). + y + Sets the image's y position. When `yref` is set + to `paper`, units are sized relative to the + plot height. See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to + a y axis id (e.g. "y" or "y2"), the `y` + position refers to a y data coordinate. If set + to "paper", the `y` position refers to the + distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds + to the bottom (top). + + Returns + ------- + tuple[plotly.graph_objs.layout.Image] + """ + return self["images"] + + @images.setter + def images(self, val): + self["images"] = val + + # imagedefaults + # ------------- + @property + def imagedefaults(self): + """ + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + + The 'imagedefaults' property is an instance of Image + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Image` + - A dict of string/value properties that will be passed + to the Image constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.Image + """ + return self["imagedefaults"] + + @imagedefaults.setter + def imagedefaults(self, val): + self["imagedefaults"] = val + + # legend + # ------ + @property + def legend(self): + """ + The 'legend' property is an instance of Legend + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Legend` + - A dict of string/value properties that will be passed + to the Legend constructor + + Supported dict properties: + + bgcolor + Sets the legend background color. Defaults to + `layout.paper_bgcolor`. + bordercolor + Sets the color of the border enclosing the + legend. + borderwidth + Sets the width (in px) of the border enclosing + the legend. + font + Sets the font used to text the legend items. + itemclick + Determines the behavior on legend item click. + "toggle" toggles the visibility of the item + clicked on the graph. "toggleothers" makes the + clicked item the sole visible item on the + graph. False disable legend item click + interactions. + itemdoubleclick + Determines the behavior on legend item double- + click. "toggle" toggles the visibility of the + item clicked on the graph. "toggleothers" makes + the clicked item the sole visible item on the + graph. False disable legend item double-click + interactions. + itemsizing + Determines if the legend items symbols scale + with their corresponding "trace" attributes or + remain "constant" independent of the symbol + size on the graph. + orientation + Sets the orientation of the legend. + title + :class:`plotly.graph_objects.layout.legend.Titl + e` instance or dict with compatible properties + tracegroupgap + Sets the amount of vertical space (in px) + between legend groups. + traceorder + Determines the order at which the legend items + are displayed. If "normal", the items are + displayed top-to-bottom in the same order as + the input data. If "reversed", the items are + displayed in the opposite order as "normal". If + "grouped", the items are displayed in groups + (when a trace `legendgroup` is provided). if + "grouped+reversed", the items are displayed in + the opposite order as "grouped". + uirevision + Controls persistence of legend-driven changes + in trace and pie label visibility. Defaults to + `layout.uirevision`. + valign + Sets the vertical alignment of the symbols with + respect to their associated text. + x + Sets the x position (in normalized coordinates) + of the legend. Defaults to 1.02 for vertical + legends and defaults to 0 for horizontal + legends. + xanchor + Sets the legend's horizontal position anchor. + This anchor binds the `x` position to the + "left", "center" or "right" of the legend. + Value "auto" anchors legends to the right for + `x` values greater than or equal to 2/3, + anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with + respect to their center otherwise. + y + Sets the y position (in normalized coordinates) + of the legend. Defaults to 1 for vertical + legends, defaults to "-0.1" for horizontal + legends on graphs w/o range sliders and + defaults to 1.1 for horizontal legends on graph + with one or multiple range sliders. + yanchor + Sets the legend's vertical position anchor This + anchor binds the `y` position to the "top", + "middle" or "bottom" of the legend. Value + "auto" anchors legends at their bottom for `y` + values less than or equal to 1/3, anchors + legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with + respect to their middle otherwise. + + Returns + ------- + plotly.graph_objs.layout.Legend + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + # mapbox + # ------ + @property + def mapbox(self): + """ + The 'mapbox' property is an instance of Mapbox + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Mapbox` + - A dict of string/value properties that will be passed + to the Mapbox constructor + + Supported dict properties: + + accesstoken + Sets the mapbox access token to be used for + this mapbox map. Alternatively, the mapbox + access token can be set in the configuration + options under `mapboxAccessToken`. Note that + accessToken are only required when `style` (e.g + with values : basic, streets, outdoors, light, + dark, satellite, satellite-streets ) and/or a + layout layer references the Mapbox server. + bearing + Sets the bearing angle of the map in degrees + counter-clockwise from North (mapbox.bearing). + center + :class:`plotly.graph_objects.layout.mapbox.Cent + er` instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.mapbox.Doma + in` instance or dict with compatible properties + layers + A tuple of :class:`plotly.graph_objects.layout. + mapbox.Layer` instances or dicts with + compatible properties + layerdefaults + When used in a template (as + layout.template.layout.mapbox.layerdefaults), + sets the default property values to use for + elements of layout.mapbox.layers + pitch + Sets the pitch angle of the map (in degrees, + where 0 means perpendicular to the surface of + the map) (mapbox.pitch). + style + Defines the map layers that are rendered by + default below the trace layers defined in + `data`, which are themselves by default + rendered below the layers defined in + `layout.mapbox.layers`. These layers can be + defined either explicitly as a Mapbox Style + object which can contain multiple layer + definitions that load data from any public or + private Tile Map Service (TMS or XYZ) or Web + Map Service (WMS) or implicitly by using one of + the built-in style objects which use WMSes + which do not require any access tokens, or by + using a default Mapbox style or custom Mapbox + style URL, both of which require a Mapbox + access token Note that Mapbox access token can + be set in the `accesstoken` attribute or in the + `mapboxAccessToken` config option. Mapbox + Style objects are of the form described in the + Mapbox GL JS documentation available at + https://docs.mapbox.com/mapbox-gl-js/style-spec + The built-in plotly.js styles objects are: + open-street-map, white-bg, carto-positron, + carto-darkmatter, stamen-terrain, stamen-toner, + stamen-watercolor The built-in Mapbox styles + are: basic, streets, outdoors, light, dark, + satellite, satellite-streets Mapbox style URLs + are of the form: + mapbox://mapbox.mapbox-- + uirevision + Controls persistence of user-driven changes in + the view: `center`, `zoom`, `bearing`, `pitch`. + Defaults to `layout.uirevision`. + zoom + Sets the zoom level of the map (mapbox.zoom). + + Returns + ------- + plotly.graph_objs.layout.Mapbox + """ + return self["mapbox"] + + @mapbox.setter + def mapbox(self, val): + self["mapbox"] = val + + # margin + # ------ + @property + def margin(self): + """ + The 'margin' property is an instance of Margin + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Margin` + - A dict of string/value properties that will be passed + to the Margin constructor + + Supported dict properties: + + autoexpand + Turns on/off margin expansion computations. + Legends, colorbars, updatemenus, sliders, axis + rangeselector and rangeslider are allowed to + push the margins by defaults. + b + Sets the bottom margin (in px). + l + Sets the left margin (in px). + pad + Sets the amount of padding (in px) between the + plotting area and the axis lines + r + Sets the right margin (in px). + t + Sets the top margin (in px). + + Returns + ------- + plotly.graph_objs.layout.Margin + """ + return self["margin"] + + @margin.setter + def margin(self, val): + self["margin"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information that can be used in various + `text` attributes. Attributes such as the graph, axis and + colorbar `title.text`, annotation `text` `trace.name` in legend + items, `rangeselector`, `updatemenus` and `sliders` `label` + text all support `meta`. One can access `meta` fields using + template strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object for + example `{key: value}` which can be accessed %{meta[key]}. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # modebar + # ------- + @property + def modebar(self): + """ + The 'modebar' property is an instance of Modebar + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Modebar` + - A dict of string/value properties that will be passed + to the Modebar constructor + + Supported dict properties: + + activecolor + Sets the color of the active or hovered on + icons in the modebar. + bgcolor + Sets the background color of the modebar. + color + Sets the color of the icons in the modebar. + orientation + Sets the orientation of the modebar. + uirevision + Controls persistence of user-driven changes + related to the modebar, including `hovermode`, + `dragmode`, and `showspikes` at both the root + level and inside subplots. Defaults to + `layout.uirevision`. + + Returns + ------- + plotly.graph_objs.layout.Modebar + """ + return self["modebar"] + + @modebar.setter + def modebar(self, val): + self["modebar"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Rotates the entire polar by the given angle in legacy + polar charts. + + The 'orientation' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # paper_bgcolor + # ------------- + @property + def paper_bgcolor(self): + """ + Sets the background color of the paper where the graph is + drawn. + + The 'paper_bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["paper_bgcolor"] + + @paper_bgcolor.setter + def paper_bgcolor(self, val): + self["paper_bgcolor"] = val + + # piecolorway + # ----------- + @property + def piecolorway(self): + """ + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendpiecolors`. + + The 'piecolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["piecolorway"] + + @piecolorway.setter + def piecolorway(self, val): + self["piecolorway"] = val + + # plot_bgcolor + # ------------ + @property + def plot_bgcolor(self): + """ + Sets the background color of the plotting area in-between x and + y axes. + + The 'plot_bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["plot_bgcolor"] + + @plot_bgcolor.setter + def plot_bgcolor(self, val): + self["plot_bgcolor"] = val + + # polar + # ----- + @property + def polar(self): + """ + The 'polar' property is an instance of Polar + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Polar` + - A dict of string/value properties that will be passed + to the Polar constructor + + Supported dict properties: + + angularaxis + :class:`plotly.graph_objects.layout.polar.Angul + arAxis` instance or dict with compatible + properties + bargap + Sets the gap between bars of adjacent location + coordinates. Values are unitless, they + represent fractions of the minimum difference + in bar positions in the data. + barmode + Determines how bars at the same location + coordinate are displayed on the graph. With + "stack", the bars are stacked on top of one + another With "overlay", the bars are plotted + over one another, you might need to an + "opacity" to see multiple bars. + bgcolor + Set the background color of the subplot + domain + :class:`plotly.graph_objects.layout.polar.Domai + n` instance or dict with compatible properties + gridshape + Determines if the radial axis grid lines and + angular axis line are drawn as "circular" + sectors or as "linear" (polygon) sectors. Has + an effect only when the angular axis has `type` + "category". Note that `radialaxis.angle` is + snapped to the angle of the closest vertex when + `gridshape` is "circular" (so that radial axis + scale is the same as the data scale). + hole + Sets the fraction of the radius to cut out of + the polar subplot. + radialaxis + :class:`plotly.graph_objects.layout.polar.Radia + lAxis` instance or dict with compatible + properties + sector + Sets angular span of this polar subplot with + two angles (in degrees). Sector are assumed to + be spanned in the counterclockwise direction + with 0 corresponding to rightmost limit of the + polar subplot. + uirevision + Controls persistence of user-driven changes in + axis attributes, if not overridden in the + individual axes. Defaults to + `layout.uirevision`. + + Returns + ------- + plotly.graph_objs.layout.Polar + """ + return self["polar"] + + @polar.setter + def polar(self, val): + self["polar"] = val + + # radialaxis + # ---------- + @property + def radialaxis(self): + """ + The 'radialaxis' property is an instance of RadialAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.RadialAxis` + - A dict of string/value properties that will be passed + to the RadialAxis constructor + + Supported dict properties: + + domain + Polar chart subplots are not supported yet. + This key has currently no effect. + endpadding + Legacy polar charts are deprecated! Please + switch to "polar" subplots. + orientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (an angle with respect to the + origin) of the radial axis. + range + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Defines the start + and end point of this radial axis. + showline + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the line bounding this radial axis will + be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the radial axis ticks will feature tick + labels. + tickcolor + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the color of + the tick lines on this radial axis. + ticklen + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this radial axis. + tickorientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (from the paper perspective) of the + radial axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this radial axis. + visible + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not this axis will be visible. + + Returns + ------- + plotly.graph_objs.layout.RadialAxis + """ + return self["radialaxis"] + + @radialaxis.setter + def radialaxis(self, val): + self["radialaxis"] = val + + # scene + # ----- + @property + def scene(self): + """ + The 'scene' property is an instance of Scene + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Scene` + - A dict of string/value properties that will be passed + to the Scene constructor + + Supported dict properties: + + annotations + A tuple of :class:`plotly.graph_objects.layout. + scene.Annotation` instances or dicts with + compatible properties + annotationdefaults + When used in a template (as layout.template.lay + out.scene.annotationdefaults), sets the default + property values to use for elements of + layout.scene.annotations + aspectmode + If "cube", this scene's axes are drawn as a + cube, regardless of the axes' ranges. If + "data", this scene's axes are drawn in + proportion with the axes' ranges. If "manual", + this scene's axes are drawn in proportion with + the input of "aspectratio" (the default + behavior if "aspectratio" is provided). If + "auto", this scene's axes are drawn using the + results of "data" except when one axis is more + than four times the size of the two others, + where in that case the results of "cube" are + used. + aspectratio + Sets this scene's axis aspectratio. + bgcolor + + camera + :class:`plotly.graph_objects.layout.scene.Camer + a` instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.scene.Domai + n` instance or dict with compatible properties + dragmode + Determines the mode of drag interactions for + this scene. + hovermode + Determines the mode of hover interactions for + this scene. + uirevision + Controls persistence of user-driven changes in + camera attributes. Defaults to + `layout.uirevision`. + xaxis + :class:`plotly.graph_objects.layout.scene.XAxis + ` instance or dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.scene.YAxis + ` instance or dict with compatible properties + zaxis + :class:`plotly.graph_objects.layout.scene.ZAxis + ` instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.layout.Scene + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # selectdirection + # --------------- + @property + def selectdirection(self): + """ + When "dragmode" is set to "select", this limits the selection + of the drag to horizontal, vertical or diagonal. "h" only + allows horizontal selection, "v" only vertical, "d" only + diagonal and "any" sets no limit. + + The 'selectdirection' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v', 'd', 'any'] + + Returns + ------- + Any + """ + return self["selectdirection"] + + @selectdirection.setter + def selectdirection(self, val): + self["selectdirection"] = val + + # selectionrevision + # ----------------- + @property + def selectionrevision(self): + """ + Controls persistence of user-driven changes in selected points + from all traces. + + The 'selectionrevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectionrevision"] + + @selectionrevision.setter + def selectionrevision(self, val): + self["selectionrevision"] = val + + # separators + # ---------- + @property + def separators(self): + """ + Sets the decimal and thousand separators. For example, *. * + puts a '.' before decimals and a space between thousands. In + English locales, dflt is ".," but other locales may alter this + default. + + The 'separators' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["separators"] + + @separators.setter + def separators(self, val): + self["separators"] = val + + # shapes + # ------ + @property + def shapes(self): + """ + The 'shapes' property is a tuple of instances of + Shape that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Shape + - A list or tuple of dicts of string/value properties that + will be passed to the Shape constructor + + Supported dict properties: + + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or + above traces. + line + :class:`plotly.graph_objects.layout.shape.Line` + instance or dict with compatible properties + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the + pixel values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and + taken unmodified as pixels relative to + `xanchor` and `yanchor` in case of "pixel" size + mode. There are a few restrictions / quirks + only absolute instructions, not relative. So + the allowed segments are: M, L, H, V, Q, C, T, + S, and Z arcs (A) are not allowed because + radius rx and ry are relative. In the future we + could consider supporting relative commands, + but we would have to decide on how to handle + date and log axes. Note that even as is, Q and + C Bezier paths that are smooth on linear axes + may not be smooth on log, and vice versa. no + chained "polybezier" commands - specify the + segment type for each one. On category axes, + values are numbers scaled to the serial numbers + of categories because using the categories + themselves there would be no way to describe + fractional positions On data axes: because + space and T are both normal components of path + strings, we can't use either to separate date + from time parts. Therefore we'll use underscore + for this purpose: 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If + "line", a line is drawn from (`x0`,`y0`) to + (`x1`,`y1`) with respect to the axes' sizing + mode. If "circle", a circle is drawn from + ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 + -`y0`)|) with respect to the axes' sizing mode. + If "rect", a rectangle is drawn linking + (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), + (`x0`,`y1`), (`x0`,`y0`) with respect to the + axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' + sizing mode. + visible + Determines whether or not this shape is + visible. + x0 + Sets the shape's starting x position. See + `type` and `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` + set to "pixel". Specifies the anchor point on + the x axis to which `x0`, `x1` and x + coordinates within `path` are relative to. E.g. + useful to attach a pixel sized shape to a + certain data value. No effect when `xsizemode` + not set to "pixel". + xref + Sets the shape's x coordinate axis. If set to + an x axis id (e.g. "x" or "x2"), the `x` + position refers to an x coordinate. If set to + "paper", the `x` position refers to the + distance from the left side of the plotting + area in normalized coordinates where 0 (1) + corresponds to the left (right) side. If the + axis `type` is "log", then you must take the + log of your desired range. If the axis `type` + is "date", then you must convert the date to + unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. + If set to "scaled", `x0`, `x1` and x + coordinates within `path` refer to data values + on the x axis or a fraction of the plot area's + width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in + terms of data or plot fraction but `x0`, `x1` + and x coordinates within `path` are pixels + relative to `xanchor`. This way, the shape can + have a fixed width while maintaining a position + relative to data or plot fraction. + y0 + Sets the shape's starting y position. See + `type` and `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` + set to "pixel". Specifies the anchor point on + the y axis to which `y0`, `y1` and y + coordinates within `path` are relative to. E.g. + useful to attach a pixel sized shape to a + certain data value. No effect when `ysizemode` + not set to "pixel". + yref + Sets the annotation's y coordinate axis. If set + to an y axis id (e.g. "y" or "y2"), the `y` + position refers to an y coordinate If set to + "paper", the `y` position refers to the + distance from the bottom of the plotting area + in normalized coordinates where 0 (1) + corresponds to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. + If set to "scaled", `y0`, `y1` and y + coordinates within `path` refer to data values + on the y axis or a fraction of the plot area's + height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in + terms of data or plot fraction but `y0`, `y1` + and y coordinates within `path` are pixels + relative to `yanchor`. This way, the shape can + have a fixed height while maintaining a + position relative to data or plot fraction. + + Returns + ------- + tuple[plotly.graph_objs.layout.Shape] + """ + return self["shapes"] + + @shapes.setter + def shapes(self, val): + self["shapes"] = val + + # shapedefaults + # ------------- + @property + def shapedefaults(self): + """ + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + + The 'shapedefaults' property is an instance of Shape + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Shape` + - A dict of string/value properties that will be passed + to the Shape constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.Shape + """ + return self["shapedefaults"] + + @shapedefaults.setter + def shapedefaults(self, val): + self["shapedefaults"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not a legend is drawn. Default is `true` + if there is a trace to show and any of these: a) Two or more + traces would by default be shown in the legend. b) One pie + trace is shown in the legend. c) One trace is explicitly given + with `showlegend: true`. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # sliders + # ------- + @property + def sliders(self): + """ + The 'sliders' property is a tuple of instances of + Slider that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Slider + - A list or tuple of dicts of string/value properties that + will be passed to the Slider constructor + + Supported dict properties: + + active + Determines which button (by index starting from + 0) is considered active. + activebgcolor + Sets the background color of the slider grip + while dragging. + bgcolor + Sets the background color of the slider. + bordercolor + Sets the color of the border enclosing the + slider. + borderwidth + Sets the width (in px) of the border enclosing + the slider. + currentvalue + :class:`plotly.graph_objects.layout.slider.Curr + entvalue` instance or dict with compatible + properties + font + Sets the font of the slider step labels. + len + Sets the length of the slider This measure + excludes the padding of both ends. That is, the + slider's length is this length minus the + padding on both ends. + lenmode + Determines whether this slider length is set in + units of plot "fraction" or in *pixels. Use + `len` to set the value. + minorticklen + Sets the length in pixels of minor step tick + marks + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pad + Set the padding of the slider component along + each side. + steps + A tuple of :class:`plotly.graph_objects.layout. + slider.Step` instances or dicts with compatible + properties + stepdefaults + When used in a template (as + layout.template.layout.slider.stepdefaults), + sets the default property values to use for + elements of layout.slider.steps + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + tickcolor + Sets the color of the border enclosing the + slider. + ticklen + Sets the length in pixels of step tick marks + tickwidth + Sets the tick width (in px). + transition + :class:`plotly.graph_objects.layout.slider.Tran + sition` instance or dict with compatible + properties + visible + Determines whether or not the slider is + visible. + x + Sets the x position (in normalized coordinates) + of the slider. + xanchor + Sets the slider's horizontal position anchor. + This anchor binds the `x` position to the + "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the slider. + yanchor + Sets the slider's vertical position anchor This + anchor binds the `y` position to the "top", + "middle" or "bottom" of the range selector. + + Returns + ------- + tuple[plotly.graph_objs.layout.Slider] + """ + return self["sliders"] + + @sliders.setter + def sliders(self, val): + self["sliders"] = val + + # sliderdefaults + # -------------- + @property + def sliderdefaults(self): + """ + When used in a template (as + layout.template.layout.sliderdefaults), sets the default + property values to use for elements of layout.sliders + + The 'sliderdefaults' property is an instance of Slider + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Slider` + - A dict of string/value properties that will be passed + to the Slider constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.Slider + """ + return self["sliderdefaults"] + + @sliderdefaults.setter + def sliderdefaults(self, val): + self["sliderdefaults"] = val + + # spikedistance + # ------------- + @property + def spikedistance(self): + """ + Sets the default distance (in pixels) to look for data to draw + spikelines to (-1 means no cutoff, 0 means no looking for + data). As with hoverdistance, distance does not apply to area- + like objects. In addition, some objects can be hovered on but + will not generate spikelines, such as scatter fills. + + The 'spikedistance' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + + Returns + ------- + int + """ + return self["spikedistance"] + + @spikedistance.setter + def spikedistance(self, val): + self["spikedistance"] = val + + # sunburstcolorway + # ---------------- + @property + def sunburstcolorway(self): + """ + Sets the default sunburst slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendsunburstcolors`. + + The 'sunburstcolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["sunburstcolorway"] + + @sunburstcolorway.setter + def sunburstcolorway(self, val): + self["sunburstcolorway"] = val + + # template + # -------- + @property + def template(self): + """ + Default attributes to be applied to the plot. This should be a + dict with format: `{'layout': layoutTemplate, 'data': + {trace_type: [traceTemplate, ...], ...}}` where + `layoutTemplate` is a dict matching the structure of + `figure.layout` and `traceTemplate` is a dict matching the + structure of the trace with type `trace_type` (e.g. 'scatter'). + Alternatively, this may be specified as an instance of + plotly.graph_objs.layout.Template. 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 this can be used to add 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`. + + The 'template' property is an instance of Template + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Template` + - A dict of string/value properties that will be passed + to the Template constructor + + Supported dict properties: + + data + :class:`plotly.graph_objects.layout.template.Da + ta` instance or dict with compatible properties + layout + :class:`plotly.graph_objects.Layout` instance + or dict with compatible properties + + - The name of a registered template where current registered templates + are stored in the plotly.io.templates configuration object. The names + of all registered templates can be retrieved with: + >>> import plotly.io as pio + >>> list(pio.templates) # doctest: +ELLIPSIS + ['ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', ...] + + - A string containing multiple registered template names, joined on '+' + characters (e.g. 'template1+template2'). In this case the resulting + template is computed by merging together the collection of registered + templates + + Returns + ------- + plotly.graph_objs.layout.Template + """ + return self["template"] + + @template.setter + def template(self, val): + self["template"] = val + + # ternary + # ------- + @property + def ternary(self): + """ + The 'ternary' property is an instance of Ternary + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Ternary` + - A dict of string/value properties that will be passed + to the Ternary constructor + + Supported dict properties: + + aaxis + :class:`plotly.graph_objects.layout.ternary.Aax + is` instance or dict with compatible properties + baxis + :class:`plotly.graph_objects.layout.ternary.Bax + is` instance or dict with compatible properties + bgcolor + Set the background color of the subplot + caxis + :class:`plotly.graph_objects.layout.ternary.Cax + is` instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.ternary.Dom + ain` instance or dict with compatible + properties + sum + The number each triplet should sum to, and the + maximum range of each axis + uirevision + Controls persistence of user-driven changes in + axis `min` and `title`, if not overridden in + the individual axes. Defaults to + `layout.uirevision`. + + Returns + ------- + plotly.graph_objs.layout.Ternary + """ + return self["ternary"] + + @ternary.setter + def ternary(self, val): + self["ternary"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets the title font. Note that the title's font + used to be customized by the now deprecated + `titlefont` attribute. + pad + Sets the padding of the title. Each padding + value only applies when the corresponding + `xanchor`/`yanchor` value is set accordingly. + E.g. for left padding to take effect, `xanchor` + must be set to "left". The same rule applies if + `xanchor`/`yanchor` is determined + automatically. Padding is muted if the + respective anchor value is "middle*/*center". + text + Sets the plot's title. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. + x + Sets the x position with respect to `xref` in + normalized coordinates from 0 (left) to 1 + (right). + xanchor + Sets the title's horizontal alignment with + respect to its x position. "left" means that + the title starts at x, "right" means that the + title ends at x and "center" means that the + title's center is at x. "auto" divides `xref` + by three and calculates the `xanchor` value + automatically based on the value of `x`. + xref + Sets the container `x` refers to. "container" + spans the entire `width` of the plot. "paper" + refers to the width of the plotting area only. + y + Sets the y position with respect to `yref` in + normalized coordinates from 0 (bottom) to 1 + (top). "auto" places the baseline of the title + onto the vertical center of the top margin. + yanchor + Sets the title's vertical alignment with + respect to its y position. "top" means that the + title's cap line is at y, "bottom" means that + the title's baseline is at y and "middle" means + that the title's midline is at y. "auto" + divides `yref` by three and calculates the + `yanchor` value automatically based on the + value of `y`. + yref + Sets the container `y` refers to. "container" + spans the entire `height` of the plot. "paper" + refers to the height of the plotting area only. + + Returns + ------- + plotly.graph_objs.layout.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.title.font instead. Sets the + title font. Note that the title's font used to be customized by + the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # transition + # ---------- + @property + def transition(self): + """ + Sets transition options used during Plotly.react updates. + + The 'transition' property is an instance of Transition + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Transition` + - A dict of string/value properties that will be passed + to the Transition constructor + + Supported dict properties: + + duration + The duration of the transition, in + milliseconds. If equal to zero, updates are + synchronous. + easing + The easing function used for the transition + ordering + Determines whether the figure's layout or + traces smoothly transitions during updates that + make both traces and layout change. + + Returns + ------- + plotly.graph_objs.layout.Transition + """ + return self["transition"] + + @transition.setter + def transition(self, val): + self["transition"] = val + + # treemapcolorway + # --------------- + @property + def treemapcolorway(self): + """ + Sets the default treemap slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendtreemapcolors`. + + The 'treemapcolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["treemapcolorway"] + + @treemapcolorway.setter + def treemapcolorway(self, val): + self["treemapcolorway"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Used to allow user interactions with the plot to persist after + `Plotly.react` calls that are unaware of these interactions. If + `uirevision` is omitted, or if it is given and it changed from + the previous `Plotly.react` call, the exact new figure is used. + If `uirevision` is truthy and did NOT change, any attribute + that has been affected by user interactions and did not receive + a different value in the new figure will keep the interaction + value. `layout.uirevision` attribute serves as the default for + `uirevision` attributes in various sub-containers. For finer + control you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y axes + you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is changed, + you can update `yaxis.uirevision=*quantity*` and the y axis + range will reset but the x axis range will retain any user- + driven zoom. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # uniformtext + # ----------- + @property + def uniformtext(self): + """ + The 'uniformtext' property is an instance of Uniformtext + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Uniformtext` + - A dict of string/value properties that will be passed + to the Uniformtext constructor + + Supported dict properties: + + minsize + Sets the minimum text size between traces of + the same type. + mode + Determines how the font size for various text + elements are uniformed between each trace type. + If the computed text sizes were smaller than + the minimum size defined by + `uniformtext.minsize` using "hide" option hides + the text; and using "show" option shows the + text without further downscaling. Please note + that if the size defined by `minsize` is + greater than the font size defined by trace, + then the `minsize` is used. + + Returns + ------- + plotly.graph_objs.layout.Uniformtext + """ + return self["uniformtext"] + + @uniformtext.setter + def uniformtext(self, val): + self["uniformtext"] = val + + # updatemenus + # ----------- + @property + def updatemenus(self): + """ + The 'updatemenus' property is a tuple of instances of + Updatemenu that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Updatemenu + - A list or tuple of dicts of string/value properties that + will be passed to the Updatemenu constructor + + Supported dict properties: + + active + Determines which button (by index starting from + 0) is considered active. + bgcolor + Sets the background color of the update menu + buttons. + bordercolor + Sets the color of the border enclosing the + update menu. + borderwidth + Sets the width (in px) of the border enclosing + the update menu. + buttons + A tuple of :class:`plotly.graph_objects.layout. + updatemenu.Button` instances or dicts with + compatible properties + buttondefaults + When used in a template (as layout.template.lay + out.updatemenu.buttondefaults), sets the + default property values to use for elements of + layout.updatemenu.buttons + direction + Determines the direction in which the buttons + are laid out, whether in a dropdown menu or a + row/column of buttons. For `left` and `up`, the + buttons will still appear in left-to-right or + top-to-bottom order respectively. + font + Sets the font of the update menu button text. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pad + Sets the padding around the buttons or dropdown + menu. + showactive + Highlights active dropdown item or active + button if true. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Determines whether the buttons are accessible + via a dropdown menu or whether the buttons are + stacked horizontally or vertically + visible + Determines whether or not the update menu is + visible. + x + Sets the x position (in normalized coordinates) + of the update menu. + xanchor + Sets the update menu's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the update menu. + yanchor + Sets the update menu's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the range + selector. + + Returns + ------- + tuple[plotly.graph_objs.layout.Updatemenu] + """ + return self["updatemenus"] + + @updatemenus.setter + def updatemenus(self, val): + self["updatemenus"] = val + + # updatemenudefaults + # ------------------ + @property + def updatemenudefaults(self): + """ + When used in a template (as + layout.template.layout.updatemenudefaults), sets the default + property values to use for elements of layout.updatemenus + + The 'updatemenudefaults' property is an instance of Updatemenu + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Updatemenu` + - A dict of string/value properties that will be passed + to the Updatemenu constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.Updatemenu + """ + return self["updatemenudefaults"] + + @updatemenudefaults.setter + def updatemenudefaults(self, val): + self["updatemenudefaults"] = val + + # violingap + # --------- + @property + def violingap(self): + """ + Sets the gap (in plot fraction) between violins of adjacent + location coordinates. Has no effect on traces that have "width" + set. + + The 'violingap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["violingap"] + + @violingap.setter + def violingap(self, val): + self["violingap"] = val + + # violingroupgap + # -------------- + @property + def violingroupgap(self): + """ + Sets the gap (in plot fraction) between violins of the same + location coordinate. Has no effect on traces that have "width" + set. + + The 'violingroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["violingroupgap"] + + @violingroupgap.setter + def violingroupgap(self, val): + self["violingroupgap"] = val + + # violinmode + # ---------- + @property + def violinmode(self): + """ + Determines how violins at the same location coordinate are + displayed on the graph. If "group", the violins are plotted + next to one another centered around the shared location. If + "overlay", the violins are plotted over one another, you might + need to set "opacity" to see them multiple violins. Has no + effect on traces that have "width" set. + + The 'violinmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["violinmode"] + + @violinmode.setter + def violinmode(self, val): + self["violinmode"] = val + + # waterfallgap + # ------------ + @property + def waterfallgap(self): + """ + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. + + The 'waterfallgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["waterfallgap"] + + @waterfallgap.setter + def waterfallgap(self, val): + self["waterfallgap"] = val + + # waterfallgroupgap + # ----------------- + @property + def waterfallgroupgap(self): + """ + Sets the gap (in plot fraction) between bars of the same + location coordinate. + + The 'waterfallgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["waterfallgroupgap"] + + @waterfallgroupgap.setter + def waterfallgroupgap(self, val): + self["waterfallgroupgap"] = val + + # waterfallmode + # ------------- + @property + def waterfallmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are plotted next + to one another centered around the shared location. With + "overlay", the bars are plotted over one another, you might + need to an "opacity" to see multiple bars. + + The 'waterfallmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["waterfallmode"] + + @waterfallmode.setter + def waterfallmode(self, val): + self["waterfallmode"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the plot's width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [10, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + The 'xaxis' property is an instance of XAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.XAxis` + - A dict of string/value properties that will be passed + to the XAxis constructor + + Supported dict properties: + + anchor + If set to an opposite-letter axis id (e.g. + `x2`, `y`), this axis is bound to the + corresponding opposite-letter axis. If set to + "free", this axis' position is determined by + `position`. + automargin + Determines whether long tick labels + automatically grow the figure margins. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + constrain + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines how that + happens: by increasing the "range" (default), + or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines which + direction we push the originally specified plot + area. Options are "left", "center" (default), + and "right" for x axes, and "top", "middle" + (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an + effect on "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has + an effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot + fraction). + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the + range of this axis will match the range of the + corresponding axis in data-coordinates space. + Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that + matching axes must have the same `type`. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + overlaying + If set a same-letter axis id, this axis is + overlaid on top of the corresponding same- + letter axis, with traces and axes visible for + both axes. If False, this axis does not overlay + any same-letter axes. In this case, for axes + with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting + space (in normalized coordinates). Only has an + effect if `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangebreaks + A tuple of :class:`plotly.graph_objects.layout. + xaxis.Rangebreak` instances or dicts with + compatible properties + rangebreakdefaults + When used in a template (as layout.template.lay + out.xaxis.rangebreakdefaults), sets the default + property values to use for elements of + layout.xaxis.rangebreaks + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + rangeselector + :class:`plotly.graph_objects.layout.xaxis.Range + selector` instance or dict with compatible + properties + rangeslider + :class:`plotly.graph_objects.layout.xaxis.Range + slider` instance or dict with compatible + properties + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the + range of this axis changes together with the + range of the corresponding axis such that the + scale of pixels per unit is in a constant + ratio. Both axes are still zoomable, but when + you zoom one, the other will zoom the same + amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce + the constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` + but you can only link axes of the same `type`. + The linked axis can have the opposite letter + (to constrain the aspect ratio) or the same + letter (to match scales across subplots). Loops + (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant + and the last constraint encountered will be + ignored to avoid possible inconsistent + constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and + a `matches` constraint is currently forbidden. + scaleratio + If this axis is linked to another by + `scaleanchor`, this determines the pixel to + unit scale ratio. For example, if this value is + 10, then every unit on this axis spans 10 times + the number of pixels as a unit on the linked + axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn + between the category levels of this axis. Only + has an effect on "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Determines whether or not spikes (aka + droplines) are drawn for this axis. Note: This + only takes affect when hovermode = closest + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned + at the "bottom" ("left") or "top" ("right") of + the plotting area. + spikecolor + Sets the spike color. If undefined, will use + the series color + spikedash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line + If "toaxis", the line is drawn from the data + point to the axis the series is plotted on. If + "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If + "marker", then a marker dot is drawn on the + axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the + cursor or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + xaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.xaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn + with respect to their corresponding tick + labels. Only has an effect for axes of `type` + "category" or "multicategory". When set to + "boundaries", ticks and grid lines are drawn + half a category to the left/bottom of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.xaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.xaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be customized by the + now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, and `title` if in + `editable: true` configuration. Defaults to + `layout.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + plotly.graph_objs.layout.XAxis + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + The 'yaxis' property is an instance of YAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.YAxis` + - A dict of string/value properties that will be passed + to the YAxis constructor + + Supported dict properties: + + anchor + If set to an opposite-letter axis id (e.g. + `x2`, `y`), this axis is bound to the + corresponding opposite-letter axis. If set to + "free", this axis' position is determined by + `position`. + automargin + Determines whether long tick labels + automatically grow the figure margins. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + constrain + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines how that + happens: by increasing the "range" (default), + or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines which + direction we push the originally specified plot + area. Options are "left", "center" (default), + and "right" for x axes, and "top", "middle" + (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an + effect on "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has + an effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot + fraction). + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the + range of this axis will match the range of the + corresponding axis in data-coordinates space. + Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that + matching axes must have the same `type`. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + overlaying + If set a same-letter axis id, this axis is + overlaid on top of the corresponding same- + letter axis, with traces and axes visible for + both axes. If False, this axis does not overlay + any same-letter axes. In this case, for axes + with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting + space (in normalized coordinates). Only has an + effect if `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangebreaks + A tuple of :class:`plotly.graph_objects.layout. + yaxis.Rangebreak` instances or dicts with + compatible properties + rangebreakdefaults + When used in a template (as layout.template.lay + out.yaxis.rangebreakdefaults), sets the default + property values to use for elements of + layout.yaxis.rangebreaks + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the + range of this axis changes together with the + range of the corresponding axis such that the + scale of pixels per unit is in a constant + ratio. Both axes are still zoomable, but when + you zoom one, the other will zoom the same + amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce + the constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` + but you can only link axes of the same `type`. + The linked axis can have the opposite letter + (to constrain the aspect ratio) or the same + letter (to match scales across subplots). Loops + (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant + and the last constraint encountered will be + ignored to avoid possible inconsistent + constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and + a `matches` constraint is currently forbidden. + scaleratio + If this axis is linked to another by + `scaleanchor`, this determines the pixel to + unit scale ratio. For example, if this value is + 10, then every unit on this axis spans 10 times + the number of pixels as a unit on the linked + axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn + between the category levels of this axis. Only + has an effect on "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Determines whether or not spikes (aka + droplines) are drawn for this axis. Note: This + only takes affect when hovermode = closest + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned + at the "bottom" ("left") or "top" ("right") of + the plotting area. + spikecolor + Sets the spike color. If undefined, will use + the series color + spikedash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line + If "toaxis", the line is drawn from the data + point to the axis the series is plotted on. If + "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If + "marker", then a marker dot is drawn on the + axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the + cursor or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + yaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.yaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn + with respect to their corresponding tick + labels. Only has an effect for axes of `type` + "category" or "multicategory". When set to + "boundaries", ticks and grid lines are drawn + half a category to the left/bottom of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.yaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.yaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be customized by the + now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, and `title` if in + `editable: true` configuration. Defaults to + `layout.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + plotly.graph_objs.layout.YAxis + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + angularaxis + :class:`plotly.graph_objects.layout.AngularAxis` + instance or dict with compatible properties + annotations + A tuple of + :class:`plotly.graph_objects.layout.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), sets the + default property values to use for elements of + layout.annotations + autosize + Determines whether or not a layout width or height that + has been left undefined by the user is initialized on + each relayout. Note that, regardless of this attribute, + an undefined layout width or height is always + initialized on the first call to plot. + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "relative", the bars + are stacked on top of one another, with negative values + below the axis, positive values above With "group", the + bars are plotted next to one another centered around + the shared location. With "overlay", the bars are + plotted over one another, you might need to an + "opacity" to see multiple bars. + barnorm + Sets the normalization for bar traces on the graph. + With "fraction", the value of each bar is divided by + the sum of all values at that location coordinate. + "percent" is the same but multiplied by 100 to show + percentages. + boxgap + Sets the gap (in plot fraction) between boxes of + adjacent location coordinates. Has no effect on traces + that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes of the + same location coordinate. Has no effect on traces that + have "width" set. + boxmode + Determines how boxes at the same location coordinate + are displayed on the graph. If "group", the boxes are + plotted next to one another centered around the shared + location. If "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see them + multiple boxes. Has no effect on traces that have + "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout the plot. + clickmode + Determines the mode of single click interactions. + "event" is the default value and emits the + `plotly_click` event. In addition this mode emits the + `plotly_selected` event in drag modes "lasso" and + "select", but with no event data attached (kept for + compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also + supports persistent selections, meaning that pressing + Shift while clicking, adds to / subtracts from an + existing selection. "select" with `hovermode`: "x" can + be confusing, consider explicitly setting `hovermode`: + "closest" when using this feature. Selection events are + sent accordingly as long as "event" flag is set as + well. When the "event" flag is missing, `plotly_click` + and `plotly_selected` events are not fired. + coloraxis + :class:`plotly.graph_objects.layout.Coloraxis` instance + or dict with compatible properties + colorscale + :class:`plotly.graph_objects.layout.Colorscale` + instance or dict with compatible properties + colorway + Sets the default trace colors. + datarevision + If provided, a changed value tells `Plotly.react` that + one or more data arrays has changed. This way you can + modify arrays in-place rather than making a complete + new copy for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are being + treated as immutable, thus any data array with a + different identity from its predecessor contains new + data. + direction + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the direction corresponding to + positive angles in legacy polar charts. + dragmode + Determines the mode of drag interactions. "select" and + "lasso" apply only to scatter traces with markers or + text. "orbit" and "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than trace names + and axis titles. Defaults to `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether given + by `funnelareacolorway` or inherited from `colorway`) + will be extended to three times its original length by + first repeating every color 20% lighter then each color + 20% darker. This is intended to reduce the likelihood + of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in + the trace, using `marker.colors`, are never extended. + extendpiecolors + If `true`, the pie slice colors (whether given by + `piecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will + be extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + font + Sets the global font. Note that fonts used in traces + and other layout components inherit from the global + font. + funnelareacolorway + Sets the default funnelarea slice colors. Defaults to + the main `colorway` used for trace colors. If you + specify a new list here it can still be extended with + lighter and darker colors, see + `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + funnelmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "group", the bars + are plotted next to one another centered around the + shared location. With "overlay", the bars are plotted + over one another, you might need to an "opacity" to see + multiple bars. + geo + :class:`plotly.graph_objects.layout.Geo` instance or + dict with compatible properties + grid + :class:`plotly.graph_objects.layout.Grid` instance or + dict with compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, + and can simultaneously hide slices from several + pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on Chart Studio Cloud for + hiddenlabels . + hidesources + Determines whether or not a text link citing the data + source is placed at the bottom-right cored of the + figure. Has only an effect only on graphs that have + been generated via forked graphs from the Chart Studio + Cloud (at https://chart-studio.plotly.com or on- + premise). + hoverdistance + Sets the default distance (in pixels) to look for data + to add hover labels (-1 means no cutoff, 0 means no + looking for data). This is only a real distance for + hovering on point-like objects, like scatter points. + For area-like objects (bars, scatter fills, etc) + hovering is on inside the area and off outside, but + these objects will not supersede hover on point-like + objects in case of conflict. + hoverlabel + :class:`plotly.graph_objects.layout.Hoverlabel` + instance or dict with compatible properties + hovermode + Determines the mode of hover interactions. If + "closest", a single hoverlabel will appear for the + "closest" point within the `hoverdistance`. If "x" (or + "y"), multiple hoverlabels will appear for multiple + points at the "closest" x- (or y-) coordinate within + the `hoverdistance`, with the caveat that no more than + one hoverlabel will appear per trace. If *x unified* + (or *y unified*), a single hoverlabel will appear + multiple points at the closest x- (or y-) coordinate + within the `hoverdistance` with the caveat that no more + than one hoverlabel will appear per trace. In this + mode, spikelines are enabled by default perpendicular + to the specified axis. If false, hover interactions are + disabled. If `clickmode` includes the "select" flag, + `hovermode` defaults to "closest". If `clickmode` lacks + the "select" flag, it defaults to "x" or "y" (depending + on the trace's `orientation` value) for plots based on + cartesian coordinates. For anything else the default + value is "closest". + images + A tuple of :class:`plotly.graph_objects.layout.Image` + instances or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + legend + :class:`plotly.graph_objects.layout.Legend` instance or + dict with compatible properties + mapbox + :class:`plotly.graph_objects.layout.Mapbox` instance or + dict with compatible properties + margin + :class:`plotly.graph_objects.layout.Margin` instance or + dict with compatible properties + meta + Assigns extra meta information that can be used in + various `text` attributes. Attributes such as the + graph, axis and colorbar `title.text`, annotation + `text` `trace.name` in legend items, `rangeselector`, + `updatemenus` and `sliders` `label` text all support + `meta`. One can access `meta` fields using template + strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object + for example `{key: value}` which can be accessed + %{meta[key]}. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + modebar + :class:`plotly.graph_objects.layout.Modebar` instance + or dict with compatible properties + orientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Rotates the entire polar by the given + angle in legacy polar charts. + paper_bgcolor + Sets the background color of the paper where the graph + is drawn. + piecolorway + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new + list here it can still be extended with lighter and + darker colors, see `extendpiecolors`. + plot_bgcolor + Sets the background color of the plotting area in- + between x and y axes. + polar + :class:`plotly.graph_objects.layout.Polar` instance or + dict with compatible properties + radialaxis + :class:`plotly.graph_objects.layout.RadialAxis` + instance or dict with compatible properties + scene + :class:`plotly.graph_objects.layout.Scene` instance or + dict with compatible properties + selectdirection + When "dragmode" is set to "select", this limits the + selection of the drag to horizontal, vertical or + diagonal. "h" only allows horizontal selection, "v" + only vertical, "d" only diagonal and "any" sets no + limit. + selectionrevision + Controls persistence of user-driven changes in selected + points from all traces. + separators + Sets the decimal and thousand separators. For example, + *. * puts a '.' before decimals and a space between + thousands. In English locales, dflt is ".," but other + locales may alter this default. + shapes + A tuple of :class:`plotly.graph_objects.layout.Shape` + instances or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + showlegend + Determines whether or not a legend is drawn. Default is + `true` if there is a trace to show and any of these: a) + Two or more traces would by default be shown in the + legend. b) One pie trace is shown in the legend. c) One + trace is explicitly given with `showlegend: true`. + sliders + A tuple of :class:`plotly.graph_objects.layout.Slider` + instances or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets the + default property values to use for elements of + layout.sliders + spikedistance + Sets the default distance (in pixels) to look for data + to draw spikelines to (-1 means no cutoff, 0 means no + looking for data). As with hoverdistance, distance does + not apply to area-like objects. In addition, some + objects can be hovered on but will not generate + spikelines, such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. This + should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: [traceTemplate, + ...], ...}}` where `layoutTemplate` is a dict matching + the structure of `figure.layout` and `traceTemplate` is + a dict matching the structure of the trace with type + `trace_type` (e.g. 'scatter'). Alternatively, this may + be specified as an instance of + plotly.graph_objs.layout.Template. 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 this can be + used to add 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`. + ternary + :class:`plotly.graph_objects.layout.Ternary` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.layout.Title` instance or + dict with compatible properties + titlefont + Deprecated: Please use layout.title.font instead. Sets + the title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + transition + Sets transition options used during Plotly.react + updates. + treemapcolorway + Sets the default treemap slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendtreemapcolors`. + uirevision + Used to allow user interactions with the plot to + persist after `Plotly.react` calls that are unaware of + these interactions. If `uirevision` is omitted, or if + it is given and it changed from the previous + `Plotly.react` call, the exact new figure is used. If + `uirevision` is truthy and did NOT change, any + attribute that has been affected by user interactions + and did not receive a different value in the new figure + will keep the interaction value. `layout.uirevision` + attribute serves as the default for `uirevision` + attributes in various sub-containers. For finer control + you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y + axes you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is + changed, you can update `yaxis.uirevision=*quantity*` + and the y axis range will reset but the x axis range + will retain any user-driven zoom. + uniformtext + :class:`plotly.graph_objects.layout.Uniformtext` + instance or dict with compatible properties + updatemenus + A tuple of + :class:`plotly.graph_objects.layout.Updatemenu` + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), sets the + default property values to use for elements of + layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins of + adjacent location coordinates. Has no effect on traces + that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins of the + same location coordinate. Has no effect on traces that + have "width" set. + violinmode + Determines how violins at the same location coordinate + are displayed on the graph. If "group", the violins are + plotted next to one another centered around the shared + location. If "overlay", the violins are plotted over + one another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces that + have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + waterfallmode + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are + plotted next to one another centered around the shared + location. With "overlay", the bars are plotted over one + another, you might need to an "opacity" to see multiple + bars. + width + Sets the plot's width (in px). + xaxis + :class:`plotly.graph_objects.layout.XAxis` instance or + dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.YAxis` instance or + dict with compatible properties + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + angularaxis=None, + annotations=None, + annotationdefaults=None, + autosize=None, + bargap=None, + bargroupgap=None, + barmode=None, + barnorm=None, + boxgap=None, + boxgroupgap=None, + boxmode=None, + calendar=None, + clickmode=None, + coloraxis=None, + colorscale=None, + colorway=None, + datarevision=None, + direction=None, + dragmode=None, + editrevision=None, + extendfunnelareacolors=None, + extendpiecolors=None, + extendsunburstcolors=None, + extendtreemapcolors=None, + font=None, + funnelareacolorway=None, + funnelgap=None, + funnelgroupgap=None, + funnelmode=None, + geo=None, + grid=None, + height=None, + hiddenlabels=None, + hiddenlabelssrc=None, + hidesources=None, + hoverdistance=None, + hoverlabel=None, + hovermode=None, + images=None, + imagedefaults=None, + legend=None, + mapbox=None, + margin=None, + meta=None, + metasrc=None, + modebar=None, + orientation=None, + paper_bgcolor=None, + piecolorway=None, + plot_bgcolor=None, + polar=None, + radialaxis=None, + scene=None, + selectdirection=None, + selectionrevision=None, + separators=None, + shapes=None, + shapedefaults=None, + showlegend=None, + sliders=None, + sliderdefaults=None, + spikedistance=None, + sunburstcolorway=None, + template=None, + ternary=None, + title=None, + titlefont=None, + transition=None, + treemapcolorway=None, + uirevision=None, + uniformtext=None, + updatemenus=None, + updatemenudefaults=None, + violingap=None, + violingroupgap=None, + violinmode=None, + waterfallgap=None, + waterfallgroupgap=None, + waterfallmode=None, + width=None, + xaxis=None, + yaxis=None, + **kwargs + ): + """ + Construct a new Layout object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Layout` + angularaxis + :class:`plotly.graph_objects.layout.AngularAxis` + instance or dict with compatible properties + annotations + A tuple of + :class:`plotly.graph_objects.layout.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), sets the + default property values to use for elements of + layout.annotations + autosize + Determines whether or not a layout width or height that + has been left undefined by the user is initialized on + each relayout. Note that, regardless of this attribute, + an undefined layout width or height is always + initialized on the first call to plot. + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "relative", the bars + are stacked on top of one another, with negative values + below the axis, positive values above With "group", the + bars are plotted next to one another centered around + the shared location. With "overlay", the bars are + plotted over one another, you might need to an + "opacity" to see multiple bars. + barnorm + Sets the normalization for bar traces on the graph. + With "fraction", the value of each bar is divided by + the sum of all values at that location coordinate. + "percent" is the same but multiplied by 100 to show + percentages. + boxgap + Sets the gap (in plot fraction) between boxes of + adjacent location coordinates. Has no effect on traces + that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes of the + same location coordinate. Has no effect on traces that + have "width" set. + boxmode + Determines how boxes at the same location coordinate + are displayed on the graph. If "group", the boxes are + plotted next to one another centered around the shared + location. If "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see them + multiple boxes. Has no effect on traces that have + "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout the plot. + clickmode + Determines the mode of single click interactions. + "event" is the default value and emits the + `plotly_click` event. In addition this mode emits the + `plotly_selected` event in drag modes "lasso" and + "select", but with no event data attached (kept for + compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also + supports persistent selections, meaning that pressing + Shift while clicking, adds to / subtracts from an + existing selection. "select" with `hovermode`: "x" can + be confusing, consider explicitly setting `hovermode`: + "closest" when using this feature. Selection events are + sent accordingly as long as "event" flag is set as + well. When the "event" flag is missing, `plotly_click` + and `plotly_selected` events are not fired. + coloraxis + :class:`plotly.graph_objects.layout.Coloraxis` instance + or dict with compatible properties + colorscale + :class:`plotly.graph_objects.layout.Colorscale` + instance or dict with compatible properties + colorway + Sets the default trace colors. + datarevision + If provided, a changed value tells `Plotly.react` that + one or more data arrays has changed. This way you can + modify arrays in-place rather than making a complete + new copy for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are being + treated as immutable, thus any data array with a + different identity from its predecessor contains new + data. + direction + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the direction corresponding to + positive angles in legacy polar charts. + dragmode + Determines the mode of drag interactions. "select" and + "lasso" apply only to scatter traces with markers or + text. "orbit" and "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than trace names + and axis titles. Defaults to `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether given + by `funnelareacolorway` or inherited from `colorway`) + will be extended to three times its original length by + first repeating every color 20% lighter then each color + 20% darker. This is intended to reduce the likelihood + of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in + the trace, using `marker.colors`, are never extended. + extendpiecolors + If `true`, the pie slice colors (whether given by + `piecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will + be extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + font + Sets the global font. Note that fonts used in traces + and other layout components inherit from the global + font. + funnelareacolorway + Sets the default funnelarea slice colors. Defaults to + the main `colorway` used for trace colors. If you + specify a new list here it can still be extended with + lighter and darker colors, see + `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + funnelmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "group", the bars + are plotted next to one another centered around the + shared location. With "overlay", the bars are plotted + over one another, you might need to an "opacity" to see + multiple bars. + geo + :class:`plotly.graph_objects.layout.Geo` instance or + dict with compatible properties + grid + :class:`plotly.graph_objects.layout.Grid` instance or + dict with compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, + and can simultaneously hide slices from several + pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on Chart Studio Cloud for + hiddenlabels . + hidesources + Determines whether or not a text link citing the data + source is placed at the bottom-right cored of the + figure. Has only an effect only on graphs that have + been generated via forked graphs from the Chart Studio + Cloud (at https://chart-studio.plotly.com or on- + premise). + hoverdistance + Sets the default distance (in pixels) to look for data + to add hover labels (-1 means no cutoff, 0 means no + looking for data). This is only a real distance for + hovering on point-like objects, like scatter points. + For area-like objects (bars, scatter fills, etc) + hovering is on inside the area and off outside, but + these objects will not supersede hover on point-like + objects in case of conflict. + hoverlabel + :class:`plotly.graph_objects.layout.Hoverlabel` + instance or dict with compatible properties + hovermode + Determines the mode of hover interactions. If + "closest", a single hoverlabel will appear for the + "closest" point within the `hoverdistance`. If "x" (or + "y"), multiple hoverlabels will appear for multiple + points at the "closest" x- (or y-) coordinate within + the `hoverdistance`, with the caveat that no more than + one hoverlabel will appear per trace. If *x unified* + (or *y unified*), a single hoverlabel will appear + multiple points at the closest x- (or y-) coordinate + within the `hoverdistance` with the caveat that no more + than one hoverlabel will appear per trace. In this + mode, spikelines are enabled by default perpendicular + to the specified axis. If false, hover interactions are + disabled. If `clickmode` includes the "select" flag, + `hovermode` defaults to "closest". If `clickmode` lacks + the "select" flag, it defaults to "x" or "y" (depending + on the trace's `orientation` value) for plots based on + cartesian coordinates. For anything else the default + value is "closest". + images + A tuple of :class:`plotly.graph_objects.layout.Image` + instances or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + legend + :class:`plotly.graph_objects.layout.Legend` instance or + dict with compatible properties + mapbox + :class:`plotly.graph_objects.layout.Mapbox` instance or + dict with compatible properties + margin + :class:`plotly.graph_objects.layout.Margin` instance or + dict with compatible properties + meta + Assigns extra meta information that can be used in + various `text` attributes. Attributes such as the + graph, axis and colorbar `title.text`, annotation + `text` `trace.name` in legend items, `rangeselector`, + `updatemenus` and `sliders` `label` text all support + `meta`. One can access `meta` fields using template + strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object + for example `{key: value}` which can be accessed + %{meta[key]}. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + modebar + :class:`plotly.graph_objects.layout.Modebar` instance + or dict with compatible properties + orientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Rotates the entire polar by the given + angle in legacy polar charts. + paper_bgcolor + Sets the background color of the paper where the graph + is drawn. + piecolorway + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new + list here it can still be extended with lighter and + darker colors, see `extendpiecolors`. + plot_bgcolor + Sets the background color of the plotting area in- + between x and y axes. + polar + :class:`plotly.graph_objects.layout.Polar` instance or + dict with compatible properties + radialaxis + :class:`plotly.graph_objects.layout.RadialAxis` + instance or dict with compatible properties + scene + :class:`plotly.graph_objects.layout.Scene` instance or + dict with compatible properties + selectdirection + When "dragmode" is set to "select", this limits the + selection of the drag to horizontal, vertical or + diagonal. "h" only allows horizontal selection, "v" + only vertical, "d" only diagonal and "any" sets no + limit. + selectionrevision + Controls persistence of user-driven changes in selected + points from all traces. + separators + Sets the decimal and thousand separators. For example, + *. * puts a '.' before decimals and a space between + thousands. In English locales, dflt is ".," but other + locales may alter this default. + shapes + A tuple of :class:`plotly.graph_objects.layout.Shape` + instances or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + showlegend + Determines whether or not a legend is drawn. Default is + `true` if there is a trace to show and any of these: a) + Two or more traces would by default be shown in the + legend. b) One pie trace is shown in the legend. c) One + trace is explicitly given with `showlegend: true`. + sliders + A tuple of :class:`plotly.graph_objects.layout.Slider` + instances or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets the + default property values to use for elements of + layout.sliders + spikedistance + Sets the default distance (in pixels) to look for data + to draw spikelines to (-1 means no cutoff, 0 means no + looking for data). As with hoverdistance, distance does + not apply to area-like objects. In addition, some + objects can be hovered on but will not generate + spikelines, such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. This + should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: [traceTemplate, + ...], ...}}` where `layoutTemplate` is a dict matching + the structure of `figure.layout` and `traceTemplate` is + a dict matching the structure of the trace with type + `trace_type` (e.g. 'scatter'). Alternatively, this may + be specified as an instance of + plotly.graph_objs.layout.Template. 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 this can be + used to add 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`. + ternary + :class:`plotly.graph_objects.layout.Ternary` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.layout.Title` instance or + dict with compatible properties + titlefont + Deprecated: Please use layout.title.font instead. Sets + the title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + transition + Sets transition options used during Plotly.react + updates. + treemapcolorway + Sets the default treemap slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendtreemapcolors`. + uirevision + Used to allow user interactions with the plot to + persist after `Plotly.react` calls that are unaware of + these interactions. If `uirevision` is omitted, or if + it is given and it changed from the previous + `Plotly.react` call, the exact new figure is used. If + `uirevision` is truthy and did NOT change, any + attribute that has been affected by user interactions + and did not receive a different value in the new figure + will keep the interaction value. `layout.uirevision` + attribute serves as the default for `uirevision` + attributes in various sub-containers. For finer control + you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y + axes you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is + changed, you can update `yaxis.uirevision=*quantity*` + and the y axis range will reset but the x axis range + will retain any user-driven zoom. + uniformtext + :class:`plotly.graph_objects.layout.Uniformtext` + instance or dict with compatible properties + updatemenus + A tuple of + :class:`plotly.graph_objects.layout.Updatemenu` + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), sets the + default property values to use for elements of + layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins of + adjacent location coordinates. Has no effect on traces + that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins of the + same location coordinate. Has no effect on traces that + have "width" set. + violinmode + Determines how violins at the same location coordinate + are displayed on the graph. If "group", the violins are + plotted next to one another centered around the shared + location. If "overlay", the violins are plotted over + one another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces that + have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + waterfallmode + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are + plotted next to one another centered around the shared + location. With "overlay", the bars are plotted over one + another, you might need to an "opacity" to see multiple + bars. + width + Sets the plot's width (in px). + xaxis + :class:`plotly.graph_objects.layout.XAxis` instance or + dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.YAxis` instance or + dict with compatible properties + + Returns + ------- + Layout + """ + super(Layout, self).__init__("layout") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Override _valid_props for instance so that instance can mutate set + # to support subplot properties (e.g. xaxis2) + self._valid_props = { + "angularaxis", + "annotationdefaults", + "annotations", + "autosize", + "bargap", + "bargroupgap", + "barmode", + "barnorm", + "boxgap", + "boxgroupgap", + "boxmode", + "calendar", + "clickmode", + "coloraxis", + "colorscale", + "colorway", + "datarevision", + "direction", + "dragmode", + "editrevision", + "extendfunnelareacolors", + "extendpiecolors", + "extendsunburstcolors", + "extendtreemapcolors", + "font", + "funnelareacolorway", + "funnelgap", + "funnelgroupgap", + "funnelmode", + "geo", + "grid", + "height", + "hiddenlabels", + "hiddenlabelssrc", + "hidesources", + "hoverdistance", + "hoverlabel", + "hovermode", + "imagedefaults", + "images", + "legend", + "mapbox", + "margin", + "meta", + "metasrc", + "modebar", + "orientation", + "paper_bgcolor", + "piecolorway", + "plot_bgcolor", + "polar", + "radialaxis", + "scene", + "selectdirection", + "selectionrevision", + "separators", + "shapedefaults", + "shapes", + "showlegend", + "sliderdefaults", + "sliders", + "spikedistance", + "sunburstcolorway", + "template", + "ternary", + "title", + "titlefont", + "transition", + "treemapcolorway", + "uirevision", + "uniformtext", + "updatemenudefaults", + "updatemenus", + "violingap", + "violingroupgap", + "violinmode", + "waterfallgap", + "waterfallgroupgap", + "waterfallmode", + "width", + "xaxis", + "yaxis", + } + + # Validate arg + # ------------ + 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 +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Layout`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("angularaxis", None) + _v = angularaxis if angularaxis is not None else _v + if _v is not None: + self["angularaxis"] = _v + _v = arg.pop("annotations", None) + _v = annotations if annotations is not None else _v + if _v is not None: + self["annotations"] = _v + _v = arg.pop("annotationdefaults", None) + _v = annotationdefaults if annotationdefaults is not None else _v + if _v is not None: + self["annotationdefaults"] = _v + _v = arg.pop("autosize", None) + _v = autosize if autosize is not None else _v + if _v is not None: + self["autosize"] = _v + _v = arg.pop("bargap", None) + _v = bargap if bargap is not None else _v + if _v is not None: + self["bargap"] = _v + _v = arg.pop("bargroupgap", None) + _v = bargroupgap if bargroupgap is not None else _v + if _v is not None: + self["bargroupgap"] = _v + _v = arg.pop("barmode", None) + _v = barmode if barmode is not None else _v + if _v is not None: + self["barmode"] = _v + _v = arg.pop("barnorm", None) + _v = barnorm if barnorm is not None else _v + if _v is not None: + self["barnorm"] = _v + _v = arg.pop("boxgap", None) + _v = boxgap if boxgap is not None else _v + if _v is not None: + self["boxgap"] = _v + _v = arg.pop("boxgroupgap", None) + _v = boxgroupgap if boxgroupgap is not None else _v + if _v is not None: + self["boxgroupgap"] = _v + _v = arg.pop("boxmode", None) + _v = boxmode if boxmode is not None else _v + if _v is not None: + self["boxmode"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("clickmode", None) + _v = clickmode if clickmode is not None else _v + if _v is not None: + self["clickmode"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorway", None) + _v = colorway if colorway is not None else _v + if _v is not None: + self["colorway"] = _v + _v = arg.pop("datarevision", None) + _v = datarevision if datarevision is not None else _v + if _v is not None: + self["datarevision"] = _v + _v = arg.pop("direction", None) + _v = direction if direction is not None else _v + if _v is not None: + self["direction"] = _v + _v = arg.pop("dragmode", None) + _v = dragmode if dragmode is not None else _v + if _v is not None: + self["dragmode"] = _v + _v = arg.pop("editrevision", None) + _v = editrevision if editrevision is not None else _v + if _v is not None: + self["editrevision"] = _v + _v = arg.pop("extendfunnelareacolors", None) + _v = extendfunnelareacolors if extendfunnelareacolors is not None else _v + if _v is not None: + self["extendfunnelareacolors"] = _v + _v = arg.pop("extendpiecolors", None) + _v = extendpiecolors if extendpiecolors is not None else _v + if _v is not None: + self["extendpiecolors"] = _v + _v = arg.pop("extendsunburstcolors", None) + _v = extendsunburstcolors if extendsunburstcolors is not None else _v + if _v is not None: + self["extendsunburstcolors"] = _v + _v = arg.pop("extendtreemapcolors", None) + _v = extendtreemapcolors if extendtreemapcolors is not None else _v + if _v is not None: + self["extendtreemapcolors"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("funnelareacolorway", None) + _v = funnelareacolorway if funnelareacolorway is not None else _v + if _v is not None: + self["funnelareacolorway"] = _v + _v = arg.pop("funnelgap", None) + _v = funnelgap if funnelgap is not None else _v + if _v is not None: + self["funnelgap"] = _v + _v = arg.pop("funnelgroupgap", None) + _v = funnelgroupgap if funnelgroupgap is not None else _v + if _v is not None: + self["funnelgroupgap"] = _v + _v = arg.pop("funnelmode", None) + _v = funnelmode if funnelmode is not None else _v + if _v is not None: + self["funnelmode"] = _v + _v = arg.pop("geo", None) + _v = geo if geo is not None else _v + if _v is not None: + self["geo"] = _v + _v = arg.pop("grid", None) + _v = grid if grid is not None else _v + if _v is not None: + self["grid"] = _v + _v = arg.pop("height", None) + _v = height if height is not None else _v + if _v is not None: + self["height"] = _v + _v = arg.pop("hiddenlabels", None) + _v = hiddenlabels if hiddenlabels is not None else _v + if _v is not None: + self["hiddenlabels"] = _v + _v = arg.pop("hiddenlabelssrc", None) + _v = hiddenlabelssrc if hiddenlabelssrc is not None else _v + if _v is not None: + self["hiddenlabelssrc"] = _v + _v = arg.pop("hidesources", None) + _v = hidesources if hidesources is not None else _v + if _v is not None: + self["hidesources"] = _v + _v = arg.pop("hoverdistance", None) + _v = hoverdistance if hoverdistance is not None else _v + if _v is not None: + self["hoverdistance"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovermode", None) + _v = hovermode if hovermode is not None else _v + if _v is not None: + self["hovermode"] = _v + _v = arg.pop("images", None) + _v = images if images is not None else _v + if _v is not None: + self["images"] = _v + _v = arg.pop("imagedefaults", None) + _v = imagedefaults if imagedefaults is not None else _v + if _v is not None: + self["imagedefaults"] = _v + _v = arg.pop("legend", None) + _v = legend if legend is not None else _v + if _v is not None: + self["legend"] = _v + _v = arg.pop("mapbox", None) + _v = mapbox if mapbox is not None else _v + if _v is not None: + self["mapbox"] = _v + _v = arg.pop("margin", None) + _v = margin if margin is not None else _v + if _v is not None: + self["margin"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("modebar", None) + _v = modebar if modebar is not None else _v + if _v is not None: + self["modebar"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("paper_bgcolor", None) + _v = paper_bgcolor if paper_bgcolor is not None else _v + if _v is not None: + self["paper_bgcolor"] = _v + _v = arg.pop("piecolorway", None) + _v = piecolorway if piecolorway is not None else _v + if _v is not None: + self["piecolorway"] = _v + _v = arg.pop("plot_bgcolor", None) + _v = plot_bgcolor if plot_bgcolor is not None else _v + if _v is not None: + self["plot_bgcolor"] = _v + _v = arg.pop("polar", None) + _v = polar if polar is not None else _v + if _v is not None: + self["polar"] = _v + _v = arg.pop("radialaxis", None) + _v = radialaxis if radialaxis is not None else _v + if _v is not None: + self["radialaxis"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("selectdirection", None) + _v = selectdirection if selectdirection is not None else _v + if _v is not None: + self["selectdirection"] = _v + _v = arg.pop("selectionrevision", None) + _v = selectionrevision if selectionrevision is not None else _v + if _v is not None: + self["selectionrevision"] = _v + _v = arg.pop("separators", None) + _v = separators if separators is not None else _v + if _v is not None: + self["separators"] = _v + _v = arg.pop("shapes", None) + _v = shapes if shapes is not None else _v + if _v is not None: + self["shapes"] = _v + _v = arg.pop("shapedefaults", None) + _v = shapedefaults if shapedefaults is not None else _v + if _v is not None: + self["shapedefaults"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("sliders", None) + _v = sliders if sliders is not None else _v + if _v is not None: + self["sliders"] = _v + _v = arg.pop("sliderdefaults", None) + _v = sliderdefaults if sliderdefaults is not None else _v + if _v is not None: + self["sliderdefaults"] = _v + _v = arg.pop("spikedistance", None) + _v = spikedistance if spikedistance is not None else _v + if _v is not None: + self["spikedistance"] = _v + _v = arg.pop("sunburstcolorway", None) + _v = sunburstcolorway if sunburstcolorway is not None else _v + if _v is not None: + self["sunburstcolorway"] = _v + _v = arg.pop("template", None) + _v = template if template is not None else _v + if _v is not None: + self["template"] = _v + _v = arg.pop("ternary", None) + _v = ternary if ternary is not None else _v + if _v is not None: + self["ternary"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("transition", None) + _v = transition if transition is not None else _v + if _v is not None: + self["transition"] = _v + _v = arg.pop("treemapcolorway", None) + _v = treemapcolorway if treemapcolorway is not None else _v + if _v is not None: + self["treemapcolorway"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("uniformtext", None) + _v = uniformtext if uniformtext is not None else _v + if _v is not None: + self["uniformtext"] = _v + _v = arg.pop("updatemenus", None) + _v = updatemenus if updatemenus is not None else _v + if _v is not None: + self["updatemenus"] = _v + _v = arg.pop("updatemenudefaults", None) + _v = updatemenudefaults if updatemenudefaults is not None else _v + if _v is not None: + self["updatemenudefaults"] = _v + _v = arg.pop("violingap", None) + _v = violingap if violingap is not None else _v + if _v is not None: + self["violingap"] = _v + _v = arg.pop("violingroupgap", None) + _v = violingroupgap if violingroupgap is not None else _v + if _v is not None: + self["violingroupgap"] = _v + _v = arg.pop("violinmode", None) + _v = violinmode if violinmode is not None else _v + if _v is not None: + self["violinmode"] = _v + _v = arg.pop("waterfallgap", None) + _v = waterfallgap if waterfallgap is not None else _v + if _v is not None: + self["waterfallgap"] = _v + _v = arg.pop("waterfallgroupgap", None) + _v = waterfallgroupgap if waterfallgroupgap is not None else _v + if _v is not None: + self["waterfallgroupgap"] = _v + _v = arg.pop("waterfallmode", None) + _v = waterfallmode if waterfallmode is not None else _v + if _v is not None: + self["waterfallmode"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_mesh3d.py b/packages/python/plotly/plotly/graph_objs/_mesh3d.py new file mode 100644 index 00000000000..552715bf298 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_mesh3d.py @@ -0,0 +1,2929 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Mesh3d(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "mesh3d" + _valid_props = { + "alphahull", + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "contour", + "customdata", + "customdatasrc", + "delaunayaxis", + "facecolor", + "facecolorsrc", + "flatshading", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "i", + "ids", + "idssrc", + "intensity", + "intensitymode", + "intensitysrc", + "isrc", + "j", + "jsrc", + "k", + "ksrc", + "legendgroup", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "vertexcolor", + "vertexcolorsrc", + "visible", + "x", + "xcalendar", + "xsrc", + "y", + "ycalendar", + "ysrc", + "z", + "zcalendar", + "zsrc", + } + + # alphahull + # --------- + @property + def alphahull(self): + """ + Determines how the mesh surface triangles are derived from the + set of vertices (points) represented by the `x`, `y` and `z` + arrays, if the `i`, `j`, `k` arrays are not supplied. For + general use of `mesh3d` it is preferred that `i`, `j`, `k` are + supplied. If "-1", Delaunay triangulation is used, which is + mainly suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In case the + `delaunayaxis` intersects the mesh surface at more than one + point it will result triangles that are very long in the + dimension of `delaunayaxis`. If ">0", the alpha-shape algorithm + is used. In this case, the positive `alphahull` value signals + the use of the alpha-shape algorithm, _and_ its value acts as + the parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or if the + intention is to enclose the `x`, `y` and `z` point set into a + convex hull. + + The 'alphahull' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["alphahull"] + + @alphahull.setter + def alphahull(self, val): + self["alphahull"] = val + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `intensity`) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `intensity` and if set, `cmin` must be set as + well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `intensity`. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `intensity` and if set, `cmax` must be set as + well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the color of the whole mesh + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to mesh3d.colorscale + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.mesh3d. + colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.mesh3d.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of mesh3d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.mesh3d.colorbar.Ti + tle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + mesh3d.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + mesh3d.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.mesh3d.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # contour + # ------- + @property + def contour(self): + """ + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Contour` + - A dict of string/value properties that will be passed + to the Contour constructor + + Supported dict properties: + + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.mesh3d.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # delaunayaxis + # ------------ + @property + def delaunayaxis(self): + """ + Sets the Delaunay axis, which is the axis that is perpendicular + to the surface of the Delaunay triangulation. It has an effect + if `i`, `j`, `k` are not provided and `alphahull` is set to + indicate Delaunay triangulation. + + The 'delaunayaxis' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['x', 'y', 'z'] + + Returns + ------- + Any + """ + return self["delaunayaxis"] + + @delaunayaxis.setter + def delaunayaxis(self, val): + self["delaunayaxis"] = val + + # facecolor + # --------- + @property + def facecolor(self): + """ + Sets the color of each face Overrides "color" and + "vertexcolor". + + The 'facecolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["facecolor"] + + @facecolor.setter + def facecolor(self, val): + self["facecolor"] = val + + # facecolorsrc + # ------------ + @property + def facecolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for facecolor + . + + The 'facecolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["facecolorsrc"] + + @facecolorsrc.setter + def facecolorsrc(self, val): + self["facecolorsrc"] = val + + # flatshading + # ----------- + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.mesh3d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # i + # - + @property + def i(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "first" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `i[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `i` represents a point in + space, which is the first vertex of a triangle. + + The 'i' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["i"] + + @i.setter + def i(self, val): + self["i"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # intensity + # --------- + @property + def intensity(self): + """ + Sets the intensity values for vertices or cells as defined by + `intensitymode`. It can be used for plotting fields on meshes. + + The 'intensity' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["intensity"] + + @intensity.setter + def intensity(self, val): + self["intensity"] = val + + # intensitymode + # ------------- + @property + def intensitymode(self): + """ + Determines the source of `intensity` values. + + The 'intensitymode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['vertex', 'cell'] + + Returns + ------- + Any + """ + return self["intensitymode"] + + @intensitymode.setter + def intensitymode(self, val): + self["intensitymode"] = val + + # intensitysrc + # ------------ + @property + def intensitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for intensity + . + + The 'intensitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["intensitysrc"] + + @intensitysrc.setter + def intensitysrc(self, val): + self["intensitysrc"] = val + + # isrc + # ---- + @property + def isrc(self): + """ + Sets the source reference on Chart Studio Cloud for i . + + The 'isrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["isrc"] + + @isrc.setter + def isrc(self, val): + self["isrc"] = val + + # j + # - + @property + def j(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "second" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `j[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `j` represents a point in + space, which is the second vertex of a triangle. + + The 'j' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["j"] + + @j.setter + def j(self, val): + self["j"] = val + + # jsrc + # ---- + @property + def jsrc(self): + """ + Sets the source reference on Chart Studio Cloud for j . + + The 'jsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["jsrc"] + + @jsrc.setter + def jsrc(self, val): + self["jsrc"] = val + + # k + # - + @property + def k(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "third" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `k[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `k` represents a point in + space, which is the third vertex of a triangle. + + The 'k' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["k"] + + @k.setter + def k(self, val): + self["k"] = val + + # ksrc + # ---- + @property + def ksrc(self): + """ + Sets the source reference on Chart Studio Cloud for k . + + The 'ksrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ksrc"] + + @ksrc.setter + def ksrc(self, val): + self["ksrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. + + Returns + ------- + plotly.graph_objs.mesh3d.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.mesh3d.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.mesh3d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # vertexcolor + # ----------- + @property + def vertexcolor(self): + """ + Sets the color of each vertex Overrides "color". While Red, + green and blue colors are in the range of 0 and 255; in the + case of having vertex color data in RGBA format, the alpha + color should be normalized to be between 0 and 1. + + The 'vertexcolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["vertexcolor"] + + @vertexcolor.setter + def vertexcolor(self, val): + self["vertexcolor"] = val + + # vertexcolorsrc + # -------------- + @property + def vertexcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + vertexcolor . + + The 'vertexcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vertexcolorsrc"] + + @vertexcolorsrc.setter + def vertexcolorsrc(self, val): + self["vertexcolorsrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the X coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the Y coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the Z coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zcalendar + # --------- + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.mesh3d.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud for + facecolor . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + intensity + Sets the intensity values for vertices or cells as + defined by `intensitymode`. It can be used for plotting + fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud for + intensity . + isrc + Sets the source reference on Chart Studio Cloud for i + . + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on Chart Studio Cloud for j + . + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud for k + . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud for + vertexcolor . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + alphahull=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + delaunayaxis=None, + facecolor=None, + facecolorsrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + i=None, + ids=None, + idssrc=None, + intensity=None, + intensitymode=None, + intensitysrc=None, + isrc=None, + j=None, + jsrc=None, + k=None, + ksrc=None, + legendgroup=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + vertexcolor=None, + vertexcolorsrc=None, + visible=None, + x=None, + xcalendar=None, + xsrc=None, + y=None, + ycalendar=None, + ysrc=None, + z=None, + zcalendar=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Mesh3d object + + Draws sets of triangles with coordinates given by three + 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, + `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- + shape algorithm or (4) the Convex-hull algorithm + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Mesh3d` + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.mesh3d.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud for + facecolor . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + intensity + Sets the intensity values for vertices or cells as + defined by `intensitymode`. It can be used for plotting + fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud for + intensity . + isrc + Sets the source reference on Chart Studio Cloud for i + . + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on Chart Studio Cloud for j + . + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud for k + . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud for + vertexcolor . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Mesh3d + """ + super(Mesh3d, self).__init__("mesh3d") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Mesh3d +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Mesh3d`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alphahull", None) + _v = alphahull if alphahull is not None else _v + if _v is not None: + self["alphahull"] = _v + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("contour", None) + _v = contour if contour is not None else _v + if _v is not None: + self["contour"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("delaunayaxis", None) + _v = delaunayaxis if delaunayaxis is not None else _v + if _v is not None: + self["delaunayaxis"] = _v + _v = arg.pop("facecolor", None) + _v = facecolor if facecolor is not None else _v + if _v is not None: + self["facecolor"] = _v + _v = arg.pop("facecolorsrc", None) + _v = facecolorsrc if facecolorsrc is not None else _v + if _v is not None: + self["facecolorsrc"] = _v + _v = arg.pop("flatshading", None) + _v = flatshading if flatshading is not None else _v + if _v is not None: + self["flatshading"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("i", None) + _v = i if i is not None else _v + if _v is not None: + self["i"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("intensity", None) + _v = intensity if intensity is not None else _v + if _v is not None: + self["intensity"] = _v + _v = arg.pop("intensitymode", None) + _v = intensitymode if intensitymode is not None else _v + if _v is not None: + self["intensitymode"] = _v + _v = arg.pop("intensitysrc", None) + _v = intensitysrc if intensitysrc is not None else _v + if _v is not None: + self["intensitysrc"] = _v + _v = arg.pop("isrc", None) + _v = isrc if isrc is not None else _v + if _v is not None: + self["isrc"] = _v + _v = arg.pop("j", None) + _v = j if j is not None else _v + if _v is not None: + self["j"] = _v + _v = arg.pop("jsrc", None) + _v = jsrc if jsrc is not None else _v + if _v is not None: + self["jsrc"] = _v + _v = arg.pop("k", None) + _v = k if k is not None else _v + if _v is not None: + self["k"] = _v + _v = arg.pop("ksrc", None) + _v = ksrc if ksrc is not None else _v + if _v is not None: + self["ksrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lighting", None) + _v = lighting if lighting is not None else _v + if _v is not None: + self["lighting"] = _v + _v = arg.pop("lightposition", None) + _v = lightposition if lightposition is not None else _v + if _v is not None: + self["lightposition"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("vertexcolor", None) + _v = vertexcolor if vertexcolor is not None else _v + if _v is not None: + self["vertexcolor"] = _v + _v = arg.pop("vertexcolorsrc", None) + _v = vertexcolorsrc if vertexcolorsrc is not None else _v + if _v is not None: + self["vertexcolorsrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zcalendar", None) + _v = zcalendar if zcalendar is not None else _v + if _v is not None: + self["zcalendar"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "mesh3d" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_ohlc.py b/packages/python/plotly/plotly/graph_objs/_ohlc.py new file mode 100644 index 00000000000..d5edb9f0627 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_ohlc.py @@ -0,0 +1,1577 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Ohlc(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "ohlc" + _valid_props = { + "close", + "closesrc", + "customdata", + "customdatasrc", + "decreasing", + "high", + "highsrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "increasing", + "legendgroup", + "line", + "low", + "lowsrc", + "meta", + "metasrc", + "name", + "opacity", + "open", + "opensrc", + "selectedpoints", + "showlegend", + "stream", + "text", + "textsrc", + "tickwidth", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xcalendar", + "xsrc", + "yaxis", + } + + # close + # ----- + @property + def close(self): + """ + Sets the close values. + + The 'close' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["close"] + + @close.setter + def close(self, val): + self["close"] = val + + # closesrc + # -------- + @property + def closesrc(self): + """ + Sets the source reference on Chart Studio Cloud for close . + + The 'closesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["closesrc"] + + @closesrc.setter + def closesrc(self, val): + self["closesrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # decreasing + # ---------- + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Supported dict properties: + + line + :class:`plotly.graph_objects.ohlc.decreasing.Li + ne` instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.ohlc.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + # high + # ---- + @property + def high(self): + """ + Sets the high values. + + The 'high' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["high"] + + @high.setter + def high(self, val): + self["high"] = val + + # highsrc + # ------- + @property + def highsrc(self): + """ + Sets the source reference on Chart Studio Cloud for high . + + The 'highsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["highsrc"] + + @highsrc.setter + def highsrc(self, val): + self["highsrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + split + Show hover information (open, close, high, low) + in separate labels. + + Returns + ------- + plotly.graph_objs.ohlc.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # increasing + # ---------- + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Supported dict properties: + + line + :class:`plotly.graph_objects.ohlc.increasing.Li + ne` instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.ohlc.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + Note that this style setting can also be set + per direction via `increasing.line.dash` and + `decreasing.line.dash`. + width + [object Object] Note that this style setting + can also be set per direction via + `increasing.line.width` and + `decreasing.line.width`. + + Returns + ------- + plotly.graph_objs.ohlc.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # low + # --- + @property + def low(self): + """ + Sets the low values. + + The 'low' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["low"] + + @low.setter + def low(self, val): + self["low"] = val + + # lowsrc + # ------ + @property + def lowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for low . + + The 'lowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowsrc"] + + @lowsrc.setter + def lowsrc(self, val): + self["lowsrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # open + # ---- + @property + def open(self): + """ + Sets the open values. + + The 'open' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["open"] + + @open.setter + def open(self, val): + self["open"] = val + + # opensrc + # ------- + @property + def opensrc(self): + """ + Sets the source reference on Chart Studio Cloud for open . + + The 'opensrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opensrc"] + + @opensrc.setter + def opensrc(self, val): + self["opensrc"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.ohlc.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets hover text elements associated with each sample point. If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + this trace's sample points. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the width of the open/close tick marks relative to the "x" + minimal interval. + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, 0.5] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. If absent, linear coordinate will be + generated. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + close . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` instance + or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + high . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` instance + or dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + increasing + :class:`plotly.graph_objects.ohlc.Increasing` instance + or dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.ohlc.Line` instance or + dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + low . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + """ + + def __init__( + self, + arg=None, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legendgroup=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + tickwidth=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xcalendar=None, + xsrc=None, + yaxis=None, + **kwargs + ): + """ + Construct a new Ohlc object + + The ohlc (short for Open-High-Low-Close) is a style of + financial chart describing open, high, low and close for a + given `x` coordinate (most likely time). The tip of the lines + represent the `low` and `high` values and the horizontal + segments represent the `open` and `close` values. Sample points + where the close value is higher (lower) then the open value are + called increasing (decreasing). By default, increasing items + are drawn in green whereas decreasing are drawn in red. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Ohlc` + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + close . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` instance + or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + high . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` instance + or dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + increasing + :class:`plotly.graph_objects.ohlc.Increasing` instance + or dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.ohlc.Line` instance or + dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + low . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + + Returns + ------- + Ohlc + """ + super(Ohlc, self).__init__("ohlc") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Ohlc +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Ohlc`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("close", None) + _v = close if close is not None else _v + if _v is not None: + self["close"] = _v + _v = arg.pop("closesrc", None) + _v = closesrc if closesrc is not None else _v + if _v is not None: + self["closesrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("decreasing", None) + _v = decreasing if decreasing is not None else _v + if _v is not None: + self["decreasing"] = _v + _v = arg.pop("high", None) + _v = high if high is not None else _v + if _v is not None: + self["high"] = _v + _v = arg.pop("highsrc", None) + _v = highsrc if highsrc is not None else _v + if _v is not None: + self["highsrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("increasing", None) + _v = increasing if increasing is not None else _v + if _v is not None: + self["increasing"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("low", None) + _v = low if low is not None else _v + if _v is not None: + self["low"] = _v + _v = arg.pop("lowsrc", None) + _v = lowsrc if lowsrc is not None else _v + if _v is not None: + self["lowsrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("open", None) + _v = open if open is not None else _v + if _v is not None: + self["open"] = _v + _v = arg.pop("opensrc", None) + _v = opensrc if opensrc is not None else _v + if _v is not None: + self["opensrc"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "ohlc" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_parcats.py b/packages/python/plotly/plotly/graph_objs/_parcats.py new file mode 100644 index 00000000000..4f047f86392 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_parcats.py @@ -0,0 +1,1227 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Parcats(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "parcats" + _valid_props = { + "arrangement", + "bundlecolors", + "counts", + "countssrc", + "dimensiondefaults", + "dimensions", + "domain", + "hoverinfo", + "hoveron", + "hovertemplate", + "labelfont", + "line", + "meta", + "metasrc", + "name", + "sortpaths", + "stream", + "tickfont", + "type", + "uid", + "uirevision", + "visible", + } + + # arrangement + # ----------- + @property + def arrangement(self): + """ + Sets the drag interaction mode for categories and dimensions. + If `perpendicular`, the categories can only move along a line + perpendicular to the paths. If `freeform`, the categories can + freely move on the plane. If `fixed`, the categories and + dimensions are stationary. + + The 'arrangement' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['perpendicular', 'freeform', 'fixed'] + + Returns + ------- + Any + """ + return self["arrangement"] + + @arrangement.setter + def arrangement(self, val): + self["arrangement"] = val + + # bundlecolors + # ------------ + @property + def bundlecolors(self): + """ + Sort paths so that like colors are bundled together within each + category. + + The 'bundlecolors' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["bundlecolors"] + + @bundlecolors.setter + def bundlecolors(self, val): + self["bundlecolors"] = val + + # counts + # ------ + @property + def counts(self): + """ + The number of observations represented by each state. Defaults + to 1 so that each state represents one observation + + The 'counts' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["counts"] + + @counts.setter + def counts(self, val): + self["counts"] = val + + # countssrc + # --------- + @property + def countssrc(self): + """ + Sets the source reference on Chart Studio Cloud for counts . + + The 'countssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["countssrc"] + + @countssrc.setter + def countssrc(self, val): + self["countssrc"] = val + + # dimensions + # ---------- + @property + def dimensions(self): + """ + The dimensions (variables) of the parallel categories diagram. + + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcats.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Supported dict properties: + + categoryarray + Sets the order in which categories in this + dimension appear. Only has an effect if + `categoryorder` is set to "array". Used with + `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the categories + in the dimension. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + displayindex + The display index of dimension, from left to + right, zero indexed, defaults to dimension + index. + label + The shown name of the dimension. + ticktext + Sets alternative tick labels for the categories + in this dimension. Only has an effect if + `categoryorder` is set to "array". Should be an + array the same length as `categoryarray` Used + with `categoryorder`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + values + Dimension values. `values[n]` represents the + category value of the `n`th point in the + dataset, therefore the `values` vector for all + dimensions must be the same (longer vectors + will be truncated). + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Shows the dimension when set to `true` (the + default). Hides the dimension for `false`. + + Returns + ------- + tuple[plotly.graph_objs.parcats.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + # dimensiondefaults + # ----------------- + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets the + default property values to use for elements of + parcats.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Dimension` + - A dict of string/value properties that will be passed + to the Dimension constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.parcats.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this parcats trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this parcats trace . + x + Sets the horizontal domain of this parcats + trace (in plot fraction). + y + Sets the vertical domain of this parcats trace + (in plot fraction). + + Returns + ------- + plotly.graph_objs.parcats.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['count', 'probability'] joined with '+' characters + (e.g. 'count+probability') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + + Returns + ------- + Any + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Sets the hover interaction mode for the parcats diagram. If + `category`, hover interaction take place per category. If + `color`, hover interactions take place per color per category. + If `dimension`, hover interactions take place across all + categories per dimension. + + The 'hoveron' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['category', 'color', 'dimension'] + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `count`, `probability`, `category`, `categorycount`, + `colorcount` and `bandcolorcount`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font for the `dimension` labels. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcats.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.parcats.line.Color + Bar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `count` and `probability`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + shape + Sets the shape of the paths. If `linear`, paths + are composed of straight lines. If `hspline`, + paths are composed of horizontal curved splines + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.parcats.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # sortpaths + # --------- + @property + def sortpaths(self): + """ + Sets the path sorting algorithm. If `forward`, sort paths based + on dimension categories from left to right. If `backward`, sort + paths based on dimensions categories from right to left. + + The 'sortpaths' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['forward', 'backward'] + + Returns + ------- + Any + """ + return self["sortpaths"] + + @sortpaths.setter + def sortpaths(self, val): + self["sortpaths"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.parcats.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the font for the `category` labels. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcats.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on Chart Studio Cloud for + counts . + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `count`, `probability`, + `category`, `categorycount`, `colorcount` and + `bandcolorcount`. Anything contained in tag `` + is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + labelfont + Sets the font for the `dimension` labels. + line + :class:`plotly.graph_objects.parcats.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + arrangement=None, + bundlecolors=None, + counts=None, + countssrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + hoverinfo=None, + hoveron=None, + hovertemplate=None, + labelfont=None, + line=None, + meta=None, + metasrc=None, + name=None, + sortpaths=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new Parcats object + + Parallel categories diagram for multidimensional categorical + data. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Parcats` + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on Chart Studio Cloud for + counts . + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `count`, `probability`, + `category`, `categorycount`, `colorcount` and + `bandcolorcount`. Anything contained in tag `` + is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + labelfont + Sets the font for the `dimension` labels. + line + :class:`plotly.graph_objects.parcats.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Parcats + """ + super(Parcats, self).__init__("parcats") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Parcats +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Parcats`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("arrangement", None) + _v = arrangement if arrangement is not None else _v + if _v is not None: + self["arrangement"] = _v + _v = arg.pop("bundlecolors", None) + _v = bundlecolors if bundlecolors is not None else _v + if _v is not None: + self["bundlecolors"] = _v + _v = arg.pop("counts", None) + _v = counts if counts is not None else _v + if _v is not None: + self["counts"] = _v + _v = arg.pop("countssrc", None) + _v = countssrc if countssrc is not None else _v + if _v is not None: + self["countssrc"] = _v + _v = arg.pop("dimensions", None) + _v = dimensions if dimensions is not None else _v + if _v is not None: + self["dimensions"] = _v + _v = arg.pop("dimensiondefaults", None) + _v = dimensiondefaults if dimensiondefaults is not None else _v + if _v is not None: + self["dimensiondefaults"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("labelfont", None) + _v = labelfont if labelfont is not None else _v + if _v is not None: + self["labelfont"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("sortpaths", None) + _v = sortpaths if sortpaths is not None else _v + if _v is not None: + self["sortpaths"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "parcats" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_parcoords.py b/packages/python/plotly/plotly/graph_objs/_parcoords.py new file mode 100644 index 00000000000..7f94df10288 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_parcoords.py @@ -0,0 +1,1136 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Parcoords(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "parcoords" + _valid_props = { + "customdata", + "customdatasrc", + "dimensiondefaults", + "dimensions", + "domain", + "ids", + "idssrc", + "labelangle", + "labelfont", + "labelside", + "line", + "meta", + "metasrc", + "name", + "rangefont", + "stream", + "tickfont", + "type", + "uid", + "uirevision", + "visible", + } + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dimensions + # ---------- + @property + def dimensions(self): + """ + The dimensions (variables) of the parallel coordinates chart. + 2..60 dimensions are supported. + + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcoords.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Supported dict properties: + + constraintrange + The domain range to which the filter on the + dimension is constrained. Must be an array of + `[fromValue, toValue]` with `fromValue <= + toValue`, or if `multiselect` is not disabled, + you may give an array of arrays, where each + inner array is `[fromValue, toValue]`. + label + The shown name of the dimension. + multiselect + Do we allow multiple selection ranges or just a + single range? + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + range + The domain range that represents the full, + shown axis extent. Defaults to the `values` + extent. Must be an array of `[fromValue, + toValue]` with finite numbers as elements. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + ticktext + Sets the text displayed at the ticks position + via `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + values + Dimension values. `values[n]` represents the + value of the `n`th point in the dataset, + therefore the `values` vector for all + dimensions must be the same (longer vectors + will be truncated). Each value must be a finite + number. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Shows the dimension when set to `true` (the + default). Hides the dimension for `false`. + + Returns + ------- + tuple[plotly.graph_objs.parcoords.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + # dimensiondefaults + # ----------------- + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets the + default property values to use for elements of + parcoords.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Dimension` + - A dict of string/value properties that will be passed + to the Dimension constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.parcoords.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this parcoords + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this parcoords trace . + x + Sets the horizontal domain of this parcoords + trace (in plot fraction). + y + Sets the vertical domain of this parcoords + trace (in plot fraction). + + Returns + ------- + plotly.graph_objs.parcoords.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # labelangle + # ---------- + @property + def labelangle(self): + """ + Sets the angle of the labels with respect to the horizontal. + For example, a `tickangle` of -90 draws the labels vertically. + Tilted labels with "labelangle" may be positioned better inside + margins when `labelposition` is set to "bottom". + + The 'labelangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["labelangle"] + + @labelangle.setter + def labelangle(self, val): + self["labelangle"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font for the `dimension` labels. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcoords.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # labelside + # --------- + @property + def labelside(self): + """ + Specifies the location of the `label`. "top" positions labels + above, next to the title "bottom" positions labels below the + graph Tilted labels with "labelangle" may be positioned better + inside margins when `labelposition` is set to "bottom". + + The 'labelside' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom'] + + Returns + ------- + Any + """ + return self["labelside"] + + @labelside.setter + def labelside(self, val): + self["labelside"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.parcoords.line.Col + orBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.parcoords.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # rangefont + # --------- + @property + def rangefont(self): + """ + Sets the font for the `dimension` range values. + + The 'rangefont' property is an instance of Rangefont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Rangefont` + - A dict of string/value properties that will be passed + to the Rangefont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcoords.Rangefont + """ + return self["rangefont"] + + @rangefont.setter + def rangefont(self, val): + self["rangefont"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.parcoords.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the font for the `dimension` tick values. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcoords.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + line + :class:`plotly.graph_objects.parcoords.Line` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + customdata=None, + customdatasrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + ids=None, + idssrc=None, + labelangle=None, + labelfont=None, + labelside=None, + line=None, + meta=None, + metasrc=None, + name=None, + rangefont=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new Parcoords object + + Parallel coordinates for multidimensional exploratory data + analysis. The samples are specified in `dimensions`. The colors + are set in `line.color`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Parcoords` + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + line + :class:`plotly.graph_objects.parcoords.Line` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Parcoords + """ + super(Parcoords, self).__init__("parcoords") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Parcoords +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Parcoords`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dimensions", None) + _v = dimensions if dimensions is not None else _v + if _v is not None: + self["dimensions"] = _v + _v = arg.pop("dimensiondefaults", None) + _v = dimensiondefaults if dimensiondefaults is not None else _v + if _v is not None: + self["dimensiondefaults"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("labelangle", None) + _v = labelangle if labelangle is not None else _v + if _v is not None: + self["labelangle"] = _v + _v = arg.pop("labelfont", None) + _v = labelfont if labelfont is not None else _v + if _v is not None: + self["labelfont"] = _v + _v = arg.pop("labelside", None) + _v = labelside if labelside is not None else _v + if _v is not None: + self["labelside"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("rangefont", None) + _v = rangefont if rangefont is not None else _v + if _v is not None: + self["rangefont"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "parcoords" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_pie.py b/packages/python/plotly/plotly/graph_objs/_pie.py new file mode 100644 index 00000000000..533dfb1919d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_pie.py @@ -0,0 +1,2285 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Pie(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "pie" + _valid_props = { + "automargin", + "customdata", + "customdatasrc", + "direction", + "dlabel", + "domain", + "hole", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "insidetextorientation", + "label0", + "labels", + "labelssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "pull", + "pullsrc", + "rotation", + "scalegroup", + "showlegend", + "sort", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "title", + "titlefont", + "titleposition", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + # automargin + # ---------- + @property + def automargin(self): + """ + Determines whether outside text labels can push the margins. + + The 'automargin' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["automargin"] + + @automargin.setter + def automargin(self, val): + self["automargin"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # direction + # --------- + @property + def direction(self): + """ + Specifies the direction at which succeeding sectors follow one + another. + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['clockwise', 'counterclockwise'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + + # dlabel + # ------ + @property + def dlabel(self): + """ + Sets the label step. See `label0` for more info. + + The 'dlabel' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dlabel"] + + @dlabel.setter + def dlabel(self, val): + self["dlabel"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this pie trace . + row + If there is a layout grid, use the domain for + this row in the grid for this pie trace . + x + Sets the horizontal domain of this pie trace + (in plot fraction). + y + Sets the vertical domain of this pie trace (in + plot fraction). + + Returns + ------- + plotly.graph_objs.pie.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # hole + # ---- + @property + def hole(self): + """ + Sets the fraction of the radius to cut out of the pie. Use this + to make a donut chart. + + The 'hole' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["hole"] + + @hole.setter + def hole(self, val): + self["hole"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.pie.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `label`, `color`, `value`, `percent` and `text`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.pie.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # insidetextorientation + # --------------------- + @property + def insidetextorientation(self): + """ + Controls the orientation of the text inside chart sectors. When + set to "auto", text may be oriented in any direction in order + to be as big as possible in the middle of a sector. The + "horizontal" option orients text to be parallel with the bottom + of the chart, and may make text smaller in order to achieve + that goal. The "radial" option orients text along the radius of + the sector. The "tangential" option orients text perpendicular + to the radius of the sector. + + The 'insidetextorientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['horizontal', 'radial', 'tangential', 'auto'] + + Returns + ------- + Any + """ + return self["insidetextorientation"] + + @insidetextorientation.setter + def insidetextorientation(self, val): + self["insidetextorientation"] = val + + # label0 + # ------ + @property + def label0(self): + """ + Alternate to `labels`. Builds a numeric set of labels. Use with + `dlabel` where `label0` is the starting label and `dlabel` the + step. + + The 'label0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["label0"] + + @label0.setter + def label0(self, val): + self["label0"] = val + + # labels + # ------ + @property + def labels(self): + """ + Sets the sector labels. If `labels` entries are duplicated, we + sum associated `values` or simply count occurrences if `values` + is not provided. For other array attributes (including color) + we use the first non-empty entry among all occurrences of the + label. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + colors + Sets the color of each sector. If not + specified, the default trace color set is used + to pick the sector colors. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + line + :class:`plotly.graph_objects.pie.marker.Line` + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.pie.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.pie.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # pull + # ---- + @property + def pull(self): + """ + Sets the fraction of larger radius to pull the sectors out from + the center. This can be a constant to pull all slices apart + from each other equally or an array to highlight one or more + slices. + + The 'pull' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["pull"] + + @pull.setter + def pull(self, val): + self["pull"] = val + + # pullsrc + # ------- + @property + def pullsrc(self): + """ + Sets the source reference on Chart Studio Cloud for pull . + + The 'pullsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["pullsrc"] + + @pullsrc.setter + def pullsrc(self, val): + self["pullsrc"] = val + + # rotation + # -------- + @property + def rotation(self): + """ + Instead of the first slice starting at 12 o'clock, rotate to + some other angle. + + The 'rotation' property is a number and may be specified as: + - An int or float in the interval [-360, 360] + + Returns + ------- + int|float + """ + return self["rotation"] + + @rotation.setter + def rotation(self, val): + self["rotation"] = val + + # scalegroup + # ---------- + @property + def scalegroup(self): + """ + If there are multiple pie charts that should be sized according + to their totals, link them by providing a non-empty group id + here shared by every trace in the same group. + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # sort + # ---- + @property + def sort(self): + """ + Determines whether or not the sectors are reordered from + largest to smallest. + + The 'sort' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["sort"] + + @sort.setter + def sort(self, val): + self["sort"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.pie.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.pie.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `textinfo`. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, `percent` and + `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + position + Specifies the location of the `title`. Note + that the title's position used to be set by the + now deprecated `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no + title is displayed. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. + + Returns + ------- + plotly.graph_objs.pie.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use pie.title.font instead. Sets the font + used for `title`. Note that the title's font used to be set by + the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleposition + # ------------- + @property + def titleposition(self): + """ + Deprecated: Please use pie.title.position instead. Specifies + the location of the `title`. Note that the title's position + used to be set by the now deprecated `titleposition` attribute. + + The 'position' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle center', + 'bottom left', 'bottom center', 'bottom right'] + + Returns + ------- + + """ + return self["titleposition"] + + @titleposition.setter + def titleposition(self, val): + self["titleposition"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the values of the sectors. If omitted, we count + occurrences of each label. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + automargin + Determines whether outside text labels can push the + margins. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.pie.Domain` instance or + dict with compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `label`, `color`, `value`, + `percent` and `text`. Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.pie.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on Chart Studio Cloud for + pull . + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `percent` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + title + :class:`plotly.graph_objects.pie.Title` instance or + dict with compatible properties + titlefont + Deprecated: Please use pie.title.font instead. Sets the + font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleposition + Deprecated: Please use pie.title.position instead. + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleposition": ("title", "position"), + } + + def __init__( + self, + arg=None, + automargin=None, + customdata=None, + customdatasrc=None, + direction=None, + dlabel=None, + domain=None, + hole=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + label0=None, + labels=None, + labelssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + pull=None, + pullsrc=None, + rotation=None, + scalegroup=None, + showlegend=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + title=None, + titlefont=None, + titleposition=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Pie object + + A data visualized by the sectors of the pie is set in `values`. + The sector labels are set in `labels`. The sector colors are + set in `marker.colors` + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Pie` + automargin + Determines whether outside text labels can push the + margins. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.pie.Domain` instance or + dict with compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `label`, `color`, `value`, + `percent` and `text`. Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.pie.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on Chart Studio Cloud for + pull . + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `percent` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + title + :class:`plotly.graph_objects.pie.Title` instance or + dict with compatible properties + titlefont + Deprecated: Please use pie.title.font instead. Sets the + font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleposition + Deprecated: Please use pie.title.position instead. + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Pie + """ + super(Pie, self).__init__("pie") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Pie +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Pie`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("automargin", None) + _v = automargin if automargin is not None else _v + if _v is not None: + self["automargin"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("direction", None) + _v = direction if direction is not None else _v + if _v is not None: + self["direction"] = _v + _v = arg.pop("dlabel", None) + _v = dlabel if dlabel is not None else _v + if _v is not None: + self["dlabel"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("hole", None) + _v = hole if hole is not None else _v + if _v is not None: + self["hole"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("insidetextorientation", None) + _v = insidetextorientation if insidetextorientation is not None else _v + if _v is not None: + self["insidetextorientation"] = _v + _v = arg.pop("label0", None) + _v = label0 if label0 is not None else _v + if _v is not None: + self["label0"] = _v + _v = arg.pop("labels", None) + _v = labels if labels is not None else _v + if _v is not None: + self["labels"] = _v + _v = arg.pop("labelssrc", None) + _v = labelssrc if labelssrc is not None else _v + if _v is not None: + self["labelssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("outsidetextfont", None) + _v = outsidetextfont if outsidetextfont is not None else _v + if _v is not None: + self["outsidetextfont"] = _v + _v = arg.pop("pull", None) + _v = pull if pull is not None else _v + if _v is not None: + self["pull"] = _v + _v = arg.pop("pullsrc", None) + _v = pullsrc if pullsrc is not None else _v + if _v is not None: + self["pullsrc"] = _v + _v = arg.pop("rotation", None) + _v = rotation if rotation is not None else _v + if _v is not None: + self["rotation"] = _v + _v = arg.pop("scalegroup", None) + _v = scalegroup if scalegroup is not None else _v + if _v is not None: + self["scalegroup"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("sort", None) + _v = sort if sort is not None else _v + if _v is not None: + self["sort"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textinfo", None) + _v = textinfo if textinfo is not None else _v + if _v is not None: + self["textinfo"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleposition", None) + _v = titleposition if titleposition is not None else _v + if _v is not None: + self["titleposition"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "pie" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_pointcloud.py b/packages/python/plotly/plotly/graph_objs/_pointcloud.py new file mode 100644 index 00000000000..1dc862425a3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_pointcloud.py @@ -0,0 +1,1444 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Pointcloud(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "pointcloud" + _valid_props = { + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "ids", + "idssrc", + "indices", + "indicessrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "showlegend", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xbounds", + "xboundssrc", + "xsrc", + "xy", + "xysrc", + "y", + "yaxis", + "ybounds", + "yboundssrc", + "ysrc", + } + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.pointcloud.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # indices + # ------- + @property + def indices(self): + """ + A sequential value, 0..n, supply it to avoid creating this + array inside plotting. If specified, it must be a typed + `Int32Array` array. Its length must be equal to or greater than + the number of points. For the best performance and memory use, + create one large `indices` typed array that is guaranteed to be + at least as long as the largest number of points during use, + and reuse it on each `Plotly.restyle()` call. + + The 'indices' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["indices"] + + @indices.setter + def indices(self, val): + self["indices"] = val + + # indicessrc + # ---------- + @property + def indicessrc(self): + """ + Sets the source reference on Chart Studio Cloud for indices . + + The 'indicessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["indicessrc"] + + @indicessrc.setter + def indicessrc(self, val): + self["indicessrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.pointcloud.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + blend + Determines if colors are blended together for a + translucency effect in case `opacity` is + specified as a value less then `1`. Setting + `blend` to `true` reduces zoom/pan speed if + used with large numbers of points. + border + :class:`plotly.graph_objects.pointcloud.marker. + Border` instance or dict with compatible + properties + color + Sets the marker fill color. It accepts a + specific color.If the color is not fully opaque + and there are hundreds of thousandsof points, + it may cause slower zooming and panning. + opacity + Sets the marker opacity. The default value is + `1` (fully opaque). If the markers are not + fully opaque and there are hundreds of + thousands of points, it may cause slower + zooming and panning. Opacity fades the color + even if `blend` is left on `false` even if + there is no translucency effect in that case. + sizemax + Sets the maximum size (in px) of the rendered + marker points. Effective when the `pointcloud` + shows only few points. + sizemin + Sets the minimum size (in px) of the rendered + marker points, effective when the `pointcloud` + shows a million or more points. + + Returns + ------- + plotly.graph_objs.pointcloud.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.pointcloud.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.pointcloud.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xbounds + # ------- + @property + def xbounds(self): + """ + Specify `xbounds` in the shape of `[xMin, xMax] to avoid + looping through the `xy` typed array. Use it in conjunction + with `xy` and `ybounds` for the performance benefits. + + The 'xbounds' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["xbounds"] + + @xbounds.setter + def xbounds(self, val): + self["xbounds"] = val + + # xboundssrc + # ---------- + @property + def xboundssrc(self): + """ + Sets the source reference on Chart Studio Cloud for xbounds . + + The 'xboundssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xboundssrc"] + + @xboundssrc.setter + def xboundssrc(self, val): + self["xboundssrc"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # xy + # -- + @property + def xy(self): + """ + Faster alternative to specifying `x` and `y` separately. If + supplied, it must be a typed `Float32Array` array that + represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + + 1] = y[i]` + + The 'xy' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["xy"] + + @xy.setter + def xy(self, val): + self["xy"] = val + + # xysrc + # ----- + @property + def xysrc(self): + """ + Sets the source reference on Chart Studio Cloud for xy . + + The 'xysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xysrc"] + + @xysrc.setter + def xysrc(self, val): + self["xysrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ybounds + # ------- + @property + def ybounds(self): + """ + Specify `ybounds` in the shape of `[yMin, yMax] to avoid + looping through the `xy` typed array. Use it in conjunction + with `xy` and `xbounds` for the performance benefits. + + The 'ybounds' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ybounds"] + + @ybounds.setter + def ybounds(self, val): + self["ybounds"] = val + + # yboundssrc + # ---------- + @property + def yboundssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ybounds . + + The 'yboundssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["yboundssrc"] + + @yboundssrc.setter + def yboundssrc(self, val): + self["yboundssrc"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.pointcloud.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + indices + A sequential value, 0..n, supply it to avoid creating + this array inside plotting. If specified, it must be a + typed `Int32Array` array. Its length must be equal to + or greater than the number of points. For the best + performance and memory use, create one large `indices` + typed array that is guaranteed to be at least as long + as the largest number of points during use, and reuse + it on each `Plotly.restyle()` call. + indicessrc + Sets the source reference on Chart Studio Cloud for + indices . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.pointcloud.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.pointcloud.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbounds + Specify `xbounds` in the shape of `[xMin, xMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `ybounds` for the performance + benefits. + xboundssrc + Sets the source reference on Chart Studio Cloud for + xbounds . + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xy + Faster alternative to specifying `x` and `y` + separately. If supplied, it must be a typed + `Float32Array` array that represents points such that + `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` + xysrc + Sets the source reference on Chart Studio Cloud for xy + . + y + Sets the y coordinates. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybounds + Specify `ybounds` in the shape of `[yMin, yMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `xbounds` for the performance + benefits. + yboundssrc + Sets the source reference on Chart Studio Cloud for + ybounds . + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + indices=None, + indicessrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbounds=None, + xboundssrc=None, + xsrc=None, + xy=None, + xysrc=None, + y=None, + yaxis=None, + ybounds=None, + yboundssrc=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Pointcloud object + + The data visualized as a point cloud set in `x` and `y` using + the WebGl plotting engine. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Pointcloud` + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.pointcloud.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + indices + A sequential value, 0..n, supply it to avoid creating + this array inside plotting. If specified, it must be a + typed `Int32Array` array. Its length must be equal to + or greater than the number of points. For the best + performance and memory use, create one large `indices` + typed array that is guaranteed to be at least as long + as the largest number of points during use, and reuse + it on each `Plotly.restyle()` call. + indicessrc + Sets the source reference on Chart Studio Cloud for + indices . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.pointcloud.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.pointcloud.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbounds + Specify `xbounds` in the shape of `[xMin, xMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `ybounds` for the performance + benefits. + xboundssrc + Sets the source reference on Chart Studio Cloud for + xbounds . + xsrc + Sets the source reference on Chart Studio Cloud for x + . + xy + Faster alternative to specifying `x` and `y` + separately. If supplied, it must be a typed + `Float32Array` array that represents points such that + `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` + xysrc + Sets the source reference on Chart Studio Cloud for xy + . + y + Sets the y coordinates. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybounds + Specify `ybounds` in the shape of `[yMin, yMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `xbounds` for the performance + benefits. + yboundssrc + Sets the source reference on Chart Studio Cloud for + ybounds . + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Pointcloud + """ + super(Pointcloud, self).__init__("pointcloud") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Pointcloud +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Pointcloud`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("indices", None) + _v = indices if indices is not None else _v + if _v is not None: + self["indices"] = _v + _v = arg.pop("indicessrc", None) + _v = indicessrc if indicessrc is not None else _v + if _v is not None: + self["indicessrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xbounds", None) + _v = xbounds if xbounds is not None else _v + if _v is not None: + self["xbounds"] = _v + _v = arg.pop("xboundssrc", None) + _v = xboundssrc if xboundssrc is not None else _v + if _v is not None: + self["xboundssrc"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("xy", None) + _v = xy if xy is not None else _v + if _v is not None: + self["xy"] = _v + _v = arg.pop("xysrc", None) + _v = xysrc if xysrc is not None else _v + if _v is not None: + self["xysrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ybounds", None) + _v = ybounds if ybounds is not None else _v + if _v is not None: + self["ybounds"] = _v + _v = arg.pop("yboundssrc", None) + _v = yboundssrc if yboundssrc is not None else _v + if _v is not None: + self["yboundssrc"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "pointcloud" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_sankey.py b/packages/python/plotly/plotly/graph_objs/_sankey.py new file mode 100644 index 00000000000..da4cb90ba91 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_sankey.py @@ -0,0 +1,1222 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Sankey(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "sankey" + _valid_props = { + "arrangement", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverlabel", + "ids", + "idssrc", + "link", + "meta", + "metasrc", + "name", + "node", + "orientation", + "selectedpoints", + "stream", + "textfont", + "type", + "uid", + "uirevision", + "valueformat", + "valuesuffix", + "visible", + } + + # arrangement + # ----------- + @property + def arrangement(self): + """ + If value is `snap` (the default), the node arrangement is + assisted by automatic snapping of elements to preserve space + between nodes specified via `nodepad`. If value is + `perpendicular`, the nodes can only move along a line + perpendicular to the flow. If value is `freeform`, the nodes + can freely move on the plane. If value is `fixed`, the nodes + are stationary. + + The 'arrangement' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['snap', 'perpendicular', 'freeform', 'fixed'] + + Returns + ------- + Any + """ + return self["arrangement"] + + @arrangement.setter + def arrangement(self, val): + self["arrangement"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this sankey trace . + row + If there is a layout grid, use the domain for + this row in the grid for this sankey trace . + x + Sets the horizontal domain of this sankey trace + (in plot fraction). + y + Sets the vertical domain of this sankey trace + (in plot fraction). + + Returns + ------- + plotly.graph_objs.sankey.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + Note that this attribute is superseded by `node.hoverinfo` and + `node.hoverinfo` for nodes and links respectively. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of [] joined with '+' characters + (e.g. '') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + + Returns + ------- + Any + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.sankey.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # link + # ---- + @property + def link(self): + """ + The links of the Sankey plot. + + The 'link' property is an instance of Link + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Link` + - A dict of string/value properties that will be passed + to the Link constructor + + Supported dict properties: + + color + Sets the `link` color. It can be a single + value, or an array for specifying color for + each `link`. If `link.color` is omitted, then + by default, a translucent grey link will be + used. + colorscales + A tuple of :class:`plotly.graph_objects.sankey. + link.Colorscale` instances or dicts with + compatible properties + colorscaledefaults + When used in a template (as layout.template.dat + a.sankey.link.colorscaledefaults), sets the + default property values to use for elements of + sankey.link.colorscales + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + customdata + Assigns extra data to each link. + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear when + hovering links. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverlabel + :class:`plotly.graph_objects.sankey.link.Hoverl + abel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + label + The shown name of the link. + labelsrc + Sets the source reference on Chart Studio Cloud + for label . + line + :class:`plotly.graph_objects.sankey.link.Line` + instance or dict with compatible properties + source + An integer number `[0..nodes.length - 1]` that + represents the source node. + sourcesrc + Sets the source reference on Chart Studio Cloud + for source . + target + An integer number `[0..nodes.length - 1]` that + represents the target node. + targetsrc + Sets the source reference on Chart Studio Cloud + for target . + value + A numeric value representing the flow volume + value. + valuesrc + Sets the source reference on Chart Studio Cloud + for value . + + Returns + ------- + plotly.graph_objs.sankey.Link + """ + return self["link"] + + @link.setter + def link(self, val): + self["link"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # node + # ---- + @property + def node(self): + """ + The nodes of the Sankey plot. + + The 'node' property is an instance of Node + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Node` + - A dict of string/value properties that will be passed + to the Node constructor + + Supported dict properties: + + color + Sets the `node` color. It can be a single + value, or an array for specifying color for + each `node`. If `node.color` is omitted, then + the default `Plotly` color palette will be + cycled through to have a variety of colors. + These defaults are not fully opaque, to allow + some visibility of what is beneath the node. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + customdata + Assigns extra data to each node. + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + groups + Groups of nodes. Each group is defined by an + array with the indices of the nodes it + contains. Multiple groups can be specified. + hoverinfo + Determines which trace information appear when + hovering nodes. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverlabel + :class:`plotly.graph_objects.sankey.node.Hoverl + abel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + label + The shown name of the node. + labelsrc + Sets the source reference on Chart Studio Cloud + for label . + line + :class:`plotly.graph_objects.sankey.node.Line` + instance or dict with compatible properties + pad + Sets the padding (in px) between the `nodes`. + thickness + Sets the thickness (in px) of the `nodes`. + x + The normalized horizontal position of the node. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + The normalized vertical position of the node. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + + Returns + ------- + plotly.graph_objs.sankey.Node + """ + return self["node"] + + @node.setter + def node(self, val): + self["node"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the Sankey diagram. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.sankey.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font for node labels + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.sankey.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # valueformat + # ----------- + @property + def valueformat(self): + """ + Sets the value formatting rule using d3 formatting mini- + language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'valueformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valueformat"] + + @valueformat.setter + def valueformat(self, val): + self["valueformat"] = val + + # valuesuffix + # ----------- + @property + def valuesuffix(self): + """ + Adds a unit to follow the value in the hover tooltip. Add a + space if a separation is necessary from the value. + + The 'valuesuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valuesuffix"] + + @valuesuffix.setter + def valuesuffix(self, val): + self["valuesuffix"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.sankey.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` instance or + dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + arrangement=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverlabel=None, + ids=None, + idssrc=None, + link=None, + meta=None, + metasrc=None, + name=None, + node=None, + orientation=None, + selectedpoints=None, + stream=None, + textfont=None, + uid=None, + uirevision=None, + valueformat=None, + valuesuffix=None, + visible=None, + **kwargs + ): + """ + Construct a new Sankey object + + Sankey plots for network flow data analysis. The nodes are + specified in `nodes` and the links between sources and targets + in `links`. The colors are set in `nodes[i].color` and + `links[i].color`, otherwise defaults are used. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Sankey` + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.sankey.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` instance or + dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Sankey + """ + super(Sankey, self).__init__("sankey") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Sankey +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Sankey`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("arrangement", None) + _v = arrangement if arrangement is not None else _v + if _v is not None: + self["arrangement"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("link", None) + _v = link if link is not None else _v + if _v is not None: + self["link"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("node", None) + _v = node if node is not None else _v + if _v is not None: + self["node"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("valueformat", None) + _v = valueformat if valueformat is not None else _v + if _v is not None: + self["valueformat"] = _v + _v = arg.pop("valuesuffix", None) + _v = valuesuffix if valuesuffix is not None else _v + if _v is not None: + self["valuesuffix"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "sankey" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scatter.py b/packages/python/plotly/plotly/graph_objs/_scatter.py new file mode 100644 index 00000000000..1829db91b98 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scatter.py @@ -0,0 +1,2967 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatter(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scatter" + _valid_props = { + "cliponaxis", + "connectgaps", + "customdata", + "customdatasrc", + "dx", + "dy", + "error_x", + "error_y", + "fill", + "fillcolor", + "groupnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "orientation", + "r", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stackgaps", + "stackgroup", + "stream", + "t", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "tsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "ysrc", + } + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # groupnorm + # --------- + @property + def groupnorm(self): + """ + Only relevant when `stackgroup` is used, and only the first + `groupnorm` found in the `stackgroup` will be used - including + if `visible` is "legendonly" but not if it is `false`. Sets the + normalization for the sum of this `stackgroup`. With + "fraction", the value of each trace at each location is divided + by the sum of all trace values at that location. "percent" is + the same but multiplied by 100 to show percentages. If there + are multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + + The 'groupnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'fraction', 'percent'] + + Returns + ------- + Any + """ + return self["groupnorm"] + + @groupnorm.setter + def groupnorm(self, val): + self["groupnorm"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scatter.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + simplify + Simplifies lines by removing nearly-collinear + points. When transitioning lines, it may be + desirable to disable this so that the number of + points along the resulting SVG path is + unaffected. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scatter.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatter.marker.Col + orBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scatter.marker.Gra + dient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scatter.marker.Lin + e` instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scatter.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Only relevant when `stackgroup` is used, and only the first + `orientation` found in the `stackgroup` will be used - + including if `visible` is "legendonly" but not if it is + `false`. Sets the stacking direction. With "v" ("h"), the y (x) + values of subsequent traces are added. Also affects the default + value of `fill`. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # r + # - + @property + def r(self): + """ + r coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the radial coordinatesfor + legacy polar chart only. + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatter.selected.M + arker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatter.selected.T + extfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scatter.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stackgaps + # --------- + @property + def stackgaps(self): + """ + Only relevant when `stackgroup` is used, and only the first + `stackgaps` found in the `stackgroup` will be used - including + if `visible` is "legendonly" but not if it is `false`. + Determines how we handle locations at which other traces in + this group have data but this one does not. With *infer zero* + we insert a zero at these locations. With "interpolate" we + linearly interpolate between existing values, and extrapolate a + constant beyond the existing values. + + The 'stackgaps' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['infer zero', 'interpolate'] + + Returns + ------- + Any + """ + return self["stackgaps"] + + @stackgaps.setter + def stackgaps(self, val): + self["stackgaps"] = val + + # stackgroup + # ---------- + @property + def stackgroup(self): + """ + Set several scatter traces (on the same subplot) to the same + stackgroup in order to add their y values (or their x values if + `orientation` is "h"). If blank or omitted this trace will not + be stacked. Stacking also turns `fill` on by default, using + "tonexty" ("tonextx") if `orientation` is "h" ("v") and sets + the default `mode` to "lines" irrespective of point count. You + can only stack on a numeric (linear or log) axis. Traces in a + `stackgroup` will only fill to (or be filled to) other traces + in the same group. With multiple `stackgroup`s or some traces + stacked and some not, if fill-linked traces are not already + consecutive, the later ones will be pushed down in the drawing + order. + + The 'stackgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["stackgroup"] + + @stackgroup.setter + def stackgroup(self, val): + self["stackgroup"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scatter.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # t + # - + @property + def t(self): + """ + t coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the angular coordinatesfor + legacy polar chart only. + + The 't' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatter.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # tsrc + # ---- + @property + def tsrc(self): + """ + Sets the source reference on Chart Studio Cloud for t . + + The 'tsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tsrc"] + + @tsrc.setter + def tsrc(self, val): + self["tsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatter.unselected + .Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatter.unselected + .Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scatter.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatter.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + orientation + Only relevant when `stackgroup` is used, and only the + first `orientation` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the stacking direction. With "v" + ("h"), the y (x) values of subsequent traces are added. + Also affects the default value of `fill`. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.scatter.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` instance + or dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + tsrc + Sets the source reference on Chart Studio Cloud for t + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + groupnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + orientation=None, + r=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stackgaps=None, + stackgroup=None, + stream=None, + t=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Scatter object + + The scatter trace type encompasses line charts, scatter charts, + text charts, and bubble charts. The data visualized as scatter + point or lines is set in `x` and `y`. Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scatter` + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatter.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + orientation + Only relevant when `stackgroup` is used, and only the + first `orientation` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the stacking direction. With "v" + ("h"), the y (x) values of subsequent traces are added. + Also affects the default value of `fill`. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.scatter.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` instance + or dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + tsrc + Sets the source reference on Chart Studio Cloud for t + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Scatter + """ + super(Scatter, self).__init__("scatter") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scatter +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatter`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("cliponaxis", None) + _v = cliponaxis if cliponaxis is not None else _v + if _v is not None: + self["cliponaxis"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("error_x", None) + _v = error_x if error_x is not None else _v + if _v is not None: + self["error_x"] = _v + _v = arg.pop("error_y", None) + _v = error_y if error_y is not None else _v + if _v is not None: + self["error_y"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("groupnorm", None) + _v = groupnorm if groupnorm is not None else _v + if _v is not None: + self["groupnorm"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("rsrc", None) + _v = rsrc if rsrc is not None else _v + if _v is not None: + self["rsrc"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stackgaps", None) + _v = stackgaps if stackgaps is not None else _v + if _v is not None: + self["stackgaps"] = _v + _v = arg.pop("stackgroup", None) + _v = stackgroup if stackgroup is not None else _v + if _v is not None: + self["stackgroup"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("tsrc", None) + _v = tsrc if tsrc is not None else _v + if _v is not None: + self["tsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scatter" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scatter3d.py b/packages/python/plotly/plotly/graph_objs/_scatter3d.py new file mode 100644 index 00000000000..b8f8e9f98da --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scatter3d.py @@ -0,0 +1,2452 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatter3d(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scatter3d" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "error_x", + "error_y", + "error_z", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "projection", + "scene", + "showlegend", + "stream", + "surfaceaxis", + "surfacecolor", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "visible", + "x", + "xcalendar", + "xsrc", + "y", + "ycalendar", + "ysrc", + "z", + "zcalendar", + "zsrc", + } + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter3d.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter3d.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + # error_z + # ------- + @property + def error_z(self): + """ + The 'error_z' property is an instance of ErrorZ + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.ErrorZ` + - A dict of string/value properties that will be passed + to the ErrorZ constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter3d.ErrorZ + """ + return self["error_z"] + + @error_z.setter + def error_z(self, val): + self["error_z"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scatter3d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets text elements associated with each (x,y,z) triplet. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y,z) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatter3d.line.Col + orBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + dash + Sets the dash style of the lines. + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scatter3d.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatter3d.marker.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.scatter3d.marker.L + ine` instance or dict with compatible + properties + opacity + Sets the marker opacity. Note that the marker + opacity for scatter3d traces must be a scalar + value for performance reasons. To set a + blending opacity value (i.e. which is not + transparent), set "marker.color" to an rgba + color and use its alpha channel. + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scatter3d.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # projection + # ---------- + @property + def projection(self): + """ + The 'projection' property is an instance of Projection + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Projection` + - A dict of string/value properties that will be passed + to the Projection constructor + + Supported dict properties: + + x + :class:`plotly.graph_objects.scatter3d.projecti + on.X` instance or dict with compatible + properties + y + :class:`plotly.graph_objects.scatter3d.projecti + on.Y` instance or dict with compatible + properties + z + :class:`plotly.graph_objects.scatter3d.projecti + on.Z` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scatter3d.Projection + """ + return self["projection"] + + @projection.setter + def projection(self, val): + self["projection"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scatter3d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # surfaceaxis + # ----------- + @property + def surfaceaxis(self): + """ + If "-1", the scatter points are not fill with a surface If 0, + 1, 2, the scatter points are filled with a Delaunay surface + about the x, y, z respectively. + + The 'surfaceaxis' property is an enumeration that may be specified as: + - One of the following enumeration values: + [-1, 0, 1, 2] + + Returns + ------- + Any + """ + return self["surfaceaxis"] + + @surfaceaxis.setter + def surfaceaxis(self, val): + self["surfaceaxis"] = val + + # surfacecolor + # ------------ + @property + def surfacecolor(self): + """ + Sets the surface fill color. + + The 'surfacecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["surfacecolor"] + + @surfacecolor.setter + def surfacecolor(self, val): + self["surfacecolor"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y,z) triplet. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y,z) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatter3d.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the z coordinates. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zcalendar + # --------- + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` instance + or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatter3d.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projection` + instance or dict with compatible properties + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` instance + or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + :class:`plotly.graph_objects.scatter3d.Textfont` + instance or dict with compatible properties + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + error_z=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + projection=None, + scene=None, + showlegend=None, + stream=None, + surfaceaxis=None, + surfacecolor=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xsrc=None, + y=None, + ycalendar=None, + ysrc=None, + z=None, + zcalendar=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Scatter3d object + + The data visualized as scatter point or lines in 3D dimension + is set in `x`, `y`, `z`. Text (appearing either on the chart or + on hover only) is via `text`. Bubble charts are achieved by + setting `marker.size` and/or `marker.color` Projections are + achieved via `projection`. Surface fills are achieved via + `surfaceaxis`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scatter3d` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` instance + or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatter3d.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projection` + instance or dict with compatible properties + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` instance + or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + :class:`plotly.graph_objects.scatter3d.Textfont` + instance or dict with compatible properties + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Scatter3d + """ + super(Scatter3d, self).__init__("scatter3d") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scatter3d +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatter3d`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("error_x", None) + _v = error_x if error_x is not None else _v + if _v is not None: + self["error_x"] = _v + _v = arg.pop("error_y", None) + _v = error_y if error_y is not None else _v + if _v is not None: + self["error_y"] = _v + _v = arg.pop("error_z", None) + _v = error_z if error_z is not None else _v + if _v is not None: + self["error_z"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("projection", None) + _v = projection if projection is not None else _v + if _v is not None: + self["projection"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("surfaceaxis", None) + _v = surfaceaxis if surfaceaxis is not None else _v + if _v is not None: + self["surfaceaxis"] = _v + _v = arg.pop("surfacecolor", None) + _v = surfacecolor if surfacecolor is not None else _v + if _v is not None: + self["surfacecolor"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zcalendar", None) + _v = zcalendar if zcalendar is not None else _v + if _v is not None: + self["zcalendar"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scatter3d" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scattercarpet.py b/packages/python/plotly/plotly/graph_objs/_scattercarpet.py new file mode 100644 index 00000000000..7da00da77b2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scattercarpet.py @@ -0,0 +1,2178 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattercarpet(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scattercarpet" + _valid_props = { + "a", + "asrc", + "b", + "bsrc", + "carpet", + "connectgaps", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "xaxis", + "yaxis", + } + + # a + # - + @property + def a(self): + """ + Sets the a-axis coordinates. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # b + # - + @property + def b(self): + """ + Sets the b-axis coordinates. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + # carpet + # ------ + @property + def carpet(self): + """ + An identifier for this carpet, so that `scattercarpet` and + `contourcarpet` traces can specify a carpet plot on which they + lie + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterternary has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['a', 'b', 'text', 'name'] joined with '+' characters + (e.g. 'a+b') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scattercarpet.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (a,b) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b). To be seen, trace `hoverinfo` + must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scattercarpet.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattercarpet.mark + er.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scattercarpet.mark + er.Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scattercarpet.mark + er.Line` instance or dict with compatible + properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scattercarpet.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattercarpet.sele + cted.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattercarpet.sele + cted.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattercarpet.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scattercarpet.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (a,b) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b). If trace `hoverinfo` contains + a "text" flag and "hovertext" is not set, these elements will + be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattercarpet.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `a`, `b` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattercarpet.unse + lected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattercarpet.unse + lected.Textfont` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.scattercarpet.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud for a + . + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud for b + . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattercarpet.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b` and + `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + """ + + def __init__( + self, + arg=None, + a=None, + asrc=None, + b=None, + bsrc=None, + carpet=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxis=None, + yaxis=None, + **kwargs + ): + """ + Construct a new Scattercarpet object + + Plots a scatter trace on either the first carpet axis or the + carpet axis with a matching `carpet` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattercarpet` + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud for a + . + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud for b + . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattercarpet.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b` and + `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + + Returns + ------- + Scattercarpet + """ + super(Scattercarpet, self).__init__("scattercarpet") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scattercarpet +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattercarpet`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("a", None) + _v = a if a is not None else _v + if _v is not None: + self["a"] = _v + _v = arg.pop("asrc", None) + _v = asrc if asrc is not None else _v + if _v is not None: + self["asrc"] = _v + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("bsrc", None) + _v = bsrc if bsrc is not None else _v + if _v is not None: + self["bsrc"] = _v + _v = arg.pop("carpet", None) + _v = carpet if carpet is not None else _v + if _v is not None: + self["carpet"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scattercarpet" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scattergeo.py b/packages/python/plotly/plotly/graph_objs/_scattergeo.py new file mode 100644 index 00000000000..60473d095be --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scattergeo.py @@ -0,0 +1,2236 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattergeo(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scattergeo" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "featureidkey", + "fill", + "fillcolor", + "geo", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legendgroup", + "line", + "locationmode", + "locations", + "locationssrc", + "lon", + "lonsrc", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # featureidkey + # ------------ + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Only has an effect + when `geojson` is set. Support nested property, for example + "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # geo + # --- + @property + def geo(self): + """ + Sets a reference between this trace's geospatial coordinates + and a geographic map. If "geo" (the default value), the + geospatial coordinates refer to `layout.geo`. If "geo2", the + geospatial coordinates refer to `layout.geo2`, and so on. + + The 'geo' property is an identifier of a particular + subplot, of type 'geo', that may be specified as the string 'geo' + optionally followed by an integer >= 1 + (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + + Returns + ------- + str + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + + # geojson + # ------- + @property + def geojson(self): + """ + Sets optional GeoJSON data associated with this trace. If not + given, the features on the base map are used when `locations` + is set. It can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of type + "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'location', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scattergeo.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair or + item in `locations`. If a single string, the same string + appears over all the data points. If an array of string, the + items are mapped in order to the this trace's (lon,lat) or + `locations` coordinates. To be seen, trace `hoverinfo` must + contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # lat + # --- + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # latsrc + # ------ + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for lat . + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scattergeo.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # locationmode + # ------------ + @property + def locationmode(self): + """ + Determines the set of locations used to match entries in + `locations` to regions on the map. Values "ISO-3", "USA- + states", *country names* correspond to features on the base map + and value "geojson-id" corresponds to features from a custom + GeoJSON linked to the `geojson` attribute. + + The 'locationmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['ISO-3', 'USA-states', 'country names', 'geojson-id'] + + Returns + ------- + Any + """ + return self["locationmode"] + + @locationmode.setter + def locationmode(self, val): + self["locationmode"] = val + + # locations + # --------- + @property + def locations(self): + """ + Sets the coordinates via location IDs or names. Coordinates + correspond to the centroid of each location given. See + `locationmode` for more info. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # lon + # --- + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # lonsrc + # ------ + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for lon . + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattergeo.marker. + ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scattergeo.marker. + Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scattergeo.marker. + Line` instance or dict with compatible + properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scattergeo.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattergeo.selecte + d.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergeo.selecte + d.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattergeo.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scattergeo.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair or item + in `locations`. If a single string, the same string appears + over all the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) or `locations` + coordinates. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattergeo.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon`, `location` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattergeo.unselec + ted.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergeo.unselec + ted.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattergeo.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used + when `locations` is set. It can be set as a valid + GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + lat . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattergeo.Line` instance + or dict with compatible properties + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. Values "ISO-3", + "USA-states", *country names* correspond to features on + the base map and value "geojson-id" corresponds to + features from a custom GeoJSON linked to the `geojson` + attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + lon . + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon`, + `location` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + fill=None, + fillcolor=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legendgroup=None, + line=None, + locationmode=None, + locations=None, + locationssrc=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs + ): + """ + Construct a new Scattergeo object + + The data visualized as scatter point or lines on a geographic + map is provided either by longitude/latitude pairs in `lon` and + `lat` respectively or by geographic location IDs or names in + `locations`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattergeo` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used + when `locations` is set. It can be set as a valid + GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + lat . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattergeo.Line` instance + or dict with compatible properties + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. Values "ISO-3", + "USA-states", *country names* correspond to features on + the base map and value "geojson-id" corresponds to + features from a custom GeoJSON linked to the `geojson` + attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + lon . + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon`, + `location` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scattergeo + """ + super(Scattergeo, self).__init__("scattergeo") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scattergeo +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattergeo`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("featureidkey", None) + _v = featureidkey if featureidkey is not None else _v + if _v is not None: + self["featureidkey"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("geo", None) + _v = geo if geo is not None else _v + if _v is not None: + self["geo"] = _v + _v = arg.pop("geojson", None) + _v = geojson if geojson is not None else _v + if _v is not None: + self["geojson"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("lat", None) + _v = lat if lat is not None else _v + if _v is not None: + self["lat"] = _v + _v = arg.pop("latsrc", None) + _v = latsrc if latsrc is not None else _v + if _v is not None: + self["latsrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("locationmode", None) + _v = locationmode if locationmode is not None else _v + if _v is not None: + self["locationmode"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("lon", None) + _v = lon if lon is not None else _v + if _v is not None: + self["lon"] = _v + _v = arg.pop("lonsrc", None) + _v = lonsrc if lonsrc is not None else _v + if _v is not None: + self["lonsrc"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scattergeo" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scattergl.py b/packages/python/plotly/plotly/graph_objs/_scattergl.py new file mode 100644 index 00000000000..ccbd4ab8ae8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scattergl.py @@ -0,0 +1,2485 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattergl(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scattergl" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "dx", + "dy", + "error_x", + "error_y", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "ysrc", + } + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scattergl.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scattergl.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scattergl.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values + correspond to step-wise line shapes. + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scattergl.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattergl.marker.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.scattergl.marker.L + ine` instance or dict with compatible + properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scattergl.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattergl.selected + .Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergl.selected + .Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattergl.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scattergl.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattergl.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattergl.unselect + ed.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergl.unselect + ed.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattergl.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattergl.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Scattergl object + + The data visualized as scatter point or lines is set in `x` and + `y` using the WebGL plotting engine. Bubble charts are achieved + by setting `marker.size` and/or `marker.color` to a numerical + arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattergl` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattergl.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Scattergl + """ + super(Scattergl, self).__init__("scattergl") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scattergl +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattergl`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("error_x", None) + _v = error_x if error_x is not None else _v + if _v is not None: + self["error_x"] = _v + _v = arg.pop("error_y", None) + _v = error_y if error_y is not None else _v + if _v is not None: + self["error_y"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scattergl" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scattermapbox.py b/packages/python/plotly/plotly/graph_objs/_scattermapbox.py new file mode 100644 index 00000000000..543bf23087b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scattermapbox.py @@ -0,0 +1,2005 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattermapbox(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scattermapbox" + _valid_props = { + "below", + "connectgaps", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legendgroup", + "line", + "lon", + "lonsrc", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + # below + # ----- + @property + def below(self): + """ + Determines if this scattermapbox trace's layers are to be + inserted before the layer with the specified ID. By default, + scattermapbox layers are inserted above all the base layers. To + place the scattermapbox layers above every other layer, set + `below` to "''". + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scattermapbox.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # lat + # --- + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # latsrc + # ------ + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for lat . + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scattermapbox.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # lon + # --- + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # lonsrc + # ------ + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for lon . + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattermapbox.mark + er.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol. Full list: + https://www.mapbox.com/maki-icons/ Note that + the array `marker.color` and `marker.size` are + only available for "circle" symbols. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scattermapbox.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattermapbox.sele + cted.Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattermapbox.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scattermapbox.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + mapbox subplot. If "mapbox" (the default value), the data refer + to `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as the string 'mapbox' + optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @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.scattermapbox.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattermapbox.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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 + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scattermapbox.unse + lected.Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scattermapbox.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + lat . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattermapbox.Line` + instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + lon . + marker + :class:`plotly.graph_objects.scattermapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + 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. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + below=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legendgroup=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs + ): + """ + Construct a new Scattermapbox object + + The data visualized as scatter point, lines or marker symbols + on a Mapbox GL geographic map is provided by longitude/latitude + pairs in `lon` and `lat`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattermapbox` + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + lat . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scattermapbox.Line` + instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + lon . + marker + :class:`plotly.graph_objects.scattermapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + 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. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scattermapbox + """ + super(Scattermapbox, self).__init__("scattermapbox") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scattermapbox +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattermapbox`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("below", None) + _v = below if below is not None else _v + if _v is not None: + self["below"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("lat", None) + _v = lat if lat is not None else _v + if _v is not None: + self["lat"] = _v + _v = arg.pop("latsrc", None) + _v = latsrc if latsrc is not None else _v + if _v is not None: + self["latsrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("lon", None) + _v = lon if lon is not None else _v + if _v is not None: + self["lon"] = _v + _v = arg.pop("lonsrc", None) + _v = lonsrc if lonsrc is not None else _v + if _v is not None: + self["lonsrc"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scattermapbox" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scatterpolar.py b/packages/python/plotly/plotly/graph_objs/_scatterpolar.py new file mode 100644 index 00000000000..f20c777bbc7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scatterpolar.py @@ -0,0 +1,2318 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatterpolar(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scatterpolar" + _valid_props = { + "cliponaxis", + "connectgaps", + "customdata", + "customdatasrc", + "dr", + "dtheta", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "r", + "r0", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "theta", + "theta0", + "thetasrc", + "thetaunit", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dr + # -- + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + # dtheta + # ------ + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterpolar has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scatterpolar.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scatterpolar.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatterpolar.marke + r.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scatterpolar.marke + r.Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scatterpolar.marke + r.Line` instance or dict with compatible + properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scatterpolar.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # r + # - + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # r0 + # -- + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatterpolar.selec + ted.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterpolar.selec + ted.Textfont` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.scatterpolar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scatterpolar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as the string 'polar' + optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatterpolar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # theta + # ----- + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + # theta0 + # ------ + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + # thetasrc + # -------- + @property + def thetasrc(self): + """ + Sets the source reference on Chart Studio Cloud for theta . + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + # thetaunit + # --------- + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatterpolar.unsel + ected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterpolar.unsel + ected.Textfont` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.scatterpolar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.scatterpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs + ): + """ + Construct a new Scatterpolar object + + The scatterpolar trace type encompasses line charts, scatter + charts, text charts, and bubble charts in polar coordinates. + The data visualized as scatter point or lines is set in `r` + (radial) and `theta` (angular) coordinates Text (appearing + either on the chart or on hover only) is via `text`. Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scatterpolar` + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.scatterpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scatterpolar + """ + super(Scatterpolar, self).__init__("scatterpolar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scatterpolar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatterpolar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("cliponaxis", None) + _v = cliponaxis if cliponaxis is not None else _v + if _v is not None: + self["cliponaxis"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dr", None) + _v = dr if dr is not None else _v + if _v is not None: + self["dr"] = _v + _v = arg.pop("dtheta", None) + _v = dtheta if dtheta is not None else _v + if _v is not None: + self["dtheta"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("r0", None) + _v = r0 if r0 is not None else _v + if _v is not None: + self["r0"] = _v + _v = arg.pop("rsrc", None) + _v = rsrc if rsrc is not None else _v + if _v is not None: + self["rsrc"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("theta", None) + _v = theta if theta is not None else _v + if _v is not None: + self["theta"] = _v + _v = arg.pop("theta0", None) + _v = theta0 if theta0 is not None else _v + if _v is not None: + self["theta0"] = _v + _v = arg.pop("thetasrc", None) + _v = thetasrc if thetasrc is not None else _v + if _v is not None: + self["thetasrc"] = _v + _v = arg.pop("thetaunit", None) + _v = thetaunit if thetaunit is not None else _v + if _v is not None: + self["thetaunit"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scatterpolar" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scatterpolargl.py b/packages/python/plotly/plotly/graph_objs/_scatterpolargl.py new file mode 100644 index 00000000000..100d020d394 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scatterpolargl.py @@ -0,0 +1,2252 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatterpolargl(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scatterpolargl" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "dr", + "dtheta", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "r", + "r0", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "theta", + "theta0", + "thetasrc", + "thetaunit", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # dr + # -- + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + # dtheta + # ------ + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scatterpolargl.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values + correspond to step-wise line shapes. + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scatterpolargl.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatterpolargl.mar + ker.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.scatterpolargl.mar + ker.Line` instance or dict with compatible + properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scatterpolargl.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # r + # - + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # r0 + # -- + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatterpolargl.sel + ected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterpolargl.sel + ected.Textfont` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.scatterpolargl.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scatterpolargl.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as the string 'polar' + optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatterpolargl.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # theta + # ----- + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + # theta0 + # ------ + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + # thetasrc + # -------- + @property + def thetasrc(self): + """ + Sets the source reference on Chart Studio Cloud for theta . + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + # thetaunit + # --------- + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatterpolargl.uns + elected.Marker` instance or dict with + compatible properties + textfont + :class:`plotly.graph_objects.scatterpolargl.uns + elected.Textfont` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.scatterpolargl.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatterpolargl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.scatterpolargl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs + ): + """ + Construct a new Scatterpolargl object + + The scatterpolargl trace type encompasses line charts, scatter + charts, and bubble charts in polar coordinates using the WebGL + plotting engine. The data visualized as scatter point or lines + is set in `r` (radial) and `theta` (angular) coordinates Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Scatterpolargl` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatterpolargl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for r + . + selected + :class:`plotly.graph_objects.scatterpolargl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scatterpolargl + """ + super(Scatterpolargl, self).__init__("scatterpolargl") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scatterpolargl +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatterpolargl`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("dr", None) + _v = dr if dr is not None else _v + if _v is not None: + self["dr"] = _v + _v = arg.pop("dtheta", None) + _v = dtheta if dtheta is not None else _v + if _v is not None: + self["dtheta"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("r0", None) + _v = r0 if r0 is not None else _v + if _v is not None: + self["r0"] = _v + _v = arg.pop("rsrc", None) + _v = rsrc if rsrc is not None else _v + if _v is not None: + self["rsrc"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("theta", None) + _v = theta if theta is not None else _v + if _v is not None: + self["theta"] = _v + _v = arg.pop("theta0", None) + _v = theta0 if theta0 is not None else _v + if _v is not None: + self["theta0"] = _v + _v = arg.pop("thetasrc", None) + _v = thetasrc if thetasrc is not None else _v + if _v is not None: + self["thetasrc"] = _v + _v = arg.pop("thetaunit", None) + _v = thetaunit if thetaunit is not None else _v + if _v is not None: + self["thetaunit"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scatterpolargl" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_scatterternary.py b/packages/python/plotly/plotly/graph_objs/_scatterternary.py new file mode 100644 index 00000000000..8a6e42065b7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_scatterternary.py @@ -0,0 +1,2284 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatterternary(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "scatterternary" + _valid_props = { + "a", + "asrc", + "b", + "bsrc", + "c", + "cliponaxis", + "connectgaps", + "csrc", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "sum", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + # a + # - + @property + def a(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # b + # - + @property + def b(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + # c + # - + @property + def c(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'c' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["c"] + + @c.setter + def c(self, val): + self["c"] = val + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # csrc + # ---- + @property + def csrc(self): + """ + Sets the source reference on Chart Studio Cloud for c . + + The 'csrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["csrc"] + + @csrc.setter + def csrc(self, val): + self["csrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterternary has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['a', 'b', 'c', 'text', 'name'] joined with '+' characters + (e.g. 'a+b') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.scatterternary.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (a,b,c) point. If + a single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b,c). To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scatterternary.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatterternary.mar + ker.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scatterternary.mar + ker.Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scatterternary.mar + ker.Line` instance or dict with compatible + properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.scatterternary.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatterternary.sel + ected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterternary.sel + ected.Textfont` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.scatterternary.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.scatterternary.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + ternary subplot. If "ternary" (the default value), the data + refer to `layout.ternary`. If "ternary2", the data refer to + `layout.ternary2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'ternary', that may be specified as the string 'ternary' + optionally followed by an integer >= 1 + (e.g. 'ternary', 'ternary1', 'ternary2', 'ternary3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # sum + # --- + @property + def sum(self): + """ + The number each triplet should sum to, if only two of `a`, `b`, + and `c` are provided. This overrides `ternary.sum` to + normalize this specific trace, but does not affect the values + displayed on the axes. 0 (or missing) means to use + ternary.sum + + The 'sum' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sum"] + + @sum.setter + def sum(self, val): + self["sum"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (a,b,c) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b,c). If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatterternary.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `a`, `b`, `c` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.scatterternary.uns + elected.Marker` instance or dict with + compatible properties + textfont + :class:`plotly.graph_objects.scatterternary.uns + elected.Textfont` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.scatterternary.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud for a + . + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud for b + . + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on Chart Studio Cloud for c + . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatterternary.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum + text + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b`, `c` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + a=None, + asrc=None, + b=None, + bsrc=None, + c=None, + cliponaxis=None, + connectgaps=None, + csrc=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + sum=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs + ): + """ + Construct a new Scatterternary object + + Provides similar functionality to the "scatter" type but on a + ternary phase diagram. The data is provided by at least two + arrays out of `a`, `b`, `c` triplets. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Scatterternary` + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud for a + . + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud for b + . + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on Chart Studio Cloud for c + . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.scatterternary.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum + text + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b`, `c` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scatterternary + """ + super(Scatterternary, self).__init__("scatterternary") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scatterternary +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatterternary`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("a", None) + _v = a if a is not None else _v + if _v is not None: + self["a"] = _v + _v = arg.pop("asrc", None) + _v = asrc if asrc is not None else _v + if _v is not None: + self["asrc"] = _v + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("bsrc", None) + _v = bsrc if bsrc is not None else _v + if _v is not None: + self["bsrc"] = _v + _v = arg.pop("c", None) + _v = c if c is not None else _v + if _v is not None: + self["c"] = _v + _v = arg.pop("cliponaxis", None) + _v = cliponaxis if cliponaxis is not None else _v + if _v is not None: + self["cliponaxis"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("csrc", None) + _v = csrc if csrc is not None else _v + if _v is not None: + self["csrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("subplot", None) + _v = subplot if subplot is not None else _v + if _v is not None: + self["subplot"] = _v + _v = arg.pop("sum", None) + _v = sum if sum is not None else _v + if _v is not None: + self["sum"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "scatterternary" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_splom.py b/packages/python/plotly/plotly/graph_objs/_splom.py new file mode 100644 index 00000000000..0f27e288a03 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_splom.py @@ -0,0 +1,1676 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Splom(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "splom" + _valid_props = { + "customdata", + "customdatasrc", + "diagonal", + "dimensiondefaults", + "dimensions", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "showlowerhalf", + "showupperhalf", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "xaxes", + "yaxes", + } + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # diagonal + # -------- + @property + def diagonal(self): + """ + The 'diagonal' property is an instance of Diagonal + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Diagonal` + - A dict of string/value properties that will be passed + to the Diagonal constructor + + Supported dict properties: + + visible + Determines whether or not subplots on the + diagonal are displayed. + + Returns + ------- + plotly.graph_objs.splom.Diagonal + """ + return self["diagonal"] + + @diagonal.setter + def diagonal(self, val): + self["diagonal"] = val + + # dimensions + # ---------- + @property + def dimensions(self): + """ + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.splom.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Supported dict properties: + + axis + :class:`plotly.graph_objects.splom.dimension.Ax + is` instance or dict with compatible properties + label + Sets the label corresponding to this splom + dimension. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the dimension values to be plotted. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Determines whether or not this dimension is + shown on the graph. Note that even visible + false dimension contribute to the default grid + generate by this splom trace. + + Returns + ------- + tuple[plotly.graph_objs.splom.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + # dimensiondefaults + # ----------------- + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the default + property values to use for elements of splom.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Dimension` + - A dict of string/value properties that will be passed + to the Dimension constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.splom.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.splom.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.splom.marker.Color + Bar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.splom.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . + + Returns + ------- + plotly.graph_objs.splom.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.splom.selected.Mar + ker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.splom.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showlowerhalf + # ------------- + @property + def showlowerhalf(self): + """ + Determines whether or not subplots on the lower half from the + diagonal are displayed. + + The 'showlowerhalf' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlowerhalf"] + + @showlowerhalf.setter + def showlowerhalf(self, val): + self["showlowerhalf"] = val + + # showupperhalf + # ------------- + @property + def showupperhalf(self): + """ + Determines whether or not subplots on the upper half from the + diagonal are displayed. + + The 'showupperhalf' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showupperhalf"] + + @showupperhalf.setter + def showupperhalf(self, val): + self["showupperhalf"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.splom.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair to appear on + hover. If a single string, the same string appears over all the + data points. If an array of string, the items are mapped in + order to the this trace's (x,y) coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.splom.unselected.M + arker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.splom.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # xaxes + # ----- + @property + def xaxes(self): + """ + Sets the list of x axes corresponding to dimensions of this + splom trace. By default, a splom will match the first N xaxes + where N is the number of input dimensions. Note that, in case + where `diagonal.visible` is false and `showupperhalf` or + `showlowerhalf` is false, this splom trace will generate one + less x-axis and one less y-axis. + + The 'xaxes' property is an info array that may be specified as: + * a list of elements where: + The 'xaxes[i]' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + list + """ + return self["xaxes"] + + @xaxes.setter + def xaxes(self, val): + self["xaxes"] = val + + # yaxes + # ----- + @property + def yaxes(self): + """ + Sets the list of y axes corresponding to dimensions of this + splom trace. By default, a splom will match the first N yaxes + where N is the number of input dimensions. Note that, in case + where `diagonal.visible` is false and `showupperhalf` or + `showlowerhalf` is false, this splom trace will generate one + less x-axis and one less y-axis. + + The 'yaxes' property is an info array that may be specified as: + * a list of elements where: + The 'yaxes[i]' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + list + """ + return self["yaxes"] + + @yaxes.setter + def yaxes(self, val): + self["yaxes"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + diagonal + :class:`plotly.graph_objects.splom.Diagonal` instance + or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` instances + or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.splom.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + """ + + def __init__( + self, + arg=None, + customdata=None, + customdatasrc=None, + diagonal=None, + dimensions=None, + dimensiondefaults=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + showlowerhalf=None, + showupperhalf=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxes=None, + yaxes=None, + **kwargs + ): + """ + Construct a new Splom object + + Splom traces generate scatter plot matrix visualizations. Each + splom `dimensions` items correspond to a generated axis. Values + for each of those dimensions are set in `dimensions[i].values`. + Splom traces support all `scattergl` marker style attributes. + Specify `layout.grid` attributes and/or layout x-axis and + y-axis attributes for more control over the axis positioning + and style. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Splom` + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + diagonal + :class:`plotly.graph_objects.splom.Diagonal` instance + or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` instances + or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + :class:`plotly.graph_objects.splom.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + + Returns + ------- + Splom + """ + super(Splom, self).__init__("splom") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Splom +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Splom`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("diagonal", None) + _v = diagonal if diagonal is not None else _v + if _v is not None: + self["diagonal"] = _v + _v = arg.pop("dimensions", None) + _v = dimensions if dimensions is not None else _v + if _v is not None: + self["dimensions"] = _v + _v = arg.pop("dimensiondefaults", None) + _v = dimensiondefaults if dimensiondefaults is not None else _v + if _v is not None: + self["dimensiondefaults"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showlowerhalf", None) + _v = showlowerhalf if showlowerhalf is not None else _v + if _v is not None: + self["showlowerhalf"] = _v + _v = arg.pop("showupperhalf", None) + _v = showupperhalf if showupperhalf is not None else _v + if _v is not None: + self["showupperhalf"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("xaxes", None) + _v = xaxes if xaxes is not None else _v + if _v is not None: + self["xaxes"] = _v + _v = arg.pop("yaxes", None) + _v = yaxes if yaxes is not None else _v + if _v is not None: + self["yaxes"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "splom" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_streamtube.py b/packages/python/plotly/plotly/graph_objs/_streamtube.py new file mode 100644 index 00000000000..c2f16950db7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_streamtube.py @@ -0,0 +1,2306 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Streamtube(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "streamtube" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "ids", + "idssrc", + "legendgroup", + "lighting", + "lightposition", + "maxdisplayed", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "sizeref", + "starts", + "stream", + "text", + "type", + "u", + "uid", + "uirevision", + "usrc", + "v", + "visible", + "vsrc", + "w", + "wsrc", + "x", + "xsrc", + "y", + "ysrc", + "z", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here u/v/w norm) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmin` must be set as + well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as u/v/w norm. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmax` must be set as + well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.streamt + ube.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.streamtube.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of streamtube.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.streamtube.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + streamtube.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + streamtube.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.streamtube.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.streamtube.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, + `norm` and `divergence`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. + + Returns + ------- + plotly.graph_objs.streamtube.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.streamtube.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # maxdisplayed + # ------------ + @property + def maxdisplayed(self): + """ + The maximum number of displayed segments in a streamtube. + + The 'maxdisplayed' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["maxdisplayed"] + + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + The scaling factor for the streamtubes. The default is 1, which + avoids two max divergence tubes from touching at adjacent + starting positions. + + The 'sizeref' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # starts + # ------ + @property + def starts(self): + """ + The 'starts' property is an instance of Starts + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Starts` + - A dict of string/value properties that will be passed + to the Starts constructor + + Supported dict properties: + + x + Sets the x components of the starting position + of the streamtubes + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y components of the starting position + of the streamtubes + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the z components of the starting position + of the streamtubes + zsrc + Sets the source reference on Chart Studio Cloud + for z . + + Returns + ------- + plotly.graph_objs.streamtube.Starts + """ + return self["starts"] + + @starts.setter + def starts(self, val): + self["starts"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.streamtube.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets a text element associated with this trace. If trace + `hoverinfo` contains a "text" flag, this text element will be + seen in all hover labels. Note that streamtube traces do not + support array `text` values. + + 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 + + # u + # - + @property + def u(self): + """ + Sets the x components of the vector field. + + The 'u' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["u"] + + @u.setter + def u(self, val): + self["u"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # usrc + # ---- + @property + def usrc(self): + """ + Sets the source reference on Chart Studio Cloud for u . + + The 'usrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["usrc"] + + @usrc.setter + def usrc(self, val): + self["usrc"] = val + + # v + # - + @property + def v(self): + """ + Sets the y components of the vector field. + + The 'v' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["v"] + + @v.setter + def v(self, val): + self["v"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # vsrc + # ---- + @property + def vsrc(self): + """ + Sets the source reference on Chart Studio Cloud for v . + + The 'vsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vsrc"] + + @vsrc.setter + def vsrc(self, val): + self["vsrc"] = val + + # w + # - + @property + def w(self): + """ + Sets the z components of the vector field. + + The 'w' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["w"] + + @w.setter + def w(self, val): + self["w"] = val + + # wsrc + # ---- + @property + def wsrc(self): + """ + Sets the source reference on Chart Studio Cloud for w . + + The 'wsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["wsrc"] + + @wsrc.setter + def wsrc(self, val): + self["wsrc"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates of the vector field. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates of the vector field. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the z coordinates of the vector field. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `tubex`, `tubey`, `tubez`, + `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.streamtube.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightposition` + instance or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for u + . + v + Sets the y components of the vector field. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for v + . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on Chart Studio Cloud for w + . + x + Sets the x coordinates of the vector field. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates of the vector field. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates of the vector field. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + ids=None, + idssrc=None, + legendgroup=None, + lighting=None, + lightposition=None, + maxdisplayed=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizeref=None, + starts=None, + stream=None, + text=None, + u=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + visible=None, + vsrc=None, + w=None, + wsrc=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Streamtube object + + Use a streamtube trace to visualize flow in a vector field. + Specify a vector field using 6 1D arrays of equal length, 3 + position arrays `x`, `y` and `z` and 3 vector component arrays + `u`, `v`, and `w`. By default, the tubes' starting positions + will be cut from the vector field's x-z plane at its minimum y + value. To specify your own starting position, use attributes + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Streamtube` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `tubex`, `tubey`, `tubez`, + `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.streamtube.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightposition` + instance or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for u + . + v + Sets the y components of the vector field. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for v + . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on Chart Studio Cloud for w + . + x + Sets the x coordinates of the vector field. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates of the vector field. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates of the vector field. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Streamtube + """ + super(Streamtube, self).__init__("streamtube") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Streamtube +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Streamtube`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lighting", None) + _v = lighting if lighting is not None else _v + if _v is not None: + self["lighting"] = _v + _v = arg.pop("lightposition", None) + _v = lightposition if lightposition is not None else _v + if _v is not None: + self["lightposition"] = _v + _v = arg.pop("maxdisplayed", None) + _v = maxdisplayed if maxdisplayed is not None else _v + if _v is not None: + self["maxdisplayed"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("starts", None) + _v = starts if starts is not None else _v + if _v is not None: + self["starts"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("u", None) + _v = u if u is not None else _v + if _v is not None: + self["u"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("usrc", None) + _v = usrc if usrc is not None else _v + if _v is not None: + self["usrc"] = _v + _v = arg.pop("v", None) + _v = v if v is not None else _v + if _v is not None: + self["v"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("vsrc", None) + _v = vsrc if vsrc is not None else _v + if _v is not None: + self["vsrc"] = _v + _v = arg.pop("w", None) + _v = w if w is not None else _v + if _v is not None: + self["w"] = _v + _v = arg.pop("wsrc", None) + _v = wsrc if wsrc is not None else _v + if _v is not None: + self["wsrc"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "streamtube" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_sunburst.py b/packages/python/plotly/plotly/graph_objs/_sunburst.py new file mode 100644 index 00000000000..da31247be8a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_sunburst.py @@ -0,0 +1,2000 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Sunburst(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "sunburst" + _valid_props = { + "branchvalues", + "count", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "insidetextorientation", + "labels", + "labelssrc", + "leaf", + "level", + "marker", + "maxdepth", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "parents", + "parentssrc", + "stream", + "text", + "textfont", + "textinfo", + "textsrc", + "texttemplate", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + # branchvalues + # ------------ + @property + def branchvalues(self): + """ + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. + + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] + + Returns + ------- + Any + """ + return self["branchvalues"] + + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val + + # count + # ----- + @property + def count(self): + """ + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. + + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') + + Returns + ------- + Any + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this sunburst trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this sunburst trace . + x + Sets the horizontal domain of this sunburst + trace (in plot fraction). + y + Sets the vertical domain of this sunburst trace + (in plot fraction). + + Returns + ------- + plotly.graph_objs.sunburst.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.sunburst.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry` and `percentParent`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sunburst.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # insidetextorientation + # --------------------- + @property + def insidetextorientation(self): + """ + Controls the orientation of the text inside chart sectors. When + set to "auto", text may be oriented in any direction in order + to be as big as possible in the middle of a sector. The + "horizontal" option orients text to be parallel with the bottom + of the chart, and may make text smaller in order to achieve + that goal. The "radial" option orients text along the radius of + the sector. The "tangential" option orients text perpendicular + to the radius of the sector. + + The 'insidetextorientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['horizontal', 'radial', 'tangential', 'auto'] + + Returns + ------- + Any + """ + return self["insidetextorientation"] + + @insidetextorientation.setter + def insidetextorientation(self, val): + self["insidetextorientation"] = val + + # labels + # ------ + @property + def labels(self): + """ + Sets the labels of each of the sectors. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + # leaf + # ---- + @property + def leaf(self): + """ + The 'leaf' property is an instance of Leaf + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Leaf` + - A dict of string/value properties that will be passed + to the Leaf constructor + + Supported dict properties: + + opacity + Sets the opacity of the leaves. With colorscale + it is defaulted to 1; otherwise it is defaulted + to 0.7 + + Returns + ------- + plotly.graph_objs.sunburst.Leaf + """ + return self["leaf"] + + @leaf.setter + def leaf(self, val): + self["leaf"] = val + + # level + # ----- + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.sunburst.marker.Co + lorBar` instance or dict with compatible + properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + line + :class:`plotly.graph_objects.sunburst.marker.Li + ne` instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. + + Returns + ------- + plotly.graph_objs.sunburst.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # maxdepth + # -------- + @property + def maxdepth(self): + """ + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. + + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["maxdepth"] + + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented at + the center of a sunburst graph. Please note that if a hierarchy + has multiple root nodes, this option won't have any effect and + `insidetextfont` would be used. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sunburst.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # parents + # ------- + @property + def parents(self): + """ + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. + + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["parents"] + + @parents.setter + def parents(self, val): + self["parents"] = val + + # parentssrc + # ---------- + @property + def parentssrc(self): + """ + Sets the source reference on Chart Studio Cloud for parents . + + The 'parentssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["parentssrc"] + + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.sunburst.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sunburst.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` and + `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.sunburst.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + leaf + :class:`plotly.graph_objects.sunburst.Leaf` instance or + dict with compatible properties + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented at the center of a sunburst graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + parents . + stream + :class:`plotly.graph_objects.sunburst.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + labels=None, + labelssrc=None, + leaf=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Sunburst object + + Visualize hierarchal data spanning outward radially from root + to leaves. The sunburst sectors are determined by the entries + in "labels" or "ids" and in "parents". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Sunburst` + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.sunburst.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + leaf + :class:`plotly.graph_objects.sunburst.Leaf` instance or + dict with compatible properties + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented at the center of a sunburst graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + parents . + stream + :class:`plotly.graph_objects.sunburst.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Sunburst + """ + super(Sunburst, self).__init__("sunburst") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Sunburst +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Sunburst`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("branchvalues", None) + _v = branchvalues if branchvalues is not None else _v + if _v is not None: + self["branchvalues"] = _v + _v = arg.pop("count", None) + _v = count if count is not None else _v + if _v is not None: + self["count"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("insidetextorientation", None) + _v = insidetextorientation if insidetextorientation is not None else _v + if _v is not None: + self["insidetextorientation"] = _v + _v = arg.pop("labels", None) + _v = labels if labels is not None else _v + if _v is not None: + self["labels"] = _v + _v = arg.pop("labelssrc", None) + _v = labelssrc if labelssrc is not None else _v + if _v is not None: + self["labelssrc"] = _v + _v = arg.pop("leaf", None) + _v = leaf if leaf is not None else _v + if _v is not None: + self["leaf"] = _v + _v = arg.pop("level", None) + _v = level if level is not None else _v + if _v is not None: + self["level"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("maxdepth", None) + _v = maxdepth if maxdepth is not None else _v + if _v is not None: + self["maxdepth"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("outsidetextfont", None) + _v = outsidetextfont if outsidetextfont is not None else _v + if _v is not None: + self["outsidetextfont"] = _v + _v = arg.pop("parents", None) + _v = parents if parents is not None else _v + if _v is not None: + self["parents"] = _v + _v = arg.pop("parentssrc", None) + _v = parentssrc if parentssrc is not None else _v + if _v is not None: + self["parentssrc"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textinfo", None) + _v = textinfo if textinfo is not None else _v + if _v is not None: + self["textinfo"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "sunburst" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_surface.py b/packages/python/plotly/plotly/graph_objs/_surface.py new file mode 100644 index 00000000000..b814984a082 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_surface.py @@ -0,0 +1,2391 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Surface(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "surface" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "connectgaps", + "contours", + "customdata", + "customdatasrc", + "hidesurface", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legendgroup", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "opacityscale", + "reversescale", + "scene", + "showlegend", + "showscale", + "stream", + "surfacecolor", + "surfacecolorsrc", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "x", + "xcalendar", + "xsrc", + "y", + "ycalendar", + "ysrc", + "z", + "zcalendar", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here z or surfacecolor) or the + bounds set in `cmin` and `cmax` Defaults to `false` when + `cmin` and `cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as z or surfacecolor and if set, `cmin` must be set + as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as z or surfacecolor. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as z or surfacecolor and if set, `cmax` must be set + as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.surface + .colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.surface.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of surface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.surface.colorbar.T + itle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + surface.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + surface.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.surface.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # contours + # -------- + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Supported dict properties: + + x + :class:`plotly.graph_objects.surface.contours.X + ` instance or dict with compatible properties + y + :class:`plotly.graph_objects.surface.contours.Y + ` instance or dict with compatible properties + z + :class:`plotly.graph_objects.surface.contours.Z + ` instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.surface.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hidesurface + # ----------- + @property + def hidesurface(self): + """ + Determines whether or not a surface is drawn. For example, set + `hidesurface` to False `contours.x.show` to True and + `contours.y.show` to True to draw a wire frame plot. + + The 'hidesurface' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["hidesurface"] + + @hidesurface.setter + def hidesurface(self, val): + self["hidesurface"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.surface.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + + Returns + ------- + plotly.graph_objs.surface.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.surface.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacityscale + # ------------ + @property + def opacityscale(self): + """ + Sets the opacityscale. The opacityscale must be an array + containing arrays mapping a normalized value to an opacity + value. At minimum, a mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], [0.5, 0.2], [1, + 1]]` means that higher/lower values would have higher opacity + values and those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette name string of + the following list: 'min', 'max', 'extremes' and 'uniform'. The + default is 'uniform'. + + The 'opacityscale' property accepts values of any type + + Returns + ------- + Any + """ + return self["opacityscale"] + + @opacityscale.setter + def opacityscale(self, val): + self["opacityscale"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.surface.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # surfacecolor + # ------------ + @property + def surfacecolor(self): + """ + Sets the surface color values, used for setting a color scale + independent of `z`. + + The 'surfacecolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["surfacecolor"] + + @surfacecolor.setter + def surfacecolor(self, val): + self["surfacecolor"] = val + + # surfacecolorsrc + # --------------- + @property + def surfacecolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + surfacecolor . + + The 'surfacecolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["surfacecolorsrc"] + + @surfacecolorsrc.setter + def surfacecolorsrc(self, val): + self["surfacecolorsrc"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the z coordinates. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zcalendar + # --------- + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.surface.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.surface.Stream` instance + or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud for + surfacecolor . + text + Sets the text elements associated with each z value. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + hidesurface=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legendgroup=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + surfacecolor=None, + surfacecolorsrc=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xsrc=None, + y=None, + ycalendar=None, + ysrc=None, + z=None, + zcalendar=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Surface object + + The data the describes the coordinates of the surface is set in + `z`. Data in `z` should be a 2D list. Coordinates in `x` and + `y` can either be 1D lists or 2D lists (e.g. to graph + parametric surfaces). If not provided in `x` and `y`, the x and + y coordinates are assumed to be linear starting at 0 with a + unit step. The color scale corresponds to the `z` values by + default. For custom color scales, use `surfacecolor` which + should be a 2D list, where its bounds can be controlled using + `cmin` and `cmax`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Surface` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.surface.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.surface.Stream` instance + or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud for + surfacecolor . + text + Sets the text elements associated with each z value. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Surface + """ + super(Surface, self).__init__("surface") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Surface +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Surface`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("connectgaps", None) + _v = connectgaps if connectgaps is not None else _v + if _v is not None: + self["connectgaps"] = _v + _v = arg.pop("contours", None) + _v = contours if contours is not None else _v + if _v is not None: + self["contours"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hidesurface", None) + _v = hidesurface if hidesurface is not None else _v + if _v is not None: + self["hidesurface"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lighting", None) + _v = lighting if lighting is not None else _v + if _v is not None: + self["lighting"] = _v + _v = arg.pop("lightposition", None) + _v = lightposition if lightposition is not None else _v + if _v is not None: + self["lightposition"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacityscale", None) + _v = opacityscale if opacityscale is not None else _v + if _v is not None: + self["opacityscale"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("surfacecolor", None) + _v = surfacecolor if surfacecolor is not None else _v + if _v is not None: + self["surfacecolor"] = _v + _v = arg.pop("surfacecolorsrc", None) + _v = surfacecolorsrc if surfacecolorsrc is not None else _v + if _v is not None: + self["surfacecolorsrc"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xcalendar", None) + _v = xcalendar if xcalendar is not None else _v + if _v is not None: + self["xcalendar"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ycalendar", None) + _v = ycalendar if ycalendar is not None else _v + if _v is not None: + self["ycalendar"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zcalendar", None) + _v = zcalendar if zcalendar is not None else _v + if _v is not None: + self["zcalendar"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "surface" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_table.py b/packages/python/plotly/plotly/graph_objs/_table.py new file mode 100644 index 00000000000..1a9034186d5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_table.py @@ -0,0 +1,1059 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Table(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "table" + _valid_props = { + "cells", + "columnorder", + "columnordersrc", + "columnwidth", + "columnwidthsrc", + "customdata", + "customdatasrc", + "domain", + "header", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "ids", + "idssrc", + "meta", + "metasrc", + "name", + "stream", + "type", + "uid", + "uirevision", + "visible", + } + + # cells + # ----- + @property + def cells(self): + """ + The 'cells' property is an instance of Cells + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Cells` + - A dict of string/value properties that will be passed + to the Cells constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + fill + :class:`plotly.graph_objects.table.cells.Fill` + instance or dict with compatible properties + font + :class:`plotly.graph_objects.table.cells.Font` + instance or dict with compatible properties + format + Sets the cell value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud + for format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.cells.Line` + instance or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud + for prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud + for suffix . + values + Cell values. `values[m][n]` represents the + value of the `n`th point in column `m`, + therefore the `values[m]` vector length for all + columns must be the same (longer vectors will + be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + + Returns + ------- + plotly.graph_objs.table.Cells + """ + return self["cells"] + + @cells.setter + def cells(self, val): + self["cells"] = val + + # columnorder + # ----------- + @property + def columnorder(self): + """ + Specifies the rendered order of the data columns; for example, + a value `2` at position `0` means that column index `0` in the + data will be rendered as the third column, as columns have an + index base of zero. + + The 'columnorder' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["columnorder"] + + @columnorder.setter + def columnorder(self, val): + self["columnorder"] = val + + # columnordersrc + # -------------- + @property + def columnordersrc(self): + """ + Sets the source reference on Chart Studio Cloud for + columnorder . + + The 'columnordersrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["columnordersrc"] + + @columnordersrc.setter + def columnordersrc(self, val): + self["columnordersrc"] = val + + # columnwidth + # ----------- + @property + def columnwidth(self): + """ + The width of columns expressed as a ratio. Columns fill the + available width in proportion of their specified column widths. + + The 'columnwidth' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["columnwidth"] + + @columnwidth.setter + def columnwidth(self, val): + self["columnwidth"] = val + + # columnwidthsrc + # -------------- + @property + def columnwidthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + columnwidth . + + The 'columnwidthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["columnwidthsrc"] + + @columnwidthsrc.setter + def columnwidthsrc(self, val): + self["columnwidthsrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this table trace . + row + If there is a layout grid, use the domain for + this row in the grid for this table trace . + x + Sets the horizontal domain of this table trace + (in plot fraction). + y + Sets the vertical domain of this table trace + (in plot fraction). + + Returns + ------- + plotly.graph_objs.table.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # header + # ------ + @property + def header(self): + """ + The 'header' property is an instance of Header + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Header` + - A dict of string/value properties that will be passed + to the Header constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + fill + :class:`plotly.graph_objects.table.header.Fill` + instance or dict with compatible properties + font + :class:`plotly.graph_objects.table.header.Font` + instance or dict with compatible properties + format + Sets the cell value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud + for format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.header.Line` + instance or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud + for prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud + for suffix . + values + Header cell values. `values[m][n]` represents + the value of the `n`th point in column `m`, + therefore the `values[m]` vector length for all + columns must be the same (longer vectors will + be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + + Returns + ------- + plotly.graph_objs.table.Header + """ + return self["header"] + + @header.setter + def header(self, val): + self["header"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.table.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.table.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + cells + :class:`plotly.graph_objects.table.Cells` instance or + dict with compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud for + columnorder . + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud for + columnwidth . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.table.Domain` instance or + dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + cells=None, + columnorder=None, + columnordersrc=None, + columnwidth=None, + columnwidthsrc=None, + customdata=None, + customdatasrc=None, + domain=None, + header=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + meta=None, + metasrc=None, + name=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new Table object + + Table view for detailed data viewing. The data are arranged in + a grid of rows and columns. Most styling can be specified for + columns, rows or individual cells. Table is using a column- + major order, ie. the grid is represented as a vector of column + vectors. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Table` + cells + :class:`plotly.graph_objects.table.Cells` instance or + dict with compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud for + columnorder . + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud for + columnwidth . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.table.Domain` instance or + dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Table + """ + super(Table, self).__init__("table") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Table +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Table`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("cells", None) + _v = cells if cells is not None else _v + if _v is not None: + self["cells"] = _v + _v = arg.pop("columnorder", None) + _v = columnorder if columnorder is not None else _v + if _v is not None: + self["columnorder"] = _v + _v = arg.pop("columnordersrc", None) + _v = columnordersrc if columnordersrc is not None else _v + if _v is not None: + self["columnordersrc"] = _v + _v = arg.pop("columnwidth", None) + _v = columnwidth if columnwidth is not None else _v + if _v is not None: + self["columnwidth"] = _v + _v = arg.pop("columnwidthsrc", None) + _v = columnwidthsrc if columnwidthsrc is not None else _v + if _v is not None: + self["columnwidthsrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("header", None) + _v = header if header is not None else _v + if _v is not None: + self["header"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "table" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_treemap.py b/packages/python/plotly/plotly/graph_objs/_treemap.py new file mode 100644 index 00000000000..784a047eeef --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_treemap.py @@ -0,0 +1,2067 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Treemap(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "treemap" + _valid_props = { + "branchvalues", + "count", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "labels", + "labelssrc", + "level", + "marker", + "maxdepth", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "parents", + "parentssrc", + "pathbar", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textsrc", + "texttemplate", + "texttemplatesrc", + "tiling", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + # branchvalues + # ------------ + @property + def branchvalues(self): + """ + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. + + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] + + Returns + ------- + Any + """ + return self["branchvalues"] + + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val + + # count + # ----- + @property + def count(self): + """ + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. + + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') + + Returns + ------- + Any + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this treemap trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap + trace (in plot fraction). + y + Sets the vertical domain of this treemap trace + (in plot fraction). + + Returns + ------- + plotly.graph_objs.treemap.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.treemap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry` and `percentParent`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.treemap.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # labels + # ------ + @property + def labels(self): + """ + Sets the labels of each of the sectors. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + # level + # ----- + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.treemap.marker.Col + orBar` instance or dict with compatible + properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + depthfade + Determines if the sector colors are faded + towards the background from the leaves up to + the headers. This option is unavailable when a + `colorscale` is present, defaults to false when + `marker.colors` is set, but otherwise defaults + to true. When set to "reversed", the fading + direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated + colors while the leaves are faded towards the + background color. + line + :class:`plotly.graph_objects.treemap.marker.Lin + e` instance or dict with compatible properties + pad + :class:`plotly.graph_objects.treemap.marker.Pad + ` instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. + + Returns + ------- + plotly.graph_objs.treemap.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # maxdepth + # -------- + @property + def maxdepth(self): + """ + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. + + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["maxdepth"] + + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented on + top left corner of a treemap graph. Please note that if a + hierarchy has multiple root nodes, this option won't have any + effect and `insidetextfont` would be used. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.treemap.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # parents + # ------- + @property + def parents(self): + """ + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. + + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["parents"] + + @parents.setter + def parents(self, val): + self["parents"] = val + + # parentssrc + # ---------- + @property + def parentssrc(self): + """ + Sets the source reference on Chart Studio Cloud for parents . + + The 'parentssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["parentssrc"] + + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val + + # pathbar + # ------- + @property + def pathbar(self): + """ + The 'pathbar' property is an instance of Pathbar + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Pathbar` + - A dict of string/value properties that will be passed + to the Pathbar constructor + + Supported dict properties: + + edgeshape + Determines which shape is used for edges + between `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used + with 3 pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. + outside the trace `domain` and with one pixel + gap. + + Returns + ------- + plotly.graph_objs.treemap.Pathbar + """ + return self["pathbar"] + + @pathbar.setter + def pathbar(self, val): + self["pathbar"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.treemap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.treemap.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Sets the positions of the `text` elements. + + 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 + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` and + `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # tiling + # ------ + @property + def tiling(self): + """ + The 'tiling' property is an instance of Tiling + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Tiling` + - A dict of string/value properties that will be passed + to the Tiling constructor + + Supported dict properties: + + flip + Determines if the positions obtained from + solver are flipped on each axis. + packing + Determines d3 treemap solver. For more info + please refer to + https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, + according to https://github.com/d3/d3-hierarchy + /blob/master/README.md#squarify_ratio this + option specifies the desired aspect ratio of + the generated rectangles. The ratio must be + specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the + ratio; for example, a ratio of two will attempt + to produce a mixture of rectangles whose + width:height ratio is either 2:1 or 1:2. When + using "squarify", unlike d3 which uses the + Golden Ratio i.e. 1.618034, Plotly applies 1 to + increase squares in treemap layouts. + + Returns + ------- + plotly.graph_objs.treemap.Tiling + """ + return self["tiling"] + + @tiling.setter + def tiling(self, val): + self["tiling"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.treemap.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + parents . + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.treemap.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + tiling + :class:`plotly.graph_objects.treemap.Tiling` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Treemap object + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Treemap` + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + domain + :class:`plotly.graph_objects.treemap.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + labels . + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + parents . + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.treemap.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + tiling + :class:`plotly.graph_objects.treemap.Tiling` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Treemap + """ + super(Treemap, self).__init__("treemap") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Treemap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Treemap`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("branchvalues", None) + _v = branchvalues if branchvalues is not None else _v + if _v is not None: + self["branchvalues"] = _v + _v = arg.pop("count", None) + _v = count if count is not None else _v + if _v is not None: + self["count"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("labels", None) + _v = labels if labels is not None else _v + if _v is not None: + self["labels"] = _v + _v = arg.pop("labelssrc", None) + _v = labelssrc if labelssrc is not None else _v + if _v is not None: + self["labelssrc"] = _v + _v = arg.pop("level", None) + _v = level if level is not None else _v + if _v is not None: + self["level"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("maxdepth", None) + _v = maxdepth if maxdepth is not None else _v + if _v is not None: + self["maxdepth"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("outsidetextfont", None) + _v = outsidetextfont if outsidetextfont is not None else _v + if _v is not None: + self["outsidetextfont"] = _v + _v = arg.pop("parents", None) + _v = parents if parents is not None else _v + if _v is not None: + self["parents"] = _v + _v = arg.pop("parentssrc", None) + _v = parentssrc if parentssrc is not None else _v + if _v is not None: + self["parentssrc"] = _v + _v = arg.pop("pathbar", None) + _v = pathbar if pathbar is not None else _v + if _v is not None: + self["pathbar"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textinfo", None) + _v = textinfo if textinfo is not None else _v + if _v is not None: + self["textinfo"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("tiling", None) + _v = tiling if tiling is not None else _v + if _v is not None: + self["tiling"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "treemap" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_violin.py b/packages/python/plotly/plotly/graph_objs/_violin.py new file mode 100644 index 00000000000..5a686070902 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_violin.py @@ -0,0 +1,2342 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Violin(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "violin" + _valid_props = { + "alignmentgroup", + "bandwidth", + "box", + "customdata", + "customdatasrc", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "jitter", + "legendgroup", + "line", + "marker", + "meanline", + "meta", + "metasrc", + "name", + "offsetgroup", + "opacity", + "orientation", + "pointpos", + "points", + "scalegroup", + "scalemode", + "selected", + "selectedpoints", + "showlegend", + "side", + "span", + "spanmode", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "width", + "x", + "x0", + "xaxis", + "xsrc", + "y", + "y0", + "yaxis", + "ysrc", + } + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # bandwidth + # --------- + @property + def bandwidth(self): + """ + Sets the bandwidth used to compute the kernel density estimate. + By default, the bandwidth is determined by Silverman's rule of + thumb. + + The 'bandwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["bandwidth"] + + @bandwidth.setter + def bandwidth(self, val): + self["bandwidth"] = val + + # box + # --- + @property + def box(self): + """ + The 'box' property is an instance of Box + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Box` + - A dict of string/value properties that will be passed + to the Box constructor + + Supported dict properties: + + fillcolor + Sets the inner box plot fill color. + line + :class:`plotly.graph_objects.violin.box.Line` + instance or dict with compatible properties + visible + Determines if an miniature box plot is drawn + inside the violins. + width + Sets the width of the inner box plots relative + to the violins' width. For example, with 1, the + inner box plots are as wide as the violins. + + Returns + ------- + plotly.graph_objs.violin.Box + """ + return self["box"] + + @box.setter + def box(self, val): + self["box"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.violin.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual violins or sample + points or the kernel density estimate or any combination of + them? + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['violins', 'points', 'kde'] joined with '+' characters + (e.g. 'violins+points') + OR exactly one of ['all'] (e.g. 'all') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # jitter + # ------ + @property + def jitter(self): + """ + Sets the amount of jitter in the sample points drawn. If 0, the + sample points align along the distribution axis. If 1, the + sample points are drawn in a random jitter of width equal to + the width of the violins. + + The 'jitter' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["jitter"] + + @jitter.setter + def jitter(self, val): + self["jitter"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of line bounding the violin(s). + width + Sets the width (in px) of line bounding the + violin(s). + + Returns + ------- + plotly.graph_objs.violin.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + line + :class:`plotly.graph_objects.violin.marker.Line + ` instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + plotly.graph_objs.violin.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meanline + # -------- + @property + def meanline(self): + """ + The 'meanline' property is an instance of Meanline + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Meanline` + - A dict of string/value properties that will be passed + to the Meanline constructor + + Supported dict properties: + + color + Sets the mean line color. + visible + Determines if a line corresponding to the + sample's mean is shown inside the violins. If + `box.visible` is turned on, the mean line is + drawn inside the inner box. Otherwise, the mean + line is drawn from one side of the violin to + other. + width + Sets the mean line width. + + Returns + ------- + plotly.graph_objs.violin.Meanline + """ + return self["meanline"] + + @meanline.setter + def meanline(self, val): + self["meanline"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. For violin traces, the name will also be used for + the position coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis is categorical. + Note that the trace name is also used as a default value for + attribute `scalegroup` (please see its description for + details). + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the violin(s). If "v" ("h"), the + distribution is visualized along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # pointpos + # -------- + @property + def pointpos(self): + """ + Sets the position of the sample points in relation to the + violins. If 0, the sample points are places over the center of + the violins. Positive (negative) values correspond to positions + to the right (left) for vertical violins and above (below) for + horizontal violins. + + The 'pointpos' property is a number and may be specified as: + - An int or float in the interval [-2, 2] + + Returns + ------- + int|float + """ + return self["pointpos"] + + @pointpos.setter + def pointpos(self, val): + self["pointpos"] = val + + # points + # ------ + @property + def points(self): + """ + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier points + are shown and points either less than 4*Q1-3*Q3 or greater than + 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all + sample points are shown If False, only the violins are shown + with no sample points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is set, + otherwise defaults to "outliers". + + The 'points' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'outliers', 'suspectedoutliers', False] + + Returns + ------- + Any + """ + return self["points"] + + @points.setter + def points(self, val): + self["points"] = val + + # scalegroup + # ---------- + @property + def scalegroup(self): + """ + If there are multiple violins that should be sized according to + to some metric (see `scalemode`), link them by providing a non- + empty group id here shared by every trace in the same group. If + a violin's `width` is undefined, `scalegroup` will default to + the trace's name. In this case, violins with the same names + will be linked together + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + # scalemode + # --------- + @property + def scalemode(self): + """ + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number of + sample points makingup each violin. + + The 'scalemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['width', 'count'] + + Returns + ------- + Any + """ + return self["scalemode"] + + @scalemode.setter + def scalemode(self, val): + self["scalemode"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.violin.selected.Ma + rker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.violin.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # side + # ---- + @property + def side(self): + """ + Determines on which side of the position value the density + function making up one half of a violin is plotted. Useful when + comparing two violin traces under "overlay" mode, where one + trace has `side` set to "positive" and the other to "negative". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['both', 'positive', 'negative'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # span + # ---- + @property + def span(self): + """ + Sets the span in data space for which the density function will + be computed. Has an effect only when `spanmode` is set to + "manual". + + The 'span' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'span[0]' property accepts values of any type + (1) The 'span[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["span"] + + @span.setter + def span(self, val): + self["span"] = val + + # spanmode + # -------- + @property + def spanmode(self): + """ + Sets the method by which the span in data space where the + density function will be computed. "soft" means the span goes + from the sample's minimum value minus two bandwidths to the + sample's maximum value plus two bandwidths. "hard" means the + span goes from the sample's minimum to its maximum value. For + custom span settings, use mode "manual" and fill in the `span` + attribute. + + The 'spanmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['soft', 'hard', 'manual'] + + Returns + ------- + Any + """ + return self["spanmode"] + + @spanmode.setter + def spanmode(self, val): + self["spanmode"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.violin.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each sample value. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.violin.unselected. + Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.violin.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the violin in data coordinates. If 0 (default + value) the width is automatically selected based on the + positions of other violin traces in the same subplot. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # x + # - + @property + def x(self): + """ + Sets the x sample data or coordinates. See overview for more + info. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Sets the x coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y sample data or coordinates. See overview for more + info. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Sets the y coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` instance or + dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.violin.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` instance or + dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set, otherwise defaults to "outliers". + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number + of sample points makingup each violin. + selected + :class:`plotly.graph_objects.violin.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + :class:`plotly.graph_objects.violin.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + bandwidth=None, + box=None, + customdata=None, + customdatasrc=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legendgroup=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Violin object + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Violin` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` instance or + dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + :class:`plotly.graph_objects.violin.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` instance or + dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set, otherwise defaults to "outliers". + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number + of sample points makingup each violin. + selected + :class:`plotly.graph_objects.violin.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + :class:`plotly.graph_objects.violin.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Violin + """ + super(Violin, self).__init__("violin") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Violin +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Violin`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + _v = alignmentgroup if alignmentgroup is not None else _v + if _v is not None: + self["alignmentgroup"] = _v + _v = arg.pop("bandwidth", None) + _v = bandwidth if bandwidth is not None else _v + if _v is not None: + self["bandwidth"] = _v + _v = arg.pop("box", None) + _v = box if box is not None else _v + if _v is not None: + self["box"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hoveron", None) + _v = hoveron if hoveron is not None else _v + if _v is not None: + self["hoveron"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("jitter", None) + _v = jitter if jitter is not None else _v + if _v is not None: + self["jitter"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("meanline", None) + _v = meanline if meanline is not None else _v + if _v is not None: + self["meanline"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("offsetgroup", None) + _v = offsetgroup if offsetgroup is not None else _v + if _v is not None: + self["offsetgroup"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("pointpos", None) + _v = pointpos if pointpos is not None else _v + if _v is not None: + self["pointpos"] = _v + _v = arg.pop("points", None) + _v = points if points is not None else _v + if _v is not None: + self["points"] = _v + _v = arg.pop("scalegroup", None) + _v = scalegroup if scalegroup is not None else _v + if _v is not None: + self["scalegroup"] = _v + _v = arg.pop("scalemode", None) + _v = scalemode if scalemode is not None else _v + if _v is not None: + self["scalemode"] = _v + _v = arg.pop("selected", None) + _v = selected if selected is not None else _v + if _v is not None: + self["selected"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("span", None) + _v = span if span is not None else _v + if _v is not None: + self["span"] = _v + _v = arg.pop("spanmode", None) + _v = spanmode if spanmode is not None else _v + if _v is not None: + self["spanmode"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("unselected", None) + _v = unselected if unselected is not None else _v + if _v is not None: + self["unselected"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "violin" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_volume.py b/packages/python/plotly/plotly/graph_objs/_volume.py new file mode 100644 index 00000000000..4580c3de507 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_volume.py @@ -0,0 +1,2507 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Volume(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "volume" + _valid_props = { + "autocolorscale", + "caps", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "contour", + "customdata", + "customdatasrc", + "flatshading", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "isomax", + "isomin", + "legendgroup", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "opacityscale", + "reversescale", + "scene", + "showlegend", + "showscale", + "slices", + "spaceframe", + "stream", + "surface", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "value", + "valuesrc", + "visible", + "x", + "xsrc", + "y", + "ysrc", + "z", + "zsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # caps + # ---- + @property + def caps(self): + """ + The 'caps' property is an instance of Caps + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Caps` + - A dict of string/value properties that will be passed + to the Caps constructor + + Supported dict properties: + + x + :class:`plotly.graph_objects.volume.caps.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.volume.caps.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.volume.caps.Z` + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.volume.Caps + """ + return self["caps"] + + @caps.setter + def caps(self, val): + self["caps"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `value`) or the bounds set in + `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `value` and if set, `cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `value`. Has no effect when `cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `value` and if set, `cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.volume. + colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.volume.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of volume.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.volume.colorbar.Ti + tle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + volume.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + volume.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.volume.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # contour + # ------- + @property + def contour(self): + """ + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Contour` + - A dict of string/value properties that will be passed + to the Contour constructor + + Supported dict properties: + + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.volume.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # flatshading + # ----------- + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.volume.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # isomax + # ------ + @property + def isomax(self): + """ + Sets the maximum boundary for iso-surface plot. + + The 'isomax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomax"] + + @isomax.setter + def isomax(self, val): + self["isomax"] = val + + # isomin + # ------ + @property + def isomin(self): + """ + Sets the minimum boundary for iso-surface plot. + + The 'isomin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomin"] + + @isomin.setter + def isomin(self, val): + self["isomin"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. + + Returns + ------- + plotly.graph_objs.volume.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.volume.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacityscale + # ------------ + @property + def opacityscale(self): + """ + Sets the opacityscale. The opacityscale must be an array + containing arrays mapping a normalized value to an opacity + value. At minimum, a mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], [0.5, 0.2], [1, + 1]]` means that higher/lower values would have higher opacity + values and those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette name string of + the following list: 'min', 'max', 'extremes' and 'uniform'. The + default is 'uniform'. + + The 'opacityscale' property accepts values of any type + + Returns + ------- + Any + """ + return self["opacityscale"] + + @opacityscale.setter + def opacityscale(self, val): + self["opacityscale"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # slices + # ------ + @property + def slices(self): + """ + The 'slices' property is an instance of Slices + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Slices` + - A dict of string/value properties that will be passed + to the Slices constructor + + Supported dict properties: + + x + :class:`plotly.graph_objects.volume.slices.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.volume.slices.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.volume.slices.Z` + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.volume.Slices + """ + return self["slices"] + + @slices.setter + def slices(self, val): + self["slices"] = val + + # spaceframe + # ---------- + @property + def spaceframe(self): + """ + The 'spaceframe' property is an instance of Spaceframe + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Spaceframe` + - A dict of string/value properties that will be passed + to the Spaceframe constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `spaceframe` + elements. The default fill value is 1 meaning + that they are entirely shaded. Applying a + `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Displays/hides tetrahedron shapes between + minimum and maximum iso-values. Often useful + when either caps or surfaces are disabled or + filled with values less than 1. + + Returns + ------- + plotly.graph_objs.volume.Spaceframe + """ + return self["spaceframe"] + + @spaceframe.setter + def spaceframe(self, val): + self["spaceframe"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.volume.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # surface + # ------- + @property + def surface(self): + """ + The 'surface' property is an instance of Surface + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Surface` + - A dict of string/value properties that will be passed + to the Surface constructor + + Supported dict properties: + + count + Sets the number of iso-surfaces between minimum + and maximum iso-values. By default this value + is 2 meaning that only minimum and maximum + surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The + default fill value of the surface is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is + `all` meaning that the rest of surface elements + would be shaded. The check options (either 1 or + 2) could be used to draw half of the squares on + the surface. Using various combinations of + capital `A`, `B`, `C`, `D` and `E` may also be + used to reduce the number of triangles on the + iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and + maximum iso-values. + + Returns + ------- + plotly.graph_objs.volume.Surface + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the 4th dimension (value) of the vertices. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valuesrc + # -------- + @property + def valuesrc(self): + """ + Sets the source reference on Chart Studio Cloud for value . + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the X coordinates of the vertices on X axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the Y coordinates of the vertices on Y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the Z coordinates of the vertices on Z axis. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` instance or + dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.volume.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.volume.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.volume.Slices` instance or + dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` instance or + dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` instance + or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on Chart Studio Cloud for + value . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legendgroup=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuesrc=None, + visible=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Volume object + + Draws volume trace between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Volume` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` instance or + dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.volume.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + lighting + :class:`plotly.graph_objects.volume.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.volume.Slices` instance or + dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` instance or + dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` instance + or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on Chart Studio Cloud for + value . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Volume + """ + super(Volume, self).__init__("volume") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Volume +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Volume`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("caps", None) + _v = caps if caps is not None else _v + if _v is not None: + self["caps"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("contour", None) + _v = contour if contour is not None else _v + if _v is not None: + self["contour"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("flatshading", None) + _v = flatshading if flatshading is not None else _v + if _v is not None: + self["flatshading"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("isomax", None) + _v = isomax if isomax is not None else _v + if _v is not None: + self["isomax"] = _v + _v = arg.pop("isomin", None) + _v = isomin if isomin is not None else _v + if _v is not None: + self["isomin"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("lighting", None) + _v = lighting if lighting is not None else _v + if _v is not None: + self["lighting"] = _v + _v = arg.pop("lightposition", None) + _v = lightposition if lightposition is not None else _v + if _v is not None: + self["lightposition"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacityscale", None) + _v = opacityscale if opacityscale is not None else _v + if _v is not None: + self["opacityscale"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("scene", None) + _v = scene if scene is not None else _v + if _v is not None: + self["scene"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("slices", None) + _v = slices if slices is not None else _v + if _v is not None: + self["slices"] = _v + _v = arg.pop("spaceframe", None) + _v = spaceframe if spaceframe is not None else _v + if _v is not None: + self["spaceframe"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("surface", None) + _v = surface if surface is not None else _v + if _v is not None: + self["surface"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valuesrc", None) + _v = valuesrc if valuesrc is not None else _v + if _v is not None: + self["valuesrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "volume" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/_waterfall.py b/packages/python/plotly/plotly/graph_objs/_waterfall.py new file mode 100644 index 00000000000..8b49ac6e48e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/_waterfall.py @@ -0,0 +1,2565 @@ +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Waterfall(_BaseTraceType): + + # class properties + # -------------------- + _parent_path_str = "" + _path_str = "waterfall" + _valid_props = { + "alignmentgroup", + "base", + "cliponaxis", + "connector", + "constraintext", + "customdata", + "customdatasrc", + "decreasing", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "increasing", + "insidetextanchor", + "insidetextfont", + "legendgroup", + "measure", + "measuresrc", + "meta", + "metasrc", + "name", + "offset", + "offsetgroup", + "offsetsrc", + "opacity", + "orientation", + "outsidetextfont", + "selectedpoints", + "showlegend", + "stream", + "text", + "textangle", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatesrc", + "totals", + "type", + "uid", + "uirevision", + "visible", + "width", + "widthsrc", + "x", + "x0", + "xaxis", + "xsrc", + "y", + "y0", + "yaxis", + "ysrc", + } + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # base + # ---- + @property + def base(self): + """ + Sets where the bar base is drawn (in position axis units). + + The 'base' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connector + # --------- + @property + def connector(self): + """ + The 'connector' property is an instance of Connector + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Connector` + - A dict of string/value properties that will be passed + to the Connector constructor + + Supported dict properties: + + line + :class:`plotly.graph_objects.waterfall.connecto + r.Line` instance or dict with compatible + properties + mode + Sets the shape of connector lines. + visible + Determines if connector lines are drawn. + + Returns + ------- + plotly.graph_objs.waterfall.Connector + """ + return self["connector"] + + @connector.setter + def connector(self, val): + self["connector"] = val + + # constraintext + # ------------- + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # decreasing + # ---------- + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.waterfall.decreasi + ng.Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.waterfall.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['name', 'x', 'y', 'text', 'initial', 'delta', 'final'] joined with '+' characters + (e.g. 'name+x') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for hoverinfo + . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.waterfall.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `initial`, `delta` and `final`. Anything contained in + tag `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for hovertext + . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # increasing + # ---------- + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.waterfall.increasi + ng.Marker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.waterfall.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + # insidetextanchor + # ---------------- + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.waterfall.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # measure + # ------- + @property + def measure(self): + """ + An array containing types of values. By default the values are + considered as 'relative'. However; it is possible to use + 'total' to compute the sums. Also 'absolute' could be applied + to reset the computed total or to declare an initial value + where needed. + + The 'measure' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["measure"] + + @measure.setter + def measure(self, val): + self["measure"] = val + + # measuresrc + # ---------- + @property + def measuresrc(self): + """ + Sets the source reference on Chart Studio Cloud for measure . + + The 'measuresrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["measuresrc"] + + @measuresrc.setter + def measuresrc(self, val): + self["measuresrc"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # offset + # ------ + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # offsetsrc + # --------- + @property + def offsetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for offset . + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.waterfall.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. + + Returns + ------- + plotly.graph_objs.waterfall.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.waterfall.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. In the + case of having multiple waterfalls, totals are computed + separately (per trace). + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'initial', 'delta', 'final'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `initial`, `delta`, `final` and `label`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # totals + # ------ + @property + def totals(self): + """ + The 'totals' property is an instance of Totals + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Totals` + - A dict of string/value properties that will be passed + to the Totals constructor + + Supported dict properties: + + marker + :class:`plotly.graph_objects.waterfall.totals.M + arker` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.waterfall.Totals + """ + return self["totals"] + + @totals.setter + def totals(self, val): + self["totals"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.waterfall.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + decreasing + :class:`plotly.graph_objects.waterfall.Decreasing` + instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `initial`, `delta` and + `final`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + increasing + :class:`plotly.graph_objects.waterfall.Increasing` + instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud for + measure . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `initial`, + `delta`, `final` and `label`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + totals + :class:`plotly.graph_objects.waterfall.Totals` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + base=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + decreasing=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + insidetextanchor=None, + insidetextfont=None, + legendgroup=None, + measure=None, + measuresrc=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + totals=None, + uid=None, + uirevision=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Waterfall object + + Draws waterfall trace which is useful graph to displays the + contribution of various elements (either positive or negative) + in a bar chart. The data visualized by the span of the bars is + set in `y` if `orientation` is set th "v" (the default) and the + labels are set in `x`. By setting `orientation` to "h", the + roles are interchanged. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Waterfall` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.waterfall.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + decreasing + :class:`plotly.graph_objects.waterfall.Decreasing` + instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + hoverinfo . + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `initial`, `delta` and + `final`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + ids . + increasing + :class:`plotly.graph_objects.waterfall.Increasing` + instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud for + measure . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + textposition . + textsrc + Sets the source reference on Chart Studio Cloud for + text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `initial`, + `delta`, `final` and `label`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + texttemplate . + totals + :class:`plotly.graph_objects.waterfall.Totals` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Waterfall + """ + super(Waterfall, self).__init__("waterfall") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Waterfall +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Waterfall`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + _v = alignmentgroup if alignmentgroup is not None else _v + if _v is not None: + self["alignmentgroup"] = _v + _v = arg.pop("base", None) + _v = base if base is not None else _v + if _v is not None: + self["base"] = _v + _v = arg.pop("cliponaxis", None) + _v = cliponaxis if cliponaxis is not None else _v + if _v is not None: + self["cliponaxis"] = _v + _v = arg.pop("connector", None) + _v = connector if connector is not None else _v + if _v is not None: + self["connector"] = _v + _v = arg.pop("constraintext", None) + _v = constraintext if constraintext is not None else _v + if _v is not None: + self["constraintext"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("decreasing", None) + _v = decreasing if decreasing is not None else _v + if _v is not None: + self["decreasing"] = _v + _v = arg.pop("dx", None) + _v = dx if dx is not None else _v + if _v is not None: + self["dx"] = _v + _v = arg.pop("dy", None) + _v = dy if dy is not None else _v + if _v is not None: + self["dy"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverinfosrc", None) + _v = hoverinfosrc if hoverinfosrc is not None else _v + if _v is not None: + self["hoverinfosrc"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("hovertextsrc", None) + _v = hovertextsrc if hovertextsrc is not None else _v + if _v is not None: + self["hovertextsrc"] = _v + _v = arg.pop("ids", None) + _v = ids if ids is not None else _v + if _v is not None: + self["ids"] = _v + _v = arg.pop("idssrc", None) + _v = idssrc if idssrc is not None else _v + if _v is not None: + self["idssrc"] = _v + _v = arg.pop("increasing", None) + _v = increasing if increasing is not None else _v + if _v is not None: + self["increasing"] = _v + _v = arg.pop("insidetextanchor", None) + _v = insidetextanchor if insidetextanchor is not None else _v + if _v is not None: + self["insidetextanchor"] = _v + _v = arg.pop("insidetextfont", None) + _v = insidetextfont if insidetextfont is not None else _v + if _v is not None: + self["insidetextfont"] = _v + _v = arg.pop("legendgroup", None) + _v = legendgroup if legendgroup is not None else _v + if _v is not None: + self["legendgroup"] = _v + _v = arg.pop("measure", None) + _v = measure if measure is not None else _v + if _v is not None: + self["measure"] = _v + _v = arg.pop("measuresrc", None) + _v = measuresrc if measuresrc is not None else _v + if _v is not None: + self["measuresrc"] = _v + _v = arg.pop("meta", None) + _v = meta if meta is not None else _v + if _v is not None: + self["meta"] = _v + _v = arg.pop("metasrc", None) + _v = metasrc if metasrc is not None else _v + if _v is not None: + self["metasrc"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("offsetgroup", None) + _v = offsetgroup if offsetgroup is not None else _v + if _v is not None: + self["offsetgroup"] = _v + _v = arg.pop("offsetsrc", None) + _v = offsetsrc if offsetsrc is not None else _v + if _v is not None: + self["offsetsrc"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("outsidetextfont", None) + _v = outsidetextfont if outsidetextfont is not None else _v + if _v is not None: + self["outsidetextfont"] = _v + _v = arg.pop("selectedpoints", None) + _v = selectedpoints if selectedpoints is not None else _v + if _v is not None: + self["selectedpoints"] = _v + _v = arg.pop("showlegend", None) + _v = showlegend if showlegend is not None else _v + if _v is not None: + self["showlegend"] = _v + _v = arg.pop("stream", None) + _v = stream if stream is not None else _v + if _v is not None: + self["stream"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textangle", None) + _v = textangle if textangle is not None else _v + if _v is not None: + self["textangle"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textinfo", None) + _v = textinfo if textinfo is not None else _v + if _v is not None: + self["textinfo"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + _v = arg.pop("textpositionsrc", None) + _v = textpositionsrc if textpositionsrc is not None else _v + if _v is not None: + self["textpositionsrc"] = _v + _v = arg.pop("textsrc", None) + _v = textsrc if textsrc is not None else _v + if _v is not None: + self["textsrc"] = _v + _v = arg.pop("texttemplate", None) + _v = texttemplate if texttemplate is not None else _v + if _v is not None: + self["texttemplate"] = _v + _v = arg.pop("texttemplatesrc", None) + _v = texttemplatesrc if texttemplatesrc is not None else _v + if _v is not None: + self["texttemplatesrc"] = _v + _v = arg.pop("totals", None) + _v = totals if totals is not None else _v + if _v is not None: + self["totals"] = _v + _v = arg.pop("uid", None) + _v = uid if uid is not None else _v + if _v is not None: + self["uid"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Read-only literals + # ------------------ + + self._props["type"] = "waterfall" + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/area/__init__.py b/packages/python/plotly/plotly/graph_objs/area/__init__.py index 5fc7fc1bb5d..0be2be714cb 100644 --- a/packages/python/plotly/plotly/graph_objs/area/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/area/__init__.py @@ -1,1082 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "area" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.area.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.area.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.area.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.area import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets themarkercolor. It accepts either a specific - color or an array of numbers that are mapped to the colorscale - relative to the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # size - # ---- - @property - def size(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot-open" to a symbol - name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "area" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets themarkercolor. It accepts - either a specific color or an array of numbers that are - mapped to the colorscale relative to the max and min - values of the array or relative to `marker.cmin` and - `marker.cmax` if set. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - opacity - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - size - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the marker size (in px). - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the marker symbol type. - Adding 100 is equivalent to appending "-open" to a - symbol name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - opacity=None, - opacitysrc=None, - size=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.area.Marker` - color - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets themarkercolor. It accepts - either a specific color or an array of numbers that are - mapped to the colorscale relative to the max and min - values of the array or relative to `marker.cmin` and - `marker.cmax` if set. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - opacity - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - size - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the marker size (in px). - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the marker symbol type. - Adding 100 is equivalent to appending "-open" to a - symbol name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.area.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.area.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.area import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.area.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.area.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "area" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.area.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.area.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.area.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.area import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Hoverlabel", "Marker", "Stream", "hoverlabel"] - -from plotly.graph_objs.area import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel"], + ["._stream.Stream", "._marker.Marker", "._hoverlabel.Hoverlabel"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/area/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/area/_hoverlabel.py new file mode 100644 index 00000000000..a4c28f033e3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/area/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "area" + _path_str = "area.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.area.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.area.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.area.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.area.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.area.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/area/_marker.py b/packages/python/plotly/plotly/graph_objs/area/_marker.py new file mode 100644 index 00000000000..79cfc127a45 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/area/_marker.py @@ -0,0 +1,461 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "area" + _path_str = "area.marker" + _valid_props = { + "color", + "colorsrc", + "opacity", + "opacitysrc", + "size", + "sizesrc", + "symbol", + "symbolsrc", + } + + # color + # ----- + @property + def color(self): + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets themarkercolor. It accepts either a specific + color or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # size + # ---- + @property + def size(self): + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot-open" to a symbol + name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets themarkercolor. It accepts + either a specific color or an array of numbers that are + mapped to the colorscale relative to the max and min + values of the array or relative to `marker.cmin` and + `marker.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + opacity + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + size + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the marker size (in px). + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the marker symbol type. + Adding 100 is equivalent to appending "-open" to a + symbol name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + opacity=None, + opacitysrc=None, + size=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.area.Marker` + color + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets themarkercolor. It accepts + either a specific color or an array of numbers that are + mapped to the colorscale relative to the max and min + values of the array or relative to `marker.cmin` and + `marker.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + opacity + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + size + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the marker size (in px). + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the marker symbol type. + Adding 100 is equivalent to appending "-open" to a + symbol name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.area.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.area.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/area/_stream.py b/packages/python/plotly/plotly/graph_objs/area/_stream.py new file mode 100644 index 00000000000..6f2caa90833 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/area/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "area" + _path_str = "area.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.area.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.area.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.area.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py index 6767e726217..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "area.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.area.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.area.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.area.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.area.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/area/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/area/hoverlabel/_font.py new file mode 100644 index 00000000000..bd4fd76140e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/area/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "area.hoverlabel" + _path_str = "area.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.area.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.area.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.area.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/__init__.py index 9ec4791e5e4..8dd080a8d46 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/__init__.py @@ -1,4133 +1,36 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.bar.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.bar.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.bar.unselected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.unselected.Textfont` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.Unselected` - marker - :class:`plotly.graph_objects.bar.unselected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.unselected.Textfont` - instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.bar.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `text`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.bar.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.bar.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - - Returns - ------- - plotly.graph_objs.bar.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.bar.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.bar.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.selected.Textfont` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.Selected` - marker - :class:`plotly.graph_objects.bar.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.selected.Textfont` - instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.bar.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Outsidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Outsidetextfont object - - Sets the font used for `text` lying outside the bar. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.Outsidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Outsidetextfont - """ - super(Outsidetextfont, self).__init__("outsidetextfont") - - # Validate arg - # ------------ - 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.bar.Outsidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Outsidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import outsidetextfont as v_outsidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_outsidetextfont.ColorValidator() - self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() - self._validators["family"] = v_outsidetextfont.FamilyValidator() - self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() - self._validators["size"] = v_outsidetextfont.SizeValidator() - self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to bar.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.bar.mar - ker.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.bar.marker.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of bar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.bar.marker.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - bar.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - bar.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.bar.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.bar.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the bars. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.bar.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.bar.marker.Line` instance - or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.bar.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.bar.marker.Line` instance - or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.bar.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `text` lying inside the bar. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.bar.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.bar.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.bar.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorY(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorY object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.ErrorY` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorY - """ - super(ErrorY, self).__init__("error_y") - - # Validate arg - # ------------ - 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.bar.ErrorY -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.ErrorY`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import error_y as v_error_y - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_y.ArrayValidator() - self._validators["arrayminus"] = v_error_y.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_y.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_y.ArraysrcValidator() - self._validators["color"] = v_error_y.ColorValidator() - self._validators["symmetric"] = v_error_y.SymmetricValidator() - self._validators["thickness"] = v_error_y.ThicknessValidator() - self._validators["traceref"] = v_error_y.TracerefValidator() - self._validators["tracerefminus"] = v_error_y.TracerefminusValidator() - self._validators["type"] = v_error_y.TypeValidator() - self._validators["value"] = v_error_y.ValueValidator() - self._validators["valueminus"] = v_error_y.ValueminusValidator() - self._validators["visible"] = v_error_y.VisibleValidator() - self._validators["width"] = v_error_y.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorX(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # copy_ystyle - # ----------- - @property - def copy_ystyle(self): - """ - The 'copy_ystyle' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["copy_ystyle"] - - @copy_ystyle.setter - def copy_ystyle(self, val): - self["copy_ystyle"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorX object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.ErrorX` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorX - """ - super(ErrorX, self).__init__("error_x") - - # Validate arg - # ------------ - 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.bar.ErrorX -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.ErrorX`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar import error_x as v_error_x - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_x.ArrayValidator() - self._validators["arrayminus"] = v_error_x.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_x.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_x.ArraysrcValidator() - self._validators["color"] = v_error_x.ColorValidator() - self._validators["copy_ystyle"] = v_error_x.CopyYstyleValidator() - self._validators["symmetric"] = v_error_x.SymmetricValidator() - self._validators["thickness"] = v_error_x.ThicknessValidator() - self._validators["traceref"] = v_error_x.TracerefValidator() - self._validators["tracerefminus"] = v_error_x.TracerefminusValidator() - self._validators["type"] = v_error_x.TypeValidator() - self._validators["value"] = v_error_x.ValueValidator() - self._validators["valueminus"] = v_error_x.ValueminusValidator() - self._validators["visible"] = v_error_x.VisibleValidator() - self._validators["width"] = v_error_x.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("copy_ystyle", None) - self["copy_ystyle"] = copy_ystyle if copy_ystyle is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ErrorX", - "ErrorY", - "Hoverlabel", - "Insidetextfont", - "Marker", - "Outsidetextfont", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.bar import unselected -from plotly.graph_objs.bar import selected -from plotly.graph_objs.bar import marker -from plotly.graph_objs.bar import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._outsidetextfont import Outsidetextfont + from ._marker import Marker + from ._insidetextfont import Insidetextfont + from ._hoverlabel import Hoverlabel + from ._error_y import ErrorY + from ._error_x import ErrorX + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._outsidetextfont.Outsidetextfont", + "._marker.Marker", + "._insidetextfont.Insidetextfont", + "._hoverlabel.Hoverlabel", + "._error_y.ErrorY", + "._error_x.ErrorX", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/bar/_error_x.py b/packages/python/plotly/plotly/graph_objs/bar/_error_x.py new file mode 100644 index 00000000000..401704e31c3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_error_x.py @@ -0,0 +1,628 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorX(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.error_x" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_ystyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # copy_ystyle + # ----------- + @property + def copy_ystyle(self): + """ + The 'copy_ystyle' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["copy_ystyle"] + + @copy_ystyle.setter + def copy_ystyle(self, val): + self["copy_ystyle"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_ystyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorX object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.ErrorX` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorX + """ + super(ErrorX, self).__init__("error_x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.ErrorX +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.ErrorX`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("copy_ystyle", None) + _v = copy_ystyle if copy_ystyle is not None else _v + if _v is not None: + self["copy_ystyle"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_error_y.py b/packages/python/plotly/plotly/graph_objs/bar/_error_y.py new file mode 100644 index 00000000000..6d1e12a5cf9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_error_y.py @@ -0,0 +1,600 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorY(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.error_y" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorY object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.ErrorY` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorY + """ + super(ErrorY, self).__init__("error_y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.ErrorY +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.ErrorY`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/bar/_hoverlabel.py new file mode 100644 index 00000000000..839637f848c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.bar.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/bar/_insidetextfont.py new file mode 100644 index 00000000000..485641895d5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `text` lying inside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_marker.py b/packages/python/plotly/plotly/graph_objs/bar/_marker.py new file mode 100644 index 00000000000..302164eda17 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_marker.py @@ -0,0 +1,1051 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to bar.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.bar.mar + ker.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.bar.marker.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of bar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.bar.marker.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + bar.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + bar.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.bar.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.bar.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the bars. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.bar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.bar.marker.Line` instance + or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.bar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.bar.marker.Line` instance + or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_outsidetextfont.py b/packages/python/plotly/plotly/graph_objs/bar/_outsidetextfont.py new file mode 100644 index 00000000000..1d7ef6e93a7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_outsidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.outsidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `text` lying outside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Outsidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_selected.py b/packages/python/plotly/plotly/graph_objs/bar/_selected.py new file mode 100644 index 00000000000..9e05264ada6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_selected.py @@ -0,0 +1,143 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + plotly.graph_objs.bar.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.bar.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.bar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.selected.Textfont` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Selected` + marker + :class:`plotly.graph_objects.bar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.selected.Textfont` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_stream.py b/packages/python/plotly/plotly/graph_objs/bar/_stream.py new file mode 100644 index 00000000000..f639bdbf3db --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_textfont.py b/packages/python/plotly/plotly/graph_objs/bar/_textfont.py new file mode 100644 index 00000000000..affc5ab2a0c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_textfont.py @@ -0,0 +1,328 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `text`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/_unselected.py b/packages/python/plotly/plotly/graph_objs/bar/_unselected.py new file mode 100644 index 00000000000..c92949b9ffd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/_unselected.py @@ -0,0 +1,147 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar" + _path_str = "bar.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.bar.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.bar.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.bar.unselected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.unselected.Textfont` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Unselected` + marker + :class:`plotly.graph_objects.bar.unselected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.unselected.Textfont` + instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py index 47e1f9a2b75..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.bar.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/_font.py new file mode 100644 index 00000000000..182f596e052 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.hoverlabel" + _path_str = "bar.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py index 6d5f32e033b..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py @@ -1,2506 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to bar.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.bar.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.bar.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.bar.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.bar.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.bar.marker.col - orbar.tickformatstopdefaults), sets the default property values - to use for elements of bar.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.bar.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.bar.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use bar.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use bar.marker.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.bar.marker.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.bar.ma - rker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - bar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.bar.marker.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use bar.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use bar.marker.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.bar.marker.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.bar.ma - rker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - bar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.bar.marker.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use bar.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use bar.marker.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.bar.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.bar.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py new file mode 100644 index 00000000000..52c8dfc11d2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py @@ -0,0 +1,1939 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.marker" + _path_str = "bar.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.bar.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.bar.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.bar.marker.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of bar.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use bar.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use bar.marker.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.bar.marker.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.bar.ma + rker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + bar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.bar.marker.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use bar.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use bar.marker.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.bar.marker.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.bar.ma + rker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + bar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.bar.marker.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use bar.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use bar.marker.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/_line.py b/packages/python/plotly/plotly/graph_objs/bar/marker/_line.py new file mode 100644 index 00000000000..b9ab25dbd97 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.marker" + _path_str = "bar.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to bar.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py index 2b45347d0cf..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.bar.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.bar.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.marker.col - orbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.bar.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.bar.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.bar.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..2e176ce37d3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.marker.colorbar" + _path_str = "bar.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..79cc835b43b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.marker.colorbar" + _path_str = "bar.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.marker.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_title.py new file mode 100644 index 00000000000..db1d25edfb4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.marker.colorbar" + _path_str = "bar.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py index 9eccf4c7e5f..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.bar.marker.col - orbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.bar.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..a201578c4b5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.marker.colorbar.title" + _path_str = "bar.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.marker.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py index 7eae5c02bc3..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py @@ -1,310 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.bar.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.bar.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/bar/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/bar/selected/_marker.py new file mode 100644 index 00000000000..999361edffe --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/selected/_marker.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.selected" + _path_str = "bar.selected.marker" + _valid_props = {"color", "opacity"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/bar/selected/_textfont.py new file mode 100644 index 00000000000..2589b7025c0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.selected" + _path_str = "bar.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py index 224457087d5..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py @@ -1,319 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.unselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.bar.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "bar.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.bar.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.bar.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.bar.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.bar.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/bar/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/bar/unselected/_marker.py new file mode 100644 index 00000000000..3beace7627d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/unselected/_marker.py @@ -0,0 +1,171 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.unselected" + _path_str = "bar.unselected.marker" + _valid_props = {"color", "opacity"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/bar/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/bar/unselected/_textfont.py new file mode 100644 index 00000000000..05bedca940d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/bar/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "bar.unselected" + _path_str = "bar.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.bar.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py index 23c43b9877a..54ebb36a728 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py @@ -1,1971 +1,26 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.barpolar.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.barpolar.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.barpolar.unselected.Marker - ` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.barpolar.unselected.Textfo - nt` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.Unselected` - marker - :class:`plotly.graph_objects.barpolar.unselected.Marker - ` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.barpolar.unselected.Textfo - nt` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.barpolar.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.barpolar.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - - Returns - ------- - plotly.graph_objs.barpolar.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.barpolar.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.barpolar.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.barpolar.selected.Textfont - ` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.Selected` - marker - :class:`plotly.graph_objects.barpolar.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.barpolar.selected.Textfont - ` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.barpolar.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to barpolar.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.barpola - r.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.barpolar.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - barpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.barpolar.marker.co - lorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - barpolar.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - barpolar.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.barpolar.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.barpolar.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the bars. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.barpolar.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.barpolar.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.barpolar.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.barpolar.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.barpolar.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.barpolar.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.barpolar.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Marker", - "Selected", - "Stream", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.barpolar import unselected -from plotly.graph_objs.barpolar import selected -from plotly.graph_objs.barpolar import marker -from plotly.graph_objs.barpolar import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/barpolar/_hoverlabel.py new file mode 100644 index 00000000000..029ac2bd7c1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar" + _path_str = "barpolar.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.barpolar.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/_marker.py b/packages/python/plotly/plotly/graph_objs/barpolar/_marker.py new file mode 100644 index 00000000000..d13dd8d862f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/_marker.py @@ -0,0 +1,1053 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar" + _path_str = "barpolar.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to barpolar.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.barpola + r.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.barpolar.marker.colorbar.tickformatstopdefaul + ts), sets the default property values to use + for elements of + barpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.barpolar.marker.co + lorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + barpolar.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + barpolar.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.barpolar.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.barpolar.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the bars. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.barpolar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.barpolar.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.barpolar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.barpolar.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/_selected.py b/packages/python/plotly/plotly/graph_objs/barpolar/_selected.py new file mode 100644 index 00000000000..90d26db6da2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/_selected.py @@ -0,0 +1,144 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar" + _path_str = "barpolar.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + plotly.graph_objs.barpolar.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.barpolar.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.barpolar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.selected.Textfont + ` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Selected` + marker + :class:`plotly.graph_objects.barpolar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.selected.Textfont + ` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/_stream.py b/packages/python/plotly/plotly/graph_objs/barpolar/_stream.py new file mode 100644 index 00000000000..3e7c1de965c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar" + _path_str = "barpolar.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/_unselected.py b/packages/python/plotly/plotly/graph_objs/barpolar/_unselected.py new file mode 100644 index 00000000000..166fd3325d2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/_unselected.py @@ -0,0 +1,147 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar" + _path_str = "barpolar.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.barpolar.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.barpolar.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.barpolar.unselected.Marker + ` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.unselected.Textfo + nt` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Unselected` + marker + :class:`plotly.graph_objects.barpolar.unselected.Marker + ` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.unselected.Textfo + nt` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py index 2a73d38cd75..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.barpolar.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/_font.py new file mode 100644 index 00000000000..ac176f83014 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.hoverlabel" + _path_str = "barpolar.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py index d9197ef5a38..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py @@ -1,2508 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to barpolar.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.barpolar.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.barpolar.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.barpolar.marke - r.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - barpolar.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.barpolar.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use barpolar.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use barpolar.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.barpolar.marker - .colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.barpol - ar.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - barpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.barpolar.marker.colorbar.T - itle` instance or dict with compatible properties - titlefont - Deprecated: Please use - barpolar.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - barpolar.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.barpolar.marker - .colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.barpol - ar.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - barpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.barpolar.marker.colorbar.T - itle` instance or dict with compatible properties - titlefont - Deprecated: Please use - barpolar.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - barpolar.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.barpolar.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.barpolar.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py new file mode 100644 index 00000000000..1eca08af27d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.marker" + _path_str = "barpolar.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.barpolar.marke + r.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + barpolar.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use barpolar.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use barpolar.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.barpolar.marker + .colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.barpol + ar.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + barpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.barpolar.marker.colorbar.T + itle` instance or dict with compatible properties + titlefont + Deprecated: Please use + barpolar.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + barpolar.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.barpolar.marker + .colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.barpol + ar.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + barpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.barpolar.marker.colorbar.T + itle` instance or dict with compatible properties + titlefont + Deprecated: Please use + barpolar.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + barpolar.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/_line.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/_line.py new file mode 100644 index 00000000000..a65394895c0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.marker" + _path_str = "barpolar.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to barpolar.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py index d39c8c8b1db..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.barpolar.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.barpolar.marke - r.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.barpolar.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.barpolar.marke - r.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.barpolar.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.barpolar.marke - r.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.barpolar.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.barpolar.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..2621f91c7d7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.marker.colorbar" + _path_str = "barpolar.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..9a3c14f8d00 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.marker.colorbar" + _path_str = "barpolar.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_title.py new file mode 100644 index 00000000000..c2bd9453249 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.marker.colorbar" + _path_str = "barpolar.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py index d9f08fdd18a..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.barpolar.marke - r.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.barpolar.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..885ebbc61a4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.marker.colorbar.title" + _path_str = "barpolar.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py index f828d37670f..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py @@ -1,310 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.barpolar.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.barpolar.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/barpolar/selected/_marker.py new file mode 100644 index 00000000000..00c3b94f608 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/selected/_marker.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.selected" + _path_str = "barpolar.selected.marker" + _valid_props = {"color", "opacity"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/barpolar/selected/_textfont.py new file mode 100644 index 00000000000..50b2c42c6cd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.selected" + _path_str = "barpolar.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py index c8be9004256..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py @@ -1,319 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.unselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.barpolar.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "barpolar.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.barpolar.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.barpolar.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.barpolar.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.barpolar.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/_marker.py new file mode 100644 index 00000000000..c7ea2fb1e46 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/_marker.py @@ -0,0 +1,171 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.unselected" + _path_str = "barpolar.unselected.marker" + _valid_props = {"color", "opacity"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/_textfont.py new file mode 100644 index 00000000000..5d09d6bc17f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "barpolar.unselected" + _path_str = "barpolar.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.barpolar.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/__init__.py b/packages/python/plotly/plotly/graph_objs/box/__init__.py index 1fbe5c5dd38..e50dbc5239a 100644 --- a/packages/python/plotly/plotly/graph_objs/box/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/__init__.py @@ -1,1473 +1,28 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.box.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.box.unselected.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.box.Unselected` - marker - :class:`plotly.graph_objects.box.unselected.Marker` - instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.box.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.box.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.box.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.box.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.box.selected.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.box.Selected` - marker - :class:`plotly.graph_objects.box.selected.Marker` - instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.box.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. - - Returns - ------- - plotly.graph_objs.box.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # outliercolor - # ------------ - @property - def outliercolor(self): - """ - Sets the color of the outlier sample points. - - The 'outliercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outliercolor"] - - @outliercolor.setter - def outliercolor(self, val): - self["outliercolor"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - Returns - ------- - Any - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - line - :class:`plotly.graph_objects.box.marker.Line` instance - or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - """ - - def __init__( - self, - arg=None, - color=None, - line=None, - opacity=None, - outliercolor=None, - size=None, - symbol=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.box.Marker` - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - line - :class:`plotly.graph_objects.box.marker.Line` instance - or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.box.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["outliercolor"] = v_marker.OutliercolorValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outliercolor", None) - self["outliercolor"] = outliercolor if outliercolor is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of line bounding the box(es). - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of line bounding the box(es). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the box(es). - """ - - def __init__(self, arg=None, color=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.box.Line` - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the box(es). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.box.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.box.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.box.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.box.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.box.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.box import unselected -from plotly.graph_objs.box import selected -from plotly.graph_objs.box import marker -from plotly.graph_objs.box import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/box/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/box/_hoverlabel.py new file mode 100644 index 00000000000..4a2a6bbf23c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box" + _path_str = "box.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.box.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/_line.py b/packages/python/plotly/plotly/graph_objs/box/_line.py new file mode 100644 index 00000000000..a78d54f5433 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/_line.py @@ -0,0 +1,164 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box" + _path_str = "box.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of line bounding the box(es). + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + """ + + def __init__(self, arg=None, color=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.box.Line` + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/_marker.py b/packages/python/plotly/plotly/graph_objs/box/_marker.py new file mode 100644 index 00000000000..decb3b27ea7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/_marker.py @@ -0,0 +1,430 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box" + _path_str = "box.marker" + _valid_props = {"color", "line", "opacity", "outliercolor", "size", "symbol"} + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + outliercolor + Sets the border line color of the outlier + sample points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the + outlier sample points. + width + Sets the width (in px) of the lines bounding + the marker points. + + Returns + ------- + plotly.graph_objs.box.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # outliercolor + # ------------ + @property + def outliercolor(self): + """ + Sets the color of the outlier sample points. + + The 'outliercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outliercolor"] + + @outliercolor.setter + def outliercolor(self, val): + self["outliercolor"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + + Returns + ------- + Any + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + line + :class:`plotly.graph_objects.box.marker.Line` instance + or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + """ + + def __init__( + self, + arg=None, + color=None, + line=None, + opacity=None, + outliercolor=None, + size=None, + symbol=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Marker` + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + line + :class:`plotly.graph_objects.box.marker.Line` instance + or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("outliercolor", None) + _v = outliercolor if outliercolor is not None else _v + if _v is not None: + self["outliercolor"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/_selected.py b/packages/python/plotly/plotly/graph_objs/box/_selected.py new file mode 100644 index 00000000000..afa9a7a5c95 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/_selected.py @@ -0,0 +1,109 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box" + _path_str = "box.selected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.box.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.box.selected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Selected` + marker + :class:`plotly.graph_objects.box.selected.Marker` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/_stream.py b/packages/python/plotly/plotly/graph_objs/box/_stream.py new file mode 100644 index 00000000000..9c89538a07d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box" + _path_str = "box.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/_unselected.py b/packages/python/plotly/plotly/graph_objs/box/_unselected.py new file mode 100644 index 00000000000..19727af1aad --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/_unselected.py @@ -0,0 +1,113 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box" + _path_str = "box.unselected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.box.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.box.unselected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.Unselected` + marker + :class:`plotly.graph_objects.box.unselected.Marker` + instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py index 92a3d9325b4..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.box.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.box.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/box/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/box/hoverlabel/_font.py new file mode 100644 index 00000000000..996ebeb86b5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box.hoverlabel" + _path_str = "box.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py index 77cfb8e4fbf..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py @@ -1,289 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # outliercolor - # ------------ - @property - def outliercolor(self): - """ - Sets the border line color of the outlier sample points. - Defaults to marker.color - - The 'outliercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outliercolor"] - - @outliercolor.setter - def outliercolor(self, val): - self["outliercolor"] = val - - # outlierwidth - # ------------ - @property - def outlierwidth(self): - """ - Sets the border line width (in px) of the outlier sample - points. - - The 'outlierwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlierwidth"] - - @outlierwidth.setter - def outlierwidth(self, val): - self["outlierwidth"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - outliercolor - Sets the border line color of the outlier sample - points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the outlier - sample points. - width - Sets the width (in px) of the lines bounding the marker - points. - """ - - def __init__( - self, - arg=None, - color=None, - outliercolor=None, - outlierwidth=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.box.marker.Line` - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - outliercolor - Sets the border line color of the outlier sample - points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the outlier - sample points. - width - Sets the width (in px) of the lines bounding the marker - points. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.box.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["outliercolor"] = v_line.OutliercolorValidator() - self._validators["outlierwidth"] = v_line.OutlierwidthValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("outliercolor", None) - self["outliercolor"] = outliercolor if outliercolor is not None else _v - _v = arg.pop("outlierwidth", None) - self["outlierwidth"] = outlierwidth if outlierwidth is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/box/marker/_line.py b/packages/python/plotly/plotly/graph_objs/box/marker/_line.py new file mode 100644 index 00000000000..3d09b76b44a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/marker/_line.py @@ -0,0 +1,287 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box.marker" + _path_str = "box.marker.line" + _valid_props = {"color", "outliercolor", "outlierwidth", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # outliercolor + # ------------ + @property + def outliercolor(self): + """ + Sets the border line color of the outlier sample points. + Defaults to marker.color + + The 'outliercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outliercolor"] + + @outliercolor.setter + def outliercolor(self, val): + self["outliercolor"] = val + + # outlierwidth + # ------------ + @property + def outlierwidth(self): + """ + Sets the border line width (in px) of the outlier sample + points. + + The 'outlierwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlierwidth"] + + @outlierwidth.setter + def outlierwidth(self, val): + self["outlierwidth"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + outliercolor + Sets the border line color of the outlier sample + points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the outlier + sample points. + width + Sets the width (in px) of the lines bounding the marker + points. + """ + + def __init__( + self, + arg=None, + color=None, + outliercolor=None, + outlierwidth=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.box.marker.Line` + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + outliercolor + Sets the border line color of the outlier sample + points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the outlier + sample points. + width + Sets the width (in px) of the lines bounding the marker + points. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("outliercolor", None) + _v = outliercolor if outliercolor is not None else _v + if _v is not None: + self["outliercolor"] = _v + _v = arg.pop("outlierwidth", None) + _v = outlierwidth if outlierwidth is not None else _v + if _v is not None: + self["outlierwidth"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py index 55ec4d70f33..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py @@ -1,196 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.box.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.box.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/box/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/box/selected/_marker.py new file mode 100644 index 00000000000..94ac052ae07 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box.selected" + _path_str = "box.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py index 1bbc01c2ca1..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py @@ -1,205 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "box.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.box.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.box.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.box.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.box.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/box/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/box/unselected/_marker.py new file mode 100644 index 00000000000..2a2705a3db1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/box/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "box.unselected" + _path_str = "box.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.box.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py index ff0473444a9..12b1a76d937 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py @@ -1,1156 +1,25 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.candlestick.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.candlestick.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of line bounding the box(es). Note that - this style setting can also be set per direction via - `increasing.line.width` and `decreasing.line.width`. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - width - Sets the width (in px) of line bounding the box(es). - Note that this style setting can also be set per - direction via `increasing.line.width` and - `decreasing.line.width`. - """ - - def __init__(self, arg=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.candlestick.Line` - width - Sets the width (in px) of line bounding the box(es). - Note that this style setting can also be set per - direction via `increasing.line.width` and - `decreasing.line.width`. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.candlestick.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick import line as v_line - - # Initialize validators - # --------------------- - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Increasing(_BaseTraceHierarchyType): - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.increasing.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - - Returns - ------- - plotly.graph_objs.candlestick.increasing.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - line - :class:`plotly.graph_objects.candlestick.increasing.Lin - e` instance or dict with compatible properties - """ - - def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): - """ - Construct a new Increasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.candlestick.Increasing` - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - line - :class:`plotly.graph_objects.candlestick.increasing.Lin - e` instance or dict with compatible properties - - Returns - ------- - Increasing - """ - super(Increasing, self).__init__("increasing") - - # Validate arg - # ------------ - 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.candlestick.Increasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.Increasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick import increasing as v_increasing - - # Initialize validators - # --------------------- - self._validators["fillcolor"] = v_increasing.FillcolorValidator() - self._validators["line"] = v_increasing.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.candlestick.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # split - # ----- - @property - def split(self): - """ - Show hover information (open, close, high, low) in separate - labels. - - The 'split' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["split"] - - @split.setter - def split(self, val): - self["split"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - split - Show hover information (open, close, high, low) in - separate labels. - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - split=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.candlestick.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - split - Show hover information (open, close, high, low) in - separate labels. - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.candlestick.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - self._validators["split"] = v_hoverlabel.SplitValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - _v = arg.pop("split", None) - self["split"] = split if split is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Decreasing(_BaseTraceHierarchyType): - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.candlestick.decreasing.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - - Returns - ------- - plotly.graph_objs.candlestick.decreasing.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - line - :class:`plotly.graph_objects.candlestick.decreasing.Lin - e` instance or dict with compatible properties - """ - - def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): - """ - Construct a new Decreasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.candlestick.Decreasing` - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - line - :class:`plotly.graph_objects.candlestick.decreasing.Lin - e` instance or dict with compatible properties - - Returns - ------- - Decreasing - """ - super(Decreasing, self).__init__("decreasing") - - # Validate arg - # ------------ - 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.candlestick.Decreasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.Decreasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick import decreasing as v_decreasing - - # Initialize validators - # --------------------- - self._validators["fillcolor"] = v_decreasing.FillcolorValidator() - self._validators["line"] = v_decreasing.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Decreasing", - "Hoverlabel", - "Increasing", - "Line", - "Stream", - "decreasing", - "hoverlabel", - "increasing", -] - -from plotly.graph_objs.candlestick import increasing -from plotly.graph_objs.candlestick import hoverlabel -from plotly.graph_objs.candlestick import decreasing +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._line import Line + from ._increasing import Increasing + from ._hoverlabel import Hoverlabel + from ._decreasing import Decreasing + from . import increasing + from . import hoverlabel + from . import decreasing +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".increasing", ".hoverlabel", ".decreasing"], + [ + "._stream.Stream", + "._line.Line", + "._increasing.Increasing", + "._hoverlabel.Hoverlabel", + "._decreasing.Decreasing", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/_decreasing.py b/packages/python/plotly/plotly/graph_objs/candlestick/_decreasing.py new file mode 100644 index 00000000000..f67fbc4c355 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/_decreasing.py @@ -0,0 +1,182 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Decreasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick" + _path_str = "candlestick.decreasing" + _valid_props = {"fillcolor", "line"} + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.decreasing.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). + + Returns + ------- + plotly.graph_objs.candlestick.decreasing.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.decreasing.Lin + e` instance or dict with compatible properties + """ + + def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): + """ + Construct a new Decreasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Decreasing` + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.decreasing.Lin + e` instance or dict with compatible properties + + Returns + ------- + Decreasing + """ + super(Decreasing, self).__init__("decreasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.Decreasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Decreasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/candlestick/_hoverlabel.py new file mode 100644 index 00000000000..688efe38bd1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/_hoverlabel.py @@ -0,0 +1,535 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick" + _path_str = "candlestick.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "split", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.candlestick.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # split + # ----- + @property + def split(self): + """ + Show hover information (open, close, high, low) in separate + labels. + + The 'split' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["split"] + + @split.setter + def split(self, val): + self["split"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + split + Show hover information (open, close, high, low) in + separate labels. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + split=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + split + Show hover information (open, close, high, low) in + separate labels. + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + _v = arg.pop("split", None) + _v = split if split is not None else _v + if _v is not None: + self["split"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/_increasing.py b/packages/python/plotly/plotly/graph_objs/candlestick/_increasing.py new file mode 100644 index 00000000000..5a3ffbf107f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/_increasing.py @@ -0,0 +1,182 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Increasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick" + _path_str = "candlestick.increasing" + _valid_props = {"fillcolor", "line"} + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.increasing.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). + + Returns + ------- + plotly.graph_objs.candlestick.increasing.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.increasing.Lin + e` instance or dict with compatible properties + """ + + def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): + """ + Construct a new Increasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Increasing` + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.increasing.Lin + e` instance or dict with compatible properties + + Returns + ------- + Increasing + """ + super(Increasing, self).__init__("increasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.Increasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Increasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/_line.py b/packages/python/plotly/plotly/graph_objs/candlestick/_line.py new file mode 100644 index 00000000000..c322026e412 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/_line.py @@ -0,0 +1,106 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick" + _path_str = "candlestick.line" + _valid_props = {"width"} + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). Note that + this style setting can also be set per direction via + `increasing.line.width` and `decreasing.line.width`. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + width + Sets the width (in px) of line bounding the box(es). + Note that this style setting can also be set per + direction via `increasing.line.width` and + `decreasing.line.width`. + """ + + def __init__(self, arg=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.candlestick.Line` + width + Sets the width (in px) of line bounding the box(es). + Note that this style setting can also be set per + direction via `increasing.line.width` and + `decreasing.line.width`. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/_stream.py b/packages/python/plotly/plotly/graph_objs/candlestick/_stream.py new file mode 100644 index 00000000000..2f29b9a1967 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick" + _path_str = "candlestick.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py index f8810c3003e..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py @@ -1,169 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of line bounding the box(es). - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of line bounding the box(es). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick.decreasing" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the box(es). - """ - - def __init__(self, arg=None, color=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.candlestick.decreasing.Line` - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the box(es). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.candlestick.decreasing.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.decreasing.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick.decreasing import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/_line.py b/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/_line.py new file mode 100644 index 00000000000..65a710b70f5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick.decreasing" + _path_str = "candlestick.decreasing.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of line bounding the box(es). + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + """ + + def __init__(self, arg=None, color=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.candlestick.decreasing.Line` + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.decreasing.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.decreasing.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py index d0e6d7e5f98..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.candlestick.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.candlestick.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/_font.py new file mode 100644 index 00000000000..45194074af4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick.hoverlabel" + _path_str = "candlestick.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py index 09e2aa04027..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py @@ -1,169 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of line bounding the box(es). - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of line bounding the box(es). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "candlestick.increasing" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the box(es). - """ - - def __init__(self, arg=None, color=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.candlestick.increasing.Line` - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the box(es). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.candlestick.increasing.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.candlestick.increasing.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.candlestick.increasing import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/increasing/_line.py b/packages/python/plotly/plotly/graph_objs/candlestick/increasing/_line.py new file mode 100644 index 00000000000..2a073e55ad1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/candlestick/increasing/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "candlestick.increasing" + _path_str = "candlestick.increasing.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of line bounding the box(es). + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + """ + + def __init__(self, arg=None, color=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.candlestick.increasing.Line` + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.candlestick.increasing.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.increasing.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/__init__.py index 7f426ae632c..969cbc0297f 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/__init__.py @@ -1,4853 +1,17 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.carpet.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.carpet.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - The default font used for axis & tick labels on this carpet - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.carpet.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.carpet.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Baxis(_BaseTraceHierarchyType): - - # arraydtick - # ---------- - @property - def arraydtick(self): - """ - The stride between grid lines along the axis - - The 'arraydtick' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["arraydtick"] - - @arraydtick.setter - def arraydtick(self, val): - self["arraydtick"] = val - - # arraytick0 - # ---------- - @property - def arraytick0(self): - """ - The starting index of grid lines along the axis - - The 'arraytick0' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["arraytick0"] - - @arraytick0.setter - def arraytick0(self, val): - self["arraytick0"] = val - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # cheatertype - # ----------- - @property - def cheatertype(self): - """ - The 'cheatertype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['index', 'value'] - - Returns - ------- - Any - """ - return self["cheatertype"] - - @cheatertype.setter - def cheatertype(self, val): - self["cheatertype"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - The stride between grid lines along the axis - - The 'dtick' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # endline - # ------- - @property - def endline(self): - """ - Determines whether or not a line is drawn at along the final - value of this axis. If True, the end line is drawn on top of - the grid lines. - - The 'endline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["endline"] - - @endline.setter - def endline(self, val): - self["endline"] = val - - # endlinecolor - # ------------ - @property - def endlinecolor(self): - """ - Sets the line color of the end line. - - The 'endlinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["endlinecolor"] - - @endlinecolor.setter - def endlinecolor(self, val): - self["endlinecolor"] = val - - # endlinewidth - # ------------ - @property - def endlinewidth(self): - """ - Sets the width (in px) of the end line. - - The 'endlinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["endlinewidth"] - - @endlinewidth.setter - def endlinewidth(self, val): - self["endlinewidth"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # fixedrange - # ---------- - @property - def fixedrange(self): - """ - Determines whether or not this axis is zoom-able. If true, then - zoom is disabled. - - The 'fixedrange' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["fixedrange"] - - @fixedrange.setter - def fixedrange(self, val): - self["fixedrange"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the axis line color. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the axis line. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # labelpadding - # ------------ - @property - def labelpadding(self): - """ - Extra padding between label and the axis - - The 'labelpadding' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - - Returns - ------- - int - """ - return self["labelpadding"] - - @labelpadding.setter - def labelpadding(self, val): - self["labelpadding"] = val - - # labelprefix - # ----------- - @property - def labelprefix(self): - """ - Sets a axis label prefix. - - The 'labelprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelprefix"] - - @labelprefix.setter - def labelprefix(self, val): - self["labelprefix"] = val - - # labelsuffix - # ----------- - @property - def labelsuffix(self): - """ - Sets a axis label suffix. - - The 'labelsuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelsuffix"] - - @labelsuffix.setter - def labelsuffix(self, val): - self["labelsuffix"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # minorgridcolor - # -------------- - @property - def minorgridcolor(self): - """ - Sets the color of the grid lines. - - The 'minorgridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["minorgridcolor"] - - @minorgridcolor.setter - def minorgridcolor(self, val): - self["minorgridcolor"] = val - - # minorgridcount - # -------------- - @property - def minorgridcount(self): - """ - Sets the number of minor grid ticks per major grid tick - - The 'minorgridcount' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["minorgridcount"] - - @minorgridcount.setter - def minorgridcount(self, val): - self["minorgridcount"] = val - - # minorgridwidth - # -------------- - @property - def minorgridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'minorgridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["minorgridwidth"] - - @minorgridwidth.setter - def minorgridwidth(self, val): - self["minorgridwidth"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether axis labels are drawn on the low side, the - high side, both, or neither side of the axis. - - The 'showticklabels' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['start', 'end', 'both', 'none'] - - Returns - ------- - Any - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # startline - # --------- - @property - def startline(self): - """ - Determines whether or not a line is drawn at along the starting - value of this axis. If True, the start line is drawn on top of - the grid lines. - - The 'startline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["startline"] - - @startline.setter - def startline(self, val): - self["startline"] = val - - # startlinecolor - # -------------- - @property - def startlinecolor(self): - """ - Sets the line color of the start line. - - The 'startlinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["startlinecolor"] - - @startlinecolor.setter - def startlinecolor(self, val): - self["startlinecolor"] = val - - # startlinewidth - # -------------- - @property - def startlinewidth(self): - """ - Sets the width (in px) of the start line. - - The 'startlinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["startlinewidth"] - - @startlinewidth.setter - def startlinewidth(self, val): - self["startlinewidth"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - The starting index of grid lines along the axis - - The 'tick0' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.carpet.baxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: We add one item to d3's date formatter: "%{n}f" for - fractional seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.carpet.baxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.carpet.baxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.carpet.baxis.tickformatstopdefaults), sets - the default property values to use for elements of - carpet.baxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.carpet.baxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.baxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - Note that this used to be set by the now - deprecated `titleoffset` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.carpet.baxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use carpet.baxis.title.font instead. Sets - this axis' title font. Note that the title's font used to be - set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.baxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleoffset - # ----------- - @property - def titleoffset(self): - """ - Deprecated: Please use carpet.baxis.title.offset instead. An - additional amount by which to offset the title from the tick - labels, given in pixels. Note that this used to be set by the - now deprecated `titleoffset` attribute. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - - """ - return self["titleoffset"] - - @titleoffset.setter - def titleoffset(self, val): - self["titleoffset"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at along the - final value of this axis. If True, the end line is - drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether axis labels are drawn on the low - side, the high side, both, or neither side of the axis. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at along the - starting value of this axis. If True, the start line is - drawn on top of the grid lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: We add one item to d3's date formatter: - "%{n}f" for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet.baxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.carpet - .baxis.tickformatstopdefaults), sets the default - property values to use for elements of - carpet.baxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - title - :class:`plotly.graph_objects.carpet.baxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.baxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleoffset - Deprecated: Please use carpet.baxis.title.offset - instead. An additional amount by which to offset the - title from the tick labels, given in pixels. Note that - this used to be set by the now deprecated `titleoffset` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleoffset": ("title", "offset"), - } - - def __init__( - self, - arg=None, - arraydtick=None, - arraytick0=None, - autorange=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - cheatertype=None, - color=None, - dtick=None, - endline=None, - endlinecolor=None, - endlinewidth=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - gridwidth=None, - labelpadding=None, - labelprefix=None, - labelsuffix=None, - linecolor=None, - linewidth=None, - minorgridcolor=None, - minorgridcount=None, - minorgridwidth=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - smoothing=None, - startline=None, - startlinecolor=None, - startlinewidth=None, - tick0=None, - tickangle=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - tickmode=None, - tickprefix=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - title=None, - titlefont=None, - titleoffset=None, - type=None, - **kwargs - ): - """ - Construct a new Baxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.carpet.Baxis` - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at along the - final value of this axis. If True, the end line is - drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether axis labels are drawn on the low - side, the high side, both, or neither side of the axis. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at along the - starting value of this axis. If True, the start line is - drawn on top of the grid lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: We add one item to d3's date formatter: - "%{n}f" for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet.baxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.carpet - .baxis.tickformatstopdefaults), sets the default - property values to use for elements of - carpet.baxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - title - :class:`plotly.graph_objects.carpet.baxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.baxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleoffset - Deprecated: Please use carpet.baxis.title.offset - instead. An additional amount by which to offset the - title from the tick labels, given in pixels. Note that - this used to be set by the now deprecated `titleoffset` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - - Returns - ------- - Baxis - """ - super(Baxis, self).__init__("baxis") - - # Validate arg - # ------------ - 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.carpet.Baxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.Baxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet import baxis as v_baxis - - # Initialize validators - # --------------------- - self._validators["arraydtick"] = v_baxis.ArraydtickValidator() - self._validators["arraytick0"] = v_baxis.Arraytick0Validator() - self._validators["autorange"] = v_baxis.AutorangeValidator() - self._validators["categoryarray"] = v_baxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_baxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_baxis.CategoryorderValidator() - self._validators["cheatertype"] = v_baxis.CheatertypeValidator() - self._validators["color"] = v_baxis.ColorValidator() - self._validators["dtick"] = v_baxis.DtickValidator() - self._validators["endline"] = v_baxis.EndlineValidator() - self._validators["endlinecolor"] = v_baxis.EndlinecolorValidator() - self._validators["endlinewidth"] = v_baxis.EndlinewidthValidator() - self._validators["exponentformat"] = v_baxis.ExponentformatValidator() - self._validators["fixedrange"] = v_baxis.FixedrangeValidator() - self._validators["gridcolor"] = v_baxis.GridcolorValidator() - self._validators["gridwidth"] = v_baxis.GridwidthValidator() - self._validators["labelpadding"] = v_baxis.LabelpaddingValidator() - self._validators["labelprefix"] = v_baxis.LabelprefixValidator() - self._validators["labelsuffix"] = v_baxis.LabelsuffixValidator() - self._validators["linecolor"] = v_baxis.LinecolorValidator() - self._validators["linewidth"] = v_baxis.LinewidthValidator() - self._validators["minorgridcolor"] = v_baxis.MinorgridcolorValidator() - self._validators["minorgridcount"] = v_baxis.MinorgridcountValidator() - self._validators["minorgridwidth"] = v_baxis.MinorgridwidthValidator() - self._validators["nticks"] = v_baxis.NticksValidator() - self._validators["range"] = v_baxis.RangeValidator() - self._validators["rangemode"] = v_baxis.RangemodeValidator() - self._validators["separatethousands"] = v_baxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_baxis.ShowexponentValidator() - self._validators["showgrid"] = v_baxis.ShowgridValidator() - self._validators["showline"] = v_baxis.ShowlineValidator() - self._validators["showticklabels"] = v_baxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_baxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_baxis.ShowticksuffixValidator() - self._validators["smoothing"] = v_baxis.SmoothingValidator() - self._validators["startline"] = v_baxis.StartlineValidator() - self._validators["startlinecolor"] = v_baxis.StartlinecolorValidator() - self._validators["startlinewidth"] = v_baxis.StartlinewidthValidator() - self._validators["tick0"] = v_baxis.Tick0Validator() - self._validators["tickangle"] = v_baxis.TickangleValidator() - self._validators["tickfont"] = v_baxis.TickfontValidator() - self._validators["tickformat"] = v_baxis.TickformatValidator() - self._validators["tickformatstops"] = v_baxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_baxis.TickformatstopValidator() - self._validators["tickmode"] = v_baxis.TickmodeValidator() - self._validators["tickprefix"] = v_baxis.TickprefixValidator() - self._validators["ticksuffix"] = v_baxis.TicksuffixValidator() - self._validators["ticktext"] = v_baxis.TicktextValidator() - self._validators["ticktextsrc"] = v_baxis.TicktextsrcValidator() - self._validators["tickvals"] = v_baxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_baxis.TickvalssrcValidator() - self._validators["title"] = v_baxis.TitleValidator() - self._validators["type"] = v_baxis.TypeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arraydtick", None) - self["arraydtick"] = arraydtick if arraydtick is not None else _v - _v = arg.pop("arraytick0", None) - self["arraytick0"] = arraytick0 if arraytick0 is not None else _v - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("cheatertype", None) - self["cheatertype"] = cheatertype if cheatertype is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("endline", None) - self["endline"] = endline if endline is not None else _v - _v = arg.pop("endlinecolor", None) - self["endlinecolor"] = endlinecolor if endlinecolor is not None else _v - _v = arg.pop("endlinewidth", None) - self["endlinewidth"] = endlinewidth if endlinewidth is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("fixedrange", None) - self["fixedrange"] = fixedrange if fixedrange is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("labelpadding", None) - self["labelpadding"] = labelpadding if labelpadding is not None else _v - _v = arg.pop("labelprefix", None) - self["labelprefix"] = labelprefix if labelprefix is not None else _v - _v = arg.pop("labelsuffix", None) - self["labelsuffix"] = labelsuffix if labelsuffix is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("minorgridcolor", None) - self["minorgridcolor"] = minorgridcolor if minorgridcolor is not None else _v - _v = arg.pop("minorgridcount", None) - self["minorgridcount"] = minorgridcount if minorgridcount is not None else _v - _v = arg.pop("minorgridwidth", None) - self["minorgridwidth"] = minorgridwidth if minorgridwidth is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("startline", None) - self["startline"] = startline if startline is not None else _v - _v = arg.pop("startlinecolor", None) - self["startlinecolor"] = startlinecolor if startlinecolor is not None else _v - _v = arg.pop("startlinewidth", None) - self["startlinewidth"] = startlinewidth if startlinewidth is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleoffset", None) - _v = titleoffset if titleoffset is not None else _v - if _v is not None: - self["titleoffset"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Aaxis(_BaseTraceHierarchyType): - - # arraydtick - # ---------- - @property - def arraydtick(self): - """ - The stride between grid lines along the axis - - The 'arraydtick' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["arraydtick"] - - @arraydtick.setter - def arraydtick(self, val): - self["arraydtick"] = val - - # arraytick0 - # ---------- - @property - def arraytick0(self): - """ - The starting index of grid lines along the axis - - The 'arraytick0' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["arraytick0"] - - @arraytick0.setter - def arraytick0(self, val): - self["arraytick0"] = val - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # cheatertype - # ----------- - @property - def cheatertype(self): - """ - The 'cheatertype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['index', 'value'] - - Returns - ------- - Any - """ - return self["cheatertype"] - - @cheatertype.setter - def cheatertype(self, val): - self["cheatertype"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - The stride between grid lines along the axis - - The 'dtick' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # endline - # ------- - @property - def endline(self): - """ - Determines whether or not a line is drawn at along the final - value of this axis. If True, the end line is drawn on top of - the grid lines. - - The 'endline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["endline"] - - @endline.setter - def endline(self, val): - self["endline"] = val - - # endlinecolor - # ------------ - @property - def endlinecolor(self): - """ - Sets the line color of the end line. - - The 'endlinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["endlinecolor"] - - @endlinecolor.setter - def endlinecolor(self, val): - self["endlinecolor"] = val - - # endlinewidth - # ------------ - @property - def endlinewidth(self): - """ - Sets the width (in px) of the end line. - - The 'endlinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["endlinewidth"] - - @endlinewidth.setter - def endlinewidth(self, val): - self["endlinewidth"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # fixedrange - # ---------- - @property - def fixedrange(self): - """ - Determines whether or not this axis is zoom-able. If true, then - zoom is disabled. - - The 'fixedrange' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["fixedrange"] - - @fixedrange.setter - def fixedrange(self, val): - self["fixedrange"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the axis line color. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the axis line. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # labelpadding - # ------------ - @property - def labelpadding(self): - """ - Extra padding between label and the axis - - The 'labelpadding' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - - Returns - ------- - int - """ - return self["labelpadding"] - - @labelpadding.setter - def labelpadding(self, val): - self["labelpadding"] = val - - # labelprefix - # ----------- - @property - def labelprefix(self): - """ - Sets a axis label prefix. - - The 'labelprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelprefix"] - - @labelprefix.setter - def labelprefix(self, val): - self["labelprefix"] = val - - # labelsuffix - # ----------- - @property - def labelsuffix(self): - """ - Sets a axis label suffix. - - The 'labelsuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelsuffix"] - - @labelsuffix.setter - def labelsuffix(self, val): - self["labelsuffix"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # minorgridcolor - # -------------- - @property - def minorgridcolor(self): - """ - Sets the color of the grid lines. - - The 'minorgridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["minorgridcolor"] - - @minorgridcolor.setter - def minorgridcolor(self, val): - self["minorgridcolor"] = val - - # minorgridcount - # -------------- - @property - def minorgridcount(self): - """ - Sets the number of minor grid ticks per major grid tick - - The 'minorgridcount' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["minorgridcount"] - - @minorgridcount.setter - def minorgridcount(self, val): - self["minorgridcount"] = val - - # minorgridwidth - # -------------- - @property - def minorgridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'minorgridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["minorgridwidth"] - - @minorgridwidth.setter - def minorgridwidth(self, val): - self["minorgridwidth"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether axis labels are drawn on the low side, the - high side, both, or neither side of the axis. - - The 'showticklabels' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['start', 'end', 'both', 'none'] - - Returns - ------- - Any - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # startline - # --------- - @property - def startline(self): - """ - Determines whether or not a line is drawn at along the starting - value of this axis. If True, the start line is drawn on top of - the grid lines. - - The 'startline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["startline"] - - @startline.setter - def startline(self, val): - self["startline"] = val - - # startlinecolor - # -------------- - @property - def startlinecolor(self): - """ - Sets the line color of the start line. - - The 'startlinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["startlinecolor"] - - @startlinecolor.setter - def startlinecolor(self, val): - self["startlinecolor"] = val - - # startlinewidth - # -------------- - @property - def startlinewidth(self): - """ - Sets the width (in px) of the start line. - - The 'startlinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["startlinewidth"] - - @startlinewidth.setter - def startlinewidth(self, val): - self["startlinewidth"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - The starting index of grid lines along the axis - - The 'tick0' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.carpet.aaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: We add one item to d3's date formatter: "%{n}f" for - fractional seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.carpet.aaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.carpet.aaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.carpet.aaxis.tickformatstopdefaults), sets - the default property values to use for elements of - carpet.aaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.carpet.aaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.aaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - Note that this used to be set by the now - deprecated `titleoffset` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.carpet.aaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use carpet.aaxis.title.font instead. Sets - this axis' title font. Note that the title's font used to be - set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleoffset - # ----------- - @property - def titleoffset(self): - """ - Deprecated: Please use carpet.aaxis.title.offset instead. An - additional amount by which to offset the title from the tick - labels, given in pixels. Note that this used to be set by the - now deprecated `titleoffset` attribute. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - - """ - return self["titleoffset"] - - @titleoffset.setter - def titleoffset(self, val): - self["titleoffset"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at along the - final value of this axis. If True, the end line is - drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether axis labels are drawn on the low - side, the high side, both, or neither side of the axis. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at along the - starting value of this axis. If True, the start line is - drawn on top of the grid lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: We add one item to d3's date formatter: - "%{n}f" for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet.aaxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.carpet - .aaxis.tickformatstopdefaults), sets the default - property values to use for elements of - carpet.aaxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - title - :class:`plotly.graph_objects.carpet.aaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.aaxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleoffset - Deprecated: Please use carpet.aaxis.title.offset - instead. An additional amount by which to offset the - title from the tick labels, given in pixels. Note that - this used to be set by the now deprecated `titleoffset` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleoffset": ("title", "offset"), - } - - def __init__( - self, - arg=None, - arraydtick=None, - arraytick0=None, - autorange=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - cheatertype=None, - color=None, - dtick=None, - endline=None, - endlinecolor=None, - endlinewidth=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - gridwidth=None, - labelpadding=None, - labelprefix=None, - labelsuffix=None, - linecolor=None, - linewidth=None, - minorgridcolor=None, - minorgridcount=None, - minorgridwidth=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - smoothing=None, - startline=None, - startlinecolor=None, - startlinewidth=None, - tick0=None, - tickangle=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - tickmode=None, - tickprefix=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - title=None, - titlefont=None, - titleoffset=None, - type=None, - **kwargs - ): - """ - Construct a new Aaxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.carpet.Aaxis` - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at along the - final value of this axis. If True, the end line is - drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether axis labels are drawn on the low - side, the high side, both, or neither side of the axis. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at along the - starting value of this axis. If True, the start line is - drawn on top of the grid lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: We add one item to d3's date formatter: - "%{n}f" for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet.aaxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.carpet - .aaxis.tickformatstopdefaults), sets the default - property values to use for elements of - carpet.aaxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - title - :class:`plotly.graph_objects.carpet.aaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.aaxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleoffset - Deprecated: Please use carpet.aaxis.title.offset - instead. An additional amount by which to offset the - title from the tick labels, given in pixels. Note that - this used to be set by the now deprecated `titleoffset` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - - Returns - ------- - Aaxis - """ - super(Aaxis, self).__init__("aaxis") - - # Validate arg - # ------------ - 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.carpet.Aaxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.Aaxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet import aaxis as v_aaxis - - # Initialize validators - # --------------------- - self._validators["arraydtick"] = v_aaxis.ArraydtickValidator() - self._validators["arraytick0"] = v_aaxis.Arraytick0Validator() - self._validators["autorange"] = v_aaxis.AutorangeValidator() - self._validators["categoryarray"] = v_aaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_aaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_aaxis.CategoryorderValidator() - self._validators["cheatertype"] = v_aaxis.CheatertypeValidator() - self._validators["color"] = v_aaxis.ColorValidator() - self._validators["dtick"] = v_aaxis.DtickValidator() - self._validators["endline"] = v_aaxis.EndlineValidator() - self._validators["endlinecolor"] = v_aaxis.EndlinecolorValidator() - self._validators["endlinewidth"] = v_aaxis.EndlinewidthValidator() - self._validators["exponentformat"] = v_aaxis.ExponentformatValidator() - self._validators["fixedrange"] = v_aaxis.FixedrangeValidator() - self._validators["gridcolor"] = v_aaxis.GridcolorValidator() - self._validators["gridwidth"] = v_aaxis.GridwidthValidator() - self._validators["labelpadding"] = v_aaxis.LabelpaddingValidator() - self._validators["labelprefix"] = v_aaxis.LabelprefixValidator() - self._validators["labelsuffix"] = v_aaxis.LabelsuffixValidator() - self._validators["linecolor"] = v_aaxis.LinecolorValidator() - self._validators["linewidth"] = v_aaxis.LinewidthValidator() - self._validators["minorgridcolor"] = v_aaxis.MinorgridcolorValidator() - self._validators["minorgridcount"] = v_aaxis.MinorgridcountValidator() - self._validators["minorgridwidth"] = v_aaxis.MinorgridwidthValidator() - self._validators["nticks"] = v_aaxis.NticksValidator() - self._validators["range"] = v_aaxis.RangeValidator() - self._validators["rangemode"] = v_aaxis.RangemodeValidator() - self._validators["separatethousands"] = v_aaxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_aaxis.ShowexponentValidator() - self._validators["showgrid"] = v_aaxis.ShowgridValidator() - self._validators["showline"] = v_aaxis.ShowlineValidator() - self._validators["showticklabels"] = v_aaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_aaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_aaxis.ShowticksuffixValidator() - self._validators["smoothing"] = v_aaxis.SmoothingValidator() - self._validators["startline"] = v_aaxis.StartlineValidator() - self._validators["startlinecolor"] = v_aaxis.StartlinecolorValidator() - self._validators["startlinewidth"] = v_aaxis.StartlinewidthValidator() - self._validators["tick0"] = v_aaxis.Tick0Validator() - self._validators["tickangle"] = v_aaxis.TickangleValidator() - self._validators["tickfont"] = v_aaxis.TickfontValidator() - self._validators["tickformat"] = v_aaxis.TickformatValidator() - self._validators["tickformatstops"] = v_aaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_aaxis.TickformatstopValidator() - self._validators["tickmode"] = v_aaxis.TickmodeValidator() - self._validators["tickprefix"] = v_aaxis.TickprefixValidator() - self._validators["ticksuffix"] = v_aaxis.TicksuffixValidator() - self._validators["ticktext"] = v_aaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_aaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_aaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_aaxis.TickvalssrcValidator() - self._validators["title"] = v_aaxis.TitleValidator() - self._validators["type"] = v_aaxis.TypeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arraydtick", None) - self["arraydtick"] = arraydtick if arraydtick is not None else _v - _v = arg.pop("arraytick0", None) - self["arraytick0"] = arraytick0 if arraytick0 is not None else _v - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("cheatertype", None) - self["cheatertype"] = cheatertype if cheatertype is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("endline", None) - self["endline"] = endline if endline is not None else _v - _v = arg.pop("endlinecolor", None) - self["endlinecolor"] = endlinecolor if endlinecolor is not None else _v - _v = arg.pop("endlinewidth", None) - self["endlinewidth"] = endlinewidth if endlinewidth is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("fixedrange", None) - self["fixedrange"] = fixedrange if fixedrange is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("labelpadding", None) - self["labelpadding"] = labelpadding if labelpadding is not None else _v - _v = arg.pop("labelprefix", None) - self["labelprefix"] = labelprefix if labelprefix is not None else _v - _v = arg.pop("labelsuffix", None) - self["labelsuffix"] = labelsuffix if labelsuffix is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("minorgridcolor", None) - self["minorgridcolor"] = minorgridcolor if minorgridcolor is not None else _v - _v = arg.pop("minorgridcount", None) - self["minorgridcount"] = minorgridcount if minorgridcount is not None else _v - _v = arg.pop("minorgridwidth", None) - self["minorgridwidth"] = minorgridwidth if minorgridwidth is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("startline", None) - self["startline"] = startline if startline is not None else _v - _v = arg.pop("startlinecolor", None) - self["startlinecolor"] = startlinecolor if startlinecolor is not None else _v - _v = arg.pop("startlinewidth", None) - self["startlinewidth"] = startlinewidth if startlinewidth is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleoffset", None) - _v = titleoffset if titleoffset is not None else _v - if _v is not None: - self["titleoffset"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Aaxis", "Baxis", "Font", "Stream", "aaxis", "baxis"] - -from plotly.graph_objs.carpet import baxis -from plotly.graph_objs.carpet import aaxis +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._font import Font + from ._baxis import Baxis + from ._aaxis import Aaxis + from . import baxis + from . import aaxis +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".baxis", ".aaxis"], + ["._stream.Stream", "._font.Font", "._baxis.Baxis", "._aaxis.Aaxis"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py b/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py new file mode 100644 index 00000000000..dae80ca2a79 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py @@ -0,0 +1,2338 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Aaxis(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet" + _path_str = "carpet.aaxis" + _valid_props = { + "arraydtick", + "arraytick0", + "autorange", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "cheatertype", + "color", + "dtick", + "endline", + "endlinecolor", + "endlinewidth", + "exponentformat", + "fixedrange", + "gridcolor", + "gridwidth", + "labelpadding", + "labelprefix", + "labelsuffix", + "linecolor", + "linewidth", + "minorgridcolor", + "minorgridcount", + "minorgridwidth", + "nticks", + "range", + "rangemode", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "smoothing", + "startline", + "startlinecolor", + "startlinewidth", + "tick0", + "tickangle", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "tickmode", + "tickprefix", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "title", + "titlefont", + "titleoffset", + "type", + } + + # arraydtick + # ---------- + @property + def arraydtick(self): + """ + The stride between grid lines along the axis + + The 'arraydtick' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraydtick"] + + @arraydtick.setter + def arraydtick(self, val): + self["arraydtick"] = val + + # arraytick0 + # ---------- + @property + def arraytick0(self): + """ + The starting index of grid lines along the axis + + The 'arraytick0' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraytick0"] + + @arraytick0.setter + def arraytick0(self, val): + self["arraytick0"] = val + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # cheatertype + # ----------- + @property + def cheatertype(self): + """ + The 'cheatertype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['index', 'value'] + + Returns + ------- + Any + """ + return self["cheatertype"] + + @cheatertype.setter + def cheatertype(self, val): + self["cheatertype"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + The stride between grid lines along the axis + + The 'dtick' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # endline + # ------- + @property + def endline(self): + """ + Determines whether or not a line is drawn at along the final + value of this axis. If True, the end line is drawn on top of + the grid lines. + + The 'endline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["endline"] + + @endline.setter + def endline(self, val): + self["endline"] = val + + # endlinecolor + # ------------ + @property + def endlinecolor(self): + """ + Sets the line color of the end line. + + The 'endlinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["endlinecolor"] + + @endlinecolor.setter + def endlinecolor(self, val): + self["endlinecolor"] = val + + # endlinewidth + # ------------ + @property + def endlinewidth(self): + """ + Sets the width (in px) of the end line. + + The 'endlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["endlinewidth"] + + @endlinewidth.setter + def endlinewidth(self, val): + self["endlinewidth"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # fixedrange + # ---------- + @property + def fixedrange(self): + """ + Determines whether or not this axis is zoom-able. If true, then + zoom is disabled. + + The 'fixedrange' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["fixedrange"] + + @fixedrange.setter + def fixedrange(self, val): + self["fixedrange"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the axis line color. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the axis line. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # labelpadding + # ------------ + @property + def labelpadding(self): + """ + Extra padding between label and the axis + + The 'labelpadding' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["labelpadding"] + + @labelpadding.setter + def labelpadding(self, val): + self["labelpadding"] = val + + # labelprefix + # ----------- + @property + def labelprefix(self): + """ + Sets a axis label prefix. + + The 'labelprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelprefix"] + + @labelprefix.setter + def labelprefix(self, val): + self["labelprefix"] = val + + # labelsuffix + # ----------- + @property + def labelsuffix(self): + """ + Sets a axis label suffix. + + The 'labelsuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelsuffix"] + + @labelsuffix.setter + def labelsuffix(self, val): + self["labelsuffix"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # minorgridcolor + # -------------- + @property + def minorgridcolor(self): + """ + Sets the color of the grid lines. + + The 'minorgridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["minorgridcolor"] + + @minorgridcolor.setter + def minorgridcolor(self, val): + self["minorgridcolor"] = val + + # minorgridcount + # -------------- + @property + def minorgridcount(self): + """ + Sets the number of minor grid ticks per major grid tick + + The 'minorgridcount' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["minorgridcount"] + + @minorgridcount.setter + def minorgridcount(self, val): + self["minorgridcount"] = val + + # minorgridwidth + # -------------- + @property + def minorgridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'minorgridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minorgridwidth"] + + @minorgridwidth.setter + def minorgridwidth(self, val): + self["minorgridwidth"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether axis labels are drawn on the low side, the + high side, both, or neither side of the axis. + + The 'showticklabels' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'end', 'both', 'none'] + + Returns + ------- + Any + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # startline + # --------- + @property + def startline(self): + """ + Determines whether or not a line is drawn at along the starting + value of this axis. If True, the start line is drawn on top of + the grid lines. + + The 'startline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["startline"] + + @startline.setter + def startline(self, val): + self["startline"] = val + + # startlinecolor + # -------------- + @property + def startlinecolor(self): + """ + Sets the line color of the start line. + + The 'startlinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["startlinecolor"] + + @startlinecolor.setter + def startlinecolor(self, val): + self["startlinecolor"] = val + + # startlinewidth + # -------------- + @property + def startlinewidth(self): + """ + Sets the width (in px) of the start line. + + The 'startlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["startlinewidth"] + + @startlinewidth.setter + def startlinewidth(self, val): + self["startlinewidth"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + The starting index of grid lines along the axis + + The 'tick0' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.carpet.aaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: We add one item to d3's date formatter: "%{n}f" for + fractional seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.carpet.aaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.carpet.aaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.carpet.aaxis.tickformatstopdefaults), sets + the default property values to use for elements of + carpet.aaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.carpet.aaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + offset + An additional amount by which to offset the + title from the tick labels, given in pixels. + Note that this used to be set by the now + deprecated `titleoffset` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.carpet.aaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use carpet.aaxis.title.font instead. Sets + this axis' title font. Note that the title's font used to be + set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleoffset + # ----------- + @property + def titleoffset(self): + """ + Deprecated: Please use carpet.aaxis.title.offset instead. An + additional amount by which to offset the title from the tick + labels, given in pixels. Note that this used to be set by the + now deprecated `titleoffset` attribute. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + + """ + return self["titleoffset"] + + @titleoffset.setter + def titleoffset(self, val): + self["titleoffset"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: We add one item to d3's date formatter: + "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.aaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .aaxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + title + :class:`plotly.graph_objects.carpet.aaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.aaxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleoffset + Deprecated: Please use carpet.aaxis.title.offset + instead. An additional amount by which to offset the + title from the tick labels, given in pixels. Note that + this used to be set by the now deprecated `titleoffset` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleoffset": ("title", "offset"), + } + + def __init__( + self, + arg=None, + arraydtick=None, + arraytick0=None, + autorange=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + cheatertype=None, + color=None, + dtick=None, + endline=None, + endlinecolor=None, + endlinewidth=None, + exponentformat=None, + fixedrange=None, + gridcolor=None, + gridwidth=None, + labelpadding=None, + labelprefix=None, + labelsuffix=None, + linecolor=None, + linewidth=None, + minorgridcolor=None, + minorgridcount=None, + minorgridwidth=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + smoothing=None, + startline=None, + startlinecolor=None, + startlinewidth=None, + tick0=None, + tickangle=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + tickmode=None, + tickprefix=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + title=None, + titlefont=None, + titleoffset=None, + type=None, + **kwargs + ): + """ + Construct a new Aaxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Aaxis` + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: We add one item to d3's date formatter: + "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.aaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .aaxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + title + :class:`plotly.graph_objects.carpet.aaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.aaxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleoffset + Deprecated: Please use carpet.aaxis.title.offset + instead. An additional amount by which to offset the + title from the tick labels, given in pixels. Note that + this used to be set by the now deprecated `titleoffset` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + + Returns + ------- + Aaxis + """ + super(Aaxis, self).__init__("aaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.Aaxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Aaxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("arraydtick", None) + _v = arraydtick if arraydtick is not None else _v + if _v is not None: + self["arraydtick"] = _v + _v = arg.pop("arraytick0", None) + _v = arraytick0 if arraytick0 is not None else _v + if _v is not None: + self["arraytick0"] = _v + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("cheatertype", None) + _v = cheatertype if cheatertype is not None else _v + if _v is not None: + self["cheatertype"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("endline", None) + _v = endline if endline is not None else _v + if _v is not None: + self["endline"] = _v + _v = arg.pop("endlinecolor", None) + _v = endlinecolor if endlinecolor is not None else _v + if _v is not None: + self["endlinecolor"] = _v + _v = arg.pop("endlinewidth", None) + _v = endlinewidth if endlinewidth is not None else _v + if _v is not None: + self["endlinewidth"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("fixedrange", None) + _v = fixedrange if fixedrange is not None else _v + if _v is not None: + self["fixedrange"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("labelpadding", None) + _v = labelpadding if labelpadding is not None else _v + if _v is not None: + self["labelpadding"] = _v + _v = arg.pop("labelprefix", None) + _v = labelprefix if labelprefix is not None else _v + if _v is not None: + self["labelprefix"] = _v + _v = arg.pop("labelsuffix", None) + _v = labelsuffix if labelsuffix is not None else _v + if _v is not None: + self["labelsuffix"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("minorgridcolor", None) + _v = minorgridcolor if minorgridcolor is not None else _v + if _v is not None: + self["minorgridcolor"] = _v + _v = arg.pop("minorgridcount", None) + _v = minorgridcount if minorgridcount is not None else _v + if _v is not None: + self["minorgridcount"] = _v + _v = arg.pop("minorgridwidth", None) + _v = minorgridwidth if minorgridwidth is not None else _v + if _v is not None: + self["minorgridwidth"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("startline", None) + _v = startline if startline is not None else _v + if _v is not None: + self["startline"] = _v + _v = arg.pop("startlinecolor", None) + _v = startlinecolor if startlinecolor is not None else _v + if _v is not None: + self["startlinecolor"] = _v + _v = arg.pop("startlinewidth", None) + _v = startlinewidth if startlinewidth is not None else _v + if _v is not None: + self["startlinewidth"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleoffset", None) + _v = titleoffset if titleoffset is not None else _v + if _v is not None: + self["titleoffset"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py b/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py new file mode 100644 index 00000000000..44340cbf5b3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py @@ -0,0 +1,2338 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Baxis(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet" + _path_str = "carpet.baxis" + _valid_props = { + "arraydtick", + "arraytick0", + "autorange", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "cheatertype", + "color", + "dtick", + "endline", + "endlinecolor", + "endlinewidth", + "exponentformat", + "fixedrange", + "gridcolor", + "gridwidth", + "labelpadding", + "labelprefix", + "labelsuffix", + "linecolor", + "linewidth", + "minorgridcolor", + "minorgridcount", + "minorgridwidth", + "nticks", + "range", + "rangemode", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "smoothing", + "startline", + "startlinecolor", + "startlinewidth", + "tick0", + "tickangle", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "tickmode", + "tickprefix", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "title", + "titlefont", + "titleoffset", + "type", + } + + # arraydtick + # ---------- + @property + def arraydtick(self): + """ + The stride between grid lines along the axis + + The 'arraydtick' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraydtick"] + + @arraydtick.setter + def arraydtick(self, val): + self["arraydtick"] = val + + # arraytick0 + # ---------- + @property + def arraytick0(self): + """ + The starting index of grid lines along the axis + + The 'arraytick0' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraytick0"] + + @arraytick0.setter + def arraytick0(self, val): + self["arraytick0"] = val + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # cheatertype + # ----------- + @property + def cheatertype(self): + """ + The 'cheatertype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['index', 'value'] + + Returns + ------- + Any + """ + return self["cheatertype"] + + @cheatertype.setter + def cheatertype(self, val): + self["cheatertype"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + The stride between grid lines along the axis + + The 'dtick' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # endline + # ------- + @property + def endline(self): + """ + Determines whether or not a line is drawn at along the final + value of this axis. If True, the end line is drawn on top of + the grid lines. + + The 'endline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["endline"] + + @endline.setter + def endline(self, val): + self["endline"] = val + + # endlinecolor + # ------------ + @property + def endlinecolor(self): + """ + Sets the line color of the end line. + + The 'endlinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["endlinecolor"] + + @endlinecolor.setter + def endlinecolor(self, val): + self["endlinecolor"] = val + + # endlinewidth + # ------------ + @property + def endlinewidth(self): + """ + Sets the width (in px) of the end line. + + The 'endlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["endlinewidth"] + + @endlinewidth.setter + def endlinewidth(self, val): + self["endlinewidth"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # fixedrange + # ---------- + @property + def fixedrange(self): + """ + Determines whether or not this axis is zoom-able. If true, then + zoom is disabled. + + The 'fixedrange' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["fixedrange"] + + @fixedrange.setter + def fixedrange(self, val): + self["fixedrange"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the axis line color. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the axis line. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # labelpadding + # ------------ + @property + def labelpadding(self): + """ + Extra padding between label and the axis + + The 'labelpadding' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["labelpadding"] + + @labelpadding.setter + def labelpadding(self, val): + self["labelpadding"] = val + + # labelprefix + # ----------- + @property + def labelprefix(self): + """ + Sets a axis label prefix. + + The 'labelprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelprefix"] + + @labelprefix.setter + def labelprefix(self, val): + self["labelprefix"] = val + + # labelsuffix + # ----------- + @property + def labelsuffix(self): + """ + Sets a axis label suffix. + + The 'labelsuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelsuffix"] + + @labelsuffix.setter + def labelsuffix(self, val): + self["labelsuffix"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # minorgridcolor + # -------------- + @property + def minorgridcolor(self): + """ + Sets the color of the grid lines. + + The 'minorgridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["minorgridcolor"] + + @minorgridcolor.setter + def minorgridcolor(self, val): + self["minorgridcolor"] = val + + # minorgridcount + # -------------- + @property + def minorgridcount(self): + """ + Sets the number of minor grid ticks per major grid tick + + The 'minorgridcount' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["minorgridcount"] + + @minorgridcount.setter + def minorgridcount(self, val): + self["minorgridcount"] = val + + # minorgridwidth + # -------------- + @property + def minorgridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'minorgridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minorgridwidth"] + + @minorgridwidth.setter + def minorgridwidth(self, val): + self["minorgridwidth"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether axis labels are drawn on the low side, the + high side, both, or neither side of the axis. + + The 'showticklabels' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'end', 'both', 'none'] + + Returns + ------- + Any + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # startline + # --------- + @property + def startline(self): + """ + Determines whether or not a line is drawn at along the starting + value of this axis. If True, the start line is drawn on top of + the grid lines. + + The 'startline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["startline"] + + @startline.setter + def startline(self, val): + self["startline"] = val + + # startlinecolor + # -------------- + @property + def startlinecolor(self): + """ + Sets the line color of the start line. + + The 'startlinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["startlinecolor"] + + @startlinecolor.setter + def startlinecolor(self, val): + self["startlinecolor"] = val + + # startlinewidth + # -------------- + @property + def startlinewidth(self): + """ + Sets the width (in px) of the start line. + + The 'startlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["startlinewidth"] + + @startlinewidth.setter + def startlinewidth(self, val): + self["startlinewidth"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + The starting index of grid lines along the axis + + The 'tick0' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.carpet.baxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: We add one item to d3's date formatter: "%{n}f" for + fractional seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.carpet.baxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.carpet.baxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.carpet.baxis.tickformatstopdefaults), sets + the default property values to use for elements of + carpet.baxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.carpet.baxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + offset + An additional amount by which to offset the + title from the tick labels, given in pixels. + Note that this used to be set by the now + deprecated `titleoffset` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.carpet.baxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use carpet.baxis.title.font instead. Sets + this axis' title font. Note that the title's font used to be + set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleoffset + # ----------- + @property + def titleoffset(self): + """ + Deprecated: Please use carpet.baxis.title.offset instead. An + additional amount by which to offset the title from the tick + labels, given in pixels. Note that this used to be set by the + now deprecated `titleoffset` attribute. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + + """ + return self["titleoffset"] + + @titleoffset.setter + def titleoffset(self, val): + self["titleoffset"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: We add one item to d3's date formatter: + "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.baxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .baxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.baxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + title + :class:`plotly.graph_objects.carpet.baxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.baxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleoffset + Deprecated: Please use carpet.baxis.title.offset + instead. An additional amount by which to offset the + title from the tick labels, given in pixels. Note that + this used to be set by the now deprecated `titleoffset` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleoffset": ("title", "offset"), + } + + def __init__( + self, + arg=None, + arraydtick=None, + arraytick0=None, + autorange=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + cheatertype=None, + color=None, + dtick=None, + endline=None, + endlinecolor=None, + endlinewidth=None, + exponentformat=None, + fixedrange=None, + gridcolor=None, + gridwidth=None, + labelpadding=None, + labelprefix=None, + labelsuffix=None, + linecolor=None, + linewidth=None, + minorgridcolor=None, + minorgridcount=None, + minorgridwidth=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + smoothing=None, + startline=None, + startlinecolor=None, + startlinewidth=None, + tick0=None, + tickangle=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + tickmode=None, + tickprefix=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + title=None, + titlefont=None, + titleoffset=None, + type=None, + **kwargs + ): + """ + Construct a new Baxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Baxis` + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: We add one item to d3's date formatter: + "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.baxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .baxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.baxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + title + :class:`plotly.graph_objects.carpet.baxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.baxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleoffset + Deprecated: Please use carpet.baxis.title.offset + instead. An additional amount by which to offset the + title from the tick labels, given in pixels. Note that + this used to be set by the now deprecated `titleoffset` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + + Returns + ------- + Baxis + """ + super(Baxis, self).__init__("baxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.Baxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Baxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("arraydtick", None) + _v = arraydtick if arraydtick is not None else _v + if _v is not None: + self["arraydtick"] = _v + _v = arg.pop("arraytick0", None) + _v = arraytick0 if arraytick0 is not None else _v + if _v is not None: + self["arraytick0"] = _v + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("cheatertype", None) + _v = cheatertype if cheatertype is not None else _v + if _v is not None: + self["cheatertype"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("endline", None) + _v = endline if endline is not None else _v + if _v is not None: + self["endline"] = _v + _v = arg.pop("endlinecolor", None) + _v = endlinecolor if endlinecolor is not None else _v + if _v is not None: + self["endlinecolor"] = _v + _v = arg.pop("endlinewidth", None) + _v = endlinewidth if endlinewidth is not None else _v + if _v is not None: + self["endlinewidth"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("fixedrange", None) + _v = fixedrange if fixedrange is not None else _v + if _v is not None: + self["fixedrange"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("labelpadding", None) + _v = labelpadding if labelpadding is not None else _v + if _v is not None: + self["labelpadding"] = _v + _v = arg.pop("labelprefix", None) + _v = labelprefix if labelprefix is not None else _v + if _v is not None: + self["labelprefix"] = _v + _v = arg.pop("labelsuffix", None) + _v = labelsuffix if labelsuffix is not None else _v + if _v is not None: + self["labelsuffix"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("minorgridcolor", None) + _v = minorgridcolor if minorgridcolor is not None else _v + if _v is not None: + self["minorgridcolor"] = _v + _v = arg.pop("minorgridcount", None) + _v = minorgridcount if minorgridcount is not None else _v + if _v is not None: + self["minorgridcount"] = _v + _v = arg.pop("minorgridwidth", None) + _v = minorgridwidth if minorgridwidth is not None else _v + if _v is not None: + self["minorgridwidth"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("startline", None) + _v = startline if startline is not None else _v + if _v is not None: + self["startline"] = _v + _v = arg.pop("startlinecolor", None) + _v = startlinecolor if startlinecolor is not None else _v + if _v is not None: + self["startlinecolor"] = _v + _v = arg.pop("startlinewidth", None) + _v = startlinewidth if startlinewidth is not None else _v + if _v is not None: + self["startlinewidth"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleoffset", None) + _v = titleoffset if titleoffset is not None else _v + if _v is not None: + self["titleoffset"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_font.py b/packages/python/plotly/plotly/graph_objs/carpet/_font.py new file mode 100644 index 00000000000..d456719633a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/_font.py @@ -0,0 +1,225 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet" + _path_str = "carpet.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + The default font used for axis & tick labels on this carpet + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_stream.py b/packages/python/plotly/plotly/graph_objs/carpet/_stream.py new file mode 100644 index 00000000000..5b7ac3ba968 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet" + _path_str = "carpet.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py index 005852218ae..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py @@ -1,721 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.carpet.aaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # offset - # ------ - @property - def offset(self): - """ - An additional amount by which to offset the title from the tick - labels, given in pixels. Note that this used to be set by the - now deprecated `titleoffset` attribute. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.aaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - offset - An additional amount by which to offset the title from - the tick labels, given in pixels. Note that this used - to be set by the now deprecated `titleoffset` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.aaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - offset - An additional amount by which to offset the title from - the tick labels, given in pixels. Note that this used - to be set by the now deprecated `titleoffset` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.carpet.aaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.aaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.aaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["offset"] = v_title.OffsetValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.aaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.carpet.aaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.aaxis import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.aaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.aaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.carpet.aaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.aaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.carpet.aaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickfont.py new file mode 100644 index 00000000000..24c3fca5deb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.aaxis" + _path_str = "carpet.aaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.aaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickformatstop.py new file mode 100644 index 00000000000..4a83eb0f1ed --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.aaxis" + _path_str = "carpet.aaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.aaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_title.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_title.py new file mode 100644 index 00000000000..edf99ddca6c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_title.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.aaxis" + _path_str = "carpet.aaxis.title" + _valid_props = {"font", "offset", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.carpet.aaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # offset + # ------ + @property + def offset(self): + """ + An additional amount by which to offset the title from the tick + labels, given in pixels. Note that this used to be set by the + now deprecated `titleoffset` attribute. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. Note that this used + to be set by the now deprecated `titleoffset` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. Note that this used + to be set by the now deprecated `titleoffset` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.aaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py index e1d9ce33c2c..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.aaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.aaxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.carpet.aaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.aaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/_font.py new file mode 100644 index 00000000000..ebb8963a081 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.aaxis.title" + _path_str = "carpet.aaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.aaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py index ad76e0ef675..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py @@ -1,721 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.carpet.baxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.carpet.baxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # offset - # ------ - @property - def offset(self): - """ - An additional amount by which to offset the title from the tick - labels, given in pixels. Note that this used to be set by the - now deprecated `titleoffset` attribute. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.baxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - offset - An additional amount by which to offset the title from - the tick labels, given in pixels. Note that this used - to be set by the now deprecated `titleoffset` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.baxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - offset - An additional amount by which to offset the title from - the tick labels, given in pixels. Note that this used - to be set by the now deprecated `titleoffset` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.carpet.baxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.baxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.baxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["offset"] = v_title.OffsetValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.baxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.baxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.carpet.baxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.baxis import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.baxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.baxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.carpet.baxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.baxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.carpet.baxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/_tickfont.py new file mode 100644 index 00000000000..efa63cff720 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.baxis" + _path_str = "carpet.baxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.baxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/_tickformatstop.py new file mode 100644 index 00000000000..eb24bba1c32 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.baxis" + _path_str = "carpet.baxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.baxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/_title.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/_title.py new file mode 100644 index 00000000000..836732b7587 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/_title.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.baxis" + _path_str = "carpet.baxis.title" + _valid_props = {"font", "offset", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.carpet.baxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # offset + # ------ + @property + def offset(self): + """ + An additional amount by which to offset the title from the tick + labels, given in pixels. Note that this used to be set by the + now deprecated `titleoffset` attribute. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. Note that this used + to be set by the now deprecated `titleoffset` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. Note that this used + to be set by the now deprecated `titleoffset` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.baxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py index 0bc7cad692e..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet.baxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.carpet.baxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.carpet.baxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.carpet.baxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet.baxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/_font.py new file mode 100644 index 00000000000..80bae7179aa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "carpet.baxis.title" + _path_str = "carpet.baxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.carpet.baxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py index 52b07958eeb..9b12594cbb6 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py @@ -1,2917 +1,29 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.choropleth.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.choropleth.unselected.Mark - er` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.Unselected` - marker - :class:`plotly.graph_objects.choropleth.unselected.Mark - er` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.choropleth.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.choropleth.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - opacity - Sets the marker opacity of selected points. - - Returns - ------- - plotly.graph_objs.choropleth.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.choropleth.selected.Marker - ` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.Selected` - marker - :class:`plotly.graph_objects.choropleth.selected.Marker - ` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.choropleth.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.choropleth.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the locations. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - line - :class:`plotly.graph_objects.choropleth.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - """ - - def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.Marker` - line - :class:`plotly.graph_objects.choropleth.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.choropleth.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.choropleth.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.choropleth.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.choropleth.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.choropleth.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.choropleth.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.choropleth.col - orbar.tickformatstopdefaults), sets the default property values - to use for elements of choropleth.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.choropleth.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.choropleth.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use choropleth.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use choropleth.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropleth.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.chorop - leth.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - choropleth.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choropleth.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use choropleth.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use choropleth.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropleth.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.chorop - leth.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - choropleth.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choropleth.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use choropleth.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use choropleth.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.choropleth.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Hoverlabel", - "Marker", - "Selected", - "Stream", - "Unselected", - "colorbar", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.choropleth import unselected -from plotly.graph_objs.choropleth import selected -from plotly.graph_objs.choropleth import marker -from plotly.graph_objs.choropleth import hoverlabel -from plotly.graph_objs.choropleth import colorbar +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import unselected + from . import selected + from . import marker + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel", ".colorbar"], + [ + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._hoverlabel.Hoverlabel", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py b/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py new file mode 100644 index 00000000000..fca66c1ef86 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py @@ -0,0 +1,1939 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth" + _path_str = "choropleth.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.choropleth.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.choropleth.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.choropleth.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of choropleth.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use choropleth.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use choropleth.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropleth.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + leth.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + choropleth.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choropleth.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use choropleth.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use choropleth.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropleth.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + leth.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + choropleth.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choropleth.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use choropleth.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use choropleth.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/choropleth/_hoverlabel.py new file mode 100644 index 00000000000..354c1391531 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth" + _path_str = "choropleth.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.choropleth.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_marker.py b/packages/python/plotly/plotly/graph_objs/choropleth/_marker.py new file mode 100644 index 00000000000..ddb710a06ce --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_marker.py @@ -0,0 +1,179 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth" + _path_str = "choropleth.marker" + _valid_props = {"line", "opacity", "opacitysrc"} + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.choropleth.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the locations. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.choropleth.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + """ + + def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Marker` + line + :class:`plotly.graph_objects.choropleth.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_selected.py b/packages/python/plotly/plotly/graph_objs/choropleth/_selected.py new file mode 100644 index 00000000000..036064d5491 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_selected.py @@ -0,0 +1,106 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth" + _path_str = "choropleth.selected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + opacity + Sets the marker opacity of selected points. + + Returns + ------- + plotly.graph_objs.choropleth.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choropleth.selected.Marker + ` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Selected` + marker + :class:`plotly.graph_objects.choropleth.selected.Marker + ` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_stream.py b/packages/python/plotly/plotly/graph_objs/choropleth/_stream.py new file mode 100644 index 00000000000..fa858214d56 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth" + _path_str = "choropleth.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_unselected.py b/packages/python/plotly/plotly/graph_objs/choropleth/_unselected.py new file mode 100644 index 00000000000..f21de91bc98 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_unselected.py @@ -0,0 +1,107 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth" + _path_str = "choropleth.unselected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.choropleth.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choropleth.unselected.Mark + er` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Unselected` + marker + :class:`plotly.graph_objects.choropleth.unselected.Mark + er` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py index 82c8c0326d9..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.choropleth.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.choropleth.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choropleth.col - orbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.choropleth.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.choropleth.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.choropleth.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_tickfont.py new file mode 100644 index 00000000000..b1994415de6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.colorbar" + _path_str = "choropleth.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..edfa6e4b807 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.colorbar" + _path_str = "choropleth.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choropleth.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_title.py new file mode 100644 index 00000000000..91511ebbd83 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.colorbar" + _path_str = "choropleth.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py index e2dc56281b4..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choropleth.col - orbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.choropleth.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/_font.py new file mode 100644 index 00000000000..59f1143e0b9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.colorbar.title" + _path_str = "choropleth.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choropleth.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py index 4b29029a963..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.choropleth.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/_font.py new file mode 100644 index 00000000000..4f896d4b56a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.hoverlabel" + _path_str = "choropleth.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py index 6118cc2017c..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py @@ -1,244 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.marker.Line` - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.choropleth.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/marker/_line.py b/packages/python/plotly/plotly/graph_objs/choropleth/marker/_line.py new file mode 100644 index 00000000000..affd4f24034 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/marker/_line.py @@ -0,0 +1,242 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.marker" + _path_str = "choropleth.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.marker.Line` + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py index 48469be2d46..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py @@ -1,103 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the marker opacity of selected points. - """ - - def __init__(self, arg=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.selected.Marker` - opacity - Sets the marker opacity of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.choropleth.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/choropleth/selected/_marker.py new file mode 100644 index 00000000000..96b1ac02795 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/selected/_marker.py @@ -0,0 +1,98 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.selected" + _path_str = "choropleth.selected.marker" + _valid_props = {"opacity"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.selected.Marker` + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py index c693e62abdf..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py @@ -1,106 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choropleth.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choropleth.unselected.Marker` - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.choropleth.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choropleth.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choropleth.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/choropleth/unselected/_marker.py new file mode 100644 index 00000000000..8b6bf68f5c6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choropleth/unselected/_marker.py @@ -0,0 +1,101 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choropleth.unselected" + _path_str = "choropleth.unselected.marker" + _valid_props = {"opacity"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.unselected.Marker` + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choropleth.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py index fc4541a7cf9..9b12594cbb6 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py @@ -1,2921 +1,29 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.choroplethmapbox.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.choroplethmapbox.unselecte - d.Marker` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.Unselected` - marker - :class:`plotly.graph_objects.choroplethmapbox.unselecte - d.Marker` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.choroplethmapbox.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.choroplethmapbox.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - opacity - Sets the marker opacity of selected points. - - Returns - ------- - plotly.graph_objs.choroplethmapbox.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.choroplethmapbox.selected. - Marker` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.Selected` - marker - :class:`plotly.graph_objects.choroplethmapbox.selected. - Marker` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.choroplethmapbox.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.choroplethmapbox.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the locations. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - line - :class:`plotly.graph_objects.choroplethmapbox.marker.Li - ne` instance or dict with compatible properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - """ - - def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.Marker` - line - :class:`plotly.graph_objects.choroplethmapbox.marker.Li - ne` instance or dict with compatible properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.choroplethmapbox.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.choroplethmapbox.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.choroplethmapbox.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.choroplethmapbox.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.choroplethmapb - ox.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - choroplethmapbox.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.choroplethmapbox.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use choroplethmapbox.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use choroplethmapbox.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choroplethmapbo - x.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.chorop - lethmapbox.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - choroplethmapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmapbox.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - choroplethmapbox.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choroplethmapbox.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choroplethmapbo - x.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.chorop - lethmapbox.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - choroplethmapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmapbox.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - choroplethmapbox.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choroplethmapbox.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.choroplethmapbox.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Hoverlabel", - "Marker", - "Selected", - "Stream", - "Unselected", - "colorbar", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.choroplethmapbox import unselected -from plotly.graph_objs.choroplethmapbox import selected -from plotly.graph_objs.choroplethmapbox import marker -from plotly.graph_objs.choroplethmapbox import hoverlabel -from plotly.graph_objs.choroplethmapbox import colorbar +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import unselected + from . import selected + from . import marker + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel", ".colorbar"], + [ + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._hoverlabel.Hoverlabel", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py new file mode 100644 index 00000000000..ea3b925bcd9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py @@ -0,0 +1,1943 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.choroplethmapb + ox.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + choroplethmapbox.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use choroplethmapbox.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use choroplethmapbox.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choroplethmapbo + x.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + lethmapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + choroplethmapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmapbox.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + choroplethmapbox.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + choroplethmapbox.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choroplethmapbo + x.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + lethmapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + choroplethmapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmapbox.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + choroplethmapbox.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + choroplethmapbox.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_hoverlabel.py new file mode 100644 index 00000000000..24092ee5668 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.choroplethmapbox.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_marker.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_marker.py new file mode 100644 index 00000000000..f2ec1334a55 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_marker.py @@ -0,0 +1,179 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.marker" + _valid_props = {"line", "opacity", "opacitysrc"} + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.choroplethmapbox.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the locations. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.choroplethmapbox.marker.Li + ne` instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + """ + + def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Marker` + line + :class:`plotly.graph_objects.choroplethmapbox.marker.Li + ne` instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_selected.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_selected.py new file mode 100644 index 00000000000..ef1987d32f5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_selected.py @@ -0,0 +1,106 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.selected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + opacity + Sets the marker opacity of selected points. + + Returns + ------- + plotly.graph_objs.choroplethmapbox.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choroplethmapbox.selected. + Marker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Selected` + marker + :class:`plotly.graph_objects.choroplethmapbox.selected. + Marker` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_stream.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_stream.py new file mode 100644 index 00000000000..8165a204fa3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_unselected.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_unselected.py new file mode 100644 index 00000000000..6a4c9e6120e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_unselected.py @@ -0,0 +1,107 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.unselected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.choroplethmapbox.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choroplethmapbox.unselecte + d.Marker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Unselected` + marker + :class:`plotly.graph_objects.choroplethmapbox.unselecte + d.Marker` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py index e17d3b87126..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.choroplethmapbox.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.choroplethmapbox.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.choroplethmapbox.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.choroplethmapbox.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.choroplethmapbox.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py new file mode 100644 index 00000000000..11ca6d92eda --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.colorbar" + _path_str = "choroplethmapbox.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..67f64463f33 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.colorbar" + _path_str = "choroplethmapbox.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_title.py new file mode 100644 index 00000000000..767657343b7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.colorbar" + _path_str = "choroplethmapbox.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py index 8fdfff1439d..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.choroplethmapbox.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py new file mode 100644 index 00000000000..45d6871fe2e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.colorbar.title" + _path_str = "choroplethmapbox.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py index b27df50c3c8..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.choroplethmapbox.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py new file mode 100644 index 00000000000..4bc99476734 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.hoverlabel" + _path_str = "choroplethmapbox.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py index 1e31ec7dc89..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py @@ -1,244 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.choroplethmapbox.marker.Line` - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.choroplethmapbox.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/_line.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/_line.py new file mode 100644 index 00000000000..679b64fa596 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/_line.py @@ -0,0 +1,242 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.marker" + _path_str = "choroplethmapbox.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.marker.Line` + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py index 9d6e24e216d..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py @@ -1,103 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the marker opacity of selected points. - """ - - def __init__(self, arg=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.selected.Marker` - opacity - Sets the marker opacity of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.choroplethmapbox.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/_marker.py new file mode 100644 index 00000000000..38c7f88865e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/_marker.py @@ -0,0 +1,98 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.selected" + _path_str = "choroplethmapbox.selected.marker" + _valid_props = {"opacity"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.selected.Marker` + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py index da3aace0658..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py @@ -1,106 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "choroplethmapbox.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.choroplethmapb - ox.unselected.Marker` - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.choroplethmapbox.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.choroplethmapbox.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/_marker.py new file mode 100644 index 00000000000..993188d9592 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/_marker.py @@ -0,0 +1,101 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "choroplethmapbox.unselected" + _path_str = "choroplethmapbox.unselected.marker" + _valid_props = {"opacity"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.unselected.Marker` + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.choroplethmapbox.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/__init__.py index 81fb4e991f4..2e2095be755 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/__init__.py @@ -1,2977 +1,24 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.cone.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.cone.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lightposition(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Numeric vector, representing the X coordinate for each vertex. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Numeric vector, representing the Y coordinate for each vertex. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Numeric vector, representing the Z coordinate for each vertex. - - The 'z' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Lightposition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.Lightposition` - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - - Returns - ------- - Lightposition - """ - super(Lightposition, self).__init__("lightposition") - - # Validate arg - # ------------ - 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.cone.Lightposition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.Lightposition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone import lightposition as v_lightposition - - # Initialize validators - # --------------------- - self._validators["x"] = v_lightposition.XValidator() - self._validators["y"] = v_lightposition.YValidator() - self._validators["z"] = v_lightposition.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lighting(_BaseTraceHierarchyType): - - # ambient - # ------- - @property - def ambient(self): - """ - Ambient light increases overall color visibility but can wash - out the image. - - The 'ambient' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ambient"] - - @ambient.setter - def ambient(self, val): - self["ambient"] = val - - # diffuse - # ------- - @property - def diffuse(self): - """ - Represents the extent that incident rays are reflected in a - range of angles. - - The 'diffuse' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["diffuse"] - - @diffuse.setter - def diffuse(self, val): - self["diffuse"] = val - - # facenormalsepsilon - # ------------------ - @property - def facenormalsepsilon(self): - """ - Epsilon for face normals calculation avoids math issues arising - from degenerate geometry. - - The 'facenormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["facenormalsepsilon"] - - @facenormalsepsilon.setter - def facenormalsepsilon(self, val): - self["facenormalsepsilon"] = val - - # fresnel - # ------- - @property - def fresnel(self): - """ - Represents the reflectance as a dependency of the viewing - angle; e.g. paper is reflective when viewing it from the edge - of the paper (almost 90 degrees), causing shine. - - The 'fresnel' property is a number and may be specified as: - - An int or float in the interval [0, 5] - - Returns - ------- - int|float - """ - return self["fresnel"] - - @fresnel.setter - def fresnel(self, val): - self["fresnel"] = val - - # roughness - # --------- - @property - def roughness(self): - """ - Alters specular reflection; the rougher the surface, the wider - and less contrasty the shine. - - The 'roughness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["roughness"] - - @roughness.setter - def roughness(self, val): - self["roughness"] = val - - # specular - # -------- - @property - def specular(self): - """ - Represents the level that incident rays are reflected in a - single direction, causing shine. - - The 'specular' property is a number and may be specified as: - - An int or float in the interval [0, 2] - - Returns - ------- - int|float - """ - return self["specular"] - - @specular.setter - def specular(self, val): - self["specular"] = val - - # vertexnormalsepsilon - # -------------------- - @property - def vertexnormalsepsilon(self): - """ - Epsilon for vertex normals calculation avoids math issues - arising from degenerate geometry. - - The 'vertexnormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["vertexnormalsepsilon"] - - @vertexnormalsepsilon.setter - def vertexnormalsepsilon(self, val): - self["vertexnormalsepsilon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - """ - - def __init__( - self, - arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, - **kwargs - ): - """ - Construct a new Lighting object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.cone.Lighting` - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - - Returns - ------- - Lighting - """ - super(Lighting, self).__init__("lighting") - - # Validate arg - # ------------ - 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.cone.Lighting -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.Lighting`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone import lighting as v_lighting - - # Initialize validators - # --------------------- - self._validators["ambient"] = v_lighting.AmbientValidator() - self._validators["diffuse"] = v_lighting.DiffuseValidator() - self._validators[ - "facenormalsepsilon" - ] = v_lighting.FacenormalsepsilonValidator() - self._validators["fresnel"] = v_lighting.FresnelValidator() - self._validators["roughness"] = v_lighting.RoughnessValidator() - self._validators["specular"] = v_lighting.SpecularValidator() - self._validators[ - "vertexnormalsepsilon" - ] = v_lighting.VertexnormalsepsilonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - self["ambient"] = ambient if ambient is not None else _v - _v = arg.pop("diffuse", None) - self["diffuse"] = diffuse if diffuse is not None else _v - _v = arg.pop("facenormalsepsilon", None) - self["facenormalsepsilon"] = ( - facenormalsepsilon if facenormalsepsilon is not None else _v - ) - _v = arg.pop("fresnel", None) - self["fresnel"] = fresnel if fresnel is not None else _v - _v = arg.pop("roughness", None) - self["roughness"] = roughness if roughness is not None else _v - _v = arg.pop("specular", None) - self["specular"] = specular if specular is not None else _v - _v = arg.pop("vertexnormalsepsilon", None) - self["vertexnormalsepsilon"] = ( - vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - ) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.cone.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.cone.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.cone.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.cone.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.cone.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.cone.colorbar.tickformatstopdefaults), - sets the default property values to use for elements of - cone.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.cone.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.cone.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use cone.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use cone.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.cone.colorbar.T - ickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.cone.c - olorbar.tickformatstopdefaults), sets the default - property values to use for elements of - cone.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.cone.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use cone.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use cone.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.cone.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.cone.colorbar.T - ickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.cone.c - olorbar.tickformatstopdefaults), sets the default - property values to use for elements of - cone.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.cone.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use cone.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use cone.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.cone.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Hoverlabel", - "Lighting", - "Lightposition", - "Stream", - "colorbar", - "hoverlabel", -] - -from plotly.graph_objs.cone import hoverlabel -from plotly.graph_objs.cone import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._lightposition import Lightposition + from ._lighting import Lighting + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + [ + "._stream.Stream", + "._lightposition.Lightposition", + "._lighting.Lighting", + "._hoverlabel.Hoverlabel", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py b/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py new file mode 100644 index 00000000000..9672946370f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py @@ -0,0 +1,1939 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone" + _path_str = "cone.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.cone.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.cone.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.cone.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.cone.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + cone.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.cone.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.cone.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use cone.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use cone.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.cone.colorbar.T + ickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.cone.c + olorbar.tickformatstopdefaults), sets the default + property values to use for elements of + cone.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.cone.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use cone.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use cone.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.cone.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.cone.colorbar.T + ickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.cone.c + olorbar.tickformatstopdefaults), sets the default + property values to use for elements of + cone.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.cone.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use cone.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use cone.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/cone/_hoverlabel.py new file mode 100644 index 00000000000..df6592a3bd1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone" + _path_str = "cone.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.cone.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/_lighting.py b/packages/python/plotly/plotly/graph_objs/cone/_lighting.py new file mode 100644 index 00000000000..b080e214614 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/_lighting.py @@ -0,0 +1,310 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone" + _path_str = "cone.lighting" + _valid_props = { + "ambient", + "diffuse", + "facenormalsepsilon", + "fresnel", + "roughness", + "specular", + "vertexnormalsepsilon", + } + + # ambient + # ------- + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + # diffuse + # ------- + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + # facenormalsepsilon + # ------------------ + @property + def facenormalsepsilon(self): + """ + Epsilon for face normals calculation avoids math issues arising + from degenerate geometry. + + The 'facenormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["facenormalsepsilon"] + + @facenormalsepsilon.setter + def facenormalsepsilon(self, val): + self["facenormalsepsilon"] = val + + # fresnel + # ------- + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + # roughness + # --------- + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + # specular + # -------- + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + # vertexnormalsepsilon + # -------------------- + @property + def vertexnormalsepsilon(self): + """ + Epsilon for vertex normals calculation avoids math issues + arising from degenerate geometry. + + The 'vertexnormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["vertexnormalsepsilon"] + + @vertexnormalsepsilon.setter + def vertexnormalsepsilon(self, val): + self["vertexnormalsepsilon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + facenormalsepsilon=None, + fresnel=None, + roughness=None, + specular=None, + vertexnormalsepsilon=None, + **kwargs + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.cone.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + + Returns + ------- + Lighting + """ + super(Lighting, self).__init__("lighting") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Lighting`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("ambient", None) + _v = ambient if ambient is not None else _v + if _v is not None: + self["ambient"] = _v + _v = arg.pop("diffuse", None) + _v = diffuse if diffuse is not None else _v + if _v is not None: + self["diffuse"] = _v + _v = arg.pop("facenormalsepsilon", None) + _v = facenormalsepsilon if facenormalsepsilon is not None else _v + if _v is not None: + self["facenormalsepsilon"] = _v + _v = arg.pop("fresnel", None) + _v = fresnel if fresnel is not None else _v + if _v is not None: + self["fresnel"] = _v + _v = arg.pop("roughness", None) + _v = roughness if roughness is not None else _v + if _v is not None: + self["roughness"] = _v + _v = arg.pop("specular", None) + _v = specular if specular is not None else _v + if _v is not None: + self["specular"] = _v + _v = arg.pop("vertexnormalsepsilon", None) + _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v + if _v is not None: + self["vertexnormalsepsilon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/_lightposition.py b/packages/python/plotly/plotly/graph_objs/cone/_lightposition.py new file mode 100644 index 00000000000..c1416c0e2e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/_lightposition.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone" + _path_str = "cone.lightposition" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super(Lightposition, self).__init__("lightposition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Lightposition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/_stream.py b/packages/python/plotly/plotly/graph_objs/cone/_stream.py new file mode 100644 index 00000000000..c603ac6c9ca --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone" + _path_str = "cone.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.cone.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py index 5c0e4f6d57a..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py @@ -1,722 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.cone.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.cone.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.cone.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.cone.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone.colorbar import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.cone.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.cone.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/_tickfont.py new file mode 100644 index 00000000000..5ea65d6c53d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone.colorbar" + _path_str = "cone.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..8ef40470088 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone.colorbar" + _path_str = "cone.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/_title.py new file mode 100644 index 00000000000..8534390154e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone.colorbar" + _path_str = "cone.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.cone.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py index 67e316128ed..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.cone.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/_font.py new file mode 100644 index 00000000000..4f33c10bbbc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone.colorbar.title" + _path_str = "cone.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py index fd9172b6e1e..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "cone.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.cone.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.cone.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.cone.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.cone.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/_font.py new file mode 100644 index 00000000000..3364022d899 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "cone.hoverlabel" + _path_str = "cone.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.cone.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/__init__.py index 5bf409d3e90..bf7d30c6e4c 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/__init__.py @@ -1,3270 +1,25 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.contour.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Sets the amount of smoothing for the contour lines, where 0 - corresponds to no smoothing. - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the contour line width in (in px) Defaults to 0.5 when - `contours.type` is "levels". Defaults to 2 when `contour.type` - is "constraint". - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour lines, - where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults to 0.5 - when `contours.type` is "levels". Defaults to 2 when - `contour.type` is "constraint". - """ - - def __init__( - self, arg=None, color=None, dash=None, smoothing=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.contour.Line` - color - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour lines, - where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults to 0.5 - when `contours.type` is "levels". Defaults to 2 when - `contour.type` is "constraint". - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.contour.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.contour.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.contour.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contours(_BaseTraceHierarchyType): - - # coloring - # -------- - @property - def coloring(self): - """ - Determines the coloring method showing the contour values. If - "fill", coloring is done evenly between each contour level If - "heatmap", a heatmap gradient coloring is applied between each - contour level. If "lines", coloring is done on the contour - lines. If "none", no coloring is applied on this trace. - - The 'coloring' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fill', 'heatmap', 'lines', 'none'] - - Returns - ------- - Any - """ - return self["coloring"] - - @coloring.setter - def coloring(self, val): - self["coloring"] = val - - # end - # --- - @property - def end(self): - """ - Sets the end contour level value. Must be more than - `contours.start` - - The 'end' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # labelfont - # --------- - @property - def labelfont(self): - """ - Sets the font used for labeling the contour levels. The default - color comes from the lines, if shown. The default family and - size come from `layout.font`. - - The 'labelfont' property is an instance of Labelfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.contours.Labelfont` - - A dict of string/value properties that will be passed - to the Labelfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.contour.contours.Labelfont - """ - return self["labelfont"] - - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val - - # labelformat - # ----------- - @property - def labelformat(self): - """ - Sets the contour label formatting rule using d3 formatting - mini-language which is very similar to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'labelformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelformat"] - - @labelformat.setter - def labelformat(self, val): - self["labelformat"] = val - - # operation - # --------- - @property - def operation(self): - """ - Sets the constraint operation. "=" keeps regions equal to - `value` "<" and "<=" keep regions less than `value` ">" and - ">=" keep regions greater than `value` "[]", "()", "[)", and - "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", - "](", ")[" keep regions outside `value[0]` to value[1]` Open - vs. closed intervals make no difference to constraint display, - but all versions are allowed for consistency with filter - transforms. - - The 'operation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', - ')(', '](', ')['] - - Returns - ------- - Any - """ - return self["operation"] - - @operation.setter - def operation(self, val): - self["operation"] = val - - # showlabels - # ---------- - @property - def showlabels(self): - """ - Determines whether to label the contour lines with their - values. - - The 'showlabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlabels"] - - @showlabels.setter - def showlabels(self, val): - self["showlabels"] = val - - # showlines - # --------- - @property - def showlines(self): - """ - Determines whether or not the contour lines are drawn. Has an - effect only if `contours.coloring` is set to "fill". - - The 'showlines' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlines"] - - @showlines.setter - def showlines(self, val): - self["showlines"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the step between each contour level. Must be positive. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting contour level value. Must be less than - `contours.end` - - The 'start' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # type - # ---- - @property - def type(self): - """ - If `levels`, the data is represented as a contour plot with - multiple levels displayed. If `constraint`, the data is - represented as constraints with the invalid region shaded as - specified by the `operation` and `value` parameters. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['levels', 'constraint'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value or values of the constraint boundary. When - `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an array of - two numbers where the first is the lower bound and the second - is the upper bound. - - The 'value' property accepts values of any type - - Returns - ------- - Any - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - coloring - Determines the coloring method showing the contour - values. If "fill", coloring is done evenly between each - contour level If "heatmap", a heatmap gradient coloring - is applied between each contour level. If "lines", - coloring is done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more than - `contours.start` - labelfont - Sets the font used for labeling the contour levels. The - default color comes from the lines, if shown. The - default family and size come from `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar to - Python, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps regions equal - to `value` "<" and "<=" keep regions less than `value` - ">" and ">=" keep regions greater than `value` "[]", - "()", "[)", and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions outside - `value[0]` to value[1]` Open vs. closed intervals make - no difference to constraint display, but all versions - are allowed for consistency with filter transforms. - showlabels - Determines whether to label the contour lines with - their values. - showlines - Determines whether or not the contour lines are drawn. - Has an effect only if `contours.coloring` is set to - "fill". - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - type - If `levels`, the data is represented as a contour plot - with multiple levels displayed. If `constraint`, the - data is represented as constraints with the invalid - region shaded as specified by the `operation` and - `value` parameters. - value - Sets the value or values of the constraint boundary. - When `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an - array of two numbers where the first is the lower bound - and the second is the upper bound. - """ - - def __init__( - self, - arg=None, - coloring=None, - end=None, - labelfont=None, - labelformat=None, - operation=None, - showlabels=None, - showlines=None, - size=None, - start=None, - type=None, - value=None, - **kwargs - ): - """ - Construct a new Contours object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.Contours` - coloring - Determines the coloring method showing the contour - values. If "fill", coloring is done evenly between each - contour level If "heatmap", a heatmap gradient coloring - is applied between each contour level. If "lines", - coloring is done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more than - `contours.start` - labelfont - Sets the font used for labeling the contour levels. The - default color comes from the lines, if shown. The - default family and size come from `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar to - Python, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps regions equal - to `value` "<" and "<=" keep regions less than `value` - ">" and ">=" keep regions greater than `value` "[]", - "()", "[)", and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions outside - `value[0]` to value[1]` Open vs. closed intervals make - no difference to constraint display, but all versions - are allowed for consistency with filter transforms. - showlabels - Determines whether to label the contour lines with - their values. - showlines - Determines whether or not the contour lines are drawn. - Has an effect only if `contours.coloring` is set to - "fill". - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - type - If `levels`, the data is represented as a contour plot - with multiple levels displayed. If `constraint`, the - data is represented as constraints with the invalid - region shaded as specified by the `operation` and - `value` parameters. - value - Sets the value or values of the constraint boundary. - When `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an - array of two numbers where the first is the lower bound - and the second is the upper bound. - - Returns - ------- - Contours - """ - super(Contours, self).__init__("contours") - - # Validate arg - # ------------ - 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.contour.Contours -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.Contours`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour import contours as v_contours - - # Initialize validators - # --------------------- - self._validators["coloring"] = v_contours.ColoringValidator() - self._validators["end"] = v_contours.EndValidator() - self._validators["labelfont"] = v_contours.LabelfontValidator() - self._validators["labelformat"] = v_contours.LabelformatValidator() - self._validators["operation"] = v_contours.OperationValidator() - self._validators["showlabels"] = v_contours.ShowlabelsValidator() - self._validators["showlines"] = v_contours.ShowlinesValidator() - self._validators["size"] = v_contours.SizeValidator() - self._validators["start"] = v_contours.StartValidator() - self._validators["type"] = v_contours.TypeValidator() - self._validators["value"] = v_contours.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("coloring", None) - self["coloring"] = coloring if coloring is not None else _v - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("labelformat", None) - self["labelformat"] = labelformat if labelformat is not None else _v - _v = arg.pop("operation", None) - self["operation"] = operation if operation is not None else _v - _v = arg.pop("showlabels", None) - self["showlabels"] = showlabels if showlabels is not None else _v - _v = arg.pop("showlines", None) - self["showlines"] = showlines if showlines is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.contour.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.contour.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.contour.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.contour.colorbar.tickformatstopdefaults), - sets the default property values to use for elements of - contour.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.contour.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.contour.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use contour.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use contour.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour.colorba - r.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.contou - r.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - contour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contour.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use contour.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use contour.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour.colorba - r.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.contou - r.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - contour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contour.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use contour.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use contour.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.contour.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Contours", - "Hoverlabel", - "Line", - "Stream", - "colorbar", - "contours", - "hoverlabel", -] - -from plotly.graph_objs.contour import hoverlabel -from plotly.graph_objs.contour import contours -from plotly.graph_objs.contour import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._contours import Contours + from ._colorbar import ColorBar + from . import hoverlabel + from . import contours + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".contours", ".colorbar"], + [ + "._stream.Stream", + "._line.Line", + "._hoverlabel.Hoverlabel", + "._contours.Contours", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py b/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py new file mode 100644 index 00000000000..c9ccef14af2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py @@ -0,0 +1,1940 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour" + _path_str = "contour.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.contour.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.contour.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.contour.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.contour.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + contour.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.contour.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.contour.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use contour.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use contour.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + r.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + contour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contour.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use contour.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use contour.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + r.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + contour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contour.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use contour.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use contour.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/_contours.py b/packages/python/plotly/plotly/graph_objs/contour/_contours.py new file mode 100644 index 00000000000..9f8ece948d1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/_contours.py @@ -0,0 +1,530 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contours(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour" + _path_str = "contour.contours" + _valid_props = { + "coloring", + "end", + "labelfont", + "labelformat", + "operation", + "showlabels", + "showlines", + "size", + "start", + "type", + "value", + } + + # coloring + # -------- + @property + def coloring(self): + """ + Determines the coloring method showing the contour values. If + "fill", coloring is done evenly between each contour level If + "heatmap", a heatmap gradient coloring is applied between each + contour level. If "lines", coloring is done on the contour + lines. If "none", no coloring is applied on this trace. + + The 'coloring' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fill', 'heatmap', 'lines', 'none'] + + Returns + ------- + Any + """ + return self["coloring"] + + @coloring.setter + def coloring(self, val): + self["coloring"] = val + + # end + # --- + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.contours.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.contour.contours.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # labelformat + # ----------- + @property + def labelformat(self): + """ + Sets the contour label formatting rule using d3 formatting + mini-language which is very similar to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'labelformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelformat"] + + @labelformat.setter + def labelformat(self, val): + self["labelformat"] = val + + # operation + # --------- + @property + def operation(self): + """ + Sets the constraint operation. "=" keeps regions equal to + `value` "<" and "<=" keep regions less than `value` ">" and + ">=" keep regions greater than `value` "[]", "()", "[)", and + "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", + "](", ")[" keep regions outside `value[0]` to value[1]` Open + vs. closed intervals make no difference to constraint display, + but all versions are allowed for consistency with filter + transforms. + + The 'operation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', + ')(', '](', ')['] + + Returns + ------- + Any + """ + return self["operation"] + + @operation.setter + def operation(self, val): + self["operation"] = val + + # showlabels + # ---------- + @property + def showlabels(self): + """ + Determines whether to label the contour lines with their + values. + + The 'showlabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlabels"] + + @showlabels.setter + def showlabels(self, val): + self["showlabels"] = val + + # showlines + # --------- + @property + def showlines(self): + """ + Determines whether or not the contour lines are drawn. Has an + effect only if `contours.coloring` is set to "fill". + + The 'showlines' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlines"] + + @showlines.setter + def showlines(self, val): + self["showlines"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # type + # ---- + @property + def type(self): + """ + If `levels`, the data is represented as a contour plot with + multiple levels displayed. If `constraint`, the data is + represented as constraints with the invalid region shaded as + specified by the `operation` and `value` parameters. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['levels', 'constraint'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value or values of the constraint boundary. When + `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an array of + two numbers where the first is the lower bound and the second + is the upper bound. + + The 'value' property accepts values of any type + + Returns + ------- + Any + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "heatmap", a heatmap gradient coloring + is applied between each contour level. If "lines", + coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar to + Python, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an + array of two numbers where the first is the lower bound + and the second is the upper bound. + """ + + def __init__( + self, + arg=None, + coloring=None, + end=None, + labelfont=None, + labelformat=None, + operation=None, + showlabels=None, + showlines=None, + size=None, + start=None, + type=None, + value=None, + **kwargs + ): + """ + Construct a new Contours object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Contours` + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "heatmap", a heatmap gradient coloring + is applied between each contour level. If "lines", + coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar to + Python, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an + array of two numbers where the first is the lower bound + and the second is the upper bound. + + Returns + ------- + Contours + """ + super(Contours, self).__init__("contours") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.Contours +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Contours`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("coloring", None) + _v = coloring if coloring is not None else _v + if _v is not None: + self["coloring"] = _v + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("labelfont", None) + _v = labelfont if labelfont is not None else _v + if _v is not None: + self["labelfont"] = _v + _v = arg.pop("labelformat", None) + _v = labelformat if labelformat is not None else _v + if _v is not None: + self["labelformat"] = _v + _v = arg.pop("operation", None) + _v = operation if operation is not None else _v + if _v is not None: + self["operation"] = _v + _v = arg.pop("showlabels", None) + _v = showlabels if showlabels is not None else _v + if _v is not None: + self["showlabels"] = _v + _v = arg.pop("showlines", None) + _v = showlines if showlines is not None else _v + if _v is not None: + self["showlines"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/contour/_hoverlabel.py new file mode 100644 index 00000000000..fa38aa12949 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour" + _path_str = "contour.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.contour.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/_line.py b/packages/python/plotly/plotly/graph_objs/contour/_line.py new file mode 100644 index 00000000000..ffdd906e970 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/_line.py @@ -0,0 +1,246 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour" + _path_str = "contour.line" + _valid_props = {"color", "dash", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Sets the amount of smoothing for the contour lines, where 0 + corresponds to no smoothing. + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the contour line width in (in px) Defaults to 0.5 when + `contours.type` is "levels". Defaults to 2 when `contour.type` + is "constraint". + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + """ + + def __init__( + self, arg=None, color=None, dash=None, smoothing=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.contour.Line` + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/_stream.py b/packages/python/plotly/plotly/graph_objs/contour/_stream.py new file mode 100644 index 00000000000..f4156aff2a5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour" + _path_str = "contour.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py index cbeaa4eed20..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.contour.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.contour.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.contour.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.contour.colorb - ar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.contour.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.contour.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.contour.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/_tickfont.py new file mode 100644 index 00000000000..ca088c6ef22 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour.colorbar" + _path_str = "contour.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..b46e6a2f276 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour.colorbar" + _path_str = "contour.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contour.colorb + ar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/_title.py new file mode 100644 index 00000000000..5e91e7cdab5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour.colorbar" + _path_str = "contour.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.contour.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py index 987e423df63..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.contour.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/_font.py new file mode 100644 index 00000000000..75b5ae6319e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour.colorbar.title" + _path_str = "contour.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py index 69a8f1abfe8..4c1ccf7f8e8 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py @@ -1,231 +1,10 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._labelfont import Labelfont +else: + from _plotly_utils.importers import relative_import -class Labelfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour.contours" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Labelfont object - - Sets the font used for labeling the contour levels. The default - color comes from the lines, if shown. The default family and - size come from `layout.font`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.contours.Labelfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Labelfont - """ - super(Labelfont, self).__init__("labelfont") - - # Validate arg - # ------------ - 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.contour.contours.Labelfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.contours.Labelfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour.contours import labelfont as v_labelfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_labelfont.ColorValidator() - self._validators["family"] = v_labelfont.FamilyValidator() - self._validators["size"] = v_labelfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Labelfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._labelfont.Labelfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/contour/contours/_labelfont.py b/packages/python/plotly/plotly/graph_objs/contour/contours/_labelfont.py new file mode 100644 index 00000000000..e3ec7f5db7d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/contours/_labelfont.py @@ -0,0 +1,228 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour.contours" + _path_str = "contour.contours.labelfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Labelfont object + + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.contours.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Labelfont + """ + super(Labelfont, self).__init__("labelfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.contours.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.contours.Labelfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py index 003da325afc..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contour.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contour.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.contour.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contour.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contour.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/_font.py new file mode 100644 index 00000000000..944e5852f97 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contour.hoverlabel" + _path_str = "contour.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contour.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py index 39620566c41..bdd4610466c 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py @@ -1,2771 +1,22 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contourcarpet.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.contourcarpet.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Sets the amount of smoothing for the contour lines, where 0 - corresponds to no smoothing. - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the contour line width in (in px) Defaults to 0.5 when - `contours.type` is "levels". Defaults to 2 when `contour.type` - is "constraint". - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour lines, - where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults to 0.5 - when `contours.type` is "levels". Defaults to 2 when - `contour.type` is "constraint". - """ - - def __init__( - self, arg=None, color=None, dash=None, smoothing=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.contourcarpet.Line` - color - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour lines, - where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults to 0.5 - when `contours.type` is "levels". Defaults to 2 when - `contour.type` is "constraint". - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.contourcarpet.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contours(_BaseTraceHierarchyType): - - # coloring - # -------- - @property - def coloring(self): - """ - Determines the coloring method showing the contour values. If - "fill", coloring is done evenly between each contour level If - "lines", coloring is done on the contour lines. If "none", no - coloring is applied on this trace. - - The 'coloring' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fill', 'lines', 'none'] - - Returns - ------- - Any - """ - return self["coloring"] - - @coloring.setter - def coloring(self, val): - self["coloring"] = val - - # end - # --- - @property - def end(self): - """ - Sets the end contour level value. Must be more than - `contours.start` - - The 'end' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # labelfont - # --------- - @property - def labelfont(self): - """ - Sets the font used for labeling the contour levels. The default - color comes from the lines, if shown. The default family and - size come from `layout.font`. - - The 'labelfont' property is an instance of Labelfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont` - - A dict of string/value properties that will be passed - to the Labelfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.contourcarpet.contours.Labelfont - """ - return self["labelfont"] - - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val - - # labelformat - # ----------- - @property - def labelformat(self): - """ - Sets the contour label formatting rule using d3 formatting - mini-language which is very similar to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'labelformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelformat"] - - @labelformat.setter - def labelformat(self, val): - self["labelformat"] = val - - # operation - # --------- - @property - def operation(self): - """ - Sets the constraint operation. "=" keeps regions equal to - `value` "<" and "<=" keep regions less than `value` ">" and - ">=" keep regions greater than `value` "[]", "()", "[)", and - "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", - "](", ")[" keep regions outside `value[0]` to value[1]` Open - vs. closed intervals make no difference to constraint display, - but all versions are allowed for consistency with filter - transforms. - - The 'operation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', - ')(', '](', ')['] - - Returns - ------- - Any - """ - return self["operation"] - - @operation.setter - def operation(self, val): - self["operation"] = val - - # showlabels - # ---------- - @property - def showlabels(self): - """ - Determines whether to label the contour lines with their - values. - - The 'showlabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlabels"] - - @showlabels.setter - def showlabels(self, val): - self["showlabels"] = val - - # showlines - # --------- - @property - def showlines(self): - """ - Determines whether or not the contour lines are drawn. Has an - effect only if `contours.coloring` is set to "fill". - - The 'showlines' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlines"] - - @showlines.setter - def showlines(self, val): - self["showlines"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the step between each contour level. Must be positive. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting contour level value. Must be less than - `contours.end` - - The 'start' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # type - # ---- - @property - def type(self): - """ - If `levels`, the data is represented as a contour plot with - multiple levels displayed. If `constraint`, the data is - represented as constraints with the invalid region shaded as - specified by the `operation` and `value` parameters. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['levels', 'constraint'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value or values of the constraint boundary. When - `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an array of - two numbers where the first is the lower bound and the second - is the upper bound. - - The 'value' property accepts values of any type - - Returns - ------- - Any - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - coloring - Determines the coloring method showing the contour - values. If "fill", coloring is done evenly between each - contour level If "lines", coloring is done on the - contour lines. If "none", no coloring is applied on - this trace. - end - Sets the end contour level value. Must be more than - `contours.start` - labelfont - Sets the font used for labeling the contour levels. The - default color comes from the lines, if shown. The - default family and size come from `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar to - Python, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps regions equal - to `value` "<" and "<=" keep regions less than `value` - ">" and ">=" keep regions greater than `value` "[]", - "()", "[)", and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions outside - `value[0]` to value[1]` Open vs. closed intervals make - no difference to constraint display, but all versions - are allowed for consistency with filter transforms. - showlabels - Determines whether to label the contour lines with - their values. - showlines - Determines whether or not the contour lines are drawn. - Has an effect only if `contours.coloring` is set to - "fill". - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - type - If `levels`, the data is represented as a contour plot - with multiple levels displayed. If `constraint`, the - data is represented as constraints with the invalid - region shaded as specified by the `operation` and - `value` parameters. - value - Sets the value or values of the constraint boundary. - When `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an - array of two numbers where the first is the lower bound - and the second is the upper bound. - """ - - def __init__( - self, - arg=None, - coloring=None, - end=None, - labelfont=None, - labelformat=None, - operation=None, - showlabels=None, - showlines=None, - size=None, - start=None, - type=None, - value=None, - **kwargs - ): - """ - Construct a new Contours object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contourcarpet.Contours` - coloring - Determines the coloring method showing the contour - values. If "fill", coloring is done evenly between each - contour level If "lines", coloring is done on the - contour lines. If "none", no coloring is applied on - this trace. - end - Sets the end contour level value. Must be more than - `contours.start` - labelfont - Sets the font used for labeling the contour levels. The - default color comes from the lines, if shown. The - default family and size come from `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar to - Python, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps regions equal - to `value` "<" and "<=" keep regions less than `value` - ">" and ">=" keep regions greater than `value` "[]", - "()", "[)", and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions outside - `value[0]` to value[1]` Open vs. closed intervals make - no difference to constraint display, but all versions - are allowed for consistency with filter transforms. - showlabels - Determines whether to label the contour lines with - their values. - showlines - Determines whether or not the contour lines are drawn. - Has an effect only if `contours.coloring` is set to - "fill". - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - type - If `levels`, the data is represented as a contour plot - with multiple levels displayed. If `constraint`, the - data is represented as constraints with the invalid - region shaded as specified by the `operation` and - `value` parameters. - value - Sets the value or values of the constraint boundary. - When `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an - array of two numbers where the first is the lower bound - and the second is the upper bound. - - Returns - ------- - Contours - """ - super(Contours, self).__init__("contours") - - # Validate arg - # ------------ - 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.contourcarpet.Contours -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.Contours`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet import contours as v_contours - - # Initialize validators - # --------------------- - self._validators["coloring"] = v_contours.ColoringValidator() - self._validators["end"] = v_contours.EndValidator() - self._validators["labelfont"] = v_contours.LabelfontValidator() - self._validators["labelformat"] = v_contours.LabelformatValidator() - self._validators["operation"] = v_contours.OperationValidator() - self._validators["showlabels"] = v_contours.ShowlabelsValidator() - self._validators["showlines"] = v_contours.ShowlinesValidator() - self._validators["size"] = v_contours.SizeValidator() - self._validators["start"] = v_contours.StartValidator() - self._validators["type"] = v_contours.TypeValidator() - self._validators["value"] = v_contours.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("coloring", None) - self["coloring"] = coloring if coloring is not None else _v - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("labelformat", None) - self["labelformat"] = labelformat if labelformat is not None else _v - _v = arg.pop("operation", None) - self["operation"] = operation if operation is not None else _v - _v = arg.pop("showlabels", None) - self["showlabels"] = showlabels if showlabels is not None else _v - _v = arg.pop("showlines", None) - self["showlines"] = showlines if showlines is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.contourcarpet.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.contourcarpet.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.contourcarpet.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.contourcarpet. - colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - contourcarpet.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.contourcarpet.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.contourcarpet.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use contourcarpet.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use contourcarpet.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contourcarpet.c - olorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.contou - rcarpet.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - contourcarpet.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contourcarpet.colorbar.Tit - le` instance or dict with compatible properties - titlefont - Deprecated: Please use - contourcarpet.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - contourcarpet.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contourcarpet.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contourcarpet.c - olorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.contou - rcarpet.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - contourcarpet.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contourcarpet.colorbar.Tit - le` instance or dict with compatible properties - titlefont - Deprecated: Please use - contourcarpet.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - contourcarpet.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.contourcarpet.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Contours", "Line", "Stream", "colorbar", "contours"] - -from plotly.graph_objs.contourcarpet import contours -from plotly.graph_objs.contourcarpet import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._line import Line + from ._contours import Contours + from ._colorbar import ColorBar + from . import contours + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".contours", ".colorbar"], + [ + "._stream.Stream", + "._line.Line", + "._contours.Contours", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py new file mode 100644 index 00000000000..8cc36cf5bd4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.contourcarpet.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.contourcarpet.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.contourcarpet. + colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + contourcarpet.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use contourcarpet.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use contourcarpet.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contourcarpet.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + rcarpet.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + contourcarpet.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contourcarpet.colorbar.Tit + le` instance or dict with compatible properties + titlefont + Deprecated: Please use + contourcarpet.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + contourcarpet.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contourcarpet.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + rcarpet.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + contourcarpet.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contourcarpet.colorbar.Tit + le` instance or dict with compatible properties + titlefont + Deprecated: Please use + contourcarpet.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + contourcarpet.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/_contours.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/_contours.py new file mode 100644 index 00000000000..cddd0f73a98 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/_contours.py @@ -0,0 +1,527 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contours(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.contours" + _valid_props = { + "coloring", + "end", + "labelfont", + "labelformat", + "operation", + "showlabels", + "showlines", + "size", + "start", + "type", + "value", + } + + # coloring + # -------- + @property + def coloring(self): + """ + Determines the coloring method showing the contour values. If + "fill", coloring is done evenly between each contour level If + "lines", coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + + The 'coloring' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fill', 'lines', 'none'] + + Returns + ------- + Any + """ + return self["coloring"] + + @coloring.setter + def coloring(self, val): + self["coloring"] = val + + # end + # --- + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.contourcarpet.contours.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # labelformat + # ----------- + @property + def labelformat(self): + """ + Sets the contour label formatting rule using d3 formatting + mini-language which is very similar to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'labelformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelformat"] + + @labelformat.setter + def labelformat(self, val): + self["labelformat"] = val + + # operation + # --------- + @property + def operation(self): + """ + Sets the constraint operation. "=" keeps regions equal to + `value` "<" and "<=" keep regions less than `value` ">" and + ">=" keep regions greater than `value` "[]", "()", "[)", and + "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", + "](", ")[" keep regions outside `value[0]` to value[1]` Open + vs. closed intervals make no difference to constraint display, + but all versions are allowed for consistency with filter + transforms. + + The 'operation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', + ')(', '](', ')['] + + Returns + ------- + Any + """ + return self["operation"] + + @operation.setter + def operation(self, val): + self["operation"] = val + + # showlabels + # ---------- + @property + def showlabels(self): + """ + Determines whether to label the contour lines with their + values. + + The 'showlabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlabels"] + + @showlabels.setter + def showlabels(self, val): + self["showlabels"] = val + + # showlines + # --------- + @property + def showlines(self): + """ + Determines whether or not the contour lines are drawn. Has an + effect only if `contours.coloring` is set to "fill". + + The 'showlines' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlines"] + + @showlines.setter + def showlines(self, val): + self["showlines"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # type + # ---- + @property + def type(self): + """ + If `levels`, the data is represented as a contour plot with + multiple levels displayed. If `constraint`, the data is + represented as constraints with the invalid region shaded as + specified by the `operation` and `value` parameters. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['levels', 'constraint'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value or values of the constraint boundary. When + `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an array of + two numbers where the first is the lower bound and the second + is the upper bound. + + The 'value' property accepts values of any type + + Returns + ------- + Any + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "lines", coloring is done on the + contour lines. If "none", no coloring is applied on + this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar to + Python, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an + array of two numbers where the first is the lower bound + and the second is the upper bound. + """ + + def __init__( + self, + arg=None, + coloring=None, + end=None, + labelfont=None, + labelformat=None, + operation=None, + showlabels=None, + showlines=None, + size=None, + start=None, + type=None, + value=None, + **kwargs + ): + """ + Construct a new Contours object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.Contours` + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "lines", coloring is done on the + contour lines. If "none", no coloring is applied on + this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar to + Python, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an + array of two numbers where the first is the lower bound + and the second is the upper bound. + + Returns + ------- + Contours + """ + super(Contours, self).__init__("contours") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.Contours +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Contours`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("coloring", None) + _v = coloring if coloring is not None else _v + if _v is not None: + self["coloring"] = _v + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("labelfont", None) + _v = labelfont if labelfont is not None else _v + if _v is not None: + self["labelfont"] = _v + _v = arg.pop("labelformat", None) + _v = labelformat if labelformat is not None else _v + if _v is not None: + self["labelformat"] = _v + _v = arg.pop("operation", None) + _v = operation if operation is not None else _v + if _v is not None: + self["operation"] = _v + _v = arg.pop("showlabels", None) + _v = showlabels if showlabels is not None else _v + if _v is not None: + self["showlabels"] = _v + _v = arg.pop("showlines", None) + _v = showlines if showlines is not None else _v + if _v is not None: + self["showlines"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/_line.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/_line.py new file mode 100644 index 00000000000..d60d1867bd0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/_line.py @@ -0,0 +1,247 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.line" + _valid_props = {"color", "dash", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Sets the amount of smoothing for the contour lines, where 0 + corresponds to no smoothing. + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the contour line width in (in px) Defaults to 0.5 when + `contours.type` is "levels". Defaults to 2 when `contour.type` + is "constraint". + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + """ + + def __init__( + self, arg=None, color=None, dash=None, smoothing=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.contourcarpet.Line` + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/_stream.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/_stream.py new file mode 100644 index 00000000000..f1a19f6e242 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py index 85b00cea223..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.contourcarpet.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.contourcarpet.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.contourcarpet.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.contourcarpet. - colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.contourcarpet.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.contourcarpet. - colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.contourcarpet.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.contourcarpet.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py new file mode 100644 index 00000000000..ee4fba08883 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet.colorbar" + _path_str = "contourcarpet.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..a9b3f38db60 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet.colorbar" + _path_str = "contourcarpet.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_title.py new file mode 100644 index 00000000000..add98b33898 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet.colorbar" + _path_str = "contourcarpet.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py index e9483029ace..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.contourcarpet. - colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.contourcarpet.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/_font.py new file mode 100644 index 00000000000..b9332ea2892 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet.colorbar.title" + _path_str = "contourcarpet.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py index 85f436be790..4c1ccf7f8e8 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py @@ -1,231 +1,10 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._labelfont import Labelfont +else: + from _plotly_utils.importers import relative_import -class Labelfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet.contours" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Labelfont object - - Sets the font used for labeling the contour levels. The default - color comes from the lines, if shown. The default family and - size come from `layout.font`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.contourcarpet. - contours.Labelfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Labelfont - """ - super(Labelfont, self).__init__("labelfont") - - # Validate arg - # ------------ - 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.contourcarpet.contours.Labelfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet.contours import labelfont as v_labelfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_labelfont.ColorValidator() - self._validators["family"] = v_labelfont.FamilyValidator() - self._validators["size"] = v_labelfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Labelfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._labelfont.Labelfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/_labelfont.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/_labelfont.py new file mode 100644 index 00000000000..825ef6e173a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/_labelfont.py @@ -0,0 +1,228 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "contourcarpet.contours" + _path_str = "contourcarpet.contours.labelfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Labelfont object + + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + contours.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Labelfont + """ + super(Labelfont, self).__init__("labelfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.contourcarpet.contours.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py index 3eac25057dd..6f74f557def 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py @@ -1,2502 +1,16 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.densitymapbox.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.densitymapbox.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.densitymapbox.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.densitymapbox.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.densitymapbox.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.densitymapbox.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.densitymapbox.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.densitymapbox.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.densitymapbox. - colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - densitymapbox.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.densitymapbox.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.densitymapbox.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use densitymapbox.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use densitymapbox.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.densitymapbox.c - olorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.densit - ymapbox.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - densitymapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymapbox.colorbar.Tit - le` instance or dict with compatible properties - titlefont - Deprecated: Please use - densitymapbox.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - densitymapbox.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.densitymapbox.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.densitymapbox.c - olorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.densit - ymapbox.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - densitymapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymapbox.colorbar.Tit - le` instance or dict with compatible properties - titlefont - Deprecated: Please use - densitymapbox.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - densitymapbox.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.densitymapbox.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Hoverlabel", "Stream", "colorbar", "hoverlabel"] - -from plotly.graph_objs.densitymapbox import hoverlabel -from plotly.graph_objs.densitymapbox import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + ["._stream.Stream", "._hoverlabel.Hoverlabel", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py new file mode 100644 index 00000000000..2a05755b66e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.densitymapbox.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.densitymapbox.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.densitymapbox. + colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + densitymapbox.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use densitymapbox.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use densitymapbox.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.densitymapbox.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.densit + ymapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + densitymapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymapbox.colorbar.Tit + le` instance or dict with compatible properties + titlefont + Deprecated: Please use + densitymapbox.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + densitymapbox.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.densitymapbox.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.densit + ymapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + densitymapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymapbox.colorbar.Tit + le` instance or dict with compatible properties + titlefont + Deprecated: Please use + densitymapbox.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + densitymapbox.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/_hoverlabel.py new file mode 100644 index 00000000000..2bfe6e29a26 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.densitymapbox.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/_stream.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/_stream.py new file mode 100644 index 00000000000..204525cc2fe --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py index 47ac2723c9e..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.densitymapbox.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.densitymapbox.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.densitymapbox.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.densitymapbox. - colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.densitymapbox.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.densitymapbox. - colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.densitymapbox.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.densitymapbox.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py new file mode 100644 index 00000000000..1486a85f6e9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox.colorbar" + _path_str = "densitymapbox.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..cd04f57a868 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox.colorbar" + _path_str = "densitymapbox.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_title.py new file mode 100644 index 00000000000..430c7f31aa0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox.colorbar" + _path_str = "densitymapbox.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py index d1b6889c602..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.densitymapbox. - colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.densitymapbox.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/_font.py new file mode 100644 index 00000000000..ce4deeff349 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox.colorbar.title" + _path_str = "densitymapbox.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py index 31375bafc69..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "densitymapbox.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.densitymapbox. - hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.densitymapbox.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.densitymapbox.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/_font.py new file mode 100644 index 00000000000..1c534ece4e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "densitymapbox.hoverlabel" + _path_str = "densitymapbox.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.densitymapbox.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/__init__.py index 58ec5e60df4..651f5d2633e 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/__init__.py @@ -1,2866 +1,29 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `text`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.funnel.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.funnel.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.funnel.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Outsidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Outsidetextfont object - - Sets the font used for `text` lying outside the bar. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.Outsidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Outsidetextfont - """ - super(Outsidetextfont, self).__init__("outsidetextfont") - - # Validate arg - # ------------ - 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.funnel.Outsidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Outsidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import outsidetextfont as v_outsidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_outsidetextfont.ColorValidator() - self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() - self._validators["family"] = v_outsidetextfont.FamilyValidator() - self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() - self._validators["size"] = v_outsidetextfont.SizeValidator() - self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to funnel.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.funnel. - marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.funnel.marker.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - funnel.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.funnel.marker.colo - rbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - funnel.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - funnel.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.funnel.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.funnel.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the bars. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.funnel.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.funnel.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.funnel.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.funnel.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.funnel.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.funnel.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `text` lying inside the bar. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.funnel.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnel.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.funnel.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Connector(_BaseTraceHierarchyType): - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.connector.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.funnel.connector.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines if connector regions and lines are drawn. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fillcolor - Sets the fill color. - line - :class:`plotly.graph_objects.funnel.connector.Line` - instance or dict with compatible properties - visible - Determines if connector regions and lines are drawn. - """ - - def __init__(self, arg=None, fillcolor=None, line=None, visible=None, **kwargs): - """ - Construct a new Connector object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.Connector` - fillcolor - Sets the fill color. - line - :class:`plotly.graph_objects.funnel.connector.Line` - instance or dict with compatible properties - visible - Determines if connector regions and lines are drawn. - - Returns - ------- - Connector - """ - super(Connector, self).__init__("connector") - - # Validate arg - # ------------ - 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.funnel.Connector -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.Connector`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel import connector as v_connector - - # Initialize validators - # --------------------- - self._validators["fillcolor"] = v_connector.FillcolorValidator() - self._validators["line"] = v_connector.LineValidator() - self._validators["visible"] = v_connector.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Connector", - "Hoverlabel", - "Insidetextfont", - "Marker", - "Outsidetextfont", - "Stream", - "Textfont", - "connector", - "hoverlabel", - "marker", -] - -from plotly.graph_objs.funnel import marker -from plotly.graph_objs.funnel import hoverlabel -from plotly.graph_objs.funnel import connector +import sys + +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._stream import Stream + from ._outsidetextfont import Outsidetextfont + from ._marker import Marker + from ._insidetextfont import Insidetextfont + from ._hoverlabel import Hoverlabel + from ._connector import Connector + from . import marker + from . import hoverlabel + from . import connector +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".marker", ".hoverlabel", ".connector"], + [ + "._textfont.Textfont", + "._stream.Stream", + "._outsidetextfont.Outsidetextfont", + "._marker.Marker", + "._insidetextfont.Insidetextfont", + "._hoverlabel.Hoverlabel", + "._connector.Connector", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_connector.py b/packages/python/plotly/plotly/graph_objs/funnel/_connector.py new file mode 100644 index 00000000000..19f52cd4990 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_connector.py @@ -0,0 +1,208 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Connector(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.connector" + _valid_props = {"fillcolor", "line", "visible"} + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.connector.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.funnel.connector.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines if connector regions and lines are drawn. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the fill color. + line + :class:`plotly.graph_objects.funnel.connector.Line` + instance or dict with compatible properties + visible + Determines if connector regions and lines are drawn. + """ + + def __init__(self, arg=None, fillcolor=None, line=None, visible=None, **kwargs): + """ + Construct a new Connector object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.Connector` + fillcolor + Sets the fill color. + line + :class:`plotly.graph_objects.funnel.connector.Line` + instance or dict with compatible properties + visible + Determines if connector regions and lines are drawn. + + Returns + ------- + Connector + """ + super(Connector, self).__init__("connector") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Connector +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Connector`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/funnel/_hoverlabel.py new file mode 100644 index 00000000000..ad01e1684c0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnel.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/funnel/_insidetextfont.py new file mode 100644 index 00000000000..894163c56cc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `text` lying inside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_marker.py b/packages/python/plotly/plotly/graph_objs/funnel/_marker.py new file mode 100644 index 00000000000..a9a2dee5913 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_marker.py @@ -0,0 +1,1052 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to funnel.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.funnel. + marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.funnel.marker.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + funnel.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.funnel.marker.colo + rbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + funnel.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + funnel.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.funnel.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.funnel.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the bars. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.funnel.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.funnel.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.funnel.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.funnel.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.funnel.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_outsidetextfont.py b/packages/python/plotly/plotly/graph_objs/funnel/_outsidetextfont.py new file mode 100644 index 00000000000..316757b3b38 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_outsidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.outsidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `text` lying outside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Outsidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_stream.py b/packages/python/plotly/plotly/graph_objs/funnel/_stream.py new file mode 100644 index 00000000000..9b9ca36ed05 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.funnel.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/_textfont.py b/packages/python/plotly/plotly/graph_objs/funnel/_textfont.py new file mode 100644 index 00000000000..b949c42f520 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel" + _path_str = "funnel.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `text`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py index 820eb711998..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py @@ -1,208 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is a string and must be specified as: - - One of the following strings: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.connector" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=None, dash=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.funnel.connector.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.funnel.connector.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.connector.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.connector import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py b/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py new file mode 100644 index 00000000000..307d4313035 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.connector" + _path_str = "funnel.connector.line" + _valid_props = {"color", "dash", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is a string and must be specified as: + - One of the following strings: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=None, dash=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.funnel.connector.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.connector.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.connector.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py index ef1d489941d..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.funnel.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/_font.py new file mode 100644 index 00000000000..e8909f1ec1b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.hoverlabel" + _path_str = "funnel.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py index afbe497e1d8..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py @@ -1,2508 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to funnel.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.funnel.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.funnel.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.funnel.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.funnel.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.funnel.marker. - colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - funnel.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.funnel.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.funnel.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use funnel.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use funnel.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.funnel.marker.c - olorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.funnel - .marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - funnel.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.funnel.marker.colorbar.Tit - le` instance or dict with compatible properties - titlefont - Deprecated: Please use - funnel.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - funnel.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.funnel.marker.c - olorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.funnel - .marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - funnel.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.funnel.marker.colorbar.Tit - le` instance or dict with compatible properties - titlefont - Deprecated: Please use - funnel.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - funnel.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.funnel.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.funnel.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py new file mode 100644 index 00000000000..aa001ec3fa8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.marker" + _path_str = "funnel.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.funnel.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.funnel.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.funnel.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.funnel.marker. + colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + funnel.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.funnel.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.funnel.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use funnel.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use funnel.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.funnel.marker.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.funnel + .marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + funnel.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.funnel.marker.colorbar.Tit + le` instance or dict with compatible properties + titlefont + Deprecated: Please use + funnel.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + funnel.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.funnel.marker.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.funnel + .marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + funnel.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.funnel.marker.colorbar.Tit + le` instance or dict with compatible properties + titlefont + Deprecated: Please use + funnel.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + funnel.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/_line.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/_line.py new file mode 100644 index 00000000000..0f1c543d885 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.marker" + _path_str = "funnel.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to funnel.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py index 617e057be73..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.funnel.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnel.marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.funnel.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.funnel.marker. - colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.funnel.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.funnel.marker. - colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.funnel.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.funnel.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..90bbe256b49 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.marker.colorbar" + _path_str = "funnel.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.funnel.marker. + colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..d8f76b9b8e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.marker.colorbar" + _path_str = "funnel.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.funnel.marker. + colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_title.py new file mode 100644 index 00000000000..b7dfc01b2d4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.marker.colorbar" + _path_str = "funnel.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.funnel.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnel.marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py index 72c0e9f7ff2..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnel.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.funnel.marker. - colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.funnel.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnel.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..977359e2f4d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnel.marker.colorbar.title" + _path_str = "funnel.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.funnel.marker. + colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnel.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py index c5005956cd2..c1274c69908 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py @@ -1,1907 +1,29 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets the font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnelarea.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # position - # -------- - @property - def position(self): - """ - Specifies the location of the `title`. Note that the title's - position used to be set by the now deprecated `titleposition` - attribute. - - The 'position' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top left', 'top center', 'top right'] - - Returns - ------- - Any - """ - return self["position"] - - @position.setter - def position(self, val): - self["position"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the chart. If it is empty, no title is - displayed. Note that before the existence of `title.text`, the - title's contents used to be defined as the `title` attribute - itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets the font used for `title`. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - position - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no title - is displayed. Note that before the existence of - `title.text`, the title's contents used to be defined - as the `title` attribute itself. This behavior has been - deprecated. - """ - - def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Title` - font - Sets the font used for `title`. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - position - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no title - is displayed. Note that before the existence of - `title.text`, the title's contents used to be defined - as the `title` attribute itself. This behavior has been - deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.funnelarea.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["position"] = v_title.PositionValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("position", None) - self["position"] = position if position is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `textinfo`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.funnelarea.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.funnelarea.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # colors - # ------ - @property - def colors(self): - """ - Sets the color of each sector. If not specified, the default - trace color set is used to pick the sector colors. - - The 'colors' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["colors"] - - @colors.setter - def colors(self, val): - self["colors"] = val - - # colorssrc - # --------- - @property - def colorssrc(self): - """ - Sets the source reference on Chart Studio Cloud for colors . - - The 'colorssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorssrc"] - - @colorssrc.setter - def colorssrc(self, val): - self["colorssrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.funnelarea.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - colors - Sets the color of each sector. If not specified, the - default trace color set is used to pick the sector - colors. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - line - :class:`plotly.graph_objects.funnelarea.marker.Line` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Marker` - colors - Sets the color of each sector. If not specified, the - default trace color set is used to pick the sector - colors. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - line - :class:`plotly.graph_objects.funnelarea.marker.Line` - instance or dict with compatible properties - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.funnelarea.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["colors"] = v_marker.ColorsValidator() - self._validators["colorssrc"] = v_marker.ColorssrcValidator() - self._validators["line"] = v_marker.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colors", None) - self["colors"] = colors if colors is not None else _v - _v = arg.pop("colorssrc", None) - self["colorssrc"] = colorssrc if colorssrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `textinfo` lying inside the sector. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.funnelarea.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.funnelarea.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.funnelarea.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.funnelarea.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this funnelarea trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this funnelarea trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this funnelarea trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this funnelarea trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this funnelarea trace . - row - If there is a layout grid, use the domain for this row - in the grid for this funnelarea trace . - x - Sets the horizontal domain of this funnelarea trace (in - plot fraction). - y - Sets the vertical domain of this funnelarea trace (in - plot fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this funnelarea trace . - row - If there is a layout grid, use the domain for this row - in the grid for this funnelarea trace . - x - Sets the horizontal domain of this funnelarea trace (in - plot fraction). - y - Sets the vertical domain of this funnelarea trace (in - plot fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.funnelarea.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Domain", - "Hoverlabel", - "Insidetextfont", - "Marker", - "Stream", - "Textfont", - "Title", - "hoverlabel", - "marker", - "title", -] - -from plotly.graph_objs.funnelarea import title -from plotly.graph_objs.funnelarea import marker -from plotly.graph_objs.funnelarea import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._textfont import Textfont + from ._stream import Stream + from ._marker import Marker + from ._insidetextfont import Insidetextfont + from ._hoverlabel import Hoverlabel + from ._domain import Domain + from . import title + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title", ".marker", ".hoverlabel"], + [ + "._title.Title", + "._textfont.Textfont", + "._stream.Stream", + "._marker.Marker", + "._insidetextfont.Insidetextfont", + "._hoverlabel.Hoverlabel", + "._domain.Domain", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_domain.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_domain.py new file mode 100644 index 00000000000..538990353b9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this funnelarea trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this funnelarea trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this funnelarea trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this funnelarea trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this funnelarea trace . + row + If there is a layout grid, use the domain for this row + in the grid for this funnelarea trace . + x + Sets the horizontal domain of this funnelarea trace (in + plot fraction). + y + Sets the vertical domain of this funnelarea trace (in + plot fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this funnelarea trace . + row + If there is a layout grid, use the domain for this row + in the grid for this funnelarea trace . + x + Sets the horizontal domain of this funnelarea trace (in + plot fraction). + y + Sets the vertical domain of this funnelarea trace (in + plot fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_hoverlabel.py new file mode 100644 index 00000000000..6b04937b706 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnelarea.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_insidetextfont.py new file mode 100644 index 00000000000..33747e1ef96 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `textinfo` lying inside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_marker.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_marker.py new file mode 100644 index 00000000000..3a2af7bf778 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_marker.py @@ -0,0 +1,179 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.marker" + _valid_props = {"colors", "colorssrc", "line"} + + # colors + # ------ + @property + def colors(self): + """ + Sets the color of each sector. If not specified, the default + trace color set is used to pick the sector colors. + + The 'colors' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["colors"] + + @colors.setter + def colors(self, val): + self["colors"] = val + + # colorssrc + # --------- + @property + def colorssrc(self): + """ + Sets the source reference on Chart Studio Cloud for colors . + + The 'colorssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorssrc"] + + @colorssrc.setter + def colorssrc(self, val): + self["colorssrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.funnelarea.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + colors + Sets the color of each sector. If not specified, the + default trace color set is used to pick the sector + colors. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + line + :class:`plotly.graph_objects.funnelarea.marker.Line` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Marker` + colors + Sets the color of each sector. If not specified, the + default trace color set is used to pick the sector + colors. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + line + :class:`plotly.graph_objects.funnelarea.marker.Line` + instance or dict with compatible properties + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("colors", None) + _v = colors if colors is not None else _v + if _v is not None: + self["colors"] = _v + _v = arg.pop("colorssrc", None) + _v = colorssrc if colorssrc is not None else _v + if _v is not None: + self["colorssrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_stream.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_stream.py new file mode 100644 index 00000000000..97b8d00fd7c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_textfont.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_textfont.py new file mode 100644 index 00000000000..e13d93cc7ce --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `textinfo`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/_title.py b/packages/python/plotly/plotly/graph_objs/funnelarea/_title.py new file mode 100644 index 00000000000..1bd072ca20f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/_title.py @@ -0,0 +1,214 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea" + _path_str = "funnelarea.title" + _valid_props = {"font", "position", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets the font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.funnelarea.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # position + # -------- + @property + def position(self): + """ + Specifies the location of the `title`. Note that the title's + position used to be set by the now deprecated `titleposition` + attribute. + + The 'position' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right'] + + Returns + ------- + Any + """ + return self["position"] + + @position.setter + def position(self, val): + self["position"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the chart. If it is empty, no title is + displayed. Note that before the existence of `title.text`, the + title's contents used to be defined as the `title` attribute + itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets the font used for `title`. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + position + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no title + is displayed. Note that before the existence of + `title.text`, the title's contents used to be defined + as the `title` attribute itself. This behavior has been + deprecated. + """ + + def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.Title` + font + Sets the font used for `title`. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + position + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no title + is displayed. Note that before the existence of + `title.text`, the title's contents used to be defined + as the `title` attribute itself. This behavior has been + deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("position", None) + _v = position if position is not None else _v + if _v is not None: + self["position"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py index 6a2b0ac2e9e..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.funnelarea.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/_font.py new file mode 100644 index 00000000000..0636c41d60f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea.hoverlabel" + _path_str = "funnelarea.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py index 4bc8496bcb9..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py @@ -1,236 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the line enclosing each sector. Defaults to - the `paper_bgcolor` value. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the line enclosing each sector. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the line enclosing each sector. - Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.marker.Line` - color - Sets the color of the line enclosing each sector. - Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.funnelarea.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/marker/_line.py b/packages/python/plotly/plotly/graph_objs/funnelarea/marker/_line.py new file mode 100644 index 00000000000..454fcfdb732 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/marker/_line.py @@ -0,0 +1,234 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea.marker" + _path_str = "funnelarea.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. Defaults to + the `paper_bgcolor` value. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.marker.Line` + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py index c060ce83473..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py @@ -1,330 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "funnelarea.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.funnelarea.title.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.funnelarea.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.funnelarea.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.funnelarea.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/title/_font.py b/packages/python/plotly/plotly/graph_objs/funnelarea/title/_font.py new file mode 100644 index 00000000000..007eb89d5de --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/title/_font.py @@ -0,0 +1,330 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "funnelarea.title" + _path_str = "funnelarea.title.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.funnelarea.title.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.funnelarea.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.funnelarea.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py index a5fcfed3997..6f74f557def 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py @@ -1,2501 +1,16 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.heatmap.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.heatmap.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.heatmap.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.heatmap.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.heatmap.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.heatmap.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.heatmap.colorbar.tickformatstopdefaults), - sets the default property values to use for elements of - heatmap.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.heatmap.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.heatmap.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use heatmap.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use heatmap.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap.colorba - r.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.heatma - p.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - heatmap.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmap.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use heatmap.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use heatmap.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap.colorba - r.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.heatma - p.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - heatmap.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmap.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use heatmap.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use heatmap.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.heatmap.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Hoverlabel", "Stream", "colorbar", "hoverlabel"] - -from plotly.graph_objs.heatmap import hoverlabel -from plotly.graph_objs.heatmap import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + ["._stream.Stream", "._hoverlabel.Hoverlabel", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py b/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py new file mode 100644 index 00000000000..c7ce64af51a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py @@ -0,0 +1,1940 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap" + _path_str = "heatmap.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.heatmap.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.heatmap.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.heatmap.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.heatmap.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + heatmap.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.heatmap.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.heatmap.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use heatmap.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use heatmap.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmap.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.heatma + p.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + heatmap.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmap.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use heatmap.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use heatmap.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmap.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.heatma + p.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + heatmap.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmap.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use heatmap.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use heatmap.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/heatmap/_hoverlabel.py new file mode 100644 index 00000000000..d765947405b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap" + _path_str = "heatmap.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.heatmap.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/_stream.py b/packages/python/plotly/plotly/graph_objs/heatmap/_stream.py new file mode 100644 index 00000000000..4ce24610d96 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap" + _path_str = "heatmap.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py index fe519e51b04..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.heatmap.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.heatmap.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.heatmap.colorb - ar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.heatmap.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.heatmap.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.heatmap.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_tickfont.py new file mode 100644 index 00000000000..e2f939d9cca --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap.colorbar" + _path_str = "heatmap.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..f4aefe42c64 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap.colorbar" + _path_str = "heatmap.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.heatmap.colorb + ar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_title.py new file mode 100644 index 00000000000..fa3cda18eac --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap.colorbar" + _path_str = "heatmap.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.heatmap.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py index 7e1c7383672..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.heatmap.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/_font.py new file mode 100644 index 00000000000..aa93abebd5d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap.colorbar.title" + _path_str = "heatmap.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py index 495d9a1db7b..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmap.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmap.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.heatmap.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmap.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmap.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/_font.py new file mode 100644 index 00000000000..336814344a6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmap.hoverlabel" + _path_str = "heatmap.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmap.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmap.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmap.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py index d5150ed6cbd..6f74f557def 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py @@ -1,2500 +1,16 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmapgl.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.heatmapgl.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.heatmapgl.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmapgl.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.heatmapgl.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.heatmapgl.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.heatmapgl.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.heatmapgl.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.heatmapgl.colo - rbar.tickformatstopdefaults), sets the default property values - to use for elements of heatmapgl.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.heatmapgl.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.heatmapgl.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use heatmapgl.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use heatmapgl.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmapgl.color - bar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.heatma - pgl.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - heatmapgl.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmapgl.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use heatmapgl.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use heatmapgl.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmapgl.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmapgl.color - bar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.heatma - pgl.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - heatmapgl.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmapgl.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use heatmapgl.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use heatmapgl.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.heatmapgl.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Hoverlabel", "Stream", "colorbar", "hoverlabel"] - -from plotly.graph_objs.heatmapgl import hoverlabel -from plotly.graph_objs.heatmapgl import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + ["._stream.Stream", "._hoverlabel.Hoverlabel", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py new file mode 100644 index 00000000000..d45d08bc131 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py @@ -0,0 +1,1939 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl" + _path_str = "heatmapgl.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.heatmapgl.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.heatmapgl.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.heatmapgl.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.heatmapgl.colo + rbar.tickformatstopdefaults), sets the default property values + to use for elements of heatmapgl.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.heatmapgl.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.heatmapgl.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use heatmapgl.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use heatmapgl.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmapgl.color + bar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.heatma + pgl.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + heatmapgl.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmapgl.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use heatmapgl.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use heatmapgl.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmapgl.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmapgl.color + bar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.heatma + pgl.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + heatmapgl.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmapgl.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use heatmapgl.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use heatmapgl.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/_hoverlabel.py new file mode 100644 index 00000000000..e53733f0c72 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl" + _path_str = "heatmapgl.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.heatmapgl.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmapgl.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/_stream.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/_stream.py new file mode 100644 index 00000000000..022381131e8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl" + _path_str = "heatmapgl.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmapgl.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py index 72a1cb16db2..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.heatmapgl.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmapgl.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.heatmapgl.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.heatmapgl.colo - rbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.heatmapgl.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmapgl.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.heatmapgl.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.heatmapgl.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_tickfont.py new file mode 100644 index 00000000000..ed4c5b2ae5e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl.colorbar" + _path_str = "heatmapgl.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmapgl.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..2ae06b55f84 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl.colorbar" + _path_str = "heatmapgl.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.heatmapgl.colo + rbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_title.py new file mode 100644 index 00000000000..23e5300a2bb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl.colorbar" + _path_str = "heatmapgl.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmapgl.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.heatmapgl.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmapgl.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py index eca9014e625..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.heatmapgl.colo - rbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.heatmapgl.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/_font.py new file mode 100644 index 00000000000..a7791528aeb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl.colorbar.title" + _path_str = "heatmapgl.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.heatmapgl.colo + rbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py index efcb1c68d85..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "heatmapgl.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.heatmapgl.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.heatmapgl.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.heatmapgl.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.heatmapgl.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/_font.py new file mode 100644 index 00000000000..5b4fdb035aa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "heatmapgl.hoverlabel" + _path_str = "heatmapgl.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.heatmapgl.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.heatmapgl.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.heatmapgl.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/__init__.py index a7e26fe5af5..71cc806d549 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/__init__.py @@ -1,3848 +1,36 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class YBins(_BaseTraceHierarchyType): - - # end - # --- - @property - def end(self): - """ - Sets the end value for the y axis bins. The last bin may not - end exactly at this value, we increment the bin edge by `size` - from `start` until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use a date string, - and for category data `end` is based on the category serial - numbers. - - The 'end' property accepts values of any type - - Returns - ------- - Any - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the size of each y axis bin. Default behavior: If `nbinsy` - is 0 or omitted, we choose a nice round bin size such that the - number of bins is about the same as the typical number of - samples in each bin. If `nbinsy` is provided, we choose a nice - round bin size giving no more than that many bins. For date - data, use milliseconds or "M" for months, as in - `axis.dtick`. For category data, the number of categories to - bin together (always defaults to 1). If multiple non-overlaying - histograms share a subplot, the first explicit `size` is used - and all others discarded. If no `size` is provided,the sample - data from all traces is combined to determine `size` as - described above. - - The 'size' property accepts values of any type - - Returns - ------- - Any - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting value for the y axis bins. Defaults to the - minimum data value, shifted down if necessary to make nice - round values and to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin edges 0.5 down, - so a `size` of 5 would have a default `start` of -0.5, so it is - clear that 0-4 are in the first bin, 5-9 in the second, but - continuous data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date string. - For category data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non-overlaying - histograms share a subplot, the first explicit `start` is used - exactly and all others are shifted down (if necessary) to - differ from that one by an integer number of bins. - - The 'start' property accepts values of any type - - Returns - ------- - Any - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - end - Sets the end value for the y axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each y axis bin. Default behavior: If - `nbinsy` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsy` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). If multiple non- - overlaying histograms share a subplot, the first - explicit `size` is used and all others discarded. If no - `size` is provided,the sample data from all traces is - combined to determine `size` as described above. - start - Sets the starting value for the y axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. If - multiple non-overlaying histograms share a subplot, the - first explicit `start` is used exactly and all others - are shifted down (if necessary) to differ from that one - by an integer number of bins. - """ - - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): - """ - Construct a new YBins object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.YBins` - end - Sets the end value for the y axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each y axis bin. Default behavior: If - `nbinsy` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsy` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). If multiple non- - overlaying histograms share a subplot, the first - explicit `size` is used and all others discarded. If no - `size` is provided,the sample data from all traces is - combined to determine `size` as described above. - start - Sets the starting value for the y axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. If - multiple non-overlaying histograms share a subplot, the - first explicit `start` is used exactly and all others - are shifted down (if necessary) to differ from that one - by an integer number of bins. - - Returns - ------- - YBins - """ - super(YBins, self).__init__("ybins") - - # Validate arg - # ------------ - 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.histogram.YBins -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.YBins`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import ybins as v_ybins - - # Initialize validators - # --------------------- - self._validators["end"] = v_ybins.EndValidator() - self._validators["size"] = v_ybins.SizeValidator() - self._validators["start"] = v_ybins.StartValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class XBins(_BaseTraceHierarchyType): - - # end - # --- - @property - def end(self): - """ - Sets the end value for the x axis bins. The last bin may not - end exactly at this value, we increment the bin edge by `size` - from `start` until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use a date string, - and for category data `end` is based on the category serial - numbers. - - The 'end' property accepts values of any type - - Returns - ------- - Any - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the size of each x axis bin. Default behavior: If `nbinsx` - is 0 or omitted, we choose a nice round bin size such that the - number of bins is about the same as the typical number of - samples in each bin. If `nbinsx` is provided, we choose a nice - round bin size giving no more than that many bins. For date - data, use milliseconds or "M" for months, as in - `axis.dtick`. For category data, the number of categories to - bin together (always defaults to 1). If multiple non-overlaying - histograms share a subplot, the first explicit `size` is used - and all others discarded. If no `size` is provided,the sample - data from all traces is combined to determine `size` as - described above. - - The 'size' property accepts values of any type - - Returns - ------- - Any - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting value for the x axis bins. Defaults to the - minimum data value, shifted down if necessary to make nice - round values and to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin edges 0.5 down, - so a `size` of 5 would have a default `start` of -0.5, so it is - clear that 0-4 are in the first bin, 5-9 in the second, but - continuous data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date string. - For category data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non-overlaying - histograms share a subplot, the first explicit `start` is used - exactly and all others are shifted down (if necessary) to - differ from that one by an integer number of bins. - - The 'start' property accepts values of any type - - Returns - ------- - Any - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - end - Sets the end value for the x axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each x axis bin. Default behavior: If - `nbinsx` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsx` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). If multiple non- - overlaying histograms share a subplot, the first - explicit `size` is used and all others discarded. If no - `size` is provided,the sample data from all traces is - combined to determine `size` as described above. - start - Sets the starting value for the x axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. If - multiple non-overlaying histograms share a subplot, the - first explicit `start` is used exactly and all others - are shifted down (if necessary) to differ from that one - by an integer number of bins. - """ - - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): - """ - Construct a new XBins object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.XBins` - end - Sets the end value for the x axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each x axis bin. Default behavior: If - `nbinsx` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsx` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). If multiple non- - overlaying histograms share a subplot, the first - explicit `size` is used and all others discarded. If no - `size` is provided,the sample data from all traces is - combined to determine `size` as described above. - start - Sets the starting value for the x axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. If - multiple non-overlaying histograms share a subplot, the - first explicit `start` is used exactly and all others - are shifted down (if necessary) to differ from that one - by an integer number of bins. - - Returns - ------- - XBins - """ - super(XBins, self).__init__("xbins") - - # Validate arg - # ------------ - 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.histogram.XBins -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.XBins`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import xbins as v_xbins - - # Initialize validators - # --------------------- - self._validators["end"] = v_xbins.EndValidator() - self._validators["size"] = v_xbins.SizeValidator() - self._validators["start"] = v_xbins.StartValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.histogram.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.histogram.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.histogram.unselected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.histogram.unselected.Textf - ont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.Unselected` - marker - :class:`plotly.graph_objects.histogram.unselected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.histogram.unselected.Textf - ont` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.histogram.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.histogram.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - - Returns - ------- - plotly.graph_objs.histogram.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.histogram.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.histogram.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.histogram.selected.Textfon - t` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.Selected` - marker - :class:`plotly.graph_objects.histogram.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.histogram.selected.Textfon - t` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.histogram.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to histogram.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - histogram.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram.marker.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - histogram.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.histogram.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.histogram.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the bars. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.histogram.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.histogram.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.histogram.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.histogram.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.histogram.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.histogram.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.histogram.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorY(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorY object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.ErrorY` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorY - """ - super(ErrorY, self).__init__("error_y") - - # Validate arg - # ------------ - 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.histogram.ErrorY -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.ErrorY`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import error_y as v_error_y - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_y.ArrayValidator() - self._validators["arrayminus"] = v_error_y.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_y.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_y.ArraysrcValidator() - self._validators["color"] = v_error_y.ColorValidator() - self._validators["symmetric"] = v_error_y.SymmetricValidator() - self._validators["thickness"] = v_error_y.ThicknessValidator() - self._validators["traceref"] = v_error_y.TracerefValidator() - self._validators["tracerefminus"] = v_error_y.TracerefminusValidator() - self._validators["type"] = v_error_y.TypeValidator() - self._validators["value"] = v_error_y.ValueValidator() - self._validators["valueminus"] = v_error_y.ValueminusValidator() - self._validators["visible"] = v_error_y.VisibleValidator() - self._validators["width"] = v_error_y.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorX(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # copy_ystyle - # ----------- - @property - def copy_ystyle(self): - """ - The 'copy_ystyle' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["copy_ystyle"] - - @copy_ystyle.setter - def copy_ystyle(self, val): - self["copy_ystyle"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorX object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.ErrorX` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorX - """ - super(ErrorX, self).__init__("error_x") - - # Validate arg - # ------------ - 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.histogram.ErrorX -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.ErrorX`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import error_x as v_error_x - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_x.ArrayValidator() - self._validators["arrayminus"] = v_error_x.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_x.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_x.ArraysrcValidator() - self._validators["color"] = v_error_x.ColorValidator() - self._validators["copy_ystyle"] = v_error_x.CopyYstyleValidator() - self._validators["symmetric"] = v_error_x.SymmetricValidator() - self._validators["thickness"] = v_error_x.ThicknessValidator() - self._validators["traceref"] = v_error_x.TracerefValidator() - self._validators["tracerefminus"] = v_error_x.TracerefminusValidator() - self._validators["type"] = v_error_x.TypeValidator() - self._validators["value"] = v_error_x.ValueValidator() - self._validators["valueminus"] = v_error_x.ValueminusValidator() - self._validators["visible"] = v_error_x.VisibleValidator() - self._validators["width"] = v_error_x.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("copy_ystyle", None) - self["copy_ystyle"] = copy_ystyle if copy_ystyle is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Cumulative(_BaseTraceHierarchyType): - - # currentbin - # ---------- - @property - def currentbin(self): - """ - Only applies if cumulative is enabled. Sets whether the current - bin is included, excluded, or has half of its value included in - the current cumulative value. "include" is the default for - compatibility with various other tools, however it introduces a - half-bin bias to the results. "exclude" makes the opposite - half-bin bias, and "half" removes it. - - The 'currentbin' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['include', 'exclude', 'half'] - - Returns - ------- - Any - """ - return self["currentbin"] - - @currentbin.setter - def currentbin(self, val): - self["currentbin"] = val - - # direction - # --------- - @property - def direction(self): - """ - Only applies if cumulative is enabled. If "increasing" - (default) we sum all prior bins, so the result increases from - left to right. If "decreasing" we sum later bins so the result - decreases from left to right. - - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['increasing', 'decreasing'] - - Returns - ------- - Any - """ - return self["direction"] - - @direction.setter - def direction(self, val): - self["direction"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - If true, display the cumulative distribution by summing the - binned values. Use the `direction` and `centralbin` attributes - to tune the accumulation method. Note: in this mode, the - "density" `histnorm` settings behave the same as their - equivalents without "density": "" and "density" both rise to - the number of data points, and "probability" and *probability - density* both rise to the number of sample points. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - currentbin - Only applies if cumulative is enabled. Sets whether the - current bin is included, excluded, or has half of its - value included in the current cumulative value. - "include" is the default for compatibility with various - other tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half-bin - bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If "increasing" - (default) we sum all prior bins, so the result - increases from left to right. If "decreasing" we sum - later bins so the result decreases from left to right. - enabled - If true, display the cumulative distribution by summing - the binned values. Use the `direction` and `centralbin` - attributes to tune the accumulation method. Note: in - this mode, the "density" `histnorm` settings behave the - same as their equivalents without "density": "" and - "density" both rise to the number of data points, and - "probability" and *probability density* both rise to - the number of sample points. - """ - - def __init__( - self, arg=None, currentbin=None, direction=None, enabled=None, **kwargs - ): - """ - Construct a new Cumulative object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.Cumulative` - currentbin - Only applies if cumulative is enabled. Sets whether the - current bin is included, excluded, or has half of its - value included in the current cumulative value. - "include" is the default for compatibility with various - other tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half-bin - bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If "increasing" - (default) we sum all prior bins, so the result - increases from left to right. If "decreasing" we sum - later bins so the result decreases from left to right. - enabled - If true, display the cumulative distribution by summing - the binned values. Use the `direction` and `centralbin` - attributes to tune the accumulation method. Note: in - this mode, the "density" `histnorm` settings behave the - same as their equivalents without "density": "" and - "density" both rise to the number of data points, and - "probability" and *probability density* both rise to - the number of sample points. - - Returns - ------- - Cumulative - """ - super(Cumulative, self).__init__("cumulative") - - # Validate arg - # ------------ - 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.histogram.Cumulative -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.Cumulative`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram import cumulative as v_cumulative - - # Initialize validators - # --------------------- - self._validators["currentbin"] = v_cumulative.CurrentbinValidator() - self._validators["direction"] = v_cumulative.DirectionValidator() - self._validators["enabled"] = v_cumulative.EnabledValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("currentbin", None) - self["currentbin"] = currentbin if currentbin is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Cumulative", - "ErrorX", - "ErrorY", - "Hoverlabel", - "Marker", - "Selected", - "Stream", - "Unselected", - "XBins", - "YBins", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.histogram import unselected -from plotly.graph_objs.histogram import selected -from plotly.graph_objs.histogram import marker -from plotly.graph_objs.histogram import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._ybins import YBins + from ._xbins import XBins + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from ._error_y import ErrorY + from ._error_x import ErrorX + from ._cumulative import Cumulative + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._ybins.YBins", + "._xbins.XBins", + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._hoverlabel.Hoverlabel", + "._error_y.ErrorY", + "._error_x.ErrorX", + "._cumulative.Cumulative", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_cumulative.py b/packages/python/plotly/plotly/graph_objs/histogram/_cumulative.py new file mode 100644 index 00000000000..39359fb68be --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_cumulative.py @@ -0,0 +1,204 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Cumulative(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.cumulative" + _valid_props = {"currentbin", "direction", "enabled"} + + # currentbin + # ---------- + @property + def currentbin(self): + """ + Only applies if cumulative is enabled. Sets whether the current + bin is included, excluded, or has half of its value included in + the current cumulative value. "include" is the default for + compatibility with various other tools, however it introduces a + half-bin bias to the results. "exclude" makes the opposite + half-bin bias, and "half" removes it. + + The 'currentbin' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['include', 'exclude', 'half'] + + Returns + ------- + Any + """ + return self["currentbin"] + + @currentbin.setter + def currentbin(self, val): + self["currentbin"] = val + + # direction + # --------- + @property + def direction(self): + """ + Only applies if cumulative is enabled. If "increasing" + (default) we sum all prior bins, so the result increases from + left to right. If "decreasing" we sum later bins so the result + decreases from left to right. + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['increasing', 'decreasing'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + If true, display the cumulative distribution by summing the + binned values. Use the `direction` and `centralbin` attributes + to tune the accumulation method. Note: in this mode, the + "density" `histnorm` settings behave the same as their + equivalents without "density": "" and "density" both rise to + the number of data points, and "probability" and *probability + density* both rise to the number of sample points. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + currentbin + Only applies if cumulative is enabled. Sets whether the + current bin is included, excluded, or has half of its + value included in the current cumulative value. + "include" is the default for compatibility with various + other tools, however it introduces a half-bin bias to + the results. "exclude" makes the opposite half-bin + bias, and "half" removes it. + direction + Only applies if cumulative is enabled. If "increasing" + (default) we sum all prior bins, so the result + increases from left to right. If "decreasing" we sum + later bins so the result decreases from left to right. + enabled + If true, display the cumulative distribution by summing + the binned values. Use the `direction` and `centralbin` + attributes to tune the accumulation method. Note: in + this mode, the "density" `histnorm` settings behave the + same as their equivalents without "density": "" and + "density" both rise to the number of data points, and + "probability" and *probability density* both rise to + the number of sample points. + """ + + def __init__( + self, arg=None, currentbin=None, direction=None, enabled=None, **kwargs + ): + """ + Construct a new Cumulative object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.Cumulative` + currentbin + Only applies if cumulative is enabled. Sets whether the + current bin is included, excluded, or has half of its + value included in the current cumulative value. + "include" is the default for compatibility with various + other tools, however it introduces a half-bin bias to + the results. "exclude" makes the opposite half-bin + bias, and "half" removes it. + direction + Only applies if cumulative is enabled. If "increasing" + (default) we sum all prior bins, so the result + increases from left to right. If "decreasing" we sum + later bins so the result decreases from left to right. + enabled + If true, display the cumulative distribution by summing + the binned values. Use the `direction` and `centralbin` + attributes to tune the accumulation method. Note: in + this mode, the "density" `histnorm` settings behave the + same as their equivalents without "density": "" and + "density" both rise to the number of data points, and + "probability" and *probability density* both rise to + the number of sample points. + + Returns + ------- + Cumulative + """ + super(Cumulative, self).__init__("cumulative") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.Cumulative +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.Cumulative`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("currentbin", None) + _v = currentbin if currentbin is not None else _v + if _v is not None: + self["currentbin"] = _v + _v = arg.pop("direction", None) + _v = direction if direction is not None else _v + if _v is not None: + self["direction"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_error_x.py b/packages/python/plotly/plotly/graph_objs/histogram/_error_x.py new file mode 100644 index 00000000000..e7dd9e9f45f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_error_x.py @@ -0,0 +1,629 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorX(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.error_x" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_ystyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # copy_ystyle + # ----------- + @property + def copy_ystyle(self): + """ + The 'copy_ystyle' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["copy_ystyle"] + + @copy_ystyle.setter + def copy_ystyle(self, val): + self["copy_ystyle"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_ystyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorX object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.ErrorX` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorX + """ + super(ErrorX, self).__init__("error_x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.ErrorX +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.ErrorX`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("copy_ystyle", None) + _v = copy_ystyle if copy_ystyle is not None else _v + if _v is not None: + self["copy_ystyle"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_error_y.py b/packages/python/plotly/plotly/graph_objs/histogram/_error_y.py new file mode 100644 index 00000000000..cb9c5f8fe02 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_error_y.py @@ -0,0 +1,601 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorY(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.error_y" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorY object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.ErrorY` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorY + """ + super(ErrorY, self).__init__("error_y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.ErrorY +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.ErrorY`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/histogram/_hoverlabel.py new file mode 100644 index 00000000000..fbe525403ca --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.histogram.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_marker.py b/packages/python/plotly/plotly/graph_objs/histogram/_marker.py new file mode 100644 index 00000000000..200b431b384 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_marker.py @@ -0,0 +1,1053 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to histogram.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogr + am.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram.marker.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + histogram.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram.marker.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + histogram.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.histogram.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.histogram.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the bars. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.histogram.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.histogram.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_selected.py b/packages/python/plotly/plotly/graph_objs/histogram/_selected.py new file mode 100644 index 00000000000..23464ee66bd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_selected.py @@ -0,0 +1,144 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + plotly.graph_objs.histogram.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.histogram.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.histogram.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.histogram.selected.Textfon + t` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.Selected` + marker + :class:`plotly.graph_objects.histogram.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.histogram.selected.Textfon + t` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_stream.py b/packages/python/plotly/plotly/graph_objs/histogram/_stream.py new file mode 100644 index 00000000000..b195076255f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_unselected.py b/packages/python/plotly/plotly/graph_objs/histogram/_unselected.py new file mode 100644 index 00000000000..6bcaae0ee9c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_unselected.py @@ -0,0 +1,147 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.histogram.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.histogram.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.histogram.unselected.Marke + r` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.histogram.unselected.Textf + ont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.Unselected` + marker + :class:`plotly.graph_objects.histogram.unselected.Marke + r` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.histogram.unselected.Textf + ont` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_xbins.py b/packages/python/plotly/plotly/graph_objs/histogram/_xbins.py new file mode 100644 index 00000000000..48761e2ab0f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_xbins.py @@ -0,0 +1,241 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class XBins(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.xbins" + _valid_props = {"end", "size", "start"} + + # end + # --- + @property + def end(self): + """ + Sets the end value for the x axis bins. The last bin may not + end exactly at this value, we increment the bin edge by `size` + from `start` until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use a date string, + and for category data `end` is based on the category serial + numbers. + + The 'end' property accepts values of any type + + Returns + ------- + Any + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the size of each x axis bin. Default behavior: If `nbinsx` + is 0 or omitted, we choose a nice round bin size such that the + number of bins is about the same as the typical number of + samples in each bin. If `nbinsx` is provided, we choose a nice + round bin size giving no more than that many bins. For date + data, use milliseconds or "M" for months, as in + `axis.dtick`. For category data, the number of categories to + bin together (always defaults to 1). If multiple non-overlaying + histograms share a subplot, the first explicit `size` is used + and all others discarded. If no `size` is provided,the sample + data from all traces is combined to determine `size` as + described above. + + The 'size' property accepts values of any type + + Returns + ------- + Any + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting value for the x axis bins. Defaults to the + minimum data value, shifted down if necessary to make nice + round values and to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin edges 0.5 down, + so a `size` of 5 would have a default `start` of -0.5, so it is + clear that 0-4 are in the first bin, 5-9 in the second, but + continuous data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date string. + For category data, `start` is based on the category serial + numbers, and defaults to -0.5. If multiple non-overlaying + histograms share a subplot, the first explicit `start` is used + exactly and all others are shifted down (if necessary) to + differ from that one by an integer number of bins. + + The 'start' property accepts values of any type + + Returns + ------- + Any + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + end + Sets the end value for the x axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each x axis bin. Default behavior: If + `nbinsx` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsx` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). If multiple non- + overlaying histograms share a subplot, the first + explicit `size` is used and all others discarded. If no + `size` is provided,the sample data from all traces is + combined to determine `size` as described above. + start + Sets the starting value for the x axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. If + multiple non-overlaying histograms share a subplot, the + first explicit `start` is used exactly and all others + are shifted down (if necessary) to differ from that one + by an integer number of bins. + """ + + def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + """ + Construct a new XBins object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.XBins` + end + Sets the end value for the x axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each x axis bin. Default behavior: If + `nbinsx` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsx` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). If multiple non- + overlaying histograms share a subplot, the first + explicit `size` is used and all others discarded. If no + `size` is provided,the sample data from all traces is + combined to determine `size` as described above. + start + Sets the starting value for the x axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. If + multiple non-overlaying histograms share a subplot, the + first explicit `start` is used exactly and all others + are shifted down (if necessary) to differ from that one + by an integer number of bins. + + Returns + ------- + XBins + """ + super(XBins, self).__init__("xbins") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.XBins +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.XBins`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/_ybins.py b/packages/python/plotly/plotly/graph_objs/histogram/_ybins.py new file mode 100644 index 00000000000..3c09f87f83b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/_ybins.py @@ -0,0 +1,241 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class YBins(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram" + _path_str = "histogram.ybins" + _valid_props = {"end", "size", "start"} + + # end + # --- + @property + def end(self): + """ + Sets the end value for the y axis bins. The last bin may not + end exactly at this value, we increment the bin edge by `size` + from `start` until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use a date string, + and for category data `end` is based on the category serial + numbers. + + The 'end' property accepts values of any type + + Returns + ------- + Any + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the size of each y axis bin. Default behavior: If `nbinsy` + is 0 or omitted, we choose a nice round bin size such that the + number of bins is about the same as the typical number of + samples in each bin. If `nbinsy` is provided, we choose a nice + round bin size giving no more than that many bins. For date + data, use milliseconds or "M" for months, as in + `axis.dtick`. For category data, the number of categories to + bin together (always defaults to 1). If multiple non-overlaying + histograms share a subplot, the first explicit `size` is used + and all others discarded. If no `size` is provided,the sample + data from all traces is combined to determine `size` as + described above. + + The 'size' property accepts values of any type + + Returns + ------- + Any + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting value for the y axis bins. Defaults to the + minimum data value, shifted down if necessary to make nice + round values and to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin edges 0.5 down, + so a `size` of 5 would have a default `start` of -0.5, so it is + clear that 0-4 are in the first bin, 5-9 in the second, but + continuous data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date string. + For category data, `start` is based on the category serial + numbers, and defaults to -0.5. If multiple non-overlaying + histograms share a subplot, the first explicit `start` is used + exactly and all others are shifted down (if necessary) to + differ from that one by an integer number of bins. + + The 'start' property accepts values of any type + + Returns + ------- + Any + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + end + Sets the end value for the y axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each y axis bin. Default behavior: If + `nbinsy` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsy` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). If multiple non- + overlaying histograms share a subplot, the first + explicit `size` is used and all others discarded. If no + `size` is provided,the sample data from all traces is + combined to determine `size` as described above. + start + Sets the starting value for the y axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. If + multiple non-overlaying histograms share a subplot, the + first explicit `start` is used exactly and all others + are shifted down (if necessary) to differ from that one + by an integer number of bins. + """ + + def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + """ + Construct a new YBins object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.YBins` + end + Sets the end value for the y axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each y axis bin. Default behavior: If + `nbinsy` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsy` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). If multiple non- + overlaying histograms share a subplot, the first + explicit `size` is used and all others discarded. If no + `size` is provided,the sample data from all traces is + combined to determine `size` as described above. + start + Sets the starting value for the y axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. If + multiple non-overlaying histograms share a subplot, the + first explicit `start` is used exactly and all others + are shifted down (if necessary) to differ from that one + by an integer number of bins. + + Returns + ------- + YBins + """ + super(YBins, self).__init__("ybins") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.YBins +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.YBins`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py index a52481f07be..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.histogram.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/_font.py new file mode 100644 index 00000000000..caac336c869 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.hoverlabel" + _path_str = "histogram.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py index be3861588a2..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py @@ -1,2510 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to histogram.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.histogram.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.histogram.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.histogram.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.histogram.mark - er.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - histogram.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.histogram.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.histogram.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use histogram.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use histogram.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogram.marke - r.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.histog - ram.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - histogram.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram.marker.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - histogram.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogram.marke - r.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.histog - ram.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - histogram.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram.marker.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - histogram.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.histogram.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.histogram.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py new file mode 100644 index 00000000000..d90e941ae2f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py @@ -0,0 +1,1943 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.marker" + _path_str = "histogram.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.histogram.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.histogram.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.histogram.mark + er.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + histogram.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.histogram.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.histogram.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use histogram.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use histogram.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogram.marke + r.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.histog + ram.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + histogram.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram.marker.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + histogram.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogram.marke + r.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.histog + ram.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + histogram.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram.marker.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + histogram.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/_line.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/_line.py new file mode 100644 index 00000000000..9583991244a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.marker" + _path_str = "histogram.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to histogram.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py index f90eddd9ec8..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram.mark - er.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.histogram.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram.mark - er.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.histogram.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram.mark - er.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.histogram.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.histogram.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..8b75d1f6e83 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.marker.colorbar" + _path_str = "histogram.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram.mark + er.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..b0cdb2f660e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.marker.colorbar" + _path_str = "histogram.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram.mark + er.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_title.py new file mode 100644 index 00000000000..209c3da3286 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.marker.colorbar" + _path_str = "histogram.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram.mark + er.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py index 99b584910f4..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram.mark - er.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.histogram.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..6e3c5559ea8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.marker.colorbar.title" + _path_str = "histogram.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram.mark + er.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py index 934fffb0c09..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py @@ -1,310 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.histogram.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.histogram.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/histogram/selected/_marker.py new file mode 100644 index 00000000000..9487eac9470 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/selected/_marker.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.selected" + _path_str = "histogram.selected.marker" + _valid_props = {"color", "opacity"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/histogram/selected/_textfont.py new file mode 100644 index 00000000000..dfe2cef218c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.selected" + _path_str = "histogram.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py index 391fe061e4e..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py @@ -1,319 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram.unse - lected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.histogram.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.histogram.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/histogram/unselected/_marker.py new file mode 100644 index 00000000000..8633f33bdd6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/unselected/_marker.py @@ -0,0 +1,171 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.unselected" + _path_str = "histogram.unselected.marker" + _valid_props = {"color", "opacity"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/histogram/unselected/_textfont.py new file mode 100644 index 00000000000..d99275f3d38 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram.unselected" + _path_str = "histogram.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram.unse + lected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py index 363b0ba14ea..55f71d0a279 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py @@ -1,3081 +1,26 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class YBins(_BaseTraceHierarchyType): - - # end - # --- - @property - def end(self): - """ - Sets the end value for the y axis bins. The last bin may not - end exactly at this value, we increment the bin edge by `size` - from `start` until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use a date string, - and for category data `end` is based on the category serial - numbers. - - The 'end' property accepts values of any type - - Returns - ------- - Any - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the size of each y axis bin. Default behavior: If `nbinsy` - is 0 or omitted, we choose a nice round bin size such that the - number of bins is about the same as the typical number of - samples in each bin. If `nbinsy` is provided, we choose a nice - round bin size giving no more than that many bins. For date - data, use milliseconds or "M" for months, as in - `axis.dtick`. For category data, the number of categories to - bin together (always defaults to 1). - - The 'size' property accepts values of any type - - Returns - ------- - Any - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting value for the y axis bins. Defaults to the - minimum data value, shifted down if necessary to make nice - round values and to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin edges 0.5 down, - so a `size` of 5 would have a default `start` of -0.5, so it is - clear that 0-4 are in the first bin, 5-9 in the second, but - continuous data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date string. - For category data, `start` is based on the category serial - numbers, and defaults to -0.5. - - The 'start' property accepts values of any type - - Returns - ------- - Any - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - end - Sets the end value for the y axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each y axis bin. Default behavior: If - `nbinsy` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsy` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the y axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - """ - - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): - """ - Construct a new YBins object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.YBins` - end - Sets the end value for the y axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each y axis bin. Default behavior: If - `nbinsy` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsy` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the y axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - - Returns - ------- - YBins - """ - super(YBins, self).__init__("ybins") - - # Validate arg - # ------------ - 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.histogram2d.YBins -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.YBins`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d import ybins as v_ybins - - # Initialize validators - # --------------------- - self._validators["end"] = v_ybins.EndValidator() - self._validators["size"] = v_ybins.SizeValidator() - self._validators["start"] = v_ybins.StartValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class XBins(_BaseTraceHierarchyType): - - # end - # --- - @property - def end(self): - """ - Sets the end value for the x axis bins. The last bin may not - end exactly at this value, we increment the bin edge by `size` - from `start` until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use a date string, - and for category data `end` is based on the category serial - numbers. - - The 'end' property accepts values of any type - - Returns - ------- - Any - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the size of each x axis bin. Default behavior: If `nbinsx` - is 0 or omitted, we choose a nice round bin size such that the - number of bins is about the same as the typical number of - samples in each bin. If `nbinsx` is provided, we choose a nice - round bin size giving no more than that many bins. For date - data, use milliseconds or "M" for months, as in - `axis.dtick`. For category data, the number of categories to - bin together (always defaults to 1). - - The 'size' property accepts values of any type - - Returns - ------- - Any - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting value for the x axis bins. Defaults to the - minimum data value, shifted down if necessary to make nice - round values and to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin edges 0.5 down, - so a `size` of 5 would have a default `start` of -0.5, so it is - clear that 0-4 are in the first bin, 5-9 in the second, but - continuous data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date string. - For category data, `start` is based on the category serial - numbers, and defaults to -0.5. - - The 'start' property accepts values of any type - - Returns - ------- - Any - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - end - Sets the end value for the x axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each x axis bin. Default behavior: If - `nbinsx` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsx` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the x axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - """ - - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): - """ - Construct a new XBins object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.XBins` - end - Sets the end value for the x axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each x axis bin. Default behavior: If - `nbinsx` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsx` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the x axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - - Returns - ------- - XBins - """ - super(XBins, self).__init__("xbins") - - # Validate arg - # ------------ - 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.histogram2d.XBins -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.XBins`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d import xbins as v_xbins - - # Initialize validators - # --------------------- - self._validators["end"] = v_xbins.EndValidator() - self._validators["size"] = v_xbins.SizeValidator() - self._validators["start"] = v_xbins.StartValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.histogram2d.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the aggregation data. - - The 'color' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - """ - - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.Marker` - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.histogram2d.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.histogram2d.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.histogram2d.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram2d.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.histogram2d.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.histogram2d.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.histogram2d.co - lorbar.tickformatstopdefaults), sets the default property - values to use for elements of - histogram2d.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.histogram2d.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.histogram2d.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use histogram2d.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use histogram2d.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogram2d.col - orbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.histog - ram2d.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - histogram2d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2d.colorbar.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use histogram2d.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use histogram2d.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogram2d.col - orbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.histog - ram2d.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - histogram2d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2d.colorbar.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use histogram2d.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use histogram2d.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.histogram2d.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Hoverlabel", - "Marker", - "Stream", - "XBins", - "YBins", - "colorbar", - "hoverlabel", -] - -from plotly.graph_objs.histogram2d import hoverlabel -from plotly.graph_objs.histogram2d import colorbar +import sys + +if sys.version_info < (3, 7): + from ._ybins import YBins + from ._xbins import XBins + from ._stream import Stream + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + [ + "._ybins.YBins", + "._xbins.XBins", + "._stream.Stream", + "._marker.Marker", + "._hoverlabel.Hoverlabel", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py new file mode 100644 index 00000000000..13f8e3a3e46 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py @@ -0,0 +1,1940 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d" + _path_str = "histogram2d.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram2d.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.histogram2d.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.histogram2d.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.histogram2d.co + lorbar.tickformatstopdefaults), sets the default property + values to use for elements of + histogram2d.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.histogram2d.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.histogram2d.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use histogram2d.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use histogram2d.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogram2d.col + orbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.histog + ram2d.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + histogram2d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2d.colorbar.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use histogram2d.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use histogram2d.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogram2d.col + orbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.histog + ram2d.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + histogram2d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2d.colorbar.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use histogram2d.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use histogram2d.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_hoverlabel.py new file mode 100644 index 00000000000..e6c5d8238cd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d" + _path_str = "histogram2d.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.histogram2d.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_marker.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_marker.py new file mode 100644 index 00000000000..74b69280943 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_marker.py @@ -0,0 +1,128 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d" + _path_str = "histogram2d.marker" + _valid_props = {"color", "colorsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the aggregation data. + + The 'color' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + """ + + def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.Marker` + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_stream.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_stream.py new file mode 100644 index 00000000000..bb7ffd29121 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d" + _path_str = "histogram2d.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_xbins.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_xbins.py new file mode 100644 index 00000000000..61a8daaefbd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_xbins.py @@ -0,0 +1,218 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class XBins(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d" + _path_str = "histogram2d.xbins" + _valid_props = {"end", "size", "start"} + + # end + # --- + @property + def end(self): + """ + Sets the end value for the x axis bins. The last bin may not + end exactly at this value, we increment the bin edge by `size` + from `start` until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use a date string, + and for category data `end` is based on the category serial + numbers. + + The 'end' property accepts values of any type + + Returns + ------- + Any + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the size of each x axis bin. Default behavior: If `nbinsx` + is 0 or omitted, we choose a nice round bin size such that the + number of bins is about the same as the typical number of + samples in each bin. If `nbinsx` is provided, we choose a nice + round bin size giving no more than that many bins. For date + data, use milliseconds or "M" for months, as in + `axis.dtick`. For category data, the number of categories to + bin together (always defaults to 1). + + The 'size' property accepts values of any type + + Returns + ------- + Any + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting value for the x axis bins. Defaults to the + minimum data value, shifted down if necessary to make nice + round values and to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin edges 0.5 down, + so a `size` of 5 would have a default `start` of -0.5, so it is + clear that 0-4 are in the first bin, 5-9 in the second, but + continuous data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date string. + For category data, `start` is based on the category serial + numbers, and defaults to -0.5. + + The 'start' property accepts values of any type + + Returns + ------- + Any + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + end + Sets the end value for the x axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each x axis bin. Default behavior: If + `nbinsx` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsx` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the x axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + """ + + def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + """ + Construct a new XBins object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.XBins` + end + Sets the end value for the x axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each x axis bin. Default behavior: If + `nbinsx` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsx` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the x axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + + Returns + ------- + XBins + """ + super(XBins, self).__init__("xbins") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.XBins +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.XBins`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_ybins.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_ybins.py new file mode 100644 index 00000000000..80e1992c420 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_ybins.py @@ -0,0 +1,218 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class YBins(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d" + _path_str = "histogram2d.ybins" + _valid_props = {"end", "size", "start"} + + # end + # --- + @property + def end(self): + """ + Sets the end value for the y axis bins. The last bin may not + end exactly at this value, we increment the bin edge by `size` + from `start` until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use a date string, + and for category data `end` is based on the category serial + numbers. + + The 'end' property accepts values of any type + + Returns + ------- + Any + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the size of each y axis bin. Default behavior: If `nbinsy` + is 0 or omitted, we choose a nice round bin size such that the + number of bins is about the same as the typical number of + samples in each bin. If `nbinsy` is provided, we choose a nice + round bin size giving no more than that many bins. For date + data, use milliseconds or "M" for months, as in + `axis.dtick`. For category data, the number of categories to + bin together (always defaults to 1). + + The 'size' property accepts values of any type + + Returns + ------- + Any + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting value for the y axis bins. Defaults to the + minimum data value, shifted down if necessary to make nice + round values and to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin edges 0.5 down, + so a `size` of 5 would have a default `start` of -0.5, so it is + clear that 0-4 are in the first bin, 5-9 in the second, but + continuous data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date string. + For category data, `start` is based on the category serial + numbers, and defaults to -0.5. + + The 'start' property accepts values of any type + + Returns + ------- + Any + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + end + Sets the end value for the y axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each y axis bin. Default behavior: If + `nbinsy` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsy` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the y axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + """ + + def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + """ + Construct a new YBins object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.YBins` + end + Sets the end value for the y axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each y axis bin. Default behavior: If + `nbinsy` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsy` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the y axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + + Returns + ------- + YBins + """ + super(YBins, self).__init__("ybins") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.YBins +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.YBins`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py index b7e12bbd1d3..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram2d.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.histogram2d.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2d.co - lorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.histogram2d.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2d.co - lorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.histogram2d.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.histogram2d.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_tickfont.py new file mode 100644 index 00000000000..98b8c6223ac --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d.colorbar" + _path_str = "histogram2d.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2d.co + lorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..56bd3092a46 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d.colorbar" + _path_str = "histogram2d.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2d.co + lorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_title.py new file mode 100644 index 00000000000..f4baa7e250b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d.colorbar" + _path_str = "histogram2d.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram2d.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py index 82e126473fa..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2d.co - lorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.histogram2d.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/_font.py new file mode 100644 index 00000000000..94bb3056ccb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d.colorbar.title" + _path_str = "histogram2d.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2d.co + lorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py index 4f9b4654f1c..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2d.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2d.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.histogram2d.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2d.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2d.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/_font.py new file mode 100644 index 00000000000..76c0d40d072 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2d.hoverlabel" + _path_str = "histogram2d.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2d.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2d.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2d.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py index afcb8ce1533..ecdba16ecdd 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py @@ -1,3844 +1,31 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class YBins(_BaseTraceHierarchyType): - - # end - # --- - @property - def end(self): - """ - Sets the end value for the y axis bins. The last bin may not - end exactly at this value, we increment the bin edge by `size` - from `start` until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use a date string, - and for category data `end` is based on the category serial - numbers. - - The 'end' property accepts values of any type - - Returns - ------- - Any - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the size of each y axis bin. Default behavior: If `nbinsy` - is 0 or omitted, we choose a nice round bin size such that the - number of bins is about the same as the typical number of - samples in each bin. If `nbinsy` is provided, we choose a nice - round bin size giving no more than that many bins. For date - data, use milliseconds or "M" for months, as in - `axis.dtick`. For category data, the number of categories to - bin together (always defaults to 1). - - The 'size' property accepts values of any type - - Returns - ------- - Any - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting value for the y axis bins. Defaults to the - minimum data value, shifted down if necessary to make nice - round values and to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin edges 0.5 down, - so a `size` of 5 would have a default `start` of -0.5, so it is - clear that 0-4 are in the first bin, 5-9 in the second, but - continuous data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date string. - For category data, `start` is based on the category serial - numbers, and defaults to -0.5. - - The 'start' property accepts values of any type - - Returns - ------- - Any - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - end - Sets the end value for the y axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each y axis bin. Default behavior: If - `nbinsy` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsy` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the y axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - """ - - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): - """ - Construct a new YBins object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2dcontour.YBins` - end - Sets the end value for the y axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each y axis bin. Default behavior: If - `nbinsy` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsy` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the y axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - - Returns - ------- - YBins - """ - super(YBins, self).__init__("ybins") - - # Validate arg - # ------------ - 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.histogram2dcontour.YBins -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.YBins`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import ybins as v_ybins - - # Initialize validators - # --------------------- - self._validators["end"] = v_ybins.EndValidator() - self._validators["size"] = v_ybins.SizeValidator() - self._validators["start"] = v_ybins.StartValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class XBins(_BaseTraceHierarchyType): - - # end - # --- - @property - def end(self): - """ - Sets the end value for the x axis bins. The last bin may not - end exactly at this value, we increment the bin edge by `size` - from `start` until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use a date string, - and for category data `end` is based on the category serial - numbers. - - The 'end' property accepts values of any type - - Returns - ------- - Any - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the size of each x axis bin. Default behavior: If `nbinsx` - is 0 or omitted, we choose a nice round bin size such that the - number of bins is about the same as the typical number of - samples in each bin. If `nbinsx` is provided, we choose a nice - round bin size giving no more than that many bins. For date - data, use milliseconds or "M" for months, as in - `axis.dtick`. For category data, the number of categories to - bin together (always defaults to 1). - - The 'size' property accepts values of any type - - Returns - ------- - Any - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting value for the x axis bins. Defaults to the - minimum data value, shifted down if necessary to make nice - round values and to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin edges 0.5 down, - so a `size` of 5 would have a default `start` of -0.5, so it is - clear that 0-4 are in the first bin, 5-9 in the second, but - continuous data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date string. - For category data, `start` is based on the category serial - numbers, and defaults to -0.5. - - The 'start' property accepts values of any type - - Returns - ------- - Any - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - end - Sets the end value for the x axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each x axis bin. Default behavior: If - `nbinsx` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsx` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the x axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - """ - - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): - """ - Construct a new XBins object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2dcontour.XBins` - end - Sets the end value for the x axis bins. The last bin - may not end exactly at this value, we increment the bin - edge by `size` from `start` until we reach or exceed - `end`. Defaults to the maximum data value. Like - `start`, for dates use a date string, and for category - data `end` is based on the category serial numbers. - size - Sets the size of each x axis bin. Default behavior: If - `nbinsx` is 0 or omitted, we choose a nice round bin - size such that the number of bins is about the same as - the typical number of samples in each bin. If `nbinsx` - is provided, we choose a nice round bin size giving no - more than that many bins. For date data, use - milliseconds or "M" for months, as in `axis.dtick`. - For category data, the number of categories to bin - together (always defaults to 1). - start - Sets the starting value for the x axis bins. Defaults - to the minimum data value, shifted down if necessary to - make nice round values and to remove ambiguous bin - edges. For example, if most of the data is integers we - shift the bin edges 0.5 down, so a `size` of 5 would - have a default `start` of -0.5, so it is clear that 0-4 - are in the first bin, 5-9 in the second, but continuous - data gets a start of 0 and bins [0,5), [5,10) etc. - Dates behave similarly, and `start` should be a date - string. For category data, `start` is based on the - category serial numbers, and defaults to -0.5. - - Returns - ------- - XBins - """ - super(XBins, self).__init__("xbins") - - # Validate arg - # ------------ - 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.histogram2dcontour.XBins -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.XBins`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import xbins as v_xbins - - # Initialize validators - # --------------------- - self._validators["end"] = v_xbins.EndValidator() - self._validators["size"] = v_xbins.SizeValidator() - self._validators["start"] = v_xbins.StartValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2dcontour.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.histogram2dcontour.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the aggregation data. - - The 'color' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - """ - - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2dcontour.Marker` - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.histogram2dcontour.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Sets the amount of smoothing for the contour lines, where 0 - corresponds to no smoothing. - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the contour line width in (in px) - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour lines, - where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) - """ - - def __init__( - self, arg=None, color=None, dash=None, smoothing=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.histogram2dcontour.Line` - color - Sets the color of the contour level. Has no effect if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour lines, - where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.histogram2dcontour.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.histogram2dcontour.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.histogram2dcontour.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contours(_BaseTraceHierarchyType): - - # coloring - # -------- - @property - def coloring(self): - """ - Determines the coloring method showing the contour values. If - "fill", coloring is done evenly between each contour level If - "heatmap", a heatmap gradient coloring is applied between each - contour level. If "lines", coloring is done on the contour - lines. If "none", no coloring is applied on this trace. - - The 'coloring' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fill', 'heatmap', 'lines', 'none'] - - Returns - ------- - Any - """ - return self["coloring"] - - @coloring.setter - def coloring(self, val): - self["coloring"] = val - - # end - # --- - @property - def end(self): - """ - Sets the end contour level value. Must be more than - `contours.start` - - The 'end' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # labelfont - # --------- - @property - def labelfont(self): - """ - Sets the font used for labeling the contour levels. The default - color comes from the lines, if shown. The default family and - size come from `layout.font`. - - The 'labelfont' property is an instance of Labelfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.contours.Labelfont` - - A dict of string/value properties that will be passed - to the Labelfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram2dcontour.contours.Labelfont - """ - return self["labelfont"] - - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val - - # labelformat - # ----------- - @property - def labelformat(self): - """ - Sets the contour label formatting rule using d3 formatting - mini-language which is very similar to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'labelformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["labelformat"] - - @labelformat.setter - def labelformat(self, val): - self["labelformat"] = val - - # operation - # --------- - @property - def operation(self): - """ - Sets the constraint operation. "=" keeps regions equal to - `value` "<" and "<=" keep regions less than `value` ">" and - ">=" keep regions greater than `value` "[]", "()", "[)", and - "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", - "](", ")[" keep regions outside `value[0]` to value[1]` Open - vs. closed intervals make no difference to constraint display, - but all versions are allowed for consistency with filter - transforms. - - The 'operation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', - ')(', '](', ')['] - - Returns - ------- - Any - """ - return self["operation"] - - @operation.setter - def operation(self, val): - self["operation"] = val - - # showlabels - # ---------- - @property - def showlabels(self): - """ - Determines whether to label the contour lines with their - values. - - The 'showlabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlabels"] - - @showlabels.setter - def showlabels(self, val): - self["showlabels"] = val - - # showlines - # --------- - @property - def showlines(self): - """ - Determines whether or not the contour lines are drawn. Has an - effect only if `contours.coloring` is set to "fill". - - The 'showlines' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlines"] - - @showlines.setter - def showlines(self, val): - self["showlines"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the step between each contour level. Must be positive. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting contour level value. Must be less than - `contours.end` - - The 'start' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # type - # ---- - @property - def type(self): - """ - If `levels`, the data is represented as a contour plot with - multiple levels displayed. If `constraint`, the data is - represented as constraints with the invalid region shaded as - specified by the `operation` and `value` parameters. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['levels', 'constraint'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value or values of the constraint boundary. When - `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an array of - two numbers where the first is the lower bound and the second - is the upper bound. - - The 'value' property accepts values of any type - - Returns - ------- - Any - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - coloring - Determines the coloring method showing the contour - values. If "fill", coloring is done evenly between each - contour level If "heatmap", a heatmap gradient coloring - is applied between each contour level. If "lines", - coloring is done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more than - `contours.start` - labelfont - Sets the font used for labeling the contour levels. The - default color comes from the lines, if shown. The - default family and size come from `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar to - Python, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps regions equal - to `value` "<" and "<=" keep regions less than `value` - ">" and ">=" keep regions greater than `value` "[]", - "()", "[)", and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions outside - `value[0]` to value[1]` Open vs. closed intervals make - no difference to constraint display, but all versions - are allowed for consistency with filter transforms. - showlabels - Determines whether to label the contour lines with - their values. - showlines - Determines whether or not the contour lines are drawn. - Has an effect only if `contours.coloring` is set to - "fill". - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - type - If `levels`, the data is represented as a contour plot - with multiple levels displayed. If `constraint`, the - data is represented as constraints with the invalid - region shaded as specified by the `operation` and - `value` parameters. - value - Sets the value or values of the constraint boundary. - When `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an - array of two numbers where the first is the lower bound - and the second is the upper bound. - """ - - def __init__( - self, - arg=None, - coloring=None, - end=None, - labelfont=None, - labelformat=None, - operation=None, - showlabels=None, - showlines=None, - size=None, - start=None, - type=None, - value=None, - **kwargs - ): - """ - Construct a new Contours object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2dcontour.Contours` - coloring - Determines the coloring method showing the contour - values. If "fill", coloring is done evenly between each - contour level If "heatmap", a heatmap gradient coloring - is applied between each contour level. If "lines", - coloring is done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more than - `contours.start` - labelfont - Sets the font used for labeling the contour levels. The - default color comes from the lines, if shown. The - default family and size come from `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar to - Python, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps regions equal - to `value` "<" and "<=" keep regions less than `value` - ">" and ">=" keep regions greater than `value` "[]", - "()", "[)", and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions outside - `value[0]` to value[1]` Open vs. closed intervals make - no difference to constraint display, but all versions - are allowed for consistency with filter transforms. - showlabels - Determines whether to label the contour lines with - their values. - showlines - Determines whether or not the contour lines are drawn. - Has an effect only if `contours.coloring` is set to - "fill". - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - type - If `levels`, the data is represented as a contour plot - with multiple levels displayed. If `constraint`, the - data is represented as constraints with the invalid - region shaded as specified by the `operation` and - `value` parameters. - value - Sets the value or values of the constraint boundary. - When `operation` is set to one of the comparison values - (=,<,>=,>,<=) "value" is expected to be a number. When - `operation` is set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected to be an - array of two numbers where the first is the lower bound - and the second is the upper bound. - - Returns - ------- - Contours - """ - super(Contours, self).__init__("contours") - - # Validate arg - # ------------ - 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.histogram2dcontour.Contours -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.Contours`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import contours as v_contours - - # Initialize validators - # --------------------- - self._validators["coloring"] = v_contours.ColoringValidator() - self._validators["end"] = v_contours.EndValidator() - self._validators["labelfont"] = v_contours.LabelfontValidator() - self._validators["labelformat"] = v_contours.LabelformatValidator() - self._validators["operation"] = v_contours.OperationValidator() - self._validators["showlabels"] = v_contours.ShowlabelsValidator() - self._validators["showlines"] = v_contours.ShowlinesValidator() - self._validators["size"] = v_contours.SizeValidator() - self._validators["start"] = v_contours.StartValidator() - self._validators["type"] = v_contours.TypeValidator() - self._validators["value"] = v_contours.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("coloring", None) - self["coloring"] = coloring if coloring is not None else _v - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("labelformat", None) - self["labelformat"] = labelformat if labelformat is not None else _v - _v = arg.pop("operation", None) - self["operation"] = operation if operation is not None else _v - _v = arg.pop("showlabels", None) - self["showlabels"] = showlabels if showlabels is not None else _v - _v = arg.pop("showlines", None) - self["showlines"] = showlines if showlines is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram2dcontour.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.histogram2dcon - tour.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - histogram2dcontour.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use histogram2dcontour.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use histogram2dcontour.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogram2dcont - our.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.histog - ram2dcontour.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - histogram2dcontour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2dcontour.colorba - r.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - histogram2dcontour.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - histogram2dcontour.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.histogram2dcontour.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogram2dcont - our.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.histog - ram2dcontour.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - histogram2dcontour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2dcontour.colorba - r.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - histogram2dcontour.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - histogram2dcontour.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.histogram2dcontour.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Contours", - "Hoverlabel", - "Line", - "Marker", - "Stream", - "XBins", - "YBins", - "colorbar", - "contours", - "hoverlabel", -] - -from plotly.graph_objs.histogram2dcontour import hoverlabel -from plotly.graph_objs.histogram2dcontour import contours -from plotly.graph_objs.histogram2dcontour import colorbar +import sys + +if sys.version_info < (3, 7): + from ._ybins import YBins + from ._xbins import XBins + from ._stream import Stream + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._contours import Contours + from ._colorbar import ColorBar + from . import hoverlabel + from . import contours + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".contours", ".colorbar"], + [ + "._ybins.YBins", + "._xbins.XBins", + "._stream.Stream", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + "._contours.Contours", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py new file mode 100644 index 00000000000..3ac91f9c809 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py @@ -0,0 +1,1945 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram2dcontour.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.histogram2dcon + tour.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + histogram2dcontour.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.histogram2dcontour.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use histogram2dcontour.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use histogram2dcontour.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogram2dcont + our.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.histog + ram2dcontour.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + histogram2dcontour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2dcontour.colorba + r.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + histogram2dcontour.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + histogram2dcontour.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2dcontour.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogram2dcont + our.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.histog + ram2dcontour.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + histogram2dcontour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2dcontour.colorba + r.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + histogram2dcontour.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + histogram2dcontour.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_contours.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_contours.py new file mode 100644 index 00000000000..11d06de73a5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_contours.py @@ -0,0 +1,530 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contours(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.contours" + _valid_props = { + "coloring", + "end", + "labelfont", + "labelformat", + "operation", + "showlabels", + "showlines", + "size", + "start", + "type", + "value", + } + + # coloring + # -------- + @property + def coloring(self): + """ + Determines the coloring method showing the contour values. If + "fill", coloring is done evenly between each contour level If + "heatmap", a heatmap gradient coloring is applied between each + contour level. If "lines", coloring is done on the contour + lines. If "none", no coloring is applied on this trace. + + The 'coloring' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fill', 'heatmap', 'lines', 'none'] + + Returns + ------- + Any + """ + return self["coloring"] + + @coloring.setter + def coloring(self, val): + self["coloring"] = val + + # end + # --- + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.contours.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram2dcontour.contours.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # labelformat + # ----------- + @property + def labelformat(self): + """ + Sets the contour label formatting rule using d3 formatting + mini-language which is very similar to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'labelformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelformat"] + + @labelformat.setter + def labelformat(self, val): + self["labelformat"] = val + + # operation + # --------- + @property + def operation(self): + """ + Sets the constraint operation. "=" keeps regions equal to + `value` "<" and "<=" keep regions less than `value` ">" and + ">=" keep regions greater than `value` "[]", "()", "[)", and + "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", + "](", ")[" keep regions outside `value[0]` to value[1]` Open + vs. closed intervals make no difference to constraint display, + but all versions are allowed for consistency with filter + transforms. + + The 'operation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', + ')(', '](', ')['] + + Returns + ------- + Any + """ + return self["operation"] + + @operation.setter + def operation(self, val): + self["operation"] = val + + # showlabels + # ---------- + @property + def showlabels(self): + """ + Determines whether to label the contour lines with their + values. + + The 'showlabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlabels"] + + @showlabels.setter + def showlabels(self, val): + self["showlabels"] = val + + # showlines + # --------- + @property + def showlines(self): + """ + Determines whether or not the contour lines are drawn. Has an + effect only if `contours.coloring` is set to "fill". + + The 'showlines' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlines"] + + @showlines.setter + def showlines(self, val): + self["showlines"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # type + # ---- + @property + def type(self): + """ + If `levels`, the data is represented as a contour plot with + multiple levels displayed. If `constraint`, the data is + represented as constraints with the invalid region shaded as + specified by the `operation` and `value` parameters. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['levels', 'constraint'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value or values of the constraint boundary. When + `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an array of + two numbers where the first is the lower bound and the second + is the upper bound. + + The 'value' property accepts values of any type + + Returns + ------- + Any + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "heatmap", a heatmap gradient coloring + is applied between each contour level. If "lines", + coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar to + Python, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an + array of two numbers where the first is the lower bound + and the second is the upper bound. + """ + + def __init__( + self, + arg=None, + coloring=None, + end=None, + labelfont=None, + labelformat=None, + operation=None, + showlabels=None, + showlines=None, + size=None, + start=None, + type=None, + value=None, + **kwargs + ): + """ + Construct a new Contours object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2dcontour.Contours` + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "heatmap", a heatmap gradient coloring + is applied between each contour level. If "lines", + coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar to + Python, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (=,<,>=,>,<=) "value" is expected to be a number. When + `operation` is set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected to be an + array of two numbers where the first is the lower bound + and the second is the upper bound. + + Returns + ------- + Contours + """ + super(Contours, self).__init__("contours") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.Contours +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.Contours`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("coloring", None) + _v = coloring if coloring is not None else _v + if _v is not None: + self["coloring"] = _v + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("labelfont", None) + _v = labelfont if labelfont is not None else _v + if _v is not None: + self["labelfont"] = _v + _v = arg.pop("labelformat", None) + _v = labelformat if labelformat is not None else _v + if _v is not None: + self["labelformat"] = _v + _v = arg.pop("operation", None) + _v = operation if operation is not None else _v + if _v is not None: + self["operation"] = _v + _v = arg.pop("showlabels", None) + _v = showlabels if showlabels is not None else _v + if _v is not None: + self["showlabels"] = _v + _v = arg.pop("showlines", None) + _v = showlines if showlines is not None else _v + if _v is not None: + self["showlines"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_hoverlabel.py new file mode 100644 index 00000000000..dfa3fa51068 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.histogram2dcontour.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_line.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_line.py new file mode 100644 index 00000000000..5f47d6f44b4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_line.py @@ -0,0 +1,241 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.line" + _valid_props = {"color", "dash", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Sets the amount of smoothing for the contour lines, where 0 + corresponds to no smoothing. + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the contour line width in (in px) + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) + """ + + def __init__( + self, arg=None, color=None, dash=None, smoothing=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.histogram2dcontour.Line` + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_marker.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_marker.py new file mode 100644 index 00000000000..6bd4bc89f8f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_marker.py @@ -0,0 +1,128 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.marker" + _valid_props = {"color", "colorsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the aggregation data. + + The 'color' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + """ + + def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2dcontour.Marker` + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_stream.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_stream.py new file mode 100644 index 00000000000..0402aa2538c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2dcontour.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_xbins.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_xbins.py new file mode 100644 index 00000000000..a99b2748d0a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_xbins.py @@ -0,0 +1,218 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class XBins(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.xbins" + _valid_props = {"end", "size", "start"} + + # end + # --- + @property + def end(self): + """ + Sets the end value for the x axis bins. The last bin may not + end exactly at this value, we increment the bin edge by `size` + from `start` until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use a date string, + and for category data `end` is based on the category serial + numbers. + + The 'end' property accepts values of any type + + Returns + ------- + Any + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the size of each x axis bin. Default behavior: If `nbinsx` + is 0 or omitted, we choose a nice round bin size such that the + number of bins is about the same as the typical number of + samples in each bin. If `nbinsx` is provided, we choose a nice + round bin size giving no more than that many bins. For date + data, use milliseconds or "M" for months, as in + `axis.dtick`. For category data, the number of categories to + bin together (always defaults to 1). + + The 'size' property accepts values of any type + + Returns + ------- + Any + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting value for the x axis bins. Defaults to the + minimum data value, shifted down if necessary to make nice + round values and to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin edges 0.5 down, + so a `size` of 5 would have a default `start` of -0.5, so it is + clear that 0-4 are in the first bin, 5-9 in the second, but + continuous data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date string. + For category data, `start` is based on the category serial + numbers, and defaults to -0.5. + + The 'start' property accepts values of any type + + Returns + ------- + Any + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + end + Sets the end value for the x axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each x axis bin. Default behavior: If + `nbinsx` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsx` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the x axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + """ + + def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + """ + Construct a new XBins object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2dcontour.XBins` + end + Sets the end value for the x axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each x axis bin. Default behavior: If + `nbinsx` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsx` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the x axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + + Returns + ------- + XBins + """ + super(XBins, self).__init__("xbins") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.XBins +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.XBins`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_ybins.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_ybins.py new file mode 100644 index 00000000000..2ed2d3facf2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_ybins.py @@ -0,0 +1,218 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class YBins(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour" + _path_str = "histogram2dcontour.ybins" + _valid_props = {"end", "size", "start"} + + # end + # --- + @property + def end(self): + """ + Sets the end value for the y axis bins. The last bin may not + end exactly at this value, we increment the bin edge by `size` + from `start` until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use a date string, + and for category data `end` is based on the category serial + numbers. + + The 'end' property accepts values of any type + + Returns + ------- + Any + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the size of each y axis bin. Default behavior: If `nbinsy` + is 0 or omitted, we choose a nice round bin size such that the + number of bins is about the same as the typical number of + samples in each bin. If `nbinsy` is provided, we choose a nice + round bin size giving no more than that many bins. For date + data, use milliseconds or "M" for months, as in + `axis.dtick`. For category data, the number of categories to + bin together (always defaults to 1). + + The 'size' property accepts values of any type + + Returns + ------- + Any + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting value for the y axis bins. Defaults to the + minimum data value, shifted down if necessary to make nice + round values and to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin edges 0.5 down, + so a `size` of 5 would have a default `start` of -0.5, so it is + clear that 0-4 are in the first bin, 5-9 in the second, but + continuous data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date string. + For category data, `start` is based on the category serial + numbers, and defaults to -0.5. + + The 'start' property accepts values of any type + + Returns + ------- + Any + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + end + Sets the end value for the y axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each y axis bin. Default behavior: If + `nbinsy` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsy` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the y axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + """ + + def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + """ + Construct a new YBins object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.histogram2dcontour.YBins` + end + Sets the end value for the y axis bins. The last bin + may not end exactly at this value, we increment the bin + edge by `size` from `start` until we reach or exceed + `end`. Defaults to the maximum data value. Like + `start`, for dates use a date string, and for category + data `end` is based on the category serial numbers. + size + Sets the size of each y axis bin. Default behavior: If + `nbinsy` is 0 or omitted, we choose a nice round bin + size such that the number of bins is about the same as + the typical number of samples in each bin. If `nbinsy` + is provided, we choose a nice round bin size giving no + more than that many bins. For date data, use + milliseconds or "M" for months, as in `axis.dtick`. + For category data, the number of categories to bin + together (always defaults to 1). + start + Sets the starting value for the y axis bins. Defaults + to the minimum data value, shifted down if necessary to + make nice round values and to remove ambiguous bin + edges. For example, if most of the data is integers we + shift the bin edges 0.5 down, so a `size` of 5 would + have a default `start` of -0.5, so it is clear that 0-4 + are in the first bin, 5-9 in the second, but continuous + data gets a start of 0 and bins [0,5), [5,10) etc. + Dates behave similarly, and `start` should be a date + string. For category data, `start` is based on the + category serial numbers, and defaults to -0.5. + + Returns + ------- + YBins + """ + super(YBins, self).__init__("ybins") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.YBins +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.YBins`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py index e579398265f..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.histogram2dcontour.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.histogram2dcontour.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.histogram2dcontour.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.histogram2dcontour.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.histogram2dcontour.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py new file mode 100644 index 00000000000..1bde5a7606d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour.colorbar" + _path_str = "histogram2dcontour.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..42791b8cdd2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour.colorbar" + _path_str = "histogram2dcontour.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_title.py new file mode 100644 index 00000000000..f6f14a24bbc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour.colorbar" + _path_str = "histogram2dcontour.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.histogram2dcontour.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py index c041e8998e7..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.histogram2dcontour.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py new file mode 100644 index 00000000000..6e349deb70a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour.colorbar.title" + _path_str = "histogram2dcontour.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py index 4c67249514d..4c1ccf7f8e8 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py @@ -1,233 +1,10 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._labelfont import Labelfont +else: + from _plotly_utils.importers import relative_import -class Labelfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour.contours" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Labelfont object - - Sets the font used for labeling the contour levels. The default - color comes from the lines, if shown. The default family and - size come from `layout.font`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.contours.Labelfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Labelfont - """ - super(Labelfont, self).__init__("labelfont") - - # Validate arg - # ------------ - 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.histogram2dcontour.contours.Labelfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.contours.Labelfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour.contours import ( - labelfont as v_labelfont, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_labelfont.ColorValidator() - self._validators["family"] = v_labelfont.FamilyValidator() - self._validators["size"] = v_labelfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Labelfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._labelfont.Labelfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py new file mode 100644 index 00000000000..655f1e1f891 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py @@ -0,0 +1,228 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour.contours" + _path_str = "histogram2dcontour.contours.labelfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Labelfont object + + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.contours.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Labelfont + """ + super(Labelfont, self).__init__("labelfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.contours.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.contours.Labelfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py index 7abe0f52c3b..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "histogram2dcontour.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.histogram2dcon - tour.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.histogram2dcontour.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.histogram2dcontour.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.histogram2dcontour.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py new file mode 100644 index 00000000000..62c7bfddc22 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "histogram2dcontour.hoverlabel" + _path_str = "histogram2dcontour.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.histogram2dcon + tour.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.histogram2dcontour.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.histogram2dcontour.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/image/__init__.py b/packages/python/plotly/plotly/graph_objs/image/__init__.py index 90e115cd925..57b4019e9e1 100644 --- a/packages/python/plotly/plotly/graph_objs/image/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/image/__init__.py @@ -1,633 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "image" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.image.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.image.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.image.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.image import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.image.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.image.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "image" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.image.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.image.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.image.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.image import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Hoverlabel", "Stream", "hoverlabel"] - -from plotly.graph_objs.image import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._hoverlabel import Hoverlabel + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._stream.Stream", "._hoverlabel.Hoverlabel"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/image/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/image/_hoverlabel.py new file mode 100644 index 00000000000..7e03260f18b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/image/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "image" + _path_str = "image.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.image.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.image.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.image.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.image.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.image.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/image/_stream.py b/packages/python/plotly/plotly/graph_objs/image/_stream.py new file mode 100644 index 00000000000..8c10822ba55 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/image/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "image" + _path_str = "image.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.image.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.image.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.image.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/image/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/image/hoverlabel/__init__.py index cd47a1a05c0..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/image/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/image/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "image.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.image.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.image.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.image.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.image.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/image/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/image/hoverlabel/_font.py new file mode 100644 index 00000000000..ce199fad323 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/image/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "image.hoverlabel" + _path_str = "image.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.image.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.image.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.image.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/__init__.py index 6181e09db26..da8e53aee70 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/__init__.py @@ -1,1769 +1,28 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the title. It defaults to - `center` except for bullet charts for which it defaults to - right. - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # font - # ---- - @property - def font(self): - """ - Set the font used to display the title - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.indicator.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this indicator. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the title. It defaults - to `center` except for bullet charts for which it - defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. - """ - - def __init__(self, arg=None, align=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.Title` - align - Sets the horizontal alignment of the title. It defaults - to `center` except for bullet charts for which it - defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.indicator.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator import title as v_title - - # Initialize validators - # --------------------- - self._validators["align"] = v_title.AlignValidator() - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.indicator.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Number(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Set the font used to display main number - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.number.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.indicator.number.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # prefix - # ------ - @property - def prefix(self): - """ - Sets a prefix appearing before the number. - - The 'prefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["prefix"] - - @prefix.setter - def prefix(self, val): - self["prefix"] = val - - # suffix - # ------ - @property - def suffix(self): - """ - Sets a suffix appearing next to the number. - - The 'suffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["suffix"] - - @suffix.setter - def suffix(self, val): - self["suffix"] = val - - # valueformat - # ----------- - @property - def valueformat(self): - """ - Sets the value formatting rule using d3 formatting mini- - language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'valueformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["valueformat"] - - @valueformat.setter - def valueformat(self, val): - self["valueformat"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - """ - - def __init__( - self, arg=None, font=None, prefix=None, suffix=None, valueformat=None, **kwargs - ): - """ - Construct a new Number object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.Number` - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - Returns - ------- - Number - """ - super(Number, self).__init__("number") - - # Validate arg - # ------------ - 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.indicator.Number -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.Number`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator import number as v_number - - # Initialize validators - # --------------------- - self._validators["font"] = v_number.FontValidator() - self._validators["prefix"] = v_number.PrefixValidator() - self._validators["suffix"] = v_number.SuffixValidator() - self._validators["valueformat"] = v_number.ValueformatValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("prefix", None) - self["prefix"] = prefix if prefix is not None else _v - _v = arg.pop("suffix", None) - self["suffix"] = suffix if suffix is not None else _v - _v = arg.pop("valueformat", None) - self["valueformat"] = valueformat if valueformat is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Gauge(_BaseTraceHierarchyType): - - # axis - # ---- - @property - def axis(self): - """ - The 'axis' property is an instance of Axis - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.Axis` - - A dict of string/value properties that will be passed - to the Axis constructor - - Supported dict properties: - - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.axis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.axis.tickformatstopdefaults), - sets the default property values to use for - elements of - indicator.gauge.axis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - - Returns - ------- - plotly.graph_objs.indicator.gauge.Axis - """ - return self["axis"] - - @axis.setter - def axis(self, val): - self["axis"] = val - - # bar - # --- - @property - def bar(self): - """ - Set the appearance of the gauge's value - - The 'bar' property is an instance of Bar - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.Bar` - - A dict of string/value properties that will be passed - to the Bar constructor - - Supported dict properties: - - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.ba - r.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. - - Returns - ------- - plotly.graph_objs.indicator.gauge.Bar - """ - return self["bar"] - - @bar.setter - def bar(self, val): - self["bar"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the gauge background color. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the gauge. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the gauge. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # shape - # ----- - @property - def shape(self): - """ - Set the shape of the gauge - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['angular', 'bullet'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # steps - # ----- - @property - def steps(self): - """ - The 'steps' property is a tuple of instances of - Step that may be specified as: - - A list or tuple of instances of plotly.graph_objs.indicator.gauge.Step - - A list or tuple of dicts of string/value properties that - will be passed to the Step constructor - - Supported dict properties: - - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.st - ep.Line` instance or dict with compatible - properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - Sets the range of this axis. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. - - Returns - ------- - tuple[plotly.graph_objs.indicator.gauge.Step] - """ - return self["steps"] - - @steps.setter - def steps(self, val): - self["steps"] = val - - # stepdefaults - # ------------ - @property - def stepdefaults(self): - """ - When used in a template (as - layout.template.data.indicator.gauge.stepdefaults), sets the - default property values to use for elements of - indicator.gauge.steps - - The 'stepdefaults' property is an instance of Step - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.Step` - - A dict of string/value properties that will be passed - to the Step constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.indicator.gauge.Step - """ - return self["stepdefaults"] - - @stepdefaults.setter - def stepdefaults(self, val): - self["stepdefaults"] = val - - # threshold - # --------- - @property - def threshold(self): - """ - The 'threshold' property is an instance of Threshold - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.Threshold` - - A dict of string/value properties that will be passed - to the Threshold constructor - - Supported dict properties: - - line - :class:`plotly.graph_objects.indicator.gauge.th - reshold.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the threshold line as a - fraction of the thickness of the gauge. - value - Sets a treshold value drawn as a line. - - Returns - ------- - plotly.graph_objs.indicator.gauge.Threshold - """ - return self["threshold"] - - @threshold.setter - def threshold(self, val): - self["threshold"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - axis - :class:`plotly.graph_objects.indicator.gauge.Axis` - instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the gauge. - borderwidth - Sets the width (in px) of the border enclosing the - gauge. - shape - Set the shape of the gauge - steps - A tuple of - :class:`plotly.graph_objects.indicator.gauge.Step` - instances or dicts with compatible properties - stepdefaults - When used in a template (as - layout.template.data.indicator.gauge.stepdefaults), - sets the default property values to use for elements of - indicator.gauge.steps - threshold - :class:`plotly.graph_objects.indicator.gauge.Threshold` - instance or dict with compatible properties - """ - - def __init__( - self, - arg=None, - axis=None, - bar=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - shape=None, - steps=None, - stepdefaults=None, - threshold=None, - **kwargs - ): - """ - Construct a new Gauge object - - The gauge of the Indicator plot. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.Gauge` - axis - :class:`plotly.graph_objects.indicator.gauge.Axis` - instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the gauge. - borderwidth - Sets the width (in px) of the border enclosing the - gauge. - shape - Set the shape of the gauge - steps - A tuple of - :class:`plotly.graph_objects.indicator.gauge.Step` - instances or dicts with compatible properties - stepdefaults - When used in a template (as - layout.template.data.indicator.gauge.stepdefaults), - sets the default property values to use for elements of - indicator.gauge.steps - threshold - :class:`plotly.graph_objects.indicator.gauge.Threshold` - instance or dict with compatible properties - - Returns - ------- - Gauge - """ - super(Gauge, self).__init__("gauge") - - # Validate arg - # ------------ - 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.indicator.Gauge -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.Gauge`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator import gauge as v_gauge - - # Initialize validators - # --------------------- - self._validators["axis"] = v_gauge.AxisValidator() - self._validators["bar"] = v_gauge.BarValidator() - self._validators["bgcolor"] = v_gauge.BgcolorValidator() - self._validators["bordercolor"] = v_gauge.BordercolorValidator() - self._validators["borderwidth"] = v_gauge.BorderwidthValidator() - self._validators["shape"] = v_gauge.ShapeValidator() - self._validators["steps"] = v_gauge.StepsValidator() - self._validators["stepdefaults"] = v_gauge.StepValidator() - self._validators["threshold"] = v_gauge.ThresholdValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("axis", None) - self["axis"] = axis if axis is not None else _v - _v = arg.pop("bar", None) - self["bar"] = bar if bar is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("steps", None) - self["steps"] = steps if steps is not None else _v - _v = arg.pop("stepdefaults", None) - self["stepdefaults"] = stepdefaults if stepdefaults is not None else _v - _v = arg.pop("threshold", None) - self["threshold"] = threshold if threshold is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this indicator trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this indicator trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this indicator trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this indicator trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this indicator trace . - row - If there is a layout grid, use the domain for this row - in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator trace (in - plot fraction). - y - Sets the vertical domain of this indicator trace (in - plot fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this indicator trace . - row - If there is a layout grid, use the domain for this row - in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator trace (in - plot fraction). - y - Sets the vertical domain of this indicator trace (in - plot fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.indicator.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Delta(_BaseTraceHierarchyType): - - # decreasing - # ---------- - @property - def decreasing(self): - """ - The 'decreasing' property is an instance of Decreasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.delta.Decreasing` - - A dict of string/value properties that will be passed - to the Decreasing constructor - - Supported dict properties: - - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - - Returns - ------- - plotly.graph_objs.indicator.delta.Decreasing - """ - return self["decreasing"] - - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val - - # font - # ---- - @property - def font(self): - """ - Set the font used to display the delta - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.delta.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.indicator.delta.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # increasing - # ---------- - @property - def increasing(self): - """ - The 'increasing' property is an instance of Increasing - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.delta.Increasing` - - A dict of string/value properties that will be passed - to the Increasing constructor - - Supported dict properties: - - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - - Returns - ------- - plotly.graph_objs.indicator.delta.Increasing - """ - return self["increasing"] - - @increasing.setter - def increasing(self, val): - self["increasing"] = val - - # position - # -------- - @property - def position(self): - """ - Sets the position of delta with respect to the number. - - The 'position' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'bottom', 'left', 'right'] - - Returns - ------- - Any - """ - return self["position"] - - @position.setter - def position(self, val): - self["position"] = val - - # reference - # --------- - @property - def reference(self): - """ - Sets the reference value to compute the delta. By default, it - is set to the current value. - - The 'reference' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["reference"] - - @reference.setter - def reference(self, val): - self["reference"] = val - - # relative - # -------- - @property - def relative(self): - """ - Show relative change - - The 'relative' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["relative"] - - @relative.setter - def relative(self, val): - self["relative"] = val - - # valueformat - # ----------- - @property - def valueformat(self): - """ - Sets the value formatting rule using d3 formatting mini- - language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'valueformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["valueformat"] - - @valueformat.setter - def valueformat(self, val): - self["valueformat"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - decreasing - :class:`plotly.graph_objects.indicator.delta.Decreasing - ` instance or dict with compatible properties - font - Set the font used to display the delta - increasing - :class:`plotly.graph_objects.indicator.delta.Increasing - ` instance or dict with compatible properties - position - Sets the position of delta with respect to the number. - reference - Sets the reference value to compute the delta. By - default, it is set to the current value. - relative - Show relative change - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - """ - - def __init__( - self, - arg=None, - decreasing=None, - font=None, - increasing=None, - position=None, - reference=None, - relative=None, - valueformat=None, - **kwargs - ): - """ - Construct a new Delta object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.Delta` - decreasing - :class:`plotly.graph_objects.indicator.delta.Decreasing - ` instance or dict with compatible properties - font - Set the font used to display the delta - increasing - :class:`plotly.graph_objects.indicator.delta.Increasing - ` instance or dict with compatible properties - position - Sets the position of delta with respect to the number. - reference - Sets the reference value to compute the delta. By - default, it is set to the current value. - relative - Show relative change - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - Returns - ------- - Delta - """ - super(Delta, self).__init__("delta") - - # Validate arg - # ------------ - 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.indicator.Delta -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.Delta`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator import delta as v_delta - - # Initialize validators - # --------------------- - self._validators["decreasing"] = v_delta.DecreasingValidator() - self._validators["font"] = v_delta.FontValidator() - self._validators["increasing"] = v_delta.IncreasingValidator() - self._validators["position"] = v_delta.PositionValidator() - self._validators["reference"] = v_delta.ReferenceValidator() - self._validators["relative"] = v_delta.RelativeValidator() - self._validators["valueformat"] = v_delta.ValueformatValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v - _v = arg.pop("position", None) - self["position"] = position if position is not None else _v - _v = arg.pop("reference", None) - self["reference"] = reference if reference is not None else _v - _v = arg.pop("relative", None) - self["relative"] = relative if relative is not None else _v - _v = arg.pop("valueformat", None) - self["valueformat"] = valueformat if valueformat is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Delta", - "Domain", - "Gauge", - "Number", - "Stream", - "Title", - "delta", - "gauge", - "number", - "title", -] - -from plotly.graph_objs.indicator import title -from plotly.graph_objs.indicator import number -from plotly.graph_objs.indicator import gauge -from plotly.graph_objs.indicator import delta +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._stream import Stream + from ._number import Number + from ._gauge import Gauge + from ._domain import Domain + from ._delta import Delta + from . import title + from . import number + from . import gauge + from . import delta +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title", ".number", ".gauge", ".delta"], + [ + "._title.Title", + "._stream.Stream", + "._number.Number", + "._gauge.Gauge", + "._domain.Domain", + "._delta.Delta", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/_delta.py b/packages/python/plotly/plotly/graph_objs/indicator/_delta.py new file mode 100644 index 00000000000..1b7063b1e58 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/_delta.py @@ -0,0 +1,345 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Delta(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator" + _path_str = "indicator.delta" + _valid_props = { + "decreasing", + "font", + "increasing", + "position", + "reference", + "relative", + "valueformat", + } + + # decreasing + # ---------- + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.delta.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Supported dict properties: + + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value + + Returns + ------- + plotly.graph_objs.indicator.delta.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + # font + # ---- + @property + def font(self): + """ + Set the font used to display the delta + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.delta.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.indicator.delta.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # increasing + # ---------- + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.delta.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Supported dict properties: + + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value + + Returns + ------- + plotly.graph_objs.indicator.delta.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + # position + # -------- + @property + def position(self): + """ + Sets the position of delta with respect to the number. + + The 'position' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom', 'left', 'right'] + + Returns + ------- + Any + """ + return self["position"] + + @position.setter + def position(self, val): + self["position"] = val + + # reference + # --------- + @property + def reference(self): + """ + Sets the reference value to compute the delta. By default, it + is set to the current value. + + The 'reference' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["reference"] + + @reference.setter + def reference(self, val): + self["reference"] = val + + # relative + # -------- + @property + def relative(self): + """ + Show relative change + + The 'relative' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["relative"] + + @relative.setter + def relative(self, val): + self["relative"] = val + + # valueformat + # ----------- + @property + def valueformat(self): + """ + Sets the value formatting rule using d3 formatting mini- + language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'valueformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valueformat"] + + @valueformat.setter + def valueformat(self, val): + self["valueformat"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + decreasing + :class:`plotly.graph_objects.indicator.delta.Decreasing + ` instance or dict with compatible properties + font + Set the font used to display the delta + increasing + :class:`plotly.graph_objects.indicator.delta.Increasing + ` instance or dict with compatible properties + position + Sets the position of delta with respect to the number. + reference + Sets the reference value to compute the delta. By + default, it is set to the current value. + relative + Show relative change + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + """ + + def __init__( + self, + arg=None, + decreasing=None, + font=None, + increasing=None, + position=None, + reference=None, + relative=None, + valueformat=None, + **kwargs + ): + """ + Construct a new Delta object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.Delta` + decreasing + :class:`plotly.graph_objects.indicator.delta.Decreasing + ` instance or dict with compatible properties + font + Set the font used to display the delta + increasing + :class:`plotly.graph_objects.indicator.delta.Increasing + ` instance or dict with compatible properties + position + Sets the position of delta with respect to the number. + reference + Sets the reference value to compute the delta. By + default, it is set to the current value. + relative + Show relative change + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + Returns + ------- + Delta + """ + super(Delta, self).__init__("delta") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.Delta +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.Delta`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("decreasing", None) + _v = decreasing if decreasing is not None else _v + if _v is not None: + self["decreasing"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("increasing", None) + _v = increasing if increasing is not None else _v + if _v is not None: + self["increasing"] = _v + _v = arg.pop("position", None) + _v = position if position is not None else _v + if _v is not None: + self["position"] = _v + _v = arg.pop("reference", None) + _v = reference if reference is not None else _v + if _v is not None: + self["reference"] = _v + _v = arg.pop("relative", None) + _v = relative if relative is not None else _v + if _v is not None: + self["relative"] = _v + _v = arg.pop("valueformat", None) + _v = valueformat if valueformat is not None else _v + if _v is not None: + self["valueformat"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/_domain.py b/packages/python/plotly/plotly/graph_objs/indicator/_domain.py new file mode 100644 index 00000000000..f54d65dce09 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator" + _path_str = "indicator.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this indicator trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this indicator trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this indicator trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this indicator trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this indicator trace . + row + If there is a layout grid, use the domain for this row + in the grid for this indicator trace . + x + Sets the horizontal domain of this indicator trace (in + plot fraction). + y + Sets the vertical domain of this indicator trace (in + plot fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this indicator trace . + row + If there is a layout grid, use the domain for this row + in the grid for this indicator trace . + x + Sets the horizontal domain of this indicator trace (in + plot fraction). + y + Sets the vertical domain of this indicator trace (in + plot fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/_gauge.py b/packages/python/plotly/plotly/graph_objs/indicator/_gauge.py new file mode 100644 index 00000000000..1cc61094808 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/_gauge.py @@ -0,0 +1,668 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Gauge(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator" + _path_str = "indicator.gauge" + _valid_props = { + "axis", + "bar", + "bgcolor", + "bordercolor", + "borderwidth", + "shape", + "stepdefaults", + "steps", + "threshold", + } + + # axis + # ---- + @property + def axis(self): + """ + The 'axis' property is an instance of Axis + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.Axis` + - A dict of string/value properties that will be passed + to the Axis constructor + + Supported dict properties: + + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.indicat + or.gauge.axis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.indicator.gauge.axis.tickformatstopdefaults), + sets the default property values to use for + elements of + indicator.gauge.axis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + + Returns + ------- + plotly.graph_objs.indicator.gauge.Axis + """ + return self["axis"] + + @axis.setter + def axis(self, val): + self["axis"] = val + + # bar + # --- + @property + def bar(self): + """ + Set the appearance of the gauge's value + + The 'bar' property is an instance of Bar + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.Bar` + - A dict of string/value properties that will be passed + to the Bar constructor + + Supported dict properties: + + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.ba + r.Line` instance or dict with compatible + properties + thickness + Sets the thickness of the bar as a fraction of + the total thickness of the gauge. + + Returns + ------- + plotly.graph_objs.indicator.gauge.Bar + """ + return self["bar"] + + @bar.setter + def bar(self, val): + self["bar"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the gauge background color. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the gauge. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the gauge. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # shape + # ----- + @property + def shape(self): + """ + Set the shape of the gauge + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['angular', 'bullet'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # steps + # ----- + @property + def steps(self): + """ + The 'steps' property is a tuple of instances of + Step that may be specified as: + - A list or tuple of instances of plotly.graph_objs.indicator.gauge.Step + - A list or tuple of dicts of string/value properties that + will be passed to the Step constructor + + Supported dict properties: + + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.st + ep.Line` instance or dict with compatible + properties + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + range + Sets the range of this axis. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + thickness + Sets the thickness of the bar as a fraction of + the total thickness of the gauge. + + Returns + ------- + tuple[plotly.graph_objs.indicator.gauge.Step] + """ + return self["steps"] + + @steps.setter + def steps(self, val): + self["steps"] = val + + # stepdefaults + # ------------ + @property + def stepdefaults(self): + """ + When used in a template (as + layout.template.data.indicator.gauge.stepdefaults), sets the + default property values to use for elements of + indicator.gauge.steps + + The 'stepdefaults' property is an instance of Step + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.Step` + - A dict of string/value properties that will be passed + to the Step constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.indicator.gauge.Step + """ + return self["stepdefaults"] + + @stepdefaults.setter + def stepdefaults(self, val): + self["stepdefaults"] = val + + # threshold + # --------- + @property + def threshold(self): + """ + The 'threshold' property is an instance of Threshold + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.Threshold` + - A dict of string/value properties that will be passed + to the Threshold constructor + + Supported dict properties: + + line + :class:`plotly.graph_objects.indicator.gauge.th + reshold.Line` instance or dict with compatible + properties + thickness + Sets the thickness of the threshold line as a + fraction of the thickness of the gauge. + value + Sets a treshold value drawn as a line. + + Returns + ------- + plotly.graph_objs.indicator.gauge.Threshold + """ + return self["threshold"] + + @threshold.setter + def threshold(self, val): + self["threshold"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + axis + :class:`plotly.graph_objects.indicator.gauge.Axis` + instance or dict with compatible properties + bar + Set the appearance of the gauge's value + bgcolor + Sets the gauge background color. + bordercolor + Sets the color of the border enclosing the gauge. + borderwidth + Sets the width (in px) of the border enclosing the + gauge. + shape + Set the shape of the gauge + steps + A tuple of + :class:`plotly.graph_objects.indicator.gauge.Step` + instances or dicts with compatible properties + stepdefaults + When used in a template (as + layout.template.data.indicator.gauge.stepdefaults), + sets the default property values to use for elements of + indicator.gauge.steps + threshold + :class:`plotly.graph_objects.indicator.gauge.Threshold` + instance or dict with compatible properties + """ + + def __init__( + self, + arg=None, + axis=None, + bar=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + shape=None, + steps=None, + stepdefaults=None, + threshold=None, + **kwargs + ): + """ + Construct a new Gauge object + + The gauge of the Indicator plot. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.Gauge` + axis + :class:`plotly.graph_objects.indicator.gauge.Axis` + instance or dict with compatible properties + bar + Set the appearance of the gauge's value + bgcolor + Sets the gauge background color. + bordercolor + Sets the color of the border enclosing the gauge. + borderwidth + Sets the width (in px) of the border enclosing the + gauge. + shape + Set the shape of the gauge + steps + A tuple of + :class:`plotly.graph_objects.indicator.gauge.Step` + instances or dicts with compatible properties + stepdefaults + When used in a template (as + layout.template.data.indicator.gauge.stepdefaults), + sets the default property values to use for elements of + indicator.gauge.steps + threshold + :class:`plotly.graph_objects.indicator.gauge.Threshold` + instance or dict with compatible properties + + Returns + ------- + Gauge + """ + super(Gauge, self).__init__("gauge") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.Gauge +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.Gauge`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("axis", None) + _v = axis if axis is not None else _v + if _v is not None: + self["axis"] = _v + _v = arg.pop("bar", None) + _v = bar if bar is not None else _v + if _v is not None: + self["bar"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("steps", None) + _v = steps if steps is not None else _v + if _v is not None: + self["steps"] = _v + _v = arg.pop("stepdefaults", None) + _v = stepdefaults if stepdefaults is not None else _v + if _v is not None: + self["stepdefaults"] = _v + _v = arg.pop("threshold", None) + _v = threshold if threshold is not None else _v + if _v is not None: + self["threshold"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/_number.py b/packages/python/plotly/plotly/graph_objs/indicator/_number.py new file mode 100644 index 00000000000..d3567c5ef22 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/_number.py @@ -0,0 +1,222 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Number(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator" + _path_str = "indicator.number" + _valid_props = {"font", "prefix", "suffix", "valueformat"} + + # font + # ---- + @property + def font(self): + """ + Set the font used to display main number + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.number.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.indicator.number.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # prefix + # ------ + @property + def prefix(self): + """ + Sets a prefix appearing before the number. + + The 'prefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["prefix"] + + @prefix.setter + def prefix(self, val): + self["prefix"] = val + + # suffix + # ------ + @property + def suffix(self): + """ + Sets a suffix appearing next to the number. + + The 'suffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["suffix"] + + @suffix.setter + def suffix(self, val): + self["suffix"] = val + + # valueformat + # ----------- + @property + def valueformat(self): + """ + Sets the value formatting rule using d3 formatting mini- + language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'valueformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valueformat"] + + @valueformat.setter + def valueformat(self, val): + self["valueformat"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Set the font used to display main number + prefix + Sets a prefix appearing before the number. + suffix + Sets a suffix appearing next to the number. + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + """ + + def __init__( + self, arg=None, font=None, prefix=None, suffix=None, valueformat=None, **kwargs + ): + """ + Construct a new Number object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.Number` + font + Set the font used to display main number + prefix + Sets a prefix appearing before the number. + suffix + Sets a suffix appearing next to the number. + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + Returns + ------- + Number + """ + super(Number, self).__init__("number") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.Number +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.Number`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("prefix", None) + _v = prefix if prefix is not None else _v + if _v is not None: + self["prefix"] = _v + _v = arg.pop("suffix", None) + _v = suffix if suffix is not None else _v + if _v is not None: + self["suffix"] = _v + _v = arg.pop("valueformat", None) + _v = valueformat if valueformat is not None else _v + if _v is not None: + self["valueformat"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/_stream.py b/packages/python/plotly/plotly/graph_objs/indicator/_stream.py new file mode 100644 index 00000000000..92f9b269cdd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator" + _path_str = "indicator.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/_title.py b/packages/python/plotly/plotly/graph_objs/indicator/_title.py new file mode 100644 index 00000000000..9e545bfe282 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/_title.py @@ -0,0 +1,188 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator" + _path_str = "indicator.title" + _valid_props = {"align", "font", "text"} + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the title. It defaults to + `center` except for bullet charts for which it defaults to + right. + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # font + # ---- + @property + def font(self): + """ + Set the font used to display the title + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.indicator.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this indicator. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the title. It defaults + to `center` except for bullet charts for which it + defaults to right. + font + Set the font used to display the title + text + Sets the title of this indicator. + """ + + def __init__(self, arg=None, align=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.Title` + align + Sets the horizontal alignment of the title. It defaults + to `center` except for bullet charts for which it + defaults to right. + font + Set the font used to display the title + text + Sets the title of this indicator. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py index 056a991fba8..aecec3cf369 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py @@ -1,567 +1,14 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Increasing(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color for increasing value. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the symbol to display for increasing value - - The 'symbol' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.delta" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - """ - - def __init__(self, arg=None, color=None, symbol=None, **kwargs): - """ - Construct a new Increasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.delta.Increasing` - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - - Returns - ------- - Increasing - """ - super(Increasing, self).__init__("increasing") - - # Validate arg - # ------------ - 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.indicator.delta.Increasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.delta.Increasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.delta import increasing as v_increasing - - # Initialize validators - # --------------------- - self._validators["color"] = v_increasing.ColorValidator() - self._validators["symbol"] = v_increasing.SymbolValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.delta" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Set the font used to display the delta - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.delta.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.indicator.delta.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.delta.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.delta import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Decreasing(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color for increasing value. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the symbol to display for increasing value - - The 'symbol' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.delta" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - """ - - def __init__(self, arg=None, color=None, symbol=None, **kwargs): - """ - Construct a new Decreasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.delta.Decreasing` - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - - Returns - ------- - Decreasing - """ - super(Decreasing, self).__init__("decreasing") - - # Validate arg - # ------------ - 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.indicator.delta.Decreasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.delta.Decreasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.delta import decreasing as v_decreasing - - # Initialize validators - # --------------------- - self._validators["color"] = v_decreasing.ColorValidator() - self._validators["symbol"] = v_decreasing.SymbolValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Decreasing", "Font", "Increasing"] +import sys + +if sys.version_info < (3, 7): + from ._increasing import Increasing + from ._font import Font + from ._decreasing import Decreasing +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._increasing.Increasing", "._font.Font", "._decreasing.Decreasing"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/delta/_decreasing.py b/packages/python/plotly/plotly/graph_objs/indicator/delta/_decreasing.py new file mode 100644 index 00000000000..6d9def08259 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/delta/_decreasing.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Decreasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.delta" + _path_str = "indicator.delta.decreasing" + _valid_props = {"color", "symbol"} + + # color + # ----- + @property + def color(self): + """ + Sets the color for increasing value. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the symbol to display for increasing value + + The 'symbol' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value + """ + + def __init__(self, arg=None, color=None, symbol=None, **kwargs): + """ + Construct a new Decreasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.delta.Decreasing` + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value + + Returns + ------- + Decreasing + """ + super(Decreasing, self).__init__("decreasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.delta.Decreasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.delta.Decreasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/delta/_font.py b/packages/python/plotly/plotly/graph_objs/indicator/delta/_font.py new file mode 100644 index 00000000000..367f9367ca9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/delta/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.delta" + _path_str = "indicator.delta.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Set the font used to display the delta + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.delta.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.delta.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.delta.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/delta/_increasing.py b/packages/python/plotly/plotly/graph_objs/indicator/delta/_increasing.py new file mode 100644 index 00000000000..8ee8a02dc77 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/delta/_increasing.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Increasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.delta" + _path_str = "indicator.delta.increasing" + _valid_props = {"color", "symbol"} + + # color + # ----- + @property + def color(self): + """ + Sets the color for increasing value. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the symbol to display for increasing value + + The 'symbol' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value + """ + + def __init__(self, arg=None, color=None, symbol=None, **kwargs): + """ + Construct a new Increasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.delta.Increasing` + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value + + Returns + ------- + Increasing + """ + super(Increasing, self).__init__("increasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.delta.Increasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.delta.Increasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py index 4cb0d4cee1a..9060f4e7147 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py @@ -1,1935 +1,19 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Threshold(_BaseTraceHierarchyType): - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.threshold.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the threshold line. - width - Sets the width (in px) of the threshold line. - - Returns - ------- - plotly.graph_objs.indicator.gauge.threshold.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the threshold line as a fraction of the - thickness of the gauge. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # value - # ----- - @property - def value(self): - """ - Sets a treshold value drawn as a line. - - The 'value' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - line - :class:`plotly.graph_objects.indicator.gauge.threshold. - Line` instance or dict with compatible properties - thickness - Sets the thickness of the threshold line as a fraction - of the thickness of the gauge. - value - Sets a treshold value drawn as a line. - """ - - def __init__(self, arg=None, line=None, thickness=None, value=None, **kwargs): - """ - Construct a new Threshold object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.gauge.Threshold` - line - :class:`plotly.graph_objects.indicator.gauge.threshold. - Line` instance or dict with compatible properties - thickness - Sets the thickness of the threshold line as a fraction - of the thickness of the gauge. - value - Sets a treshold value drawn as a line. - - Returns - ------- - Threshold - """ - super(Threshold, self).__init__("threshold") - - # Validate arg - # ------------ - 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.indicator.gauge.Threshold -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.Threshold`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge import threshold as v_threshold - - # Initialize validators - # --------------------- - self._validators["line"] = v_threshold.LineValidator() - self._validators["thickness"] = v_threshold.ThicknessValidator() - self._validators["value"] = v_threshold.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Step(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the background color of the arc. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.step.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. - - Returns - ------- - plotly.graph_objs.indicator.gauge.step.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the bar as a fraction of the total - thickness of the gauge. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.step.Line` - instance or dict with compatible properties - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - range - Sets the range of this axis. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - thickness - Sets the thickness of the bar as a fraction of the - total thickness of the gauge. - """ - - def __init__( - self, - arg=None, - color=None, - line=None, - name=None, - range=None, - templateitemname=None, - thickness=None, - **kwargs - ): - """ - Construct a new Step object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.gauge.Step` - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.step.Line` - instance or dict with compatible properties - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - range - Sets the range of this axis. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - thickness - Sets the thickness of the bar as a fraction of the - total thickness of the gauge. - - Returns - ------- - Step - """ - super(Step, self).__init__("steps") - - # Validate arg - # ------------ - 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.indicator.gauge.Step -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.Step`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge import step as v_step - - # Initialize validators - # --------------------- - self._validators["color"] = v_step.ColorValidator() - self._validators["line"] = v_step.LineValidator() - self._validators["name"] = v_step.NameValidator() - self._validators["range"] = v_step.RangeValidator() - self._validators["templateitemname"] = v_step.TemplateitemnameValidator() - self._validators["thickness"] = v_step.ThicknessValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Bar(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the background color of the arc. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.bar.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. - - Returns - ------- - plotly.graph_objs.indicator.gauge.bar.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the bar as a fraction of the total - thickness of the gauge. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.bar.Line` - instance or dict with compatible properties - thickness - Sets the thickness of the bar as a fraction of the - total thickness of the gauge. - """ - - def __init__(self, arg=None, color=None, line=None, thickness=None, **kwargs): - """ - Construct a new Bar object - - Set the appearance of the gauge's value - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.gauge.Bar` - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.bar.Line` - instance or dict with compatible properties - thickness - Sets the thickness of the bar as a fraction of the - total thickness of the gauge. - - Returns - ------- - Bar - """ - super(Bar, self).__init__("bar") - - # Validate arg - # ------------ - 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.indicator.gauge.Bar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.Bar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge import bar as v_bar - - # Initialize validators - # --------------------- - self._validators["color"] = v_bar.ColorValidator() - self._validators["line"] = v_bar.LineValidator() - self._validators["thickness"] = v_bar.ThicknessValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Axis(_BaseTraceHierarchyType): - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.indicator.gauge.axis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.indicator.gauge.axis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.indicator.gauge.axis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.indicator.gaug - e.axis.tickformatstopdefaults), sets the default property - values to use for elements of - indicator.gauge.axis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.indicator.gauge.axis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.indicator.gauge - .axis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.indica - tor.gauge.axis.tickformatstopdefaults), sets the - default property values to use for elements of - indicator.gauge.axis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - """ - - def __init__( - self, - arg=None, - dtick=None, - exponentformat=None, - nticks=None, - range=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - visible=None, - **kwargs - ): - """ - Construct a new Axis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.gauge.Axis` - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.indicator.gauge - .axis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.indica - tor.gauge.axis.tickformatstopdefaults), sets the - default property values to use for elements of - indicator.gauge.axis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - - Returns - ------- - Axis - """ - super(Axis, self).__init__("axis") - - # Validate arg - # ------------ - 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.indicator.gauge.Axis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.Axis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge import axis as v_axis - - # Initialize validators - # --------------------- - self._validators["dtick"] = v_axis.DtickValidator() - self._validators["exponentformat"] = v_axis.ExponentformatValidator() - self._validators["nticks"] = v_axis.NticksValidator() - self._validators["range"] = v_axis.RangeValidator() - self._validators["separatethousands"] = v_axis.SeparatethousandsValidator() - self._validators["showexponent"] = v_axis.ShowexponentValidator() - self._validators["showticklabels"] = v_axis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_axis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_axis.ShowticksuffixValidator() - self._validators["tick0"] = v_axis.Tick0Validator() - self._validators["tickangle"] = v_axis.TickangleValidator() - self._validators["tickcolor"] = v_axis.TickcolorValidator() - self._validators["tickfont"] = v_axis.TickfontValidator() - self._validators["tickformat"] = v_axis.TickformatValidator() - self._validators["tickformatstops"] = v_axis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_axis.TickformatstopValidator() - self._validators["ticklen"] = v_axis.TicklenValidator() - self._validators["tickmode"] = v_axis.TickmodeValidator() - self._validators["tickprefix"] = v_axis.TickprefixValidator() - self._validators["ticks"] = v_axis.TicksValidator() - self._validators["ticksuffix"] = v_axis.TicksuffixValidator() - self._validators["ticktext"] = v_axis.TicktextValidator() - self._validators["ticktextsrc"] = v_axis.TicktextsrcValidator() - self._validators["tickvals"] = v_axis.TickvalsValidator() - self._validators["tickvalssrc"] = v_axis.TickvalssrcValidator() - self._validators["tickwidth"] = v_axis.TickwidthValidator() - self._validators["visible"] = v_axis.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Axis", - "Bar", - "Step", - "Step", - "Threshold", - "axis", - "bar", - "step", - "threshold", -] - -from plotly.graph_objs.indicator.gauge import threshold -from plotly.graph_objs.indicator.gauge import step -from plotly.graph_objs.indicator.gauge import bar -from plotly.graph_objs.indicator.gauge import axis +import sys + +if sys.version_info < (3, 7): + from ._threshold import Threshold + from ._step import Step + from ._bar import Bar + from ._axis import Axis + from . import threshold + from . import step + from . import bar + from . import axis +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".threshold", ".step", ".bar", ".axis"], + ["._threshold.Threshold", "._step.Step", "._bar.Bar", "._axis.Axis"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py new file mode 100644 index 00000000000..6b77f3d54e5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py @@ -0,0 +1,1231 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Axis(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge" + _path_str = "indicator.gauge.axis" + _valid_props = { + "dtick", + "exponentformat", + "nticks", + "range", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "visible", + } + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.indicator.gauge.axis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.indicator.gauge.axis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.indicator.gauge.axis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.indicator.gaug + e.axis.tickformatstopdefaults), sets the default property + values to use for elements of + indicator.gauge.axis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.indicator.gauge.axis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.indicator.gauge + .axis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.indica + tor.gauge.axis.tickformatstopdefaults), sets the + default property values to use for elements of + indicator.gauge.axis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + """ + + def __init__( + self, + arg=None, + dtick=None, + exponentformat=None, + nticks=None, + range=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + visible=None, + **kwargs + ): + """ + Construct a new Axis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.gauge.Axis` + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.indicator.gauge + .axis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.indica + tor.gauge.axis.tickformatstopdefaults), sets the + default property values to use for elements of + indicator.gauge.axis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + + Returns + ------- + Axis + """ + super(Axis, self).__init__("axis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.Axis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.Axis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/_bar.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_bar.py new file mode 100644 index 00000000000..0970afd48e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_bar.py @@ -0,0 +1,210 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Bar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge" + _path_str = "indicator.gauge.bar" + _valid_props = {"color", "line", "thickness"} + + # color + # ----- + @property + def color(self): + """ + Sets the background color of the arc. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.bar.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. + width + Sets the width (in px) of the line enclosing + each sector. + + Returns + ------- + plotly.graph_objs.indicator.gauge.bar.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the bar as a fraction of the total + thickness of the gauge. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.bar.Line` + instance or dict with compatible properties + thickness + Sets the thickness of the bar as a fraction of the + total thickness of the gauge. + """ + + def __init__(self, arg=None, color=None, line=None, thickness=None, **kwargs): + """ + Construct a new Bar object + + Set the appearance of the gauge's value + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.gauge.Bar` + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.bar.Line` + instance or dict with compatible properties + thickness + Sets the thickness of the bar as a fraction of the + total thickness of the gauge. + + Returns + ------- + Bar + """ + super(Bar, self).__init__("bar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.Bar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.Bar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/_step.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_step.py new file mode 100644 index 00000000000..964174b44e7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_step.py @@ -0,0 +1,352 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Step(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge" + _path_str = "indicator.gauge.step" + _valid_props = {"color", "line", "name", "range", "templateitemname", "thickness"} + + # color + # ----- + @property + def color(self): + """ + Sets the background color of the arc. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.step.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. + width + Sets the width (in px) of the line enclosing + each sector. + + Returns + ------- + plotly.graph_objs.indicator.gauge.step.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the bar as a fraction of the total + thickness of the gauge. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.step.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + range + Sets the range of this axis. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + thickness + Sets the thickness of the bar as a fraction of the + total thickness of the gauge. + """ + + def __init__( + self, + arg=None, + color=None, + line=None, + name=None, + range=None, + templateitemname=None, + thickness=None, + **kwargs + ): + """ + Construct a new Step object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.gauge.Step` + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.step.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + range + Sets the range of this axis. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + thickness + Sets the thickness of the bar as a fraction of the + total thickness of the gauge. + + Returns + ------- + Step + """ + super(Step, self).__init__("steps") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.Step +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.Step`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/_threshold.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_threshold.py new file mode 100644 index 00000000000..992b196b97d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_threshold.py @@ -0,0 +1,167 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Threshold(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge" + _path_str = "indicator.gauge.threshold" + _valid_props = {"line", "thickness", "value"} + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.gauge.threshold.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the threshold line. + width + Sets the width (in px) of the threshold line. + + Returns + ------- + plotly.graph_objs.indicator.gauge.threshold.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the threshold line as a fraction of the + thickness of the gauge. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # value + # ----- + @property + def value(self): + """ + Sets a treshold value drawn as a line. + + The 'value' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.indicator.gauge.threshold. + Line` instance or dict with compatible properties + thickness + Sets the thickness of the threshold line as a fraction + of the thickness of the gauge. + value + Sets a treshold value drawn as a line. + """ + + def __init__(self, arg=None, line=None, thickness=None, value=None, **kwargs): + """ + Construct a new Threshold object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.gauge.Threshold` + line + :class:`plotly.graph_objects.indicator.gauge.threshold. + Line` instance or dict with compatible properties + thickness + Sets the thickness of the threshold line as a fraction + of the thickness of the gauge. + value + Sets a treshold value drawn as a line. + + Returns + ------- + Threshold + """ + super(Threshold, self).__init__("threshold") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.Threshold +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.Threshold`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py index ede5f604a1b..f1d16bcb76a 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py @@ -1,517 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont +else: + from _plotly_utils.importers import relative_import -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge.axis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.indicator.gaug - e.axis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.indicator.gauge.axis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge.axis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge.axis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.indicator.gaug - e.axis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.indicator.gauge.axis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge.axis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._tickformatstop.Tickformatstop", "._tickfont.Tickfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/_tickfont.py new file mode 100644 index 00000000000..6d56a1581e8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge.axis" + _path_str = "indicator.gauge.axis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.indicator.gaug + e.axis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.axis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py new file mode 100644 index 00000000000..32b89d121a4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge.axis" + _path_str = "indicator.gauge.axis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.indicator.gaug + e.axis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.axis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py index 1aa91828401..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py @@ -1,171 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the line enclosing each sector. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the line enclosing each sector. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge.bar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the line enclosing each sector. - width - Sets the width (in px) of the line enclosing each - sector. - """ - - def __init__(self, arg=None, color=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.indicator.gauge.bar.Line` - color - Sets the color of the line enclosing each sector. - width - Sets the width (in px) of the line enclosing each - sector. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.indicator.gauge.bar.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.bar.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge.bar import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/_line.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/_line.py new file mode 100644 index 00000000000..cc0260c4d12 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/_line.py @@ -0,0 +1,167 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge.bar" + _path_str = "indicator.gauge.bar.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + width + Sets the width (in px) of the line enclosing each + sector. + """ + + def __init__(self, arg=None, color=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.indicator.gauge.bar.Line` + color + Sets the color of the line enclosing each sector. + width + Sets the width (in px) of the line enclosing each + sector. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.bar.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.bar.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py index dbc901aea8a..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py @@ -1,171 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the line enclosing each sector. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the line enclosing each sector. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge.step" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the line enclosing each sector. - width - Sets the width (in px) of the line enclosing each - sector. - """ - - def __init__(self, arg=None, color=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.indicator.gauge.step.Line` - color - Sets the color of the line enclosing each sector. - width - Sets the width (in px) of the line enclosing each - sector. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.indicator.gauge.step.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.step.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge.step import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/_line.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/_line.py new file mode 100644 index 00000000000..fddd1f52c02 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/_line.py @@ -0,0 +1,167 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge.step" + _path_str = "indicator.gauge.step.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + width + Sets the width (in px) of the line enclosing each + sector. + """ + + def __init__(self, arg=None, color=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.indicator.gauge.step.Line` + color + Sets the color of the line enclosing each sector. + width + Sets the width (in px) of the line enclosing each + sector. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.step.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.step.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py index bc8e9d10de2..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py @@ -1,169 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the threshold line. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the threshold line. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.gauge.threshold" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the threshold line. - width - Sets the width (in px) of the threshold line. - """ - - def __init__(self, arg=None, color=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.indicator.gaug - e.threshold.Line` - color - Sets the color of the threshold line. - width - Sets the width (in px) of the threshold line. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.indicator.gauge.threshold.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.gauge.threshold.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.gauge.threshold import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/_line.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/_line.py new file mode 100644 index 00000000000..fb78e262dbb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.gauge.threshold" + _path_str = "indicator.gauge.threshold.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the threshold line. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the threshold line. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the threshold line. + width + Sets the width (in px) of the threshold line. + """ + + def __init__(self, arg=None, color=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.indicator.gaug + e.threshold.Line` + color + Sets the color of the threshold line. + width + Sets the width (in px) of the threshold line. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.gauge.threshold.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.gauge.threshold.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py index fbddaabe064..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py @@ -1,229 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.number" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Set the font used to display main number - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.number.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.indicator.number.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.number.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.number import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/number/_font.py b/packages/python/plotly/plotly/graph_objs/indicator/number/_font.py new file mode 100644 index 00000000000..cd090394663 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/number/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.number" + _path_str = "indicator.number.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Set the font used to display main number + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.number.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.number.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.number.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py index a0322be7b0d..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py @@ -1,229 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "indicator.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Set the font used to display the title - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.indicator.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.indicator.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.indicator.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.indicator.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/indicator/title/_font.py b/packages/python/plotly/plotly/graph_objs/indicator/title/_font.py new file mode 100644 index 00000000000..4ed521d52b5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/indicator/title/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "indicator.title" + _path_str = "indicator.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Set the font used to display the title + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.indicator.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.indicator.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.indicator.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py index c8cf2866416..b2acee2453c 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py @@ -1,4005 +1,36 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Surface(_BaseTraceHierarchyType): - - # count - # ----- - @property - def count(self): - """ - Sets the number of iso-surfaces between minimum and maximum - iso-values. By default this value is 2 meaning that only - minimum and maximum surfaces would be drawn. - - The 'count' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["count"] - - @count.setter - def count(self, val): - self["count"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the iso-surface. The default fill value - of the surface is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # pattern - # ------- - @property - def pattern(self): - """ - Sets the surface pattern of the iso-surface 3-D sections. The - default pattern of the surface is `all` meaning that the rest - of surface elements would be shaded. The check options (either - 1 or 2) could be used to draw half of the squares on the - surface. Using various combinations of capital `A`, `B`, `C`, - `D` and `E` may also be used to reduce the number of triangles - on the iso-surfaces and creating other patterns of interest. - - The 'pattern' property is a flaglist and may be specified - as a string containing: - - Any combination of ['A', 'B', 'C', 'D', 'E'] joined with '+' characters - (e.g. 'A+B') - OR exactly one of ['all', 'odd', 'even'] (e.g. 'even') - - Returns - ------- - Any - """ - return self["pattern"] - - @pattern.setter - def pattern(self, val): - self["pattern"] = val - - # show - # ---- - @property - def show(self): - """ - Hides/displays surfaces between minimum and maximum iso-values. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - count - Sets the number of iso-surfaces between minimum and - maximum iso-values. By default this value is 2 meaning - that only minimum and maximum surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The default - fill value of the surface is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is `all` - meaning that the rest of surface elements would be - shaded. The check options (either 1 or 2) could be used - to draw half of the squares on the surface. Using - various combinations of capital `A`, `B`, `C`, `D` and - `E` may also be used to reduce the number of triangles - on the iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and maximum - iso-values. - """ - - def __init__( - self, arg=None, count=None, fill=None, pattern=None, show=None, **kwargs - ): - """ - Construct a new Surface object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Surface` - count - Sets the number of iso-surfaces between minimum and - maximum iso-values. By default this value is 2 meaning - that only minimum and maximum surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The default - fill value of the surface is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is `all` - meaning that the rest of surface elements would be - shaded. The check options (either 1 or 2) could be used - to draw half of the squares on the surface. Using - various combinations of capital `A`, `B`, `C`, `D` and - `E` may also be used to reduce the number of triangles - on the iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and maximum - iso-values. - - Returns - ------- - Surface - """ - super(Surface, self).__init__("surface") - - # Validate arg - # ------------ - 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.isosurface.Surface -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Surface`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import surface as v_surface - - # Initialize validators - # --------------------- - self._validators["count"] = v_surface.CountValidator() - self._validators["fill"] = v_surface.FillValidator() - self._validators["pattern"] = v_surface.PatternValidator() - self._validators["show"] = v_surface.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("count", None) - self["count"] = count if count is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("pattern", None) - self["pattern"] = pattern if pattern is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.isosurface.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Spaceframe(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `spaceframe` elements. The default - fill value is 0.15 meaning that only 15% of the area of every - faces of tetras would be shaded. Applying a greater `fill` - ratio would allow the creation of stronger elements or could be - sued to have entirely closed areas (in case of using 1). - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Displays/hides tetrahedron shapes between minimum and maximum - iso-values. Often useful when either caps or surfaces are - disabled or filled with values less than 1. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `spaceframe` elements. The - default fill value is 0.15 meaning that only 15% of the - area of every faces of tetras would be shaded. Applying - a greater `fill` ratio would allow the creation of - stronger elements or could be sued to have entirely - closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between minimum and - maximum iso-values. Often useful when either caps or - surfaces are disabled or filled with values less than - 1. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new Spaceframe object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Spaceframe` - fill - Sets the fill ratio of the `spaceframe` elements. The - default fill value is 0.15 meaning that only 15% of the - area of every faces of tetras would be shaded. Applying - a greater `fill` ratio would allow the creation of - stronger elements or could be sued to have entirely - closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between minimum and - maximum iso-values. Often useful when either caps or - surfaces are disabled or filled with values less than - 1. - - Returns - ------- - Spaceframe - """ - super(Spaceframe, self).__init__("spaceframe") - - # Validate arg - # ------------ - 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.isosurface.Spaceframe -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Spaceframe`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import spaceframe as v_spaceframe - - # Initialize validators - # --------------------- - self._validators["fill"] = v_spaceframe.FillValidator() - self._validators["show"] = v_spaceframe.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Slices(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is an instance of X - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.slices.X` - - A dict of string/value properties that will be passed - to the X constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the x dimension are drawn. - - Returns - ------- - plotly.graph_objs.isosurface.slices.X - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is an instance of Y - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.slices.Y` - - A dict of string/value properties that will be passed - to the Y constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the y dimension are drawn. - - Returns - ------- - plotly.graph_objs.isosurface.slices.Y - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is an instance of Z - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.slices.Z` - - A dict of string/value properties that will be passed - to the Z constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the z dimension are drawn. - - Returns - ------- - plotly.graph_objs.isosurface.slices.Z - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - :class:`plotly.graph_objects.isosurface.slices.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.slices.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.slices.Z` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Slices object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Slices` - x - :class:`plotly.graph_objects.isosurface.slices.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.slices.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.slices.Z` - instance or dict with compatible properties - - Returns - ------- - Slices - """ - super(Slices, self).__init__("slices") - - # Validate arg - # ------------ - 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.isosurface.Slices -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Slices`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import slices as v_slices - - # Initialize validators - # --------------------- - self._validators["x"] = v_slices.XValidator() - self._validators["y"] = v_slices.YValidator() - self._validators["z"] = v_slices.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lightposition(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Numeric vector, representing the X coordinate for each vertex. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Numeric vector, representing the Y coordinate for each vertex. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Numeric vector, representing the Z coordinate for each vertex. - - The 'z' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Lightposition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Lightposition` - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - - Returns - ------- - Lightposition - """ - super(Lightposition, self).__init__("lightposition") - - # Validate arg - # ------------ - 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.isosurface.Lightposition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Lightposition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import lightposition as v_lightposition - - # Initialize validators - # --------------------- - self._validators["x"] = v_lightposition.XValidator() - self._validators["y"] = v_lightposition.YValidator() - self._validators["z"] = v_lightposition.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lighting(_BaseTraceHierarchyType): - - # ambient - # ------- - @property - def ambient(self): - """ - Ambient light increases overall color visibility but can wash - out the image. - - The 'ambient' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ambient"] - - @ambient.setter - def ambient(self, val): - self["ambient"] = val - - # diffuse - # ------- - @property - def diffuse(self): - """ - Represents the extent that incident rays are reflected in a - range of angles. - - The 'diffuse' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["diffuse"] - - @diffuse.setter - def diffuse(self, val): - self["diffuse"] = val - - # facenormalsepsilon - # ------------------ - @property - def facenormalsepsilon(self): - """ - Epsilon for face normals calculation avoids math issues arising - from degenerate geometry. - - The 'facenormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["facenormalsepsilon"] - - @facenormalsepsilon.setter - def facenormalsepsilon(self, val): - self["facenormalsepsilon"] = val - - # fresnel - # ------- - @property - def fresnel(self): - """ - Represents the reflectance as a dependency of the viewing - angle; e.g. paper is reflective when viewing it from the edge - of the paper (almost 90 degrees), causing shine. - - The 'fresnel' property is a number and may be specified as: - - An int or float in the interval [0, 5] - - Returns - ------- - int|float - """ - return self["fresnel"] - - @fresnel.setter - def fresnel(self, val): - self["fresnel"] = val - - # roughness - # --------- - @property - def roughness(self): - """ - Alters specular reflection; the rougher the surface, the wider - and less contrasty the shine. - - The 'roughness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["roughness"] - - @roughness.setter - def roughness(self, val): - self["roughness"] = val - - # specular - # -------- - @property - def specular(self): - """ - Represents the level that incident rays are reflected in a - single direction, causing shine. - - The 'specular' property is a number and may be specified as: - - An int or float in the interval [0, 2] - - Returns - ------- - int|float - """ - return self["specular"] - - @specular.setter - def specular(self, val): - self["specular"] = val - - # vertexnormalsepsilon - # -------------------- - @property - def vertexnormalsepsilon(self): - """ - Epsilon for vertex normals calculation avoids math issues - arising from degenerate geometry. - - The 'vertexnormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["vertexnormalsepsilon"] - - @vertexnormalsepsilon.setter - def vertexnormalsepsilon(self, val): - self["vertexnormalsepsilon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - """ - - def __init__( - self, - arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, - **kwargs - ): - """ - Construct a new Lighting object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Lighting` - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - - Returns - ------- - Lighting - """ - super(Lighting, self).__init__("lighting") - - # Validate arg - # ------------ - 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.isosurface.Lighting -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Lighting`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import lighting as v_lighting - - # Initialize validators - # --------------------- - self._validators["ambient"] = v_lighting.AmbientValidator() - self._validators["diffuse"] = v_lighting.DiffuseValidator() - self._validators[ - "facenormalsepsilon" - ] = v_lighting.FacenormalsepsilonValidator() - self._validators["fresnel"] = v_lighting.FresnelValidator() - self._validators["roughness"] = v_lighting.RoughnessValidator() - self._validators["specular"] = v_lighting.SpecularValidator() - self._validators[ - "vertexnormalsepsilon" - ] = v_lighting.VertexnormalsepsilonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - self["ambient"] = ambient if ambient is not None else _v - _v = arg.pop("diffuse", None) - self["diffuse"] = diffuse if diffuse is not None else _v - _v = arg.pop("facenormalsepsilon", None) - self["facenormalsepsilon"] = ( - facenormalsepsilon if facenormalsepsilon is not None else _v - ) - _v = arg.pop("fresnel", None) - self["fresnel"] = fresnel if fresnel is not None else _v - _v = arg.pop("roughness", None) - self["roughness"] = roughness if roughness is not None else _v - _v = arg.pop("specular", None) - self["specular"] = specular if specular is not None else _v - _v = arg.pop("vertexnormalsepsilon", None) - self["vertexnormalsepsilon"] = ( - vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - ) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.isosurface.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.isosurface.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contour(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour lines. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # show - # ---- - @property - def show(self): - """ - Sets whether or not dynamic contours are shown on hover - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the contour lines. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown on hover - width - Sets the width of the contour lines. - """ - - def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): - """ - Construct a new Contour object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Contour` - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown on hover - width - Sets the width of the contour lines. - - Returns - ------- - Contour - """ - super(Contour, self).__init__("contour") - - # Validate arg - # ------------ - 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.isosurface.Contour -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Contour`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import contour as v_contour - - # Initialize validators - # --------------------- - self._validators["color"] = v_contour.ColorValidator() - self._validators["show"] = v_contour.ShowValidator() - self._validators["width"] = v_contour.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.isosurface.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.isosurface.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.isosurface.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.isosurface.col - orbar.tickformatstopdefaults), sets the default property values - to use for elements of isosurface.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.isosurface.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.isosurface.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use isosurface.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use isosurface.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.isosurface.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.isosur - face.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - isosurface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.isosurface.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use isosurface.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use isosurface.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.isosurface.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.isosur - face.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - isosurface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.isosurface.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use isosurface.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use isosurface.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.isosurface.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Caps(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is an instance of X - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.caps.X` - - A dict of string/value properties that will be passed - to the X constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - - Returns - ------- - plotly.graph_objs.isosurface.caps.X - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is an instance of Y - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.caps.Y` - - A dict of string/value properties that will be passed - to the Y constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - - Returns - ------- - plotly.graph_objs.isosurface.caps.Y - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is an instance of Z - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.caps.Z` - - A dict of string/value properties that will be passed - to the Z constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - - Returns - ------- - plotly.graph_objs.isosurface.caps.Z - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - :class:`plotly.graph_objects.isosurface.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.caps.Z` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Caps object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.Caps` - x - :class:`plotly.graph_objects.isosurface.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.caps.Z` - instance or dict with compatible properties - - Returns - ------- - Caps - """ - super(Caps, self).__init__("caps") - - # Validate arg - # ------------ - 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.isosurface.Caps -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.Caps`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface import caps as v_caps - - # Initialize validators - # --------------------- - self._validators["x"] = v_caps.XValidator() - self._validators["y"] = v_caps.YValidator() - self._validators["z"] = v_caps.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Caps", - "ColorBar", - "Contour", - "Hoverlabel", - "Lighting", - "Lightposition", - "Slices", - "Spaceframe", - "Stream", - "Surface", - "caps", - "colorbar", - "hoverlabel", - "slices", -] - -from plotly.graph_objs.isosurface import slices -from plotly.graph_objs.isosurface import hoverlabel -from plotly.graph_objs.isosurface import colorbar -from plotly.graph_objs.isosurface import caps +import sys + +if sys.version_info < (3, 7): + from ._surface import Surface + from ._stream import Stream + from ._spaceframe import Spaceframe + from ._slices import Slices + from ._lightposition import Lightposition + from ._lighting import Lighting + from ._hoverlabel import Hoverlabel + from ._contour import Contour + from ._colorbar import ColorBar + from ._caps import Caps + from . import slices + from . import hoverlabel + from . import colorbar + from . import caps +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".slices", ".hoverlabel", ".colorbar", ".caps"], + [ + "._surface.Surface", + "._stream.Stream", + "._spaceframe.Spaceframe", + "._slices.Slices", + "._lightposition.Lightposition", + "._lighting.Lighting", + "._hoverlabel.Hoverlabel", + "._contour.Contour", + "._colorbar.ColorBar", + "._caps.Caps", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_caps.py b/packages/python/plotly/plotly/graph_objs/isosurface/_caps.py new file mode 100644 index 00000000000..8578a59e2b0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_caps.py @@ -0,0 +1,211 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Caps(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.caps" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is an instance of X + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.caps.X` + - A dict of string/value properties that will be passed + to the X constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the x `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. + + Returns + ------- + plotly.graph_objs.isosurface.caps.X + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is an instance of Y + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.caps.Y` + - A dict of string/value properties that will be passed + to the Y constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the y `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. + + Returns + ------- + plotly.graph_objs.isosurface.caps.Y + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is an instance of Z + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.caps.Z` + - A dict of string/value properties that will be passed + to the Z constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the z `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. + + Returns + ------- + plotly.graph_objs.isosurface.caps.Z + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + :class:`plotly.graph_objects.isosurface.caps.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.caps.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.caps.Z` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Caps object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Caps` + x + :class:`plotly.graph_objects.isosurface.caps.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.caps.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.caps.Z` + instance or dict with compatible properties + + Returns + ------- + Caps + """ + super(Caps, self).__init__("caps") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Caps +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Caps`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py b/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py new file mode 100644 index 00000000000..6fc9bf684d2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py @@ -0,0 +1,1939 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.isosurface.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.isosurface.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.isosurface.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.isosurface.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of isosurface.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.isosurface.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.isosurface.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use isosurface.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use isosurface.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.isosurface.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.isosur + face.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + isosurface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.isosurface.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use isosurface.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use isosurface.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.isosurface.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.isosur + face.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + isosurface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.isosurface.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use isosurface.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use isosurface.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_contour.py b/packages/python/plotly/plotly/graph_objs/isosurface/_contour.py new file mode 100644 index 00000000000..e0c93755e10 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_contour.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contour(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.contour" + _valid_props = {"color", "show", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour lines. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # show + # ---- + @property + def show(self): + """ + Sets whether or not dynamic contours are shown on hover + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the contour lines. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown on hover + width + Sets the width of the contour lines. + """ + + def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): + """ + Construct a new Contour object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Contour` + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown on hover + width + Sets the width of the contour lines. + + Returns + ------- + Contour + """ + super(Contour, self).__init__("contour") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Contour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Contour`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/isosurface/_hoverlabel.py new file mode 100644 index 00000000000..14c998d29e3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.isosurface.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_lighting.py b/packages/python/plotly/plotly/graph_objs/isosurface/_lighting.py new file mode 100644 index 00000000000..515e7dc3cd9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_lighting.py @@ -0,0 +1,311 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.lighting" + _valid_props = { + "ambient", + "diffuse", + "facenormalsepsilon", + "fresnel", + "roughness", + "specular", + "vertexnormalsepsilon", + } + + # ambient + # ------- + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + # diffuse + # ------- + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + # facenormalsepsilon + # ------------------ + @property + def facenormalsepsilon(self): + """ + Epsilon for face normals calculation avoids math issues arising + from degenerate geometry. + + The 'facenormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["facenormalsepsilon"] + + @facenormalsepsilon.setter + def facenormalsepsilon(self, val): + self["facenormalsepsilon"] = val + + # fresnel + # ------- + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + # roughness + # --------- + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + # specular + # -------- + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + # vertexnormalsepsilon + # -------------------- + @property + def vertexnormalsepsilon(self): + """ + Epsilon for vertex normals calculation avoids math issues + arising from degenerate geometry. + + The 'vertexnormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["vertexnormalsepsilon"] + + @vertexnormalsepsilon.setter + def vertexnormalsepsilon(self, val): + self["vertexnormalsepsilon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + facenormalsepsilon=None, + fresnel=None, + roughness=None, + specular=None, + vertexnormalsepsilon=None, + **kwargs + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + + Returns + ------- + Lighting + """ + super(Lighting, self).__init__("lighting") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Lighting`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("ambient", None) + _v = ambient if ambient is not None else _v + if _v is not None: + self["ambient"] = _v + _v = arg.pop("diffuse", None) + _v = diffuse if diffuse is not None else _v + if _v is not None: + self["diffuse"] = _v + _v = arg.pop("facenormalsepsilon", None) + _v = facenormalsepsilon if facenormalsepsilon is not None else _v + if _v is not None: + self["facenormalsepsilon"] = _v + _v = arg.pop("fresnel", None) + _v = fresnel if fresnel is not None else _v + if _v is not None: + self["fresnel"] = _v + _v = arg.pop("roughness", None) + _v = roughness if roughness is not None else _v + if _v is not None: + self["roughness"] = _v + _v = arg.pop("specular", None) + _v = specular if specular is not None else _v + if _v is not None: + self["specular"] = _v + _v = arg.pop("vertexnormalsepsilon", None) + _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v + if _v is not None: + self["vertexnormalsepsilon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_lightposition.py b/packages/python/plotly/plotly/graph_objs/isosurface/_lightposition.py new file mode 100644 index 00000000000..9f33a2eaeef --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_lightposition.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.lightposition" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super(Lightposition, self).__init__("lightposition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Lightposition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_slices.py b/packages/python/plotly/plotly/graph_objs/isosurface/_slices.py new file mode 100644 index 00000000000..edbc76184cb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_slices.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Slices(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.slices" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is an instance of X + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.slices.X` + - A dict of string/value properties that will be passed + to the X constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis x except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the x dimension are drawn. + + Returns + ------- + plotly.graph_objs.isosurface.slices.X + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is an instance of Y + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.slices.Y` + - A dict of string/value properties that will be passed + to the Y constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis y except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the y dimension are drawn. + + Returns + ------- + plotly.graph_objs.isosurface.slices.Y + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is an instance of Z + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.slices.Z` + - A dict of string/value properties that will be passed + to the Z constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis z except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the z dimension are drawn. + + Returns + ------- + plotly.graph_objs.isosurface.slices.Z + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + :class:`plotly.graph_objects.isosurface.slices.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.slices.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.slices.Z` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Slices object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Slices` + x + :class:`plotly.graph_objects.isosurface.slices.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.slices.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.slices.Z` + instance or dict with compatible properties + + Returns + ------- + Slices + """ + super(Slices, self).__init__("slices") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Slices +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Slices`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_spaceframe.py b/packages/python/plotly/plotly/graph_objs/isosurface/_spaceframe.py new file mode 100644 index 00000000000..e668b4bc850 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_spaceframe.py @@ -0,0 +1,148 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Spaceframe(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.spaceframe" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `spaceframe` elements. The default + fill value is 0.15 meaning that only 15% of the area of every + faces of tetras would be shaded. Applying a greater `fill` + ratio would allow the creation of stronger elements or could be + sued to have entirely closed areas (in case of using 1). + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Displays/hides tetrahedron shapes between minimum and maximum + iso-values. Often useful when either caps or surfaces are + disabled or filled with values less than 1. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `spaceframe` elements. The + default fill value is 0.15 meaning that only 15% of the + area of every faces of tetras would be shaded. Applying + a greater `fill` ratio would allow the creation of + stronger elements or could be sued to have entirely + closed areas (in case of using 1). + show + Displays/hides tetrahedron shapes between minimum and + maximum iso-values. Often useful when either caps or + surfaces are disabled or filled with values less than + 1. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new Spaceframe object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Spaceframe` + fill + Sets the fill ratio of the `spaceframe` elements. The + default fill value is 0.15 meaning that only 15% of the + area of every faces of tetras would be shaded. Applying + a greater `fill` ratio would allow the creation of + stronger elements or could be sued to have entirely + closed areas (in case of using 1). + show + Displays/hides tetrahedron shapes between minimum and + maximum iso-values. Often useful when either caps or + surfaces are disabled or filled with values less than + 1. + + Returns + ------- + Spaceframe + """ + super(Spaceframe, self).__init__("spaceframe") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Spaceframe +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Spaceframe`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_stream.py b/packages/python/plotly/plotly/graph_objs/isosurface/_stream.py new file mode 100644 index 00000000000..87048660883 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_surface.py b/packages/python/plotly/plotly/graph_objs/isosurface/_surface.py new file mode 100644 index 00000000000..61de5758a92 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_surface.py @@ -0,0 +1,229 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Surface(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface" + _path_str = "isosurface.surface" + _valid_props = {"count", "fill", "pattern", "show"} + + # count + # ----- + @property + def count(self): + """ + Sets the number of iso-surfaces between minimum and maximum + iso-values. By default this value is 2 meaning that only + minimum and maximum surfaces would be drawn. + + The 'count' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the iso-surface. The default fill value + of the surface is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # pattern + # ------- + @property + def pattern(self): + """ + Sets the surface pattern of the iso-surface 3-D sections. The + default pattern of the surface is `all` meaning that the rest + of surface elements would be shaded. The check options (either + 1 or 2) could be used to draw half of the squares on the + surface. Using various combinations of capital `A`, `B`, `C`, + `D` and `E` may also be used to reduce the number of triangles + on the iso-surfaces and creating other patterns of interest. + + The 'pattern' property is a flaglist and may be specified + as a string containing: + - Any combination of ['A', 'B', 'C', 'D', 'E'] joined with '+' characters + (e.g. 'A+B') + OR exactly one of ['all', 'odd', 'even'] (e.g. 'even') + + Returns + ------- + Any + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + # show + # ---- + @property + def show(self): + """ + Hides/displays surfaces between minimum and maximum iso-values. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + count + Sets the number of iso-surfaces between minimum and + maximum iso-values. By default this value is 2 meaning + that only minimum and maximum surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The default + fill value of the surface is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is `all` + meaning that the rest of surface elements would be + shaded. The check options (either 1 or 2) could be used + to draw half of the squares on the surface. Using + various combinations of capital `A`, `B`, `C`, `D` and + `E` may also be used to reduce the number of triangles + on the iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and maximum + iso-values. + """ + + def __init__( + self, arg=None, count=None, fill=None, pattern=None, show=None, **kwargs + ): + """ + Construct a new Surface object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.Surface` + count + Sets the number of iso-surfaces between minimum and + maximum iso-values. By default this value is 2 meaning + that only minimum and maximum surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The default + fill value of the surface is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is `all` + meaning that the rest of surface elements would be + shaded. The check options (either 1 or 2) could be used + to draw half of the squares on the surface. Using + various combinations of capital `A`, `B`, `C`, `D` and + `E` may also be used to reduce the number of triangles + on the iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and maximum + iso-values. + + Returns + ------- + Surface + """ + super(Surface, self).__init__("surface") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.Surface +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.Surface`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("count", None) + _v = count if count is not None else _v + if _v is not None: + self["count"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("pattern", None) + _v = pattern if pattern is not None else _v + if _v is not None: + self["pattern"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py index cce84884b08..3e3a4f570cc 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py @@ -1,454 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Z(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `caps`. The default fill value of - the `caps` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the z `slices` is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.caps" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the z `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new Z object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.caps.Z` - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the z `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - - Returns - ------- - Z - """ - super(Z, self).__init__("z") - - # Validate arg - # ------------ - 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.isosurface.caps.Z -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.caps.Z`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.caps import z as v_z - - # Initialize validators - # --------------------- - self._validators["fill"] = v_z.FillValidator() - self._validators["show"] = v_z.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Y(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `caps`. The default fill value of - the `caps` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the y `slices` is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.caps" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the y `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new Y object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.caps.Y` - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the y `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - - Returns - ------- - Y - """ - super(Y, self).__init__("y") - - # Validate arg - # ------------ - 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.isosurface.caps.Y -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.caps.Y`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.caps import y as v_y - - # Initialize validators - # --------------------- - self._validators["fill"] = v_y.FillValidator() - self._validators["show"] = v_y.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class X(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `caps`. The default fill value of - the `caps` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the x `slices` is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.caps" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the x `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new X object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.caps.X` - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the x `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - - Returns - ------- - X - """ - super(X, self).__init__("x") - - # Validate arg - # ------------ - 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.isosurface.caps.X -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.caps.X`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.caps import x as v_x - - # Initialize validators - # --------------------- - self._validators["fill"] = v_x.FillValidator() - self._validators["show"] = v_x.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["X", "Y", "Z"] +import sys + +if sys.version_info < (3, 7): + from ._z import Z + from ._y import Y + from ._x import X +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.Z", "._y.Y", "._x.X"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/caps/_x.py b/packages/python/plotly/plotly/graph_objs/isosurface/caps/_x.py new file mode 100644 index 00000000000..070b67b55b9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/caps/_x.py @@ -0,0 +1,148 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class X(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.caps" + _path_str = "isosurface.caps.x" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `caps`. The default fill value of + the `caps` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the x `slices` is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the x `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new X object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.caps.X` + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the x `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + + Returns + ------- + X + """ + super(X, self).__init__("x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.caps.X +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.caps.X`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/caps/_y.py b/packages/python/plotly/plotly/graph_objs/isosurface/caps/_y.py new file mode 100644 index 00000000000..17e4f2484cc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/caps/_y.py @@ -0,0 +1,148 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Y(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.caps" + _path_str = "isosurface.caps.y" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `caps`. The default fill value of + the `caps` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the y `slices` is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the y `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new Y object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.caps.Y` + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the y `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + + Returns + ------- + Y + """ + super(Y, self).__init__("y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.caps.Y +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.caps.Y`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/caps/_z.py b/packages/python/plotly/plotly/graph_objs/isosurface/caps/_z.py new file mode 100644 index 00000000000..fd987be3375 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/caps/_z.py @@ -0,0 +1,148 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Z(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.caps" + _path_str = "isosurface.caps.z" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `caps`. The default fill value of + the `caps` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the z `slices` is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the z `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new Z object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.caps.Z` + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the z `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + + Returns + ------- + Z + """ + super(Z, self).__init__("z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.caps.Z +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.caps.Z`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py index f18f1430d89..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.isosurface.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.isosurface.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.isosurface.col - orbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.isosurface.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.isosurface.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.isosurface.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_tickfont.py new file mode 100644 index 00000000000..57ca113b2fa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.colorbar" + _path_str = "isosurface.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..0135522c946 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.colorbar" + _path_str = "isosurface.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.isosurface.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_title.py new file mode 100644 index 00000000000..0c0366fba73 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.colorbar" + _path_str = "isosurface.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.isosurface.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py index 9cb2c5118b2..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.isosurface.col - orbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.isosurface.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/_font.py new file mode 100644 index 00000000000..13bf33b1037 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.colorbar.title" + _path_str = "isosurface.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.isosurface.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py index 6367e61de62..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.isosurface.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/_font.py new file mode 100644 index 00000000000..e2d518c78c9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.hoverlabel" + _path_str = "isosurface.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py index 3a3f38fc70c..3e3a4f570cc 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py @@ -1,643 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Z(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the `slices` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # locations - # --------- - @property - def locations(self): - """ - Specifies the location(s) of slices on the axis. When not - specified slices would be created for all points of the axis z - except start and end. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not slice planes about the z dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.slices" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis z except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the z - dimension are drawn. - """ - - def __init__( - self, - arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, - **kwargs - ): - """ - Construct a new Z object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.slices.Z` - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis z except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the z - dimension are drawn. - - Returns - ------- - Z - """ - super(Z, self).__init__("z") - - # Validate arg - # ------------ - 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.isosurface.slices.Z -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.slices.Z`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.slices import z as v_z - - # Initialize validators - # --------------------- - self._validators["fill"] = v_z.FillValidator() - self._validators["locations"] = v_z.LocationsValidator() - self._validators["locationssrc"] = v_z.LocationssrcValidator() - self._validators["show"] = v_z.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Y(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the `slices` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # locations - # --------- - @property - def locations(self): - """ - Specifies the location(s) of slices on the axis. When not - specified slices would be created for all points of the axis y - except start and end. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not slice planes about the y dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.slices" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis y except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the y - dimension are drawn. - """ - - def __init__( - self, - arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, - **kwargs - ): - """ - Construct a new Y object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.slices.Y` - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis y except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the y - dimension are drawn. - - Returns - ------- - Y - """ - super(Y, self).__init__("y") - - # Validate arg - # ------------ - 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.isosurface.slices.Y -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.slices.Y`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.slices import y as v_y - - # Initialize validators - # --------------------- - self._validators["fill"] = v_y.FillValidator() - self._validators["locations"] = v_y.LocationsValidator() - self._validators["locationssrc"] = v_y.LocationssrcValidator() - self._validators["show"] = v_y.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class X(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the `slices` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # locations - # --------- - @property - def locations(self): - """ - Specifies the location(s) of slices on the axis. When not - specified slices would be created for all points of the axis x - except start and end. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not slice planes about the x dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "isosurface.slices" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis x except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the x - dimension are drawn. - """ - - def __init__( - self, - arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, - **kwargs - ): - """ - Construct a new X object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.isosurface.slices.X` - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis x except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the x - dimension are drawn. - - Returns - ------- - X - """ - super(X, self).__init__("x") - - # Validate arg - # ------------ - 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.isosurface.slices.X -constructor must be a dict or -an instance of :class:`plotly.graph_objs.isosurface.slices.X`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.isosurface.slices import x as v_x - - # Initialize validators - # --------------------- - self._validators["fill"] = v_x.FillValidator() - self._validators["locations"] = v_x.LocationsValidator() - self._validators["locationssrc"] = v_x.LocationssrcValidator() - self._validators["show"] = v_x.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["X", "Y", "Z"] +import sys + +if sys.version_info < (3, 7): + from ._z import Z + from ._y import Y + from ._x import X +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.Z", "._y.Y", "._x.X"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/slices/_x.py b/packages/python/plotly/plotly/graph_objs/isosurface/slices/_x.py new file mode 100644 index 00000000000..c672d2eb961 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/slices/_x.py @@ -0,0 +1,213 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class X(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.slices" + _path_str = "isosurface.slices.x" + _valid_props = {"fill", "locations", "locationssrc", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the `slices` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # locations + # --------- + @property + def locations(self): + """ + Specifies the location(s) of slices on the axis. When not + specified slices would be created for all points of the axis x + except start and end. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not slice planes about the x dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis x except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the x + dimension are drawn. + """ + + def __init__( + self, + arg=None, + fill=None, + locations=None, + locationssrc=None, + show=None, + **kwargs + ): + """ + Construct a new X object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.slices.X` + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis x except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the x + dimension are drawn. + + Returns + ------- + X + """ + super(X, self).__init__("x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.slices.X +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.slices.X`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/slices/_y.py b/packages/python/plotly/plotly/graph_objs/isosurface/slices/_y.py new file mode 100644 index 00000000000..cdd2cff4023 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/slices/_y.py @@ -0,0 +1,213 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Y(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.slices" + _path_str = "isosurface.slices.y" + _valid_props = {"fill", "locations", "locationssrc", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the `slices` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # locations + # --------- + @property + def locations(self): + """ + Specifies the location(s) of slices on the axis. When not + specified slices would be created for all points of the axis y + except start and end. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not slice planes about the y dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis y except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the y + dimension are drawn. + """ + + def __init__( + self, + arg=None, + fill=None, + locations=None, + locationssrc=None, + show=None, + **kwargs + ): + """ + Construct a new Y object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.slices.Y` + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis y except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the y + dimension are drawn. + + Returns + ------- + Y + """ + super(Y, self).__init__("y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.slices.Y +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.slices.Y`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/slices/_z.py b/packages/python/plotly/plotly/graph_objs/isosurface/slices/_z.py new file mode 100644 index 00000000000..3a9c6d2ab92 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/isosurface/slices/_z.py @@ -0,0 +1,213 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Z(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "isosurface.slices" + _path_str = "isosurface.slices.z" + _valid_props = {"fill", "locations", "locationssrc", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the `slices` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # locations + # --------- + @property + def locations(self): + """ + Specifies the location(s) of slices on the axis. When not + specified slices would be created for all points of the axis z + except start and end. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not slice planes about the z dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis z except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the z + dimension are drawn. + """ + + def __init__( + self, + arg=None, + fill=None, + locations=None, + locationssrc=None, + show=None, + **kwargs + ): + """ + Construct a new Z object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.isosurface.slices.Z` + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis z except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the z + dimension are drawn. + + Returns + ------- + Z + """ + super(Z, self).__init__("z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.isosurface.slices.Z +constructor must be a dict or +an instance of :class:`plotly.graph_objs.isosurface.slices.Z`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/__init__.py index 845cdb91cf5..25481ae3307 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/__init__.py @@ -1,23616 +1,99 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class YAxis(_BaseLayoutHierarchyType): - - # anchor - # ------ - @property - def anchor(self): - """ - If set to an opposite-letter axis id (e.g. `x2`, `y`), this - axis is bound to the corresponding opposite-letter axis. If set - to "free", this axis' position is determined by `position`. - - The 'anchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['free'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["anchor"] - - @anchor.setter - def anchor(self, val): - self["anchor"] = val - - # automargin - # ---------- - @property - def automargin(self): - """ - Determines whether long tick labels automatically grow the - figure margins. - - The 'automargin' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["automargin"] - - @automargin.setter - def automargin(self, val): - self["automargin"] = val - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the calendar system to use for `range` and `tick0` if this - is a date axis. This does not set the calendar for interpreting - data on this axis, that's specified in the trace or via the - global `layout.calendar` - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # constrain - # --------- - @property - def constrain(self): - """ - If this axis needs to be compressed (either due to its own - `scaleanchor` and `scaleratio` or those of the other axis), - determines how that happens: by increasing the "range" - (default), or by decreasing the "domain". - - The 'constrain' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['range', 'domain'] - - Returns - ------- - Any - """ - return self["constrain"] - - @constrain.setter - def constrain(self, val): - self["constrain"] = val - - # constraintoward - # --------------- - @property - def constraintoward(self): - """ - If this axis needs to be compressed (either due to its own - `scaleanchor` and `scaleratio` or those of the other axis), - determines which direction we push the originally specified - plot area. Options are "left", "center" (default), and "right" - for x axes, and "top", "middle" (default), and "bottom" for y - axes. - - The 'constraintoward' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["constraintoward"] - - @constraintoward.setter - def constraintoward(self, val): - self["constraintoward"] = val - - # dividercolor - # ------------ - @property - def dividercolor(self): - """ - Sets the color of the dividers Only has an effect on - "multicategory" axes. - - The 'dividercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["dividercolor"] - - @dividercolor.setter - def dividercolor(self, val): - self["dividercolor"] = val - - # dividerwidth - # ------------ - @property - def dividerwidth(self): - """ - Sets the width (in px) of the dividers Only has an effect on - "multicategory" axes. - - The 'dividerwidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dividerwidth"] - - @dividerwidth.setter - def dividerwidth(self, val): - self["dividerwidth"] = val - - # domain - # ------ - @property - def domain(self): - """ - Sets the domain of this axis (in plot fraction). - - The 'domain' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'domain[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'domain[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # fixedrange - # ---------- - @property - def fixedrange(self): - """ - Determines whether or not this axis is zoom-able. If true, then - zoom is disabled. - - The 'fixedrange' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["fixedrange"] - - @fixedrange.setter - def fixedrange(self, val): - self["fixedrange"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # matches - # ------- - @property - def matches(self): - """ - If set to another axis id (e.g. `x2`, `y`), the range of this - axis will match the range of the corresponding axis in data- - coordinates space. Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. Note that - setting axes simultaneously in both a `scaleanchor` and a - `matches` constraint is currently forbidden. Moreover, note - that matching axes must have the same `type`. - - The 'matches' property is an enumeration that may be specified as: - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["matches"] - - @matches.setter - def matches(self, val): - self["matches"] = val - - # mirror - # ------ - @property - def mirror(self): - """ - Determines if the axis lines or/and ticks are mirrored to the - opposite side of the plotting area. If True, the axis lines are - mirrored. If "ticks", the axis lines and ticks are mirrored. If - False, mirroring is disable. If "all", axis lines are mirrored - on all shared-axes subplots. If "allticks", axis lines and - ticks are mirrored on all shared-axes subplots. - - The 'mirror' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'ticks', False, 'all', 'allticks'] - - Returns - ------- - Any - """ - return self["mirror"] - - @mirror.setter - def mirror(self, val): - self["mirror"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # overlaying - # ---------- - @property - def overlaying(self): - """ - If set a same-letter axis id, this axis is overlaid on top of - the corresponding same-letter axis, with traces and axes - visible for both axes. If False, this axis does not overlay any - same-letter axes. In this case, for axes with overlapping - domains only the highest-numbered axis will be visible. - - The 'overlaying' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['free'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["overlaying"] - - @overlaying.setter - def overlaying(self, val): - self["overlaying"] = val - - # position - # -------- - @property - def position(self): - """ - Sets the position of this axis in the plotting space (in - normalized coordinates). Only has an effect if `anchor` is set - to "free". - - The 'position' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["position"] - - @position.setter - def position(self, val): - self["position"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangebreaks - # ----------- - @property - def rangebreaks(self): - """ - The 'rangebreaks' property is a tuple of instances of - Rangebreak that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.yaxis.Rangebreak - - A list or tuple of dicts of string/value properties that - will be passed to the Rangebreak constructor - - Supported dict properties: - - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. - - Returns - ------- - tuple[plotly.graph_objs.layout.yaxis.Rangebreak] - """ - return self["rangebreaks"] - - @rangebreaks.setter - def rangebreaks(self, val): - self["rangebreaks"] = val - - # rangebreakdefaults - # ------------------ - @property - def rangebreakdefaults(self): - """ - When used in a template (as - layout.template.layout.yaxis.rangebreakdefaults), sets the - default property values to use for elements of - layout.yaxis.rangebreaks - - The 'rangebreakdefaults' property is an instance of Rangebreak - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.yaxis.Rangebreak` - - A dict of string/value properties that will be passed - to the Rangebreak constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.yaxis.Rangebreak - """ - return self["rangebreakdefaults"] - - @rangebreakdefaults.setter - def rangebreakdefaults(self, val): - self["rangebreakdefaults"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. Applies only to - linear axes. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # scaleanchor - # ----------- - @property - def scaleanchor(self): - """ - If set to another axis id (e.g. `x2`, `y`), the range of this - axis changes together with the range of the corresponding axis - such that the scale of pixels per unit is in a constant ratio. - Both axes are still zoomable, but when you zoom one, the other - will zoom the same amount, keeping a fixed midpoint. - `constrain` and `constraintoward` determine how we enforce the - constraint. You can chain these, ie `yaxis: {scaleanchor: *x*}, - xaxis2: {scaleanchor: *y*}` but you can only link axes of the - same `type`. The linked axis can have the opposite letter (to - constrain the aspect ratio) or the same letter (to match scales - across subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant and the last - constraint encountered will be ignored to avoid possible - inconsistent constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and a `matches` - constraint is currently forbidden. - - The 'scaleanchor' property is an enumeration that may be specified as: - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["scaleanchor"] - - @scaleanchor.setter - def scaleanchor(self, val): - self["scaleanchor"] = val - - # scaleratio - # ---------- - @property - def scaleratio(self): - """ - If this axis is linked to another by `scaleanchor`, this - determines the pixel to unit scale ratio. For example, if this - value is 10, then every unit on this axis spans 10 times the - number of pixels as a unit on the linked axis. Use this for - example to create an elevation profile where the vertical scale - is exaggerated a fixed amount with respect to the horizontal. - - The 'scaleratio' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["scaleratio"] - - @scaleratio.setter - def scaleratio(self, val): - self["scaleratio"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showdividers - # ------------ - @property - def showdividers(self): - """ - Determines whether or not a dividers are drawn between the - category levels of this axis. Only has an effect on - "multicategory" axes. - - The 'showdividers' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showdividers"] - - @showdividers.setter - def showdividers(self, val): - self["showdividers"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showspikes - # ---------- - @property - def showspikes(self): - """ - Determines whether or not spikes (aka droplines) are drawn for - this axis. Note: This only takes affect when hovermode = - closest - - The 'showspikes' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showspikes"] - - @showspikes.setter - def showspikes(self, val): - self["showspikes"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # side - # ---- - @property - def side(self): - """ - Determines whether a x (y) axis is positioned at the "bottom" - ("left") or "top" ("right") of the plotting area. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'bottom', 'left', 'right'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # spikecolor - # ---------- - @property - def spikecolor(self): - """ - Sets the spike color. If undefined, will use the series color - - The 'spikecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["spikecolor"] - - @spikecolor.setter - def spikecolor(self, val): - self["spikecolor"] = val - - # spikedash - # --------- - @property - def spikedash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'spikedash' property is a string and must be specified as: - - One of the following strings: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["spikedash"] - - @spikedash.setter - def spikedash(self, val): - self["spikedash"] = val - - # spikemode - # --------- - @property - def spikemode(self): - """ - Determines the drawing mode for the spike line If "toaxis", the - line is drawn from the data point to the axis the series is - plotted on. If "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If "marker", then a marker - dot is drawn on the axis the series is plotted on - - The 'spikemode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['toaxis', 'across', 'marker'] joined with '+' characters - (e.g. 'toaxis+across') - - Returns - ------- - Any - """ - return self["spikemode"] - - @spikemode.setter - def spikemode(self, val): - self["spikemode"] = val - - # spikesnap - # --------- - @property - def spikesnap(self): - """ - Determines whether spikelines are stuck to the cursor or to the - closest datapoints. - - The 'spikesnap' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['data', 'cursor', 'hovered data'] - - Returns - ------- - Any - """ - return self["spikesnap"] - - @spikesnap.setter - def spikesnap(self, val): - self["spikesnap"] = val - - # spikethickness - # -------------- - @property - def spikethickness(self): - """ - Sets the width (in px) of the zero line. - - The 'spikethickness' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["spikethickness"] - - @spikethickness.setter - def spikethickness(self, val): - self["spikethickness"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.yaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.yaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.yaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.yaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.yaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.yaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.yaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.yaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # tickson - # ------- - @property - def tickson(self): - """ - Determines where ticks and grid lines are drawn with respect to - their corresponding tick labels. Only has an effect for axes of - `type` "category" or "multicategory". When set to "boundaries", - ticks and grid lines are drawn half a category to the - left/bottom of labels. - - The 'tickson' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['labels', 'boundaries'] - - Returns - ------- - Any - """ - return self["tickson"] - - @tickson.setter - def tickson(self, val): - self["tickson"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.yaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.yaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.yaxis.title.font instead. Sets - this axis' title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.yaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'log', 'date', 'category', - 'multicategory'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `range`, - `autorange`, and `title` if in `editable: true` configuration. - Defaults to `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # zeroline - # -------- - @property - def zeroline(self): - """ - Determines whether or not a line is drawn at along the 0 value - of this axis. If True, the zero line is drawn on top of the - grid lines. - - The 'zeroline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zeroline"] - - @zeroline.setter - def zeroline(self, val): - self["zeroline"] = val - - # zerolinecolor - # ------------- - @property - def zerolinecolor(self): - """ - Sets the line color of the zero line. - - The 'zerolinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["zerolinecolor"] - - @zerolinecolor.setter - def zerolinecolor(self, val): - self["zerolinecolor"] = val - - # zerolinewidth - # ------------- - @property - def zerolinewidth(self): - """ - Sets the width (in px) of the zero line. - - The 'zerolinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zerolinewidth"] - - @zerolinewidth.setter - def zerolinewidth(self, val): - self["zerolinewidth"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - anchor - If set to an opposite-letter axis id (e.g. `x2`, `y`), - this axis is bound to the corresponding opposite-letter - axis. If set to "free", this axis' position is - determined by `position`. - automargin - Determines whether long tick labels automatically grow - the figure margins. - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - constrain - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines how that happens: by increasing - the "range" (default), or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines which direction we push the - originally specified plot area. Options are "left", - "center" (default), and "right" for x axes, and "top", - "middle" (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an effect on - "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has an - effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot fraction). - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the range - of this axis will match the range of the corresponding - axis in data-coordinates space. Moreover, matching axes - share auto-range values, category lists and histogram - auto-bins. Note that setting axes simultaneously in - both a `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that matching axes - must have the same `type`. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - overlaying - If set a same-letter axis id, this axis is overlaid on - top of the corresponding same-letter axis, with traces - and axes visible for both axes. If False, this axis - does not overlay any same-letter axes. In this case, - for axes with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting space - (in normalized coordinates). Only has an effect if - `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangebreaks - A tuple of - :class:`plotly.graph_objects.layout.yaxis.Rangebreak` - instances or dicts with compatible properties - rangebreakdefaults - When used in a template (as - layout.template.layout.yaxis.rangebreakdefaults), sets - the default property values to use for elements of - layout.yaxis.rangebreaks - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the range - of this axis changes together with the range of the - corresponding axis such that the scale of pixels per - unit is in a constant ratio. Both axes are still - zoomable, but when you zoom one, the other will zoom - the same amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce the - constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you - can only link axes of the same `type`. The linked axis - can have the opposite letter (to constrain the aspect - ratio) or the same letter (to match scales across - subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant and the - last constraint encountered will be ignored to avoid - possible inconsistent constraints via `scaleratio`. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is currently - forbidden. - scaleratio - If this axis is linked to another by `scaleanchor`, - this determines the pixel to unit scale ratio. For - example, if this value is 10, then every unit on this - axis spans 10 times the number of pixels as a unit on - the linked axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn between - the category levels of this axis. Only has an effect on - "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned at the - "bottom" ("left") or "top" ("right") of the plotting - area. - spikecolor - Sets the spike color. If undefined, will use the series - color - spikedash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line If - "toaxis", the line is drawn from the data point to the - axis the series is plotted on. If "across", the line - is drawn across the entire plot area, and supercedes - "toaxis". If "marker", then a marker dot is drawn on - the axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the cursor - or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.yaxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as - layout.template.layout.yaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn with - respect to their corresponding tick labels. Only has an - effect for axes of `type` "category" or - "multicategory". When set to "boundaries", ticks and - grid lines are drawn half a category to the left/bottom - of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.yaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.yaxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - uirevision - Controls persistence of user-driven changes in axis - `range`, `autorange`, and `title` if in `editable: - true` configuration. Defaults to `layout.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - anchor=None, - automargin=None, - autorange=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - constrain=None, - constraintoward=None, - dividercolor=None, - dividerwidth=None, - domain=None, - dtick=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - matches=None, - mirror=None, - nticks=None, - overlaying=None, - position=None, - range=None, - rangebreaks=None, - rangebreakdefaults=None, - rangemode=None, - scaleanchor=None, - scaleratio=None, - separatethousands=None, - showdividers=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - spikecolor=None, - spikedash=None, - spikemode=None, - spikesnap=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - tickson=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - type=None, - uirevision=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, - **kwargs - ): - """ - Construct a new YAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.YAxis` - anchor - If set to an opposite-letter axis id (e.g. `x2`, `y`), - this axis is bound to the corresponding opposite-letter - axis. If set to "free", this axis' position is - determined by `position`. - automargin - Determines whether long tick labels automatically grow - the figure margins. - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - constrain - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines how that happens: by increasing - the "range" (default), or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines which direction we push the - originally specified plot area. Options are "left", - "center" (default), and "right" for x axes, and "top", - "middle" (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an effect on - "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has an - effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot fraction). - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the range - of this axis will match the range of the corresponding - axis in data-coordinates space. Moreover, matching axes - share auto-range values, category lists and histogram - auto-bins. Note that setting axes simultaneously in - both a `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that matching axes - must have the same `type`. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - overlaying - If set a same-letter axis id, this axis is overlaid on - top of the corresponding same-letter axis, with traces - and axes visible for both axes. If False, this axis - does not overlay any same-letter axes. In this case, - for axes with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting space - (in normalized coordinates). Only has an effect if - `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangebreaks - A tuple of - :class:`plotly.graph_objects.layout.yaxis.Rangebreak` - instances or dicts with compatible properties - rangebreakdefaults - When used in a template (as - layout.template.layout.yaxis.rangebreakdefaults), sets - the default property values to use for elements of - layout.yaxis.rangebreaks - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the range - of this axis changes together with the range of the - corresponding axis such that the scale of pixels per - unit is in a constant ratio. Both axes are still - zoomable, but when you zoom one, the other will zoom - the same amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce the - constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you - can only link axes of the same `type`. The linked axis - can have the opposite letter (to constrain the aspect - ratio) or the same letter (to match scales across - subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant and the - last constraint encountered will be ignored to avoid - possible inconsistent constraints via `scaleratio`. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is currently - forbidden. - scaleratio - If this axis is linked to another by `scaleanchor`, - this determines the pixel to unit scale ratio. For - example, if this value is 10, then every unit on this - axis spans 10 times the number of pixels as a unit on - the linked axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn between - the category levels of this axis. Only has an effect on - "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned at the - "bottom" ("left") or "top" ("right") of the plotting - area. - spikecolor - Sets the spike color. If undefined, will use the series - color - spikedash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line If - "toaxis", the line is drawn from the data point to the - axis the series is plotted on. If "across", the line - is drawn across the entire plot area, and supercedes - "toaxis". If "marker", then a marker dot is drawn on - the axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the cursor - or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.yaxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as - layout.template.layout.yaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn with - respect to their corresponding tick labels. Only has an - effect for axes of `type` "category" or - "multicategory". When set to "boundaries", ticks and - grid lines are drawn half a category to the left/bottom - of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.yaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.yaxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - uirevision - Controls persistence of user-driven changes in axis - `range`, `autorange`, and `title` if in `editable: - true` configuration. Defaults to `layout.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - YAxis - """ - super(YAxis, self).__init__("yaxis") - - # Validate arg - # ------------ - 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.YAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.YAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import yaxis as v_yaxis - - # Initialize validators - # --------------------- - self._validators["anchor"] = v_yaxis.AnchorValidator() - self._validators["automargin"] = v_yaxis.AutomarginValidator() - self._validators["autorange"] = v_yaxis.AutorangeValidator() - self._validators["calendar"] = v_yaxis.CalendarValidator() - self._validators["categoryarray"] = v_yaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_yaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_yaxis.CategoryorderValidator() - self._validators["color"] = v_yaxis.ColorValidator() - self._validators["constrain"] = v_yaxis.ConstrainValidator() - self._validators["constraintoward"] = v_yaxis.ConstraintowardValidator() - self._validators["dividercolor"] = v_yaxis.DividercolorValidator() - self._validators["dividerwidth"] = v_yaxis.DividerwidthValidator() - self._validators["domain"] = v_yaxis.DomainValidator() - self._validators["dtick"] = v_yaxis.DtickValidator() - self._validators["exponentformat"] = v_yaxis.ExponentformatValidator() - self._validators["fixedrange"] = v_yaxis.FixedrangeValidator() - self._validators["gridcolor"] = v_yaxis.GridcolorValidator() - self._validators["gridwidth"] = v_yaxis.GridwidthValidator() - self._validators["hoverformat"] = v_yaxis.HoverformatValidator() - self._validators["layer"] = v_yaxis.LayerValidator() - self._validators["linecolor"] = v_yaxis.LinecolorValidator() - self._validators["linewidth"] = v_yaxis.LinewidthValidator() - self._validators["matches"] = v_yaxis.MatchesValidator() - self._validators["mirror"] = v_yaxis.MirrorValidator() - self._validators["nticks"] = v_yaxis.NticksValidator() - self._validators["overlaying"] = v_yaxis.OverlayingValidator() - self._validators["position"] = v_yaxis.PositionValidator() - self._validators["range"] = v_yaxis.RangeValidator() - self._validators["rangebreaks"] = v_yaxis.RangebreaksValidator() - self._validators["rangebreakdefaults"] = v_yaxis.RangebreakValidator() - self._validators["rangemode"] = v_yaxis.RangemodeValidator() - self._validators["scaleanchor"] = v_yaxis.ScaleanchorValidator() - self._validators["scaleratio"] = v_yaxis.ScaleratioValidator() - self._validators["separatethousands"] = v_yaxis.SeparatethousandsValidator() - self._validators["showdividers"] = v_yaxis.ShowdividersValidator() - self._validators["showexponent"] = v_yaxis.ShowexponentValidator() - self._validators["showgrid"] = v_yaxis.ShowgridValidator() - self._validators["showline"] = v_yaxis.ShowlineValidator() - self._validators["showspikes"] = v_yaxis.ShowspikesValidator() - self._validators["showticklabels"] = v_yaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_yaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_yaxis.ShowticksuffixValidator() - self._validators["side"] = v_yaxis.SideValidator() - self._validators["spikecolor"] = v_yaxis.SpikecolorValidator() - self._validators["spikedash"] = v_yaxis.SpikedashValidator() - self._validators["spikemode"] = v_yaxis.SpikemodeValidator() - self._validators["spikesnap"] = v_yaxis.SpikesnapValidator() - self._validators["spikethickness"] = v_yaxis.SpikethicknessValidator() - self._validators["tick0"] = v_yaxis.Tick0Validator() - self._validators["tickangle"] = v_yaxis.TickangleValidator() - self._validators["tickcolor"] = v_yaxis.TickcolorValidator() - self._validators["tickfont"] = v_yaxis.TickfontValidator() - self._validators["tickformat"] = v_yaxis.TickformatValidator() - self._validators["tickformatstops"] = v_yaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_yaxis.TickformatstopValidator() - self._validators["ticklen"] = v_yaxis.TicklenValidator() - self._validators["tickmode"] = v_yaxis.TickmodeValidator() - self._validators["tickprefix"] = v_yaxis.TickprefixValidator() - self._validators["ticks"] = v_yaxis.TicksValidator() - self._validators["tickson"] = v_yaxis.TicksonValidator() - self._validators["ticksuffix"] = v_yaxis.TicksuffixValidator() - self._validators["ticktext"] = v_yaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_yaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_yaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_yaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_yaxis.TickwidthValidator() - self._validators["title"] = v_yaxis.TitleValidator() - self._validators["type"] = v_yaxis.TypeValidator() - self._validators["uirevision"] = v_yaxis.UirevisionValidator() - self._validators["visible"] = v_yaxis.VisibleValidator() - self._validators["zeroline"] = v_yaxis.ZerolineValidator() - self._validators["zerolinecolor"] = v_yaxis.ZerolinecolorValidator() - self._validators["zerolinewidth"] = v_yaxis.ZerolinewidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("anchor", None) - self["anchor"] = anchor if anchor is not None else _v - _v = arg.pop("automargin", None) - self["automargin"] = automargin if automargin is not None else _v - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("constrain", None) - self["constrain"] = constrain if constrain is not None else _v - _v = arg.pop("constraintoward", None) - self["constraintoward"] = constraintoward if constraintoward is not None else _v - _v = arg.pop("dividercolor", None) - self["dividercolor"] = dividercolor if dividercolor is not None else _v - _v = arg.pop("dividerwidth", None) - self["dividerwidth"] = dividerwidth if dividerwidth is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("fixedrange", None) - self["fixedrange"] = fixedrange if fixedrange is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("matches", None) - self["matches"] = matches if matches is not None else _v - _v = arg.pop("mirror", None) - self["mirror"] = mirror if mirror is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("overlaying", None) - self["overlaying"] = overlaying if overlaying is not None else _v - _v = arg.pop("position", None) - self["position"] = position if position is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangebreaks", None) - self["rangebreaks"] = rangebreaks if rangebreaks is not None else _v - _v = arg.pop("rangebreakdefaults", None) - self["rangebreakdefaults"] = ( - rangebreakdefaults if rangebreakdefaults is not None else _v - ) - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("scaleanchor", None) - self["scaleanchor"] = scaleanchor if scaleanchor is not None else _v - _v = arg.pop("scaleratio", None) - self["scaleratio"] = scaleratio if scaleratio is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showdividers", None) - self["showdividers"] = showdividers if showdividers is not None else _v - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showspikes", None) - self["showspikes"] = showspikes if showspikes is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("spikecolor", None) - self["spikecolor"] = spikecolor if spikecolor is not None else _v - _v = arg.pop("spikedash", None) - self["spikedash"] = spikedash if spikedash is not None else _v - _v = arg.pop("spikemode", None) - self["spikemode"] = spikemode if spikemode is not None else _v - _v = arg.pop("spikesnap", None) - self["spikesnap"] = spikesnap if spikesnap is not None else _v - _v = arg.pop("spikethickness", None) - self["spikethickness"] = spikethickness if spikethickness is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("tickson", None) - self["tickson"] = tickson if tickson is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("zeroline", None) - self["zeroline"] = zeroline if zeroline is not None else _v - _v = arg.pop("zerolinecolor", None) - self["zerolinecolor"] = zerolinecolor if zerolinecolor is not None else _v - _v = arg.pop("zerolinewidth", None) - self["zerolinewidth"] = zerolinewidth if zerolinewidth is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class XAxis(_BaseLayoutHierarchyType): - - # anchor - # ------ - @property - def anchor(self): - """ - If set to an opposite-letter axis id (e.g. `x2`, `y`), this - axis is bound to the corresponding opposite-letter axis. If set - to "free", this axis' position is determined by `position`. - - The 'anchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['free'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["anchor"] - - @anchor.setter - def anchor(self, val): - self["anchor"] = val - - # automargin - # ---------- - @property - def automargin(self): - """ - Determines whether long tick labels automatically grow the - figure margins. - - The 'automargin' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["automargin"] - - @automargin.setter - def automargin(self, val): - self["automargin"] = val - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the calendar system to use for `range` and `tick0` if this - is a date axis. This does not set the calendar for interpreting - data on this axis, that's specified in the trace or via the - global `layout.calendar` - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # constrain - # --------- - @property - def constrain(self): - """ - If this axis needs to be compressed (either due to its own - `scaleanchor` and `scaleratio` or those of the other axis), - determines how that happens: by increasing the "range" - (default), or by decreasing the "domain". - - The 'constrain' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['range', 'domain'] - - Returns - ------- - Any - """ - return self["constrain"] - - @constrain.setter - def constrain(self, val): - self["constrain"] = val - - # constraintoward - # --------------- - @property - def constraintoward(self): - """ - If this axis needs to be compressed (either due to its own - `scaleanchor` and `scaleratio` or those of the other axis), - determines which direction we push the originally specified - plot area. Options are "left", "center" (default), and "right" - for x axes, and "top", "middle" (default), and "bottom" for y - axes. - - The 'constraintoward' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["constraintoward"] - - @constraintoward.setter - def constraintoward(self, val): - self["constraintoward"] = val - - # dividercolor - # ------------ - @property - def dividercolor(self): - """ - Sets the color of the dividers Only has an effect on - "multicategory" axes. - - The 'dividercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["dividercolor"] - - @dividercolor.setter - def dividercolor(self, val): - self["dividercolor"] = val - - # dividerwidth - # ------------ - @property - def dividerwidth(self): - """ - Sets the width (in px) of the dividers Only has an effect on - "multicategory" axes. - - The 'dividerwidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dividerwidth"] - - @dividerwidth.setter - def dividerwidth(self, val): - self["dividerwidth"] = val - - # domain - # ------ - @property - def domain(self): - """ - Sets the domain of this axis (in plot fraction). - - The 'domain' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'domain[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'domain[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # fixedrange - # ---------- - @property - def fixedrange(self): - """ - Determines whether or not this axis is zoom-able. If true, then - zoom is disabled. - - The 'fixedrange' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["fixedrange"] - - @fixedrange.setter - def fixedrange(self, val): - self["fixedrange"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # matches - # ------- - @property - def matches(self): - """ - If set to another axis id (e.g. `x2`, `y`), the range of this - axis will match the range of the corresponding axis in data- - coordinates space. Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. Note that - setting axes simultaneously in both a `scaleanchor` and a - `matches` constraint is currently forbidden. Moreover, note - that matching axes must have the same `type`. - - The 'matches' property is an enumeration that may be specified as: - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["matches"] - - @matches.setter - def matches(self, val): - self["matches"] = val - - # mirror - # ------ - @property - def mirror(self): - """ - Determines if the axis lines or/and ticks are mirrored to the - opposite side of the plotting area. If True, the axis lines are - mirrored. If "ticks", the axis lines and ticks are mirrored. If - False, mirroring is disable. If "all", axis lines are mirrored - on all shared-axes subplots. If "allticks", axis lines and - ticks are mirrored on all shared-axes subplots. - - The 'mirror' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'ticks', False, 'all', 'allticks'] - - Returns - ------- - Any - """ - return self["mirror"] - - @mirror.setter - def mirror(self, val): - self["mirror"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # overlaying - # ---------- - @property - def overlaying(self): - """ - If set a same-letter axis id, this axis is overlaid on top of - the corresponding same-letter axis, with traces and axes - visible for both axes. If False, this axis does not overlay any - same-letter axes. In this case, for axes with overlapping - domains only the highest-numbered axis will be visible. - - The 'overlaying' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['free'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["overlaying"] - - @overlaying.setter - def overlaying(self, val): - self["overlaying"] = val - - # position - # -------- - @property - def position(self): - """ - Sets the position of this axis in the plotting space (in - normalized coordinates). Only has an effect if `anchor` is set - to "free". - - The 'position' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["position"] - - @position.setter - def position(self, val): - self["position"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangebreaks - # ----------- - @property - def rangebreaks(self): - """ - The 'rangebreaks' property is a tuple of instances of - Rangebreak that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.xaxis.Rangebreak - - A list or tuple of dicts of string/value properties that - will be passed to the Rangebreak constructor - - Supported dict properties: - - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. - - Returns - ------- - tuple[plotly.graph_objs.layout.xaxis.Rangebreak] - """ - return self["rangebreaks"] - - @rangebreaks.setter - def rangebreaks(self, val): - self["rangebreaks"] = val - - # rangebreakdefaults - # ------------------ - @property - def rangebreakdefaults(self): - """ - When used in a template (as - layout.template.layout.xaxis.rangebreakdefaults), sets the - default property values to use for elements of - layout.xaxis.rangebreaks - - The 'rangebreakdefaults' property is an instance of Rangebreak - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak` - - A dict of string/value properties that will be passed - to the Rangebreak constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.xaxis.Rangebreak - """ - return self["rangebreakdefaults"] - - @rangebreakdefaults.setter - def rangebreakdefaults(self, val): - self["rangebreakdefaults"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. Applies only to - linear axes. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # rangeselector - # ------------- - @property - def rangeselector(self): - """ - The 'rangeselector' property is an instance of Rangeselector - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector` - - A dict of string/value properties that will be passed - to the Rangeselector constructor - - Supported dict properties: - - activecolor - Sets the background color of the active range - selector button. - bgcolor - Sets the background color of the range selector - buttons. - bordercolor - Sets the color of the border enclosing the - range selector. - borderwidth - Sets the width (in px) of the border enclosing - the range selector. - buttons - Sets the specifications for each buttons. By - default, a range selector comes with no - buttons. - buttondefaults - When used in a template (as layout.template.lay - out.xaxis.rangeselector.buttondefaults), sets - the default property values to use for elements - of layout.xaxis.rangeselector.buttons - font - Sets the font of the range selector button - text. - visible - Determines whether or not this range selector - is visible. Note that range selectors are only - available for x axes of `type` set to or auto- - typed to "date". - x - Sets the x position (in normalized coordinates) - of the range selector. - xanchor - Sets the range selector's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the range selector. - yanchor - Sets the range selector's vertical position - anchor This anchor binds the `y` position to - the "top", "middle" or "bottom" of the range - selector. - - Returns - ------- - plotly.graph_objs.layout.xaxis.Rangeselector - """ - return self["rangeselector"] - - @rangeselector.setter - def rangeselector(self, val): - self["rangeselector"] = val - - # rangeslider - # ----------- - @property - def rangeslider(self): - """ - The 'rangeslider' property is an instance of Rangeslider - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.Rangeslider` - - A dict of string/value properties that will be passed - to the Rangeslider constructor - - Supported dict properties: - - autorange - Determines whether or not the range slider - range is computed in relation to the input - data. If `range` is provided, then `autorange` - is set to False. - bgcolor - Sets the background color of the range slider. - bordercolor - Sets the border color of the range slider. - borderwidth - Sets the border width of the range slider. - range - Sets the range of the range slider. If not set, - defaults to the full xaxis range. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - thickness - The height of the range slider as a fraction of - the total plot area height. - visible - Determines whether or not the range slider will - be visible. If visible, perpendicular axes will - be set to `fixedrange` - yaxis - :class:`plotly.graph_objects.layout.xaxis.range - slider.YAxis` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.layout.xaxis.Rangeslider - """ - return self["rangeslider"] - - @rangeslider.setter - def rangeslider(self, val): - self["rangeslider"] = val - - # scaleanchor - # ----------- - @property - def scaleanchor(self): - """ - If set to another axis id (e.g. `x2`, `y`), the range of this - axis changes together with the range of the corresponding axis - such that the scale of pixels per unit is in a constant ratio. - Both axes are still zoomable, but when you zoom one, the other - will zoom the same amount, keeping a fixed midpoint. - `constrain` and `constraintoward` determine how we enforce the - constraint. You can chain these, ie `yaxis: {scaleanchor: *x*}, - xaxis2: {scaleanchor: *y*}` but you can only link axes of the - same `type`. The linked axis can have the opposite letter (to - constrain the aspect ratio) or the same letter (to match scales - across subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant and the last - constraint encountered will be ignored to avoid possible - inconsistent constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and a `matches` - constraint is currently forbidden. - - The 'scaleanchor' property is an enumeration that may be specified as: - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["scaleanchor"] - - @scaleanchor.setter - def scaleanchor(self, val): - self["scaleanchor"] = val - - # scaleratio - # ---------- - @property - def scaleratio(self): - """ - If this axis is linked to another by `scaleanchor`, this - determines the pixel to unit scale ratio. For example, if this - value is 10, then every unit on this axis spans 10 times the - number of pixels as a unit on the linked axis. Use this for - example to create an elevation profile where the vertical scale - is exaggerated a fixed amount with respect to the horizontal. - - The 'scaleratio' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["scaleratio"] - - @scaleratio.setter - def scaleratio(self, val): - self["scaleratio"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showdividers - # ------------ - @property - def showdividers(self): - """ - Determines whether or not a dividers are drawn between the - category levels of this axis. Only has an effect on - "multicategory" axes. - - The 'showdividers' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showdividers"] - - @showdividers.setter - def showdividers(self, val): - self["showdividers"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showspikes - # ---------- - @property - def showspikes(self): - """ - Determines whether or not spikes (aka droplines) are drawn for - this axis. Note: This only takes affect when hovermode = - closest - - The 'showspikes' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showspikes"] - - @showspikes.setter - def showspikes(self, val): - self["showspikes"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # side - # ---- - @property - def side(self): - """ - Determines whether a x (y) axis is positioned at the "bottom" - ("left") or "top" ("right") of the plotting area. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'bottom', 'left', 'right'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # spikecolor - # ---------- - @property - def spikecolor(self): - """ - Sets the spike color. If undefined, will use the series color - - The 'spikecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["spikecolor"] - - @spikecolor.setter - def spikecolor(self, val): - self["spikecolor"] = val - - # spikedash - # --------- - @property - def spikedash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'spikedash' property is a string and must be specified as: - - One of the following strings: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["spikedash"] - - @spikedash.setter - def spikedash(self, val): - self["spikedash"] = val - - # spikemode - # --------- - @property - def spikemode(self): - """ - Determines the drawing mode for the spike line If "toaxis", the - line is drawn from the data point to the axis the series is - plotted on. If "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If "marker", then a marker - dot is drawn on the axis the series is plotted on - - The 'spikemode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['toaxis', 'across', 'marker'] joined with '+' characters - (e.g. 'toaxis+across') - - Returns - ------- - Any - """ - return self["spikemode"] - - @spikemode.setter - def spikemode(self, val): - self["spikemode"] = val - - # spikesnap - # --------- - @property - def spikesnap(self): - """ - Determines whether spikelines are stuck to the cursor or to the - closest datapoints. - - The 'spikesnap' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['data', 'cursor', 'hovered data'] - - Returns - ------- - Any - """ - return self["spikesnap"] - - @spikesnap.setter - def spikesnap(self, val): - self["spikesnap"] = val - - # spikethickness - # -------------- - @property - def spikethickness(self): - """ - Sets the width (in px) of the zero line. - - The 'spikethickness' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["spikethickness"] - - @spikethickness.setter - def spikethickness(self, val): - self["spikethickness"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.xaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.xaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.xaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.xaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.xaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.xaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # tickson - # ------- - @property - def tickson(self): - """ - Determines where ticks and grid lines are drawn with respect to - their corresponding tick labels. Only has an effect for axes of - `type` "category" or "multicategory". When set to "boundaries", - ticks and grid lines are drawn half a category to the - left/bottom of labels. - - The 'tickson' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['labels', 'boundaries'] - - Returns - ------- - Any - """ - return self["tickson"] - - @tickson.setter - def tickson(self, val): - self["tickson"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.xaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.xaxis.title.font instead. Sets - this axis' title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'log', 'date', 'category', - 'multicategory'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `range`, - `autorange`, and `title` if in `editable: true` configuration. - Defaults to `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # zeroline - # -------- - @property - def zeroline(self): - """ - Determines whether or not a line is drawn at along the 0 value - of this axis. If True, the zero line is drawn on top of the - grid lines. - - The 'zeroline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zeroline"] - - @zeroline.setter - def zeroline(self, val): - self["zeroline"] = val - - # zerolinecolor - # ------------- - @property - def zerolinecolor(self): - """ - Sets the line color of the zero line. - - The 'zerolinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["zerolinecolor"] - - @zerolinecolor.setter - def zerolinecolor(self, val): - self["zerolinecolor"] = val - - # zerolinewidth - # ------------- - @property - def zerolinewidth(self): - """ - Sets the width (in px) of the zero line. - - The 'zerolinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zerolinewidth"] - - @zerolinewidth.setter - def zerolinewidth(self, val): - self["zerolinewidth"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - anchor - If set to an opposite-letter axis id (e.g. `x2`, `y`), - this axis is bound to the corresponding opposite-letter - axis. If set to "free", this axis' position is - determined by `position`. - automargin - Determines whether long tick labels automatically grow - the figure margins. - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - constrain - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines how that happens: by increasing - the "range" (default), or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines which direction we push the - originally specified plot area. Options are "left", - "center" (default), and "right" for x axes, and "top", - "middle" (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an effect on - "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has an - effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot fraction). - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the range - of this axis will match the range of the corresponding - axis in data-coordinates space. Moreover, matching axes - share auto-range values, category lists and histogram - auto-bins. Note that setting axes simultaneously in - both a `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that matching axes - must have the same `type`. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - overlaying - If set a same-letter axis id, this axis is overlaid on - top of the corresponding same-letter axis, with traces - and axes visible for both axes. If False, this axis - does not overlay any same-letter axes. In this case, - for axes with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting space - (in normalized coordinates). Only has an effect if - `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangebreaks - A tuple of - :class:`plotly.graph_objects.layout.xaxis.Rangebreak` - instances or dicts with compatible properties - rangebreakdefaults - When used in a template (as - layout.template.layout.xaxis.rangebreakdefaults), sets - the default property values to use for elements of - layout.xaxis.rangebreaks - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - rangeselector - :class:`plotly.graph_objects.layout.xaxis.Rangeselector - ` instance or dict with compatible properties - rangeslider - :class:`plotly.graph_objects.layout.xaxis.Rangeslider` - instance or dict with compatible properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the range - of this axis changes together with the range of the - corresponding axis such that the scale of pixels per - unit is in a constant ratio. Both axes are still - zoomable, but when you zoom one, the other will zoom - the same amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce the - constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you - can only link axes of the same `type`. The linked axis - can have the opposite letter (to constrain the aspect - ratio) or the same letter (to match scales across - subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant and the - last constraint encountered will be ignored to avoid - possible inconsistent constraints via `scaleratio`. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is currently - forbidden. - scaleratio - If this axis is linked to another by `scaleanchor`, - this determines the pixel to unit scale ratio. For - example, if this value is 10, then every unit on this - axis spans 10 times the number of pixels as a unit on - the linked axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn between - the category levels of this axis. Only has an effect on - "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned at the - "bottom" ("left") or "top" ("right") of the plotting - area. - spikecolor - Sets the spike color. If undefined, will use the series - color - spikedash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line If - "toaxis", the line is drawn from the data point to the - axis the series is plotted on. If "across", the line - is drawn across the entire plot area, and supercedes - "toaxis". If "marker", then a marker dot is drawn on - the axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the cursor - or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.xaxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as - layout.template.layout.xaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn with - respect to their corresponding tick labels. Only has an - effect for axes of `type` "category" or - "multicategory". When set to "boundaries", ticks and - grid lines are drawn half a category to the left/bottom - of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.xaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.xaxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - uirevision - Controls persistence of user-driven changes in axis - `range`, `autorange`, and `title` if in `editable: - true` configuration. Defaults to `layout.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - anchor=None, - automargin=None, - autorange=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - constrain=None, - constraintoward=None, - dividercolor=None, - dividerwidth=None, - domain=None, - dtick=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - matches=None, - mirror=None, - nticks=None, - overlaying=None, - position=None, - range=None, - rangebreaks=None, - rangebreakdefaults=None, - rangemode=None, - rangeselector=None, - rangeslider=None, - scaleanchor=None, - scaleratio=None, - separatethousands=None, - showdividers=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - spikecolor=None, - spikedash=None, - spikemode=None, - spikesnap=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - tickson=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - type=None, - uirevision=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, - **kwargs - ): - """ - Construct a new XAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.XAxis` - anchor - If set to an opposite-letter axis id (e.g. `x2`, `y`), - this axis is bound to the corresponding opposite-letter - axis. If set to "free", this axis' position is - determined by `position`. - automargin - Determines whether long tick labels automatically grow - the figure margins. - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - constrain - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines how that happens: by increasing - the "range" (default), or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due to its - own `scaleanchor` and `scaleratio` or those of the - other axis), determines which direction we push the - originally specified plot area. Options are "left", - "center" (default), and "right" for x axes, and "top", - "middle" (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an effect on - "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has an - effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot fraction). - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom-able. If - true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the range - of this axis will match the range of the corresponding - axis in data-coordinates space. Moreover, matching axes - share auto-range values, category lists and histogram - auto-bins. Note that setting axes simultaneously in - both a `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that matching axes - must have the same `type`. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - overlaying - If set a same-letter axis id, this axis is overlaid on - top of the corresponding same-letter axis, with traces - and axes visible for both axes. If False, this axis - does not overlay any same-letter axes. In this case, - for axes with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting space - (in normalized coordinates). Only has an effect if - `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangebreaks - A tuple of - :class:`plotly.graph_objects.layout.xaxis.Rangebreak` - instances or dicts with compatible properties - rangebreakdefaults - When used in a template (as - layout.template.layout.xaxis.rangebreakdefaults), sets - the default property values to use for elements of - layout.xaxis.rangebreaks - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - rangeselector - :class:`plotly.graph_objects.layout.xaxis.Rangeselector - ` instance or dict with compatible properties - rangeslider - :class:`plotly.graph_objects.layout.xaxis.Rangeslider` - instance or dict with compatible properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the range - of this axis changes together with the range of the - corresponding axis such that the scale of pixels per - unit is in a constant ratio. Both axes are still - zoomable, but when you zoom one, the other will zoom - the same amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce the - constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you - can only link axes of the same `type`. The linked axis - can have the opposite letter (to constrain the aspect - ratio) or the same letter (to match scales across - subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant and the - last constraint encountered will be ignored to avoid - possible inconsistent constraints via `scaleratio`. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is currently - forbidden. - scaleratio - If this axis is linked to another by `scaleanchor`, - this determines the pixel to unit scale ratio. For - example, if this value is 10, then every unit on this - axis spans 10 times the number of pixels as a unit on - the linked axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn between - the category levels of this axis. Only has an effect on - "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Determines whether or not spikes (aka droplines) are - drawn for this axis. Note: This only takes affect when - hovermode = closest - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned at the - "bottom" ("left") or "top" ("right") of the plotting - area. - spikecolor - Sets the spike color. If undefined, will use the series - color - spikedash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line If - "toaxis", the line is drawn from the data point to the - axis the series is plotted on. If "across", the line - is drawn across the entire plot area, and supercedes - "toaxis". If "marker", then a marker dot is drawn on - the axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the cursor - or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.xaxis.Ti - ckformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as - layout.template.layout.xaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn with - respect to their corresponding tick labels. Only has an - effect for axes of `type` "category" or - "multicategory". When set to "boundaries", ticks and - grid lines are drawn half a category to the left/bottom - of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.xaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.xaxis.title.font instead. - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - uirevision - Controls persistence of user-driven changes in axis - `range`, `autorange`, and `title` if in `editable: - true` configuration. Defaults to `layout.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - XAxis - """ - super(XAxis, self).__init__("xaxis") - - # Validate arg - # ------------ - 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.XAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.XAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import xaxis as v_xaxis - - # Initialize validators - # --------------------- - self._validators["anchor"] = v_xaxis.AnchorValidator() - self._validators["automargin"] = v_xaxis.AutomarginValidator() - self._validators["autorange"] = v_xaxis.AutorangeValidator() - self._validators["calendar"] = v_xaxis.CalendarValidator() - self._validators["categoryarray"] = v_xaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_xaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_xaxis.CategoryorderValidator() - self._validators["color"] = v_xaxis.ColorValidator() - self._validators["constrain"] = v_xaxis.ConstrainValidator() - self._validators["constraintoward"] = v_xaxis.ConstraintowardValidator() - self._validators["dividercolor"] = v_xaxis.DividercolorValidator() - self._validators["dividerwidth"] = v_xaxis.DividerwidthValidator() - self._validators["domain"] = v_xaxis.DomainValidator() - self._validators["dtick"] = v_xaxis.DtickValidator() - self._validators["exponentformat"] = v_xaxis.ExponentformatValidator() - self._validators["fixedrange"] = v_xaxis.FixedrangeValidator() - self._validators["gridcolor"] = v_xaxis.GridcolorValidator() - self._validators["gridwidth"] = v_xaxis.GridwidthValidator() - self._validators["hoverformat"] = v_xaxis.HoverformatValidator() - self._validators["layer"] = v_xaxis.LayerValidator() - self._validators["linecolor"] = v_xaxis.LinecolorValidator() - self._validators["linewidth"] = v_xaxis.LinewidthValidator() - self._validators["matches"] = v_xaxis.MatchesValidator() - self._validators["mirror"] = v_xaxis.MirrorValidator() - self._validators["nticks"] = v_xaxis.NticksValidator() - self._validators["overlaying"] = v_xaxis.OverlayingValidator() - self._validators["position"] = v_xaxis.PositionValidator() - self._validators["range"] = v_xaxis.RangeValidator() - self._validators["rangebreaks"] = v_xaxis.RangebreaksValidator() - self._validators["rangebreakdefaults"] = v_xaxis.RangebreakValidator() - self._validators["rangemode"] = v_xaxis.RangemodeValidator() - self._validators["rangeselector"] = v_xaxis.RangeselectorValidator() - self._validators["rangeslider"] = v_xaxis.RangesliderValidator() - self._validators["scaleanchor"] = v_xaxis.ScaleanchorValidator() - self._validators["scaleratio"] = v_xaxis.ScaleratioValidator() - self._validators["separatethousands"] = v_xaxis.SeparatethousandsValidator() - self._validators["showdividers"] = v_xaxis.ShowdividersValidator() - self._validators["showexponent"] = v_xaxis.ShowexponentValidator() - self._validators["showgrid"] = v_xaxis.ShowgridValidator() - self._validators["showline"] = v_xaxis.ShowlineValidator() - self._validators["showspikes"] = v_xaxis.ShowspikesValidator() - self._validators["showticklabels"] = v_xaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_xaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_xaxis.ShowticksuffixValidator() - self._validators["side"] = v_xaxis.SideValidator() - self._validators["spikecolor"] = v_xaxis.SpikecolorValidator() - self._validators["spikedash"] = v_xaxis.SpikedashValidator() - self._validators["spikemode"] = v_xaxis.SpikemodeValidator() - self._validators["spikesnap"] = v_xaxis.SpikesnapValidator() - self._validators["spikethickness"] = v_xaxis.SpikethicknessValidator() - self._validators["tick0"] = v_xaxis.Tick0Validator() - self._validators["tickangle"] = v_xaxis.TickangleValidator() - self._validators["tickcolor"] = v_xaxis.TickcolorValidator() - self._validators["tickfont"] = v_xaxis.TickfontValidator() - self._validators["tickformat"] = v_xaxis.TickformatValidator() - self._validators["tickformatstops"] = v_xaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_xaxis.TickformatstopValidator() - self._validators["ticklen"] = v_xaxis.TicklenValidator() - self._validators["tickmode"] = v_xaxis.TickmodeValidator() - self._validators["tickprefix"] = v_xaxis.TickprefixValidator() - self._validators["ticks"] = v_xaxis.TicksValidator() - self._validators["tickson"] = v_xaxis.TicksonValidator() - self._validators["ticksuffix"] = v_xaxis.TicksuffixValidator() - self._validators["ticktext"] = v_xaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_xaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_xaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_xaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_xaxis.TickwidthValidator() - self._validators["title"] = v_xaxis.TitleValidator() - self._validators["type"] = v_xaxis.TypeValidator() - self._validators["uirevision"] = v_xaxis.UirevisionValidator() - self._validators["visible"] = v_xaxis.VisibleValidator() - self._validators["zeroline"] = v_xaxis.ZerolineValidator() - self._validators["zerolinecolor"] = v_xaxis.ZerolinecolorValidator() - self._validators["zerolinewidth"] = v_xaxis.ZerolinewidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("anchor", None) - self["anchor"] = anchor if anchor is not None else _v - _v = arg.pop("automargin", None) - self["automargin"] = automargin if automargin is not None else _v - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("constrain", None) - self["constrain"] = constrain if constrain is not None else _v - _v = arg.pop("constraintoward", None) - self["constraintoward"] = constraintoward if constraintoward is not None else _v - _v = arg.pop("dividercolor", None) - self["dividercolor"] = dividercolor if dividercolor is not None else _v - _v = arg.pop("dividerwidth", None) - self["dividerwidth"] = dividerwidth if dividerwidth is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("fixedrange", None) - self["fixedrange"] = fixedrange if fixedrange is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("matches", None) - self["matches"] = matches if matches is not None else _v - _v = arg.pop("mirror", None) - self["mirror"] = mirror if mirror is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("overlaying", None) - self["overlaying"] = overlaying if overlaying is not None else _v - _v = arg.pop("position", None) - self["position"] = position if position is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangebreaks", None) - self["rangebreaks"] = rangebreaks if rangebreaks is not None else _v - _v = arg.pop("rangebreakdefaults", None) - self["rangebreakdefaults"] = ( - rangebreakdefaults if rangebreakdefaults is not None else _v - ) - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("rangeselector", None) - self["rangeselector"] = rangeselector if rangeselector is not None else _v - _v = arg.pop("rangeslider", None) - self["rangeslider"] = rangeslider if rangeslider is not None else _v - _v = arg.pop("scaleanchor", None) - self["scaleanchor"] = scaleanchor if scaleanchor is not None else _v - _v = arg.pop("scaleratio", None) - self["scaleratio"] = scaleratio if scaleratio is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showdividers", None) - self["showdividers"] = showdividers if showdividers is not None else _v - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showspikes", None) - self["showspikes"] = showspikes if showspikes is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("spikecolor", None) - self["spikecolor"] = spikecolor if spikecolor is not None else _v - _v = arg.pop("spikedash", None) - self["spikedash"] = spikedash if spikedash is not None else _v - _v = arg.pop("spikemode", None) - self["spikemode"] = spikemode if spikemode is not None else _v - _v = arg.pop("spikesnap", None) - self["spikesnap"] = spikesnap if spikesnap is not None else _v - _v = arg.pop("spikethickness", None) - self["spikethickness"] = spikethickness if spikethickness is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("tickson", None) - self["tickson"] = tickson if tickson is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("zeroline", None) - self["zeroline"] = zeroline if zeroline is not None else _v - _v = arg.pop("zerolinecolor", None) - self["zerolinecolor"] = zerolinecolor if zerolinecolor is not None else _v - _v = arg.pop("zerolinewidth", None) - self["zerolinewidth"] = zerolinewidth if zerolinewidth is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Updatemenu(_BaseLayoutHierarchyType): - - # active - # ------ - @property - def active(self): - """ - Determines which button (by index starting from 0) is - considered active. - - The 'active' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - Returns - ------- - int - """ - return self["active"] - - @active.setter - def active(self, val): - self["active"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the update menu buttons. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the update menu. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the update menu. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # buttons - # ------- - @property - def buttons(self): - """ - The 'buttons' property is a tuple of instances of - Button that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.updatemenu.Button - - A list or tuple of dicts of string/value properties that - will be passed to the Button constructor - - Supported dict properties: - - args - Sets the arguments values to be passed to the - Plotly method set in `method` on click. - args2 - Sets a 2nd set of `args`, these arguments - values are passed to the Plotly method set in - `method` when clicking this button while in the - active state. Use this to create toggle - buttons. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_buttonclicked` method and executing the - API command manually without losing the benefit - of the updatemenu automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the button. - method - Sets the Plotly method to be called on click. - If the `skip` method is used, the API - updatemenu will function as normal but will - perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to updatemenu events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. - - Returns - ------- - tuple[plotly.graph_objs.layout.updatemenu.Button] - """ - return self["buttons"] - - @buttons.setter - def buttons(self, val): - self["buttons"] = val - - # buttondefaults - # -------------- - @property - def buttondefaults(self): - """ - When used in a template (as - layout.template.layout.updatemenu.buttondefaults), sets the - default property values to use for elements of - layout.updatemenu.buttons - - The 'buttondefaults' property is an instance of Button - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.updatemenu.Button` - - A dict of string/value properties that will be passed - to the Button constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.updatemenu.Button - """ - return self["buttondefaults"] - - @buttondefaults.setter - def buttondefaults(self, val): - self["buttondefaults"] = val - - # direction - # --------- - @property - def direction(self): - """ - Determines the direction in which the buttons are laid out, - whether in a dropdown menu or a row/column of buttons. For - `left` and `up`, the buttons will still appear in left-to-right - or top-to-bottom order respectively. - - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'up', 'down'] - - Returns - ------- - Any - """ - return self["direction"] - - @direction.setter - def direction(self, val): - self["direction"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font of the update menu button text. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.updatemenu.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.updatemenu.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # pad - # --- - @property - def pad(self): - """ - Sets the padding around the buttons or dropdown menu. - - The 'pad' property is an instance of Pad - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.updatemenu.Pad` - - A dict of string/value properties that will be passed - to the Pad constructor - - Supported dict properties: - - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. - - Returns - ------- - plotly.graph_objs.layout.updatemenu.Pad - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # showactive - # ---------- - @property - def showactive(self): - """ - Highlights active dropdown item or active button if true. - - The 'showactive' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showactive"] - - @showactive.setter - def showactive(self, val): - self["showactive"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # type - # ---- - @property - def type(self): - """ - Determines whether the buttons are accessible via a dropdown - menu or whether the buttons are stacked horizontally or - vertically - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['dropdown', 'buttons'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not the update menu is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position (in normalized coordinates) of the update - menu. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the update menu's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the range selector. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position (in normalized coordinates) of the update - menu. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the update menu's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the range selector. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - active - Determines which button (by index starting from 0) is - considered active. - bgcolor - Sets the background color of the update menu buttons. - bordercolor - Sets the color of the border enclosing the update menu. - borderwidth - Sets the width (in px) of the border enclosing the - update menu. - buttons - A tuple of - :class:`plotly.graph_objects.layout.updatemenu.Button` - instances or dicts with compatible properties - buttondefaults - When used in a template (as - layout.template.layout.updatemenu.buttondefaults), sets - the default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons are laid - out, whether in a dropdown menu or a row/column of - buttons. For `left` and `up`, the buttons will still - appear in left-to-right or top-to-bottom order - respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pad - Sets the padding around the buttons or dropdown menu. - showactive - Highlights active dropdown item or active button if - true. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible via a - dropdown menu or whether the buttons are stacked - horizontally or vertically - visible - Determines whether or not the update menu is visible. - x - Sets the x position (in normalized coordinates) of the - update menu. - xanchor - Sets the update menu's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the range selector. - y - Sets the y position (in normalized coordinates) of the - update menu. - yanchor - Sets the update menu's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the range selector. - """ - - def __init__( - self, - arg=None, - active=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - buttons=None, - buttondefaults=None, - direction=None, - font=None, - name=None, - pad=None, - showactive=None, - templateitemname=None, - type=None, - visible=None, - x=None, - xanchor=None, - y=None, - yanchor=None, - **kwargs - ): - """ - Construct a new Updatemenu object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Updatemenu` - active - Determines which button (by index starting from 0) is - considered active. - bgcolor - Sets the background color of the update menu buttons. - bordercolor - Sets the color of the border enclosing the update menu. - borderwidth - Sets the width (in px) of the border enclosing the - update menu. - buttons - A tuple of - :class:`plotly.graph_objects.layout.updatemenu.Button` - instances or dicts with compatible properties - buttondefaults - When used in a template (as - layout.template.layout.updatemenu.buttondefaults), sets - the default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons are laid - out, whether in a dropdown menu or a row/column of - buttons. For `left` and `up`, the buttons will still - appear in left-to-right or top-to-bottom order - respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pad - Sets the padding around the buttons or dropdown menu. - showactive - Highlights active dropdown item or active button if - true. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible via a - dropdown menu or whether the buttons are stacked - horizontally or vertically - visible - Determines whether or not the update menu is visible. - x - Sets the x position (in normalized coordinates) of the - update menu. - xanchor - Sets the update menu's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the range selector. - y - Sets the y position (in normalized coordinates) of the - update menu. - yanchor - Sets the update menu's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the range selector. - - Returns - ------- - Updatemenu - """ - super(Updatemenu, self).__init__("updatemenus") - - # Validate arg - # ------------ - 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.Updatemenu -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Updatemenu`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import updatemenu as v_updatemenu - - # Initialize validators - # --------------------- - self._validators["active"] = v_updatemenu.ActiveValidator() - self._validators["bgcolor"] = v_updatemenu.BgcolorValidator() - self._validators["bordercolor"] = v_updatemenu.BordercolorValidator() - self._validators["borderwidth"] = v_updatemenu.BorderwidthValidator() - self._validators["buttons"] = v_updatemenu.ButtonsValidator() - self._validators["buttondefaults"] = v_updatemenu.ButtonValidator() - self._validators["direction"] = v_updatemenu.DirectionValidator() - self._validators["font"] = v_updatemenu.FontValidator() - self._validators["name"] = v_updatemenu.NameValidator() - self._validators["pad"] = v_updatemenu.PadValidator() - self._validators["showactive"] = v_updatemenu.ShowactiveValidator() - self._validators["templateitemname"] = v_updatemenu.TemplateitemnameValidator() - self._validators["type"] = v_updatemenu.TypeValidator() - self._validators["visible"] = v_updatemenu.VisibleValidator() - self._validators["x"] = v_updatemenu.XValidator() - self._validators["xanchor"] = v_updatemenu.XanchorValidator() - self._validators["y"] = v_updatemenu.YValidator() - self._validators["yanchor"] = v_updatemenu.YanchorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("active", None) - self["active"] = active if active is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("buttons", None) - self["buttons"] = buttons if buttons is not None else _v - _v = arg.pop("buttondefaults", None) - self["buttondefaults"] = buttondefaults if buttondefaults is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("showactive", None) - self["showactive"] = showactive if showactive is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Uniformtext(_BaseLayoutHierarchyType): - - # minsize - # ------- - @property - def minsize(self): - """ - Sets the minimum text size between traces of the same type. - - The 'minsize' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["minsize"] - - @minsize.setter - def minsize(self, val): - self["minsize"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines how the font size for various text elements are - uniformed between each trace type. If the computed text sizes - were smaller than the minimum size defined by - `uniformtext.minsize` using "hide" option hides the text; and - using "show" option shows the text without further downscaling. - Please note that if the size defined by `minsize` is greater - than the font size defined by trace, then the `minsize` is - used. - - The 'mode' property is an enumeration that may be specified as: - - One of the following enumeration values: - [False, 'hide', 'show'] - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - minsize - Sets the minimum text size between traces of the same - type. - mode - Determines how the font size for various text elements - are uniformed between each trace type. If the computed - text sizes were smaller than the minimum size defined - by `uniformtext.minsize` using "hide" option hides the - text; and using "show" option shows the text without - further downscaling. Please note that if the size - defined by `minsize` is greater than the font size - defined by trace, then the `minsize` is used. - """ - - def __init__(self, arg=None, minsize=None, mode=None, **kwargs): - """ - Construct a new Uniformtext object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Uniformtext` - minsize - Sets the minimum text size between traces of the same - type. - mode - Determines how the font size for various text elements - are uniformed between each trace type. If the computed - text sizes were smaller than the minimum size defined - by `uniformtext.minsize` using "hide" option hides the - text; and using "show" option shows the text without - further downscaling. Please note that if the size - defined by `minsize` is greater than the font size - defined by trace, then the `minsize` is used. - - Returns - ------- - Uniformtext - """ - super(Uniformtext, self).__init__("uniformtext") - - # Validate arg - # ------------ - 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.Uniformtext -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Uniformtext`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import uniformtext as v_uniformtext - - # Initialize validators - # --------------------- - self._validators["minsize"] = v_uniformtext.MinsizeValidator() - self._validators["mode"] = v_uniformtext.ModeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("minsize", None) - self["minsize"] = minsize if minsize is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Transition(_BaseLayoutHierarchyType): - - # duration - # -------- - @property - def duration(self): - """ - The duration of the transition, in milliseconds. If equal to - zero, updates are synchronous. - - The 'duration' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["duration"] - - @duration.setter - def duration(self, val): - self["duration"] = val - - # easing - # ------ - @property - def easing(self): - """ - The easing function used for the transition - - The 'easing' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'quad', 'cubic', 'sin', 'exp', 'circle', - 'elastic', 'back', 'bounce', 'linear-in', 'quad-in', - 'cubic-in', 'sin-in', 'exp-in', 'circle-in', 'elastic-in', - 'back-in', 'bounce-in', 'linear-out', 'quad-out', - 'cubic-out', 'sin-out', 'exp-out', 'circle-out', - 'elastic-out', 'back-out', 'bounce-out', 'linear-in-out', - 'quad-in-out', 'cubic-in-out', 'sin-in-out', 'exp-in-out', - 'circle-in-out', 'elastic-in-out', 'back-in-out', - 'bounce-in-out'] - - Returns - ------- - Any - """ - return self["easing"] - - @easing.setter - def easing(self, val): - self["easing"] = val - - # ordering - # -------- - @property - def ordering(self): - """ - Determines whether the figure's layout or traces smoothly - transitions during updates that make both traces and layout - change. - - The 'ordering' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['layout first', 'traces first'] - - Returns - ------- - Any - """ - return self["ordering"] - - @ordering.setter - def ordering(self, val): - self["ordering"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - duration - The duration of the transition, in milliseconds. If - equal to zero, updates are synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or traces - smoothly transitions during updates that make both - traces and layout change. - """ - - def __init__(self, arg=None, duration=None, easing=None, ordering=None, **kwargs): - """ - Construct a new Transition object - - Sets transition options used during Plotly.react updates. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Transition` - duration - The duration of the transition, in milliseconds. If - equal to zero, updates are synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or traces - smoothly transitions during updates that make both - traces and layout change. - - Returns - ------- - Transition - """ - super(Transition, self).__init__("transition") - - # Validate arg - # ------------ - 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.Transition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Transition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import transition as v_transition - - # Initialize validators - # --------------------- - self._validators["duration"] = v_transition.DurationValidator() - self._validators["easing"] = v_transition.EasingValidator() - self._validators["ordering"] = v_transition.OrderingValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("duration", None) - self["duration"] = duration if duration is not None else _v - _v = arg.pop("easing", None) - self["easing"] = easing if easing is not None else _v - _v = arg.pop("ordering", None) - self["ordering"] = ordering if ordering is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets the title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # pad - # --- - @property - def pad(self): - """ - Sets the padding of the title. Each padding value only applies - when the corresponding `xanchor`/`yanchor` value is set - accordingly. E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined automatically. Padding is - muted if the respective anchor value is "middle*/*center". - - The 'pad' property is an instance of Pad - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.title.Pad` - - A dict of string/value properties that will be passed - to the Pad constructor - - Supported dict properties: - - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. - - Returns - ------- - plotly.graph_objs.layout.title.Pad - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the plot's title. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 - - # x - # - - @property - def x(self): - """ - Sets the x position with respect to `xref` in normalized - coordinates from 0 (left) to 1 (right). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the title's horizontal alignment with respect to its x - position. "left" means that the title starts at x, "right" - means that the title ends at x and "center" means that the - title's center is at x. "auto" divides `xref` by three and - calculates the `xanchor` value automatically based on the value - of `x`. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xref - # ---- - @property - def xref(self): - """ - Sets the container `x` refers to. "container" spans the entire - `width` of the plot. "paper" refers to the width of the - plotting area only. - - The 'xref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['container', 'paper'] - - Returns - ------- - Any - """ - return self["xref"] - - @xref.setter - def xref(self, val): - self["xref"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position with respect to `yref` in normalized - coordinates from 0 (bottom) to 1 (top). "auto" places the - baseline of the title onto the vertical center of the top - margin. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the title's vertical alignment with respect to its y - position. "top" means that the title's cap line is at y, - "bottom" means that the title's baseline is at y and "middle" - means that the title's midline is at y. "auto" divides `yref` - by three and calculates the `yanchor` value automatically based - on the value of `y`. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # yref - # ---- - @property - def yref(self): - """ - Sets the container `y` refers to. "container" spans the entire - `height` of the plot. "paper" refers to the height of the - plotting area only. - - The 'yref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['container', 'paper'] - - Returns - ------- - Any - """ - return self["yref"] - - @yref.setter - def yref(self, val): - self["yref"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets the title font. Note that the title's font used to - be customized by the now deprecated `titlefont` - attribute. - pad - Sets the padding of the title. Each padding value only - applies when the corresponding `xanchor`/`yanchor` - value is set accordingly. E.g. for left padding to take - effect, `xanchor` must be set to "left". The same rule - applies if `xanchor`/`yanchor` is determined - automatically. Padding is muted if the respective - anchor value is "middle*/*center". - text - Sets the plot's title. Note that before the existence - of `title.text`, the title's contents used to be - defined as the `title` attribute itself. This behavior - has been deprecated. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 (right). - xanchor - Sets the title's horizontal alignment with respect to - its x position. "left" means that the title starts at - x, "right" means that the title ends at x and "center" - means that the title's center is at x. "auto" divides - `xref` by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" spans the - entire `width` of the plot. "paper" refers to the width - of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 (top). - "auto" places the baseline of the title onto the - vertical center of the top margin. - yanchor - Sets the title's vertical alignment with respect to its - y position. "top" means that the title's cap line is at - y, "bottom" means that the title's baseline is at y and - "middle" means that the title's midline is at y. "auto" - divides `yref` by three and calculates the `yanchor` - value automatically based on the value of `y`. - yref - Sets the container `y` refers to. "container" spans the - entire `height` of the plot. "paper" refers to the - height of the plotting area only. - """ - - def __init__( - self, - arg=None, - font=None, - pad=None, - text=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, - **kwargs - ): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Title` - font - Sets the title font. Note that the title's font used to - be customized by the now deprecated `titlefont` - attribute. - pad - Sets the padding of the title. Each padding value only - applies when the corresponding `xanchor`/`yanchor` - value is set accordingly. E.g. for left padding to take - effect, `xanchor` must be set to "left". The same rule - applies if `xanchor`/`yanchor` is determined - automatically. Padding is muted if the respective - anchor value is "middle*/*center". - text - Sets the plot's title. Note that before the existence - of `title.text`, the title's contents used to be - defined as the `title` attribute itself. This behavior - has been deprecated. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 (right). - xanchor - Sets the title's horizontal alignment with respect to - its x position. "left" means that the title starts at - x, "right" means that the title ends at x and "center" - means that the title's center is at x. "auto" divides - `xref` by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" spans the - entire `width` of the plot. "paper" refers to the width - of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 (top). - "auto" places the baseline of the title onto the - vertical center of the top margin. - yanchor - Sets the title's vertical alignment with respect to its - y position. "top" means that the title's cap line is at - y, "bottom" means that the title's baseline is at y and - "middle" means that the title's midline is at y. "auto" - divides `yref` by three and calculates the `yanchor` - value automatically based on the value of `y`. - yref - Sets the container `y` refers to. "container" spans the - entire `height` of the plot. "paper" refers to the - height of the plotting area only. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["pad"] = v_title.PadValidator() - self._validators["text"] = v_title.TextValidator() - self._validators["x"] = v_title.XValidator() - self._validators["xanchor"] = v_title.XanchorValidator() - self._validators["xref"] = v_title.XrefValidator() - self._validators["y"] = v_title.YValidator() - self._validators["yanchor"] = v_title.YanchorValidator() - self._validators["yref"] = v_title.YrefValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xref", None) - self["xref"] = xref if xref is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("yref", None) - self["yref"] = yref if yref is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Ternary(_BaseLayoutHierarchyType): - - # aaxis - # ----- - @property - def aaxis(self): - """ - The 'aaxis' property is an instance of Aaxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.Aaxis` - - A dict of string/value properties that will be passed - to the Aaxis constructor - - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.aaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.aaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.aax - is.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.ternary.aaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. - - Returns - ------- - plotly.graph_objs.layout.ternary.Aaxis - """ - return self["aaxis"] - - @aaxis.setter - def aaxis(self, val): - self["aaxis"] = val - - # baxis - # ----- - @property - def baxis(self): - """ - The 'baxis' property is an instance of Baxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.Baxis` - - A dict of string/value properties that will be passed - to the Baxis constructor - - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.baxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.baxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.bax - is.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.ternary.baxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. - - Returns - ------- - plotly.graph_objs.layout.ternary.Baxis - """ - return self["baxis"] - - @baxis.setter - def baxis(self, val): - self["baxis"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Set the background color of the subplot - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # caxis - # ----- - @property - def caxis(self): - """ - The 'caxis' property is an instance of Caxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.Caxis` - - A dict of string/value properties that will be passed - to the Caxis constructor - - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.caxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.caxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.caxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.cax - is.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.ternary.caxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. - - Returns - ------- - plotly.graph_objs.layout.ternary.Caxis - """ - return self["caxis"] - - @caxis.setter - def caxis(self, val): - self["caxis"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this ternary - subplot . - row - If there is a layout grid, use the domain for - this row in the grid for this ternary subplot . - x - Sets the horizontal domain of this ternary - subplot (in plot fraction). - y - Sets the vertical domain of this ternary - subplot (in plot fraction). - - Returns - ------- - plotly.graph_objs.layout.ternary.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # sum - # --- - @property - def sum(self): - """ - The number each triplet should sum to, and the maximum range of - each axis - - The 'sum' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sum"] - - @sum.setter - def sum(self, val): - self["sum"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `min` and - `title`, if not overridden in the individual axes. Defaults to - `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - aaxis - :class:`plotly.graph_objects.layout.ternary.Aaxis` - instance or dict with compatible properties - baxis - :class:`plotly.graph_objects.layout.ternary.Baxis` - instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - :class:`plotly.graph_objects.layout.ternary.Caxis` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.ternary.Domain` - instance or dict with compatible properties - sum - The number each triplet should sum to, and the maximum - range of each axis - uirevision - Controls persistence of user-driven changes in axis - `min` and `title`, if not overridden in the individual - axes. Defaults to `layout.uirevision`. - """ - - def __init__( - self, - arg=None, - aaxis=None, - baxis=None, - bgcolor=None, - caxis=None, - domain=None, - sum=None, - uirevision=None, - **kwargs - ): - """ - Construct a new Ternary object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Ternary` - aaxis - :class:`plotly.graph_objects.layout.ternary.Aaxis` - instance or dict with compatible properties - baxis - :class:`plotly.graph_objects.layout.ternary.Baxis` - instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - :class:`plotly.graph_objects.layout.ternary.Caxis` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.ternary.Domain` - instance or dict with compatible properties - sum - The number each triplet should sum to, and the maximum - range of each axis - uirevision - Controls persistence of user-driven changes in axis - `min` and `title`, if not overridden in the individual - axes. Defaults to `layout.uirevision`. - - Returns - ------- - Ternary - """ - super(Ternary, self).__init__("ternary") - - # Validate arg - # ------------ - 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.Ternary -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Ternary`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import ternary as v_ternary - - # Initialize validators - # --------------------- - self._validators["aaxis"] = v_ternary.AaxisValidator() - self._validators["baxis"] = v_ternary.BaxisValidator() - self._validators["bgcolor"] = v_ternary.BgcolorValidator() - self._validators["caxis"] = v_ternary.CaxisValidator() - self._validators["domain"] = v_ternary.DomainValidator() - self._validators["sum"] = v_ternary.SumValidator() - self._validators["uirevision"] = v_ternary.UirevisionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("aaxis", None) - self["aaxis"] = aaxis if aaxis is not None else _v - _v = arg.pop("baxis", None) - self["baxis"] = baxis if baxis is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("caxis", None) - self["caxis"] = caxis if caxis is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("sum", None) - self["sum"] = sum if sum is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Template(_BaseLayoutHierarchyType): - - # data - # ---- - @property - def data(self): - """ - The 'data' property is an instance of Data - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.template.Data` - - A dict of string/value properties that will be passed - to the Data constructor - - Supported dict properties: - - area - A tuple of :class:`plotly.graph_objects.Area` - instances or dicts with compatible properties - barpolar - A tuple of - :class:`plotly.graph_objects.Barpolar` - instances or dicts with compatible properties - bar - A tuple of :class:`plotly.graph_objects.Bar` - instances or dicts with compatible properties - box - A tuple of :class:`plotly.graph_objects.Box` - instances or dicts with compatible properties - candlestick - A tuple of - :class:`plotly.graph_objects.Candlestick` - instances or dicts with compatible properties - carpet - A tuple of :class:`plotly.graph_objects.Carpet` - instances or dicts with compatible properties - choroplethmapbox - A tuple of - :class:`plotly.graph_objects.Choroplethmapbox` - instances or dicts with compatible properties - choropleth - A tuple of - :class:`plotly.graph_objects.Choropleth` - instances or dicts with compatible properties - cone - A tuple of :class:`plotly.graph_objects.Cone` - instances or dicts with compatible properties - contourcarpet - A tuple of - :class:`plotly.graph_objects.Contourcarpet` - instances or dicts with compatible properties - contour - A tuple of - :class:`plotly.graph_objects.Contour` instances - or dicts with compatible properties - densitymapbox - A tuple of - :class:`plotly.graph_objects.Densitymapbox` - instances or dicts with compatible properties - funnelarea - A tuple of - :class:`plotly.graph_objects.Funnelarea` - instances or dicts with compatible properties - funnel - A tuple of :class:`plotly.graph_objects.Funnel` - instances or dicts with compatible properties - heatmapgl - A tuple of - :class:`plotly.graph_objects.Heatmapgl` - instances or dicts with compatible properties - heatmap - A tuple of - :class:`plotly.graph_objects.Heatmap` instances - or dicts with compatible properties - histogram2dcontour - A tuple of :class:`plotly.graph_objects.Histogr - am2dContour` instances or dicts with compatible - properties - histogram2d - A tuple of - :class:`plotly.graph_objects.Histogram2d` - instances or dicts with compatible properties - histogram - A tuple of - :class:`plotly.graph_objects.Histogram` - instances or dicts with compatible properties - image - A tuple of :class:`plotly.graph_objects.Image` - instances or dicts with compatible properties - indicator - A tuple of - :class:`plotly.graph_objects.Indicator` - instances or dicts with compatible properties - isosurface - A tuple of - :class:`plotly.graph_objects.Isosurface` - instances or dicts with compatible properties - mesh3d - A tuple of :class:`plotly.graph_objects.Mesh3d` - instances or dicts with compatible properties - ohlc - A tuple of :class:`plotly.graph_objects.Ohlc` - instances or dicts with compatible properties - parcats - A tuple of - :class:`plotly.graph_objects.Parcats` instances - or dicts with compatible properties - parcoords - A tuple of - :class:`plotly.graph_objects.Parcoords` - instances or dicts with compatible properties - pie - A tuple of :class:`plotly.graph_objects.Pie` - instances or dicts with compatible properties - pointcloud - A tuple of - :class:`plotly.graph_objects.Pointcloud` - instances or dicts with compatible properties - sankey - A tuple of :class:`plotly.graph_objects.Sankey` - instances or dicts with compatible properties - scatter3d - A tuple of - :class:`plotly.graph_objects.Scatter3d` - instances or dicts with compatible properties - scattercarpet - A tuple of - :class:`plotly.graph_objects.Scattercarpet` - instances or dicts with compatible properties - scattergeo - A tuple of - :class:`plotly.graph_objects.Scattergeo` - instances or dicts with compatible properties - scattergl - A tuple of - :class:`plotly.graph_objects.Scattergl` - instances or dicts with compatible properties - scattermapbox - A tuple of - :class:`plotly.graph_objects.Scattermapbox` - instances or dicts with compatible properties - scatterpolargl - A tuple of - :class:`plotly.graph_objects.Scatterpolargl` - instances or dicts with compatible properties - scatterpolar - A tuple of - :class:`plotly.graph_objects.Scatterpolar` - instances or dicts with compatible properties - scatter - A tuple of - :class:`plotly.graph_objects.Scatter` instances - or dicts with compatible properties - scatterternary - A tuple of - :class:`plotly.graph_objects.Scatterternary` - instances or dicts with compatible properties - splom - A tuple of :class:`plotly.graph_objects.Splom` - instances or dicts with compatible properties - streamtube - A tuple of - :class:`plotly.graph_objects.Streamtube` - instances or dicts with compatible properties - sunburst - A tuple of - :class:`plotly.graph_objects.Sunburst` - instances or dicts with compatible properties - surface - A tuple of - :class:`plotly.graph_objects.Surface` instances - or dicts with compatible properties - table - A tuple of :class:`plotly.graph_objects.Table` - instances or dicts with compatible properties - treemap - A tuple of - :class:`plotly.graph_objects.Treemap` instances - or dicts with compatible properties - violin - A tuple of :class:`plotly.graph_objects.Violin` - instances or dicts with compatible properties - volume - A tuple of :class:`plotly.graph_objects.Volume` - instances or dicts with compatible properties - waterfall - A tuple of - :class:`plotly.graph_objects.Waterfall` - instances or dicts with compatible properties - - Returns - ------- - plotly.graph_objs.layout.template.Data - """ - return self["data"] - - @data.setter - def data(self, val): - self["data"] = val - - # layout - # ------ - @property - def layout(self): - """ - The 'layout' property is an instance of Layout - that may be specified as: - - An instance of :class:`plotly.graph_objs.Layout` - - A dict of string/value properties that will be passed - to the Layout constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.template.Layout - """ - return self["layout"] - - @layout.setter - def layout(self, val): - self["layout"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - data - :class:`plotly.graph_objects.layout.template.Data` - instance or dict with compatible properties - layout - :class:`plotly.graph_objects.Layout` instance or dict - with compatible properties - """ - - def __init__(self, arg=None, data=None, layout=None, **kwargs): - """ - Construct a new Template object - - Default attributes to be applied to the plot. This should be a - dict with format: `{'layout': layoutTemplate, 'data': - {trace_type: [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the structure of - `figure.layout` and `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` (e.g. 'scatter'). - Alternatively, this may be specified as an instance of - plotly.graph_objs.layout.Template. 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 this can be used to add 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`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Template` - data - :class:`plotly.graph_objects.layout.template.Data` - instance or dict with compatible properties - layout - :class:`plotly.graph_objects.Layout` instance or dict - with compatible properties - - Returns - ------- - Template - """ - super(Template, self).__init__("template") - - # Validate arg - # ------------ - 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.Template -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Template`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import template as v_template - - # Initialize validators - # --------------------- - self._validators["data"] = v_template.DataValidator() - self._validators["layout"] = v_template.LayoutValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("data", None) - self["data"] = data if data is not None else _v - _v = arg.pop("layout", None) - self["layout"] = layout if layout is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Slider(_BaseLayoutHierarchyType): - - # active - # ------ - @property - def active(self): - """ - Determines which button (by index starting from 0) is - considered active. - - The 'active' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["active"] - - @active.setter - def active(self, val): - self["active"] = val - - # activebgcolor - # ------------- - @property - def activebgcolor(self): - """ - Sets the background color of the slider grip while dragging. - - The 'activebgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["activebgcolor"] - - @activebgcolor.setter - def activebgcolor(self, val): - self["activebgcolor"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the slider. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the slider. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the slider. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # currentvalue - # ------------ - @property - def currentvalue(self): - """ - The 'currentvalue' property is an instance of Currentvalue - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.slider.Currentvalue` - - A dict of string/value properties that will be passed - to the Currentvalue constructor - - Supported dict properties: - - font - Sets the font of the current value label text. - offset - The amount of space, in pixels, between the - current value label and the slider. - prefix - When currentvalue.visible is true, this sets - the prefix of the label. - suffix - When currentvalue.visible is true, this sets - the suffix of the label. - visible - Shows the currently-selected value above the - slider. - xanchor - The alignment of the value readout relative to - the length of the slider. - - Returns - ------- - plotly.graph_objs.layout.slider.Currentvalue - """ - return self["currentvalue"] - - @currentvalue.setter - def currentvalue(self, val): - self["currentvalue"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font of the slider step labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.slider.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.slider.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the slider This measure excludes the padding - of both ends. That is, the slider's length is this length minus - the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this slider length is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # minorticklen - # ------------ - @property - def minorticklen(self): - """ - Sets the length in pixels of minor step tick marks - - The 'minorticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["minorticklen"] - - @minorticklen.setter - def minorticklen(self, val): - self["minorticklen"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # pad - # --- - @property - def pad(self): - """ - Set the padding of the slider component along each side. - - The 'pad' property is an instance of Pad - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.slider.Pad` - - A dict of string/value properties that will be passed - to the Pad constructor - - Supported dict properties: - - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. - - Returns - ------- - plotly.graph_objs.layout.slider.Pad - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # steps - # ----- - @property - def steps(self): - """ - The 'steps' property is a tuple of instances of - Step that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.slider.Step - - A list or tuple of dicts of string/value properties that - will be passed to the Step constructor - - Supported dict properties: - - args - Sets the arguments values to be passed to the - Plotly method set in `method` on slide. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_sliderchange` method and executing the - API command manually without losing the benefit - of the slider automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the slider - method - Sets the Plotly method to be called when the - slider value is changed. If the `skip` method - is used, the API slider will function as normal - but will perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to slider events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - Sets the value of the slider step, used to - refer to the step programatically. Defaults to - the slider label if not provided. - visible - Determines whether or not this step is included - in the slider. - - Returns - ------- - tuple[plotly.graph_objs.layout.slider.Step] - """ - return self["steps"] - - @steps.setter - def steps(self, val): - self["steps"] = val - - # stepdefaults - # ------------ - @property - def stepdefaults(self): - """ - When used in a template (as - layout.template.layout.slider.stepdefaults), sets the default - property values to use for elements of layout.slider.steps - - The 'stepdefaults' property is an instance of Step - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.slider.Step` - - A dict of string/value properties that will be passed - to the Step constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.slider.Step - """ - return self["stepdefaults"] - - @stepdefaults.setter - def stepdefaults(self, val): - self["stepdefaults"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the color of the border enclosing the slider. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the length in pixels of step tick marks - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # transition - # ---------- - @property - def transition(self): - """ - The 'transition' property is an instance of Transition - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.slider.Transition` - - A dict of string/value properties that will be passed - to the Transition constructor - - Supported dict properties: - - duration - Sets the duration of the slider transition - easing - Sets the easing function of the slider - transition - - Returns - ------- - plotly.graph_objs.layout.slider.Transition - """ - return self["transition"] - - @transition.setter - def transition(self, val): - self["transition"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not the slider is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position (in normalized coordinates) of the slider. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the slider's horizontal position anchor. This anchor binds - the `x` position to the "left", "center" or "right" of the - range selector. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position (in normalized coordinates) of the slider. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the slider's vertical position anchor This anchor binds - the `y` position to the "top", "middle" or "bottom" of the - range selector. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - active - Determines which button (by index starting from 0) is - considered active. - activebgcolor - Sets the background color of the slider grip while - dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the slider. - borderwidth - Sets the width (in px) of the border enclosing the - slider. - currentvalue - :class:`plotly.graph_objects.layout.slider.Currentvalue - ` instance or dict with compatible properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure excludes the - padding of both ends. That is, the slider's length is - this length minus the padding on both ends. - lenmode - Determines whether this slider length is set in units - of plot "fraction" or in *pixels. Use `len` to set the - value. - minorticklen - Sets the length in pixels of minor step tick marks - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pad - Set the padding of the slider component along each - side. - steps - A tuple of - :class:`plotly.graph_objects.layout.slider.Step` - instances or dicts with compatible properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), sets the - default property values to use for elements of - layout.slider.steps - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - :class:`plotly.graph_objects.layout.slider.Transition` - instance or dict with compatible properties - visible - Determines whether or not the slider is visible. - x - Sets the x position (in normalized coordinates) of the - slider. - xanchor - Sets the slider's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the range selector. - y - Sets the y position (in normalized coordinates) of the - slider. - yanchor - Sets the slider's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or - "bottom" of the range selector. - """ - - def __init__( - self, - arg=None, - active=None, - activebgcolor=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - currentvalue=None, - font=None, - len=None, - lenmode=None, - minorticklen=None, - name=None, - pad=None, - steps=None, - stepdefaults=None, - templateitemname=None, - tickcolor=None, - ticklen=None, - tickwidth=None, - transition=None, - visible=None, - x=None, - xanchor=None, - y=None, - yanchor=None, - **kwargs - ): - """ - Construct a new Slider object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Slider` - active - Determines which button (by index starting from 0) is - considered active. - activebgcolor - Sets the background color of the slider grip while - dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the slider. - borderwidth - Sets the width (in px) of the border enclosing the - slider. - currentvalue - :class:`plotly.graph_objects.layout.slider.Currentvalue - ` instance or dict with compatible properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure excludes the - padding of both ends. That is, the slider's length is - this length minus the padding on both ends. - lenmode - Determines whether this slider length is set in units - of plot "fraction" or in *pixels. Use `len` to set the - value. - minorticklen - Sets the length in pixels of minor step tick marks - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pad - Set the padding of the slider component along each - side. - steps - A tuple of - :class:`plotly.graph_objects.layout.slider.Step` - instances or dicts with compatible properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), sets the - default property values to use for elements of - layout.slider.steps - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - :class:`plotly.graph_objects.layout.slider.Transition` - instance or dict with compatible properties - visible - Determines whether or not the slider is visible. - x - Sets the x position (in normalized coordinates) of the - slider. - xanchor - Sets the slider's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the range selector. - y - Sets the y position (in normalized coordinates) of the - slider. - yanchor - Sets the slider's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or - "bottom" of the range selector. - - Returns - ------- - Slider - """ - super(Slider, self).__init__("sliders") - - # Validate arg - # ------------ - 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.Slider -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Slider`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import slider as v_slider - - # Initialize validators - # --------------------- - self._validators["active"] = v_slider.ActiveValidator() - self._validators["activebgcolor"] = v_slider.ActivebgcolorValidator() - self._validators["bgcolor"] = v_slider.BgcolorValidator() - self._validators["bordercolor"] = v_slider.BordercolorValidator() - self._validators["borderwidth"] = v_slider.BorderwidthValidator() - self._validators["currentvalue"] = v_slider.CurrentvalueValidator() - self._validators["font"] = v_slider.FontValidator() - self._validators["len"] = v_slider.LenValidator() - self._validators["lenmode"] = v_slider.LenmodeValidator() - self._validators["minorticklen"] = v_slider.MinorticklenValidator() - self._validators["name"] = v_slider.NameValidator() - self._validators["pad"] = v_slider.PadValidator() - self._validators["steps"] = v_slider.StepsValidator() - self._validators["stepdefaults"] = v_slider.StepValidator() - self._validators["templateitemname"] = v_slider.TemplateitemnameValidator() - self._validators["tickcolor"] = v_slider.TickcolorValidator() - self._validators["ticklen"] = v_slider.TicklenValidator() - self._validators["tickwidth"] = v_slider.TickwidthValidator() - self._validators["transition"] = v_slider.TransitionValidator() - self._validators["visible"] = v_slider.VisibleValidator() - self._validators["x"] = v_slider.XValidator() - self._validators["xanchor"] = v_slider.XanchorValidator() - self._validators["y"] = v_slider.YValidator() - self._validators["yanchor"] = v_slider.YanchorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("active", None) - self["active"] = active if active is not None else _v - _v = arg.pop("activebgcolor", None) - self["activebgcolor"] = activebgcolor if activebgcolor is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("currentvalue", None) - self["currentvalue"] = currentvalue if currentvalue is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("minorticklen", None) - self["minorticklen"] = minorticklen if minorticklen is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("steps", None) - self["steps"] = steps if steps is not None else _v - _v = arg.pop("stepdefaults", None) - self["stepdefaults"] = stepdefaults if stepdefaults is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("transition", None) - self["transition"] = transition if transition is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Shape(_BaseLayoutHierarchyType): - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the color filling the shape's interior. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # layer - # ----- - @property - def layer(self): - """ - Specifies whether shapes are drawn below or above traces. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['below', 'above'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.shape.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.layout.shape.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the shape. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # path - # ---- - @property - def path(self): - """ - For `type` "path" - a valid SVG path with the pixel values - replaced by data values in `xsizemode`/`ysizemode` being - "scaled" and taken unmodified as pixels relative to `xanchor` - and `yanchor` in case of "pixel" size mode. There are a few - restrictions / quirks only absolute instructions, not relative. - So the allowed segments are: M, L, H, V, Q, C, T, S, and Z arcs - (A) are not allowed because radius rx and ry are relative. In - the future we could consider supporting relative commands, but - we would have to decide on how to handle date and log axes. - Note that even as is, Q and C Bezier paths that are smooth on - linear axes may not be smooth on log, and vice versa. no - chained "polybezier" commands - specify the segment type for - each one. On category axes, values are numbers scaled to the - serial numbers of categories because using the categories - themselves there would be no way to describe fractional - positions On data axes: because space and T are both normal - components of path strings, we can't use either to separate - date from time parts. Therefore we'll use underscore for this - purpose: 2015-02-21_13:45:56.789 - - The 'path' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["path"] - - @path.setter - def path(self, val): - self["path"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # type - # ---- - @property - def type(self): - """ - Specifies the shape type to be drawn. If "line", a line is - drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect to the axes' - sizing mode. If "circle", a circle is drawn from - ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius (|(`x0`+`x1`)/2 - - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with respect to the axes' sizing - mode. If "rect", a rectangle is drawn linking (`x0`,`y0`), - (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect - to the axes' sizing mode. If "path", draw a custom SVG path - using `path`. with respect to the axes' sizing mode. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['circle', 'rect', 'path', 'line'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this shape is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x0 - # -- - @property - def x0(self): - """ - Sets the shape's starting x position. See `type` and - `xsizemode` for more info. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # x1 - # -- - @property - def x1(self): - """ - Sets the shape's end x position. See `type` and `xsizemode` for - more info. - - The 'x1' property accepts values of any type - - Returns - ------- - Any - """ - return self["x1"] - - @x1.setter - def x1(self, val): - self["x1"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Only relevant in conjunction with `xsizemode` set to "pixel". - Specifies the anchor point on the x axis to which `x0`, `x1` - and x coordinates within `path` are relative to. E.g. useful to - attach a pixel sized shape to a certain data value. No effect - when `xsizemode` not set to "pixel". - - The 'xanchor' property accepts values of any type - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xref - # ---- - @property - def xref(self): - """ - Sets the shape's x coordinate axis. If set to an x axis id - (e.g. "x" or "x2"), the `x` position refers to an x coordinate. - If set to "paper", the `x` position refers to the distance from - the left side of the plotting area in normalized coordinates - where 0 (1) corresponds to the left (right) side. If the axis - `type` is "log", then you must take the log of your desired - range. If the axis `type` is "date", then you must convert the - date to unix time in milliseconds. - - The 'xref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['paper'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["xref"] - - @xref.setter - def xref(self, val): - self["xref"] = val - - # xsizemode - # --------- - @property - def xsizemode(self): - """ - Sets the shapes's sizing mode along the x axis. If set to - "scaled", `x0`, `x1` and x coordinates within `path` refer to - data values on the x axis or a fraction of the plot area's - width (`xref` set to "paper"). If set to "pixel", `xanchor` - specifies the x position in terms of data or plot fraction but - `x0`, `x1` and x coordinates within `path` are pixels relative - to `xanchor`. This way, the shape can have a fixed width while - maintaining a position relative to data or plot fraction. - - The 'xsizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['scaled', 'pixel'] - - Returns - ------- - Any - """ - return self["xsizemode"] - - @xsizemode.setter - def xsizemode(self, val): - self["xsizemode"] = val - - # y0 - # -- - @property - def y0(self): - """ - Sets the shape's starting y position. See `type` and - `ysizemode` for more info. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # y1 - # -- - @property - def y1(self): - """ - Sets the shape's end y position. See `type` and `ysizemode` for - more info. - - The 'y1' property accepts values of any type - - Returns - ------- - Any - """ - return self["y1"] - - @y1.setter - def y1(self, val): - self["y1"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Only relevant in conjunction with `ysizemode` set to "pixel". - Specifies the anchor point on the y axis to which `y0`, `y1` - and y coordinates within `path` are relative to. E.g. useful to - attach a pixel sized shape to a certain data value. No effect - when `ysizemode` not set to "pixel". - - The 'yanchor' property accepts values of any type - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # yref - # ---- - @property - def yref(self): - """ - Sets the annotation's y coordinate axis. If set to an y axis id - (e.g. "y" or "y2"), the `y` position refers to an y coordinate - If set to "paper", the `y` position refers to the distance from - the bottom of the plotting area in normalized coordinates where - 0 (1) corresponds to the bottom (top). - - The 'yref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['paper'] - - A string that matches one of the following regular expressions: - ['^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["yref"] - - @yref.setter - def yref(self, val): - self["yref"] = val - - # ysizemode - # --------- - @property - def ysizemode(self): - """ - Sets the shapes's sizing mode along the y axis. If set to - "scaled", `y0`, `y1` and y coordinates within `path` refer to - data values on the y axis or a fraction of the plot area's - height (`yref` set to "paper"). If set to "pixel", `yanchor` - specifies the y position in terms of data or plot fraction but - `y0`, `y1` and y coordinates within `path` are pixels relative - to `yanchor`. This way, the shape can have a fixed height while - maintaining a position relative to data or plot fraction. - - The 'ysizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['scaled', 'pixel'] - - Returns - ------- - Any - """ - return self["ysizemode"] - - @ysizemode.setter - def ysizemode(self, val): - self["ysizemode"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fillcolor - Sets the color filling the shape's interior. - layer - Specifies whether shapes are drawn below or above - traces. - line - :class:`plotly.graph_objects.layout.shape.Line` - instance or dict with compatible properties - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the pixel - values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and taken - unmodified as pixels relative to `xanchor` and - `yanchor` in case of "pixel" size mode. There are a few - restrictions / quirks only absolute instructions, not - relative. So the allowed segments are: M, L, H, V, Q, - C, T, S, and Z arcs (A) are not allowed because radius - rx and ry are relative. In the future we could consider - supporting relative commands, but we would have to - decide on how to handle date and log axes. Note that - even as is, Q and C Bezier paths that are smooth on - linear axes may not be smooth on log, and vice versa. - no chained "polybezier" commands - specify the segment - type for each one. On category axes, values are numbers - scaled to the serial numbers of categories because - using the categories themselves there would be no way - to describe fractional positions On data axes: because - space and T are both normal components of path strings, - we can't use either to separate date from time parts. - Therefore we'll use underscore for this purpose: - 2015-02-21_13:45:56.789 - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If "line", a line - is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect - to the axes' sizing mode. If "circle", a circle is - drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with - respect to the axes' sizing mode. If "rect", a - rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), - (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to - the axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' sizing - mode. - visible - Determines whether or not this shape is visible. - x0 - Sets the shape's starting x position. See `type` and - `xsizemode` for more info. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - xanchor - Only relevant in conjunction with `xsizemode` set to - "pixel". Specifies the anchor point on the x axis to - which `x0`, `x1` and x coordinates within `path` are - relative to. E.g. useful to attach a pixel sized shape - to a certain data value. No effect when `xsizemode` not - set to "pixel". - xref - Sets the shape's x coordinate axis. If set to an x axis - id (e.g. "x" or "x2"), the `x` position refers to an x - coordinate. If set to "paper", the `x` position refers - to the distance from the left side of the plotting area - in normalized coordinates where 0 (1) corresponds to - the left (right) side. If the axis `type` is "log", - then you must take the log of your desired range. If - the axis `type` is "date", then you must convert the - date to unix time in milliseconds. - xsizemode - Sets the shapes's sizing mode along the x axis. If set - to "scaled", `x0`, `x1` and x coordinates within `path` - refer to data values on the x axis or a fraction of the - plot area's width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in terms of - data or plot fraction but `x0`, `x1` and x coordinates - within `path` are pixels relative to `xanchor`. This - way, the shape can have a fixed width while maintaining - a position relative to data or plot fraction. - y0 - Sets the shape's starting y position. See `type` and - `ysizemode` for more info. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - yanchor - Only relevant in conjunction with `ysizemode` set to - "pixel". Specifies the anchor point on the y axis to - which `y0`, `y1` and y coordinates within `path` are - relative to. E.g. useful to attach a pixel sized shape - to a certain data value. No effect when `ysizemode` not - set to "pixel". - yref - Sets the annotation's y coordinate axis. If set to an y - axis id (e.g. "y" or "y2"), the `y` position refers to - an y coordinate If set to "paper", the `y` position - refers to the distance from the bottom of the plotting - area in normalized coordinates where 0 (1) corresponds - to the bottom (top). - ysizemode - Sets the shapes's sizing mode along the y axis. If set - to "scaled", `y0`, `y1` and y coordinates within `path` - refer to data values on the y axis or a fraction of the - plot area's height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in terms of - data or plot fraction but `y0`, `y1` and y coordinates - within `path` are pixels relative to `yanchor`. This - way, the shape can have a fixed height while - maintaining a position relative to data or plot - fraction. - """ - - def __init__( - self, - arg=None, - fillcolor=None, - layer=None, - line=None, - name=None, - opacity=None, - path=None, - templateitemname=None, - type=None, - visible=None, - x0=None, - x1=None, - xanchor=None, - xref=None, - xsizemode=None, - y0=None, - y1=None, - yanchor=None, - yref=None, - ysizemode=None, - **kwargs - ): - """ - Construct a new Shape object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Shape` - fillcolor - Sets the color filling the shape's interior. - layer - Specifies whether shapes are drawn below or above - traces. - line - :class:`plotly.graph_objects.layout.shape.Line` - instance or dict with compatible properties - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the pixel - values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and taken - unmodified as pixels relative to `xanchor` and - `yanchor` in case of "pixel" size mode. There are a few - restrictions / quirks only absolute instructions, not - relative. So the allowed segments are: M, L, H, V, Q, - C, T, S, and Z arcs (A) are not allowed because radius - rx and ry are relative. In the future we could consider - supporting relative commands, but we would have to - decide on how to handle date and log axes. Note that - even as is, Q and C Bezier paths that are smooth on - linear axes may not be smooth on log, and vice versa. - no chained "polybezier" commands - specify the segment - type for each one. On category axes, values are numbers - scaled to the serial numbers of categories because - using the categories themselves there would be no way - to describe fractional positions On data axes: because - space and T are both normal components of path strings, - we can't use either to separate date from time parts. - Therefore we'll use underscore for this purpose: - 2015-02-21_13:45:56.789 - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If "line", a line - is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect - to the axes' sizing mode. If "circle", a circle is - drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with - respect to the axes' sizing mode. If "rect", a - rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), - (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to - the axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' sizing - mode. - visible - Determines whether or not this shape is visible. - x0 - Sets the shape's starting x position. See `type` and - `xsizemode` for more info. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - xanchor - Only relevant in conjunction with `xsizemode` set to - "pixel". Specifies the anchor point on the x axis to - which `x0`, `x1` and x coordinates within `path` are - relative to. E.g. useful to attach a pixel sized shape - to a certain data value. No effect when `xsizemode` not - set to "pixel". - xref - Sets the shape's x coordinate axis. If set to an x axis - id (e.g. "x" or "x2"), the `x` position refers to an x - coordinate. If set to "paper", the `x` position refers - to the distance from the left side of the plotting area - in normalized coordinates where 0 (1) corresponds to - the left (right) side. If the axis `type` is "log", - then you must take the log of your desired range. If - the axis `type` is "date", then you must convert the - date to unix time in milliseconds. - xsizemode - Sets the shapes's sizing mode along the x axis. If set - to "scaled", `x0`, `x1` and x coordinates within `path` - refer to data values on the x axis or a fraction of the - plot area's width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in terms of - data or plot fraction but `x0`, `x1` and x coordinates - within `path` are pixels relative to `xanchor`. This - way, the shape can have a fixed width while maintaining - a position relative to data or plot fraction. - y0 - Sets the shape's starting y position. See `type` and - `ysizemode` for more info. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - yanchor - Only relevant in conjunction with `ysizemode` set to - "pixel". Specifies the anchor point on the y axis to - which `y0`, `y1` and y coordinates within `path` are - relative to. E.g. useful to attach a pixel sized shape - to a certain data value. No effect when `ysizemode` not - set to "pixel". - yref - Sets the annotation's y coordinate axis. If set to an y - axis id (e.g. "y" or "y2"), the `y` position refers to - an y coordinate If set to "paper", the `y` position - refers to the distance from the bottom of the plotting - area in normalized coordinates where 0 (1) corresponds - to the bottom (top). - ysizemode - Sets the shapes's sizing mode along the y axis. If set - to "scaled", `y0`, `y1` and y coordinates within `path` - refer to data values on the y axis or a fraction of the - plot area's height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in terms of - data or plot fraction but `y0`, `y1` and y coordinates - within `path` are pixels relative to `yanchor`. This - way, the shape can have a fixed height while - maintaining a position relative to data or plot - fraction. - - Returns - ------- - Shape - """ - super(Shape, self).__init__("shapes") - - # Validate arg - # ------------ - 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.Shape -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Shape`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import shape as v_shape - - # Initialize validators - # --------------------- - self._validators["fillcolor"] = v_shape.FillcolorValidator() - self._validators["layer"] = v_shape.LayerValidator() - self._validators["line"] = v_shape.LineValidator() - self._validators["name"] = v_shape.NameValidator() - self._validators["opacity"] = v_shape.OpacityValidator() - self._validators["path"] = v_shape.PathValidator() - self._validators["templateitemname"] = v_shape.TemplateitemnameValidator() - self._validators["type"] = v_shape.TypeValidator() - self._validators["visible"] = v_shape.VisibleValidator() - self._validators["x0"] = v_shape.X0Validator() - self._validators["x1"] = v_shape.X1Validator() - self._validators["xanchor"] = v_shape.XanchorValidator() - self._validators["xref"] = v_shape.XrefValidator() - self._validators["xsizemode"] = v_shape.XsizemodeValidator() - self._validators["y0"] = v_shape.Y0Validator() - self._validators["y1"] = v_shape.Y1Validator() - self._validators["yanchor"] = v_shape.YanchorValidator() - self._validators["yref"] = v_shape.YrefValidator() - self._validators["ysizemode"] = v_shape.YsizemodeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("path", None) - self["path"] = path if path is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("x1", None) - self["x1"] = x1 if x1 is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xref", None) - self["xref"] = xref if xref is not None else _v - _v = arg.pop("xsizemode", None) - self["xsizemode"] = xsizemode if xsizemode is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("y1", None) - self["y1"] = y1 if y1 is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("yref", None) - self["yref"] = yref if yref is not None else _v - _v = arg.pop("ysizemode", None) - self["ysizemode"] = ysizemode if ysizemode is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Scene(_BaseLayoutHierarchyType): - - # annotations - # ----------- - @property - def annotations(self): - """ - The 'annotations' property is a tuple of instances of - Annotation that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.scene.Annotation - - A list or tuple of dicts of string/value properties that - will be passed to the Annotation constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head (in pixels). - ay - Sets the y component of the arrow tail about - the arrow head (in pixels). - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.scene.annot - ation.Hoverlabel` instance or dict with - compatible properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , are also - supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. - z - Sets the annotation's z position. - - Returns - ------- - tuple[plotly.graph_objs.layout.scene.Annotation] - """ - return self["annotations"] - - @annotations.setter - def annotations(self, val): - self["annotations"] = val - - # annotationdefaults - # ------------------ - @property - def annotationdefaults(self): - """ - When used in a template (as - layout.template.layout.scene.annotationdefaults), sets the - default property values to use for elements of - layout.scene.annotations - - The 'annotationdefaults' property is an instance of Annotation - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.Annotation` - - A dict of string/value properties that will be passed - to the Annotation constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.scene.Annotation - """ - return self["annotationdefaults"] - - @annotationdefaults.setter - def annotationdefaults(self, val): - self["annotationdefaults"] = val - - # aspectmode - # ---------- - @property - def aspectmode(self): - """ - If "cube", this scene's axes are drawn as a cube, regardless of - the axes' ranges. If "data", this scene's axes are drawn in - proportion with the axes' ranges. If "manual", this scene's - axes are drawn in proportion with the input of "aspectratio" - (the default behavior if "aspectratio" is provided). If "auto", - this scene's axes are drawn using the results of "data" except - when one axis is more than four times the size of the two - others, where in that case the results of "cube" are used. - - The 'aspectmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'cube', 'data', 'manual'] - - Returns - ------- - Any - """ - return self["aspectmode"] - - @aspectmode.setter - def aspectmode(self, val): - self["aspectmode"] = val - - # aspectratio - # ----------- - @property - def aspectratio(self): - """ - Sets this scene's axis aspectratio. - - The 'aspectratio' property is an instance of Aspectratio - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.Aspectratio` - - A dict of string/value properties that will be passed - to the Aspectratio constructor - - Supported dict properties: - - x - - y - - z - - Returns - ------- - plotly.graph_objs.layout.scene.Aspectratio - """ - return self["aspectratio"] - - @aspectratio.setter - def aspectratio(self, val): - self["aspectratio"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # camera - # ------ - @property - def camera(self): - """ - The 'camera' property is an instance of Camera - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.Camera` - - A dict of string/value properties that will be passed - to the Camera constructor - - Supported dict properties: - - center - Sets the (x,y,z) components of the 'center' - camera vector This vector determines the - translation (x,y,z) space about the center of - this scene. By default, there is no such - translation. - eye - Sets the (x,y,z) components of the 'eye' camera - vector. This vector determines the view point - about the origin of this scene. - projection - :class:`plotly.graph_objects.layout.scene.camer - a.Projection` instance or dict with compatible - properties - up - Sets the (x,y,z) components of the 'up' camera - vector. This vector determines the up direction - of this scene with respect to the page. The - default is *{x: 0, y: 0, z: 1}* which means - that the z axis points up. - - Returns - ------- - plotly.graph_objs.layout.scene.Camera - """ - return self["camera"] - - @camera.setter - def camera(self, val): - self["camera"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this scene subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this scene subplot . - x - Sets the horizontal domain of this scene - subplot (in plot fraction). - y - Sets the vertical domain of this scene subplot - (in plot fraction). - - Returns - ------- - plotly.graph_objs.layout.scene.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # dragmode - # -------- - @property - def dragmode(self): - """ - Determines the mode of drag interactions for this scene. - - The 'dragmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['orbit', 'turntable', 'zoom', 'pan', False] - - Returns - ------- - Any - """ - return self["dragmode"] - - @dragmode.setter - def dragmode(self, val): - self["dragmode"] = val - - # hovermode - # --------- - @property - def hovermode(self): - """ - Determines the mode of hover interactions for this scene. - - The 'hovermode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['closest', False] - - Returns - ------- - Any - """ - return self["hovermode"] - - @hovermode.setter - def hovermode(self, val): - self["hovermode"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in camera - attributes. Defaults to `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - The 'xaxis' property is an instance of XAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.XAxis` - - A dict of string/value properties that will be passed - to the XAxis constructor - - Supported dict properties: - - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.xaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.xaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.xaxis - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.scene.xaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - plotly.graph_objs.layout.scene.XAxis - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - The 'yaxis' property is an instance of YAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.YAxis` - - A dict of string/value properties that will be passed - to the YAxis constructor - - Supported dict properties: - - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.yaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.yaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.yaxis - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.scene.yaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - plotly.graph_objs.layout.scene.YAxis - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # zaxis - # ----- - @property - def zaxis(self): - """ - The 'zaxis' property is an instance of ZAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.ZAxis` - - A dict of string/value properties that will be passed - to the ZAxis constructor - - Supported dict properties: - - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.zaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.zaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.zaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.zaxis - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.scene.zaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - plotly.graph_objs.layout.scene.ZAxis - """ - return self["zaxis"] - - @zaxis.setter - def zaxis(self, val): - self["zaxis"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - annotations - A tuple of - :class:`plotly.graph_objects.layout.scene.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.scene.annotationdefaults), sets - the default property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a cube, - regardless of the axes' ranges. If "data", this scene's - axes are drawn in proportion with the axes' ranges. If - "manual", this scene's axes are drawn in proportion - with the input of "aspectratio" (the default behavior - if "aspectratio" is provided). If "auto", this scene's - axes are drawn using the results of "data" except when - one axis is more than four times the size of the two - others, where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor - - camera - :class:`plotly.graph_objects.layout.scene.Camera` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.scene.Domain` - instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for this - scene. - hovermode - Determines the mode of hover interactions for this - scene. - uirevision - Controls persistence of user-driven changes in camera - attributes. Defaults to `layout.uirevision`. - xaxis - :class:`plotly.graph_objects.layout.scene.XAxis` - instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.scene.YAxis` - instance or dict with compatible properties - zaxis - :class:`plotly.graph_objects.layout.scene.ZAxis` - instance or dict with compatible properties - """ - - def __init__( - self, - arg=None, - annotations=None, - annotationdefaults=None, - aspectmode=None, - aspectratio=None, - bgcolor=None, - camera=None, - domain=None, - dragmode=None, - hovermode=None, - uirevision=None, - xaxis=None, - yaxis=None, - zaxis=None, - **kwargs - ): - """ - Construct a new Scene object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Scene` - annotations - A tuple of - :class:`plotly.graph_objects.layout.scene.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.scene.annotationdefaults), sets - the default property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a cube, - regardless of the axes' ranges. If "data", this scene's - axes are drawn in proportion with the axes' ranges. If - "manual", this scene's axes are drawn in proportion - with the input of "aspectratio" (the default behavior - if "aspectratio" is provided). If "auto", this scene's - axes are drawn using the results of "data" except when - one axis is more than four times the size of the two - others, where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor - - camera - :class:`plotly.graph_objects.layout.scene.Camera` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.scene.Domain` - instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for this - scene. - hovermode - Determines the mode of hover interactions for this - scene. - uirevision - Controls persistence of user-driven changes in camera - attributes. Defaults to `layout.uirevision`. - xaxis - :class:`plotly.graph_objects.layout.scene.XAxis` - instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.scene.YAxis` - instance or dict with compatible properties - zaxis - :class:`plotly.graph_objects.layout.scene.ZAxis` - instance or dict with compatible properties - - Returns - ------- - Scene - """ - super(Scene, self).__init__("scene") - - # Validate arg - # ------------ - 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.Scene -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Scene`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import scene as v_scene - - # Initialize validators - # --------------------- - self._validators["annotations"] = v_scene.AnnotationsValidator() - self._validators["annotationdefaults"] = v_scene.AnnotationValidator() - self._validators["aspectmode"] = v_scene.AspectmodeValidator() - self._validators["aspectratio"] = v_scene.AspectratioValidator() - self._validators["bgcolor"] = v_scene.BgcolorValidator() - self._validators["camera"] = v_scene.CameraValidator() - self._validators["domain"] = v_scene.DomainValidator() - self._validators["dragmode"] = v_scene.DragmodeValidator() - self._validators["hovermode"] = v_scene.HovermodeValidator() - self._validators["uirevision"] = v_scene.UirevisionValidator() - self._validators["xaxis"] = v_scene.XAxisValidator() - self._validators["yaxis"] = v_scene.YAxisValidator() - self._validators["zaxis"] = v_scene.ZAxisValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("annotations", None) - self["annotations"] = annotations if annotations is not None else _v - _v = arg.pop("annotationdefaults", None) - self["annotationdefaults"] = ( - annotationdefaults if annotationdefaults is not None else _v - ) - _v = arg.pop("aspectmode", None) - self["aspectmode"] = aspectmode if aspectmode is not None else _v - _v = arg.pop("aspectratio", None) - self["aspectratio"] = aspectratio if aspectratio is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("camera", None) - self["camera"] = camera if camera is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("dragmode", None) - self["dragmode"] = dragmode if dragmode is not None else _v - _v = arg.pop("hovermode", None) - self["hovermode"] = hovermode if hovermode is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("zaxis", None) - self["zaxis"] = zaxis if zaxis is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class RadialAxis(_BaseLayoutHierarchyType): - - # domain - # ------ - @property - def domain(self): - """ - Polar chart subplots are not supported yet. This key has - currently no effect. - - The 'domain' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'domain[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'domain[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # endpadding - # ---------- - @property - def endpadding(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. - - The 'endpadding' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["endpadding"] - - @endpadding.setter - def endpadding(self, val): - self["endpadding"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the orientation (an angle with respect to the - origin) of the radial axis. - - The 'orientation' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # range - # ----- - @property - def range(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Defines the start and end point of this radial axis. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # showline - # -------- - @property - def showline(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Determines whether or not the line bounding this - radial axis will be shown on the figure. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Determines whether or not the radial axis ticks will - feature tick labels. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the color of the tick lines on this radial axis. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the length of the tick lines on this radial - axis. - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickorientation - # --------------- - @property - def tickorientation(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the orientation (from the paper perspective) of - the radial axis tick labels. - - The 'tickorientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['horizontal', 'vertical'] - - Returns - ------- - Any - """ - return self["tickorientation"] - - @tickorientation.setter - def tickorientation(self, val): - self["tickorientation"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the length of the tick lines on this radial - axis. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # visible - # ------- - @property - def visible(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Determines whether or not this axis will be visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - domain - Polar chart subplots are not supported yet. This key - has currently no effect. - endpadding - Legacy polar charts are deprecated! Please switch to - "polar" subplots. - orientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the orientation (an angle with - respect to the origin) of the radial axis. - range - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Defines the start and end point of - this radial axis. - showline - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the line - bounding this radial axis will be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the radial - axis ticks will feature tick labels. - tickcolor - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the color of the tick lines on - this radial axis. - ticklen - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this radial axis. - tickorientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the orientation (from the paper - perspective) of the radial axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this radial axis. - visible - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not this axis - will be visible. - """ - - def __init__( - self, - arg=None, - domain=None, - endpadding=None, - orientation=None, - range=None, - showline=None, - showticklabels=None, - tickcolor=None, - ticklen=None, - tickorientation=None, - ticksuffix=None, - visible=None, - **kwargs - ): - """ - Construct a new RadialAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.RadialAxis` - domain - Polar chart subplots are not supported yet. This key - has currently no effect. - endpadding - Legacy polar charts are deprecated! Please switch to - "polar" subplots. - orientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the orientation (an angle with - respect to the origin) of the radial axis. - range - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Defines the start and end point of - this radial axis. - showline - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the line - bounding this radial axis will be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the radial - axis ticks will feature tick labels. - tickcolor - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the color of the tick lines on - this radial axis. - ticklen - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this radial axis. - tickorientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the orientation (from the paper - perspective) of the radial axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this radial axis. - visible - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not this axis - will be visible. - - Returns - ------- - RadialAxis - """ - super(RadialAxis, self).__init__("radialaxis") - - # Validate arg - # ------------ - 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.RadialAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.RadialAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import radialaxis as v_radialaxis - - # Initialize validators - # --------------------- - self._validators["domain"] = v_radialaxis.DomainValidator() - self._validators["endpadding"] = v_radialaxis.EndpaddingValidator() - self._validators["orientation"] = v_radialaxis.OrientationValidator() - self._validators["range"] = v_radialaxis.RangeValidator() - self._validators["showline"] = v_radialaxis.ShowlineValidator() - self._validators["showticklabels"] = v_radialaxis.ShowticklabelsValidator() - self._validators["tickcolor"] = v_radialaxis.TickcolorValidator() - self._validators["ticklen"] = v_radialaxis.TicklenValidator() - self._validators["tickorientation"] = v_radialaxis.TickorientationValidator() - self._validators["ticksuffix"] = v_radialaxis.TicksuffixValidator() - self._validators["visible"] = v_radialaxis.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("endpadding", None) - self["endpadding"] = endpadding if endpadding is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickorientation", None) - self["tickorientation"] = tickorientation if tickorientation is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Polar(_BaseLayoutHierarchyType): - - # angularaxis - # ----------- - @property - def angularaxis(self): - """ - The 'angularaxis' property is an instance of AngularAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.AngularAxis` - - A dict of string/value properties that will be passed - to the AngularAxis constructor - - Supported dict properties: - - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - direction - Sets the direction corresponding to positive - angles. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - period - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - rotation - Sets that start position (in degrees) of the - angular axis By default, polar subplots with - `direction` set to "counterclockwise" get a - `rotation` of 0 which corresponds to due East - (like what mathematicians prefer). In turn, - polar with `direction` set to "clockwise" get a - rotation of 90 which corresponds to due North - (like on a compass), - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thetaunit - Sets the format unit of the formatted "theta" - values. Has an effect only when - `angularaxis.type` is "linear". - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.angularaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.angularaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.angularaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - type - Sets the angular axis type. If "linear", set - `thetaunit` to determine the unit in which axis - value are shown. If *category, use `period` to - set the number of integer coordinates around - polar axis. - uirevision - Controls persistence of user-driven changes in - axis `rotation`. Defaults to - `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - - Returns - ------- - plotly.graph_objs.layout.polar.AngularAxis - """ - return self["angularaxis"] - - @angularaxis.setter - def angularaxis(self, val): - self["angularaxis"] = val - - # bargap - # ------ - @property - def bargap(self): - """ - Sets the gap between bars of adjacent location coordinates. - Values are unitless, they represent fractions of the minimum - difference in bar positions in the data. - - The 'bargap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["bargap"] - - @bargap.setter - def bargap(self, val): - self["bargap"] = val - - # barmode - # ------- - @property - def barmode(self): - """ - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are stacked on - top of one another With "overlay", the bars are plotted over - one another, you might need to an "opacity" to see multiple - bars. - - The 'barmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['stack', 'overlay'] - - Returns - ------- - Any - """ - return self["barmode"] - - @barmode.setter - def barmode(self, val): - self["barmode"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Set the background color of the subplot - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this polar subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this polar subplot . - x - Sets the horizontal domain of this polar - subplot (in plot fraction). - y - Sets the vertical domain of this polar subplot - (in plot fraction). - - Returns - ------- - plotly.graph_objs.layout.polar.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # gridshape - # --------- - @property - def gridshape(self): - """ - Determines if the radial axis grid lines and angular axis line - are drawn as "circular" sectors or as "linear" (polygon) - sectors. Has an effect only when the angular axis has `type` - "category". Note that `radialaxis.angle` is snapped to the - angle of the closest vertex when `gridshape` is "circular" (so - that radial axis scale is the same as the data scale). - - The 'gridshape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['circular', 'linear'] - - Returns - ------- - Any - """ - return self["gridshape"] - - @gridshape.setter - def gridshape(self, val): - self["gridshape"] = val - - # hole - # ---- - @property - def hole(self): - """ - Sets the fraction of the radius to cut out of the polar - subplot. - - The 'hole' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["hole"] - - @hole.setter - def hole(self, val): - self["hole"] = val - - # radialaxis - # ---------- - @property - def radialaxis(self): - """ - The 'radialaxis' property is an instance of RadialAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.RadialAxis` - - A dict of string/value properties that will be passed - to the RadialAxis constructor - - Supported dict properties: - - angle - Sets the angle (in degrees) from which the - radial axis is drawn. Note that by default, - radial axis line on the theta=0 line - corresponds to a line pointing right (like what - mathematicians prefer). Defaults to the first - `polar.sector` angle. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", - the range is non-negative, regardless of the - input data. If "normal", the range is computed - in relation to the extrema of the input data - (same behavior as for cartesian axes). - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of radial axis line - the tick and tick labels appear. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.radialaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.radialaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.radialaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.polar.radia - laxis.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.polar.radialaxis.title.font instead. - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, `angle`, and `title` - if in `editable: true` configuration. Defaults - to `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - - Returns - ------- - plotly.graph_objs.layout.polar.RadialAxis - """ - return self["radialaxis"] - - @radialaxis.setter - def radialaxis(self, val): - self["radialaxis"] = val - - # sector - # ------ - @property - def sector(self): - """ - Sets angular span of this polar subplot with two angles (in - degrees). Sector are assumed to be spanned in the - counterclockwise direction with 0 corresponding to rightmost - limit of the polar subplot. - - The 'sector' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'sector[0]' property is a number and may be specified as: - - An int or float - (1) The 'sector[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["sector"] - - @sector.setter - def sector(self, val): - self["sector"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis attributes, - if not overridden in the individual axes. Defaults to - `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - angularaxis - :class:`plotly.graph_objects.layout.polar.AngularAxis` - instance or dict with compatible properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they represent - fractions of the minimum difference in bar positions in - the data. - barmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "overlay", the bars - are plotted over one another, you might need to an - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.polar.Domain` - instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and angular - axis line are drawn as "circular" sectors or as - "linear" (polygon) sectors. Has an effect only when the - angular axis has `type` "category". Note that - `radialaxis.angle` is snapped to the angle of the - closest vertex when `gridshape` is "circular" (so that - radial axis scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of the polar - subplot. - radialaxis - :class:`plotly.graph_objects.layout.polar.RadialAxis` - instance or dict with compatible properties - sector - Sets angular span of this polar subplot with two angles - (in degrees). Sector are assumed to be spanned in the - counterclockwise direction with 0 corresponding to - rightmost limit of the polar subplot. - uirevision - Controls persistence of user-driven changes in axis - attributes, if not overridden in the individual axes. - Defaults to `layout.uirevision`. - """ - - def __init__( - self, - arg=None, - angularaxis=None, - bargap=None, - barmode=None, - bgcolor=None, - domain=None, - gridshape=None, - hole=None, - radialaxis=None, - sector=None, - uirevision=None, - **kwargs - ): - """ - Construct a new Polar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Polar` - angularaxis - :class:`plotly.graph_objects.layout.polar.AngularAxis` - instance or dict with compatible properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they represent - fractions of the minimum difference in bar positions in - the data. - barmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "overlay", the bars - are plotted over one another, you might need to an - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.polar.Domain` - instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and angular - axis line are drawn as "circular" sectors or as - "linear" (polygon) sectors. Has an effect only when the - angular axis has `type` "category". Note that - `radialaxis.angle` is snapped to the angle of the - closest vertex when `gridshape` is "circular" (so that - radial axis scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of the polar - subplot. - radialaxis - :class:`plotly.graph_objects.layout.polar.RadialAxis` - instance or dict with compatible properties - sector - Sets angular span of this polar subplot with two angles - (in degrees). Sector are assumed to be spanned in the - counterclockwise direction with 0 corresponding to - rightmost limit of the polar subplot. - uirevision - Controls persistence of user-driven changes in axis - attributes, if not overridden in the individual axes. - Defaults to `layout.uirevision`. - - Returns - ------- - Polar - """ - super(Polar, self).__init__("polar") - - # Validate arg - # ------------ - 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.Polar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Polar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import polar as v_polar - - # Initialize validators - # --------------------- - self._validators["angularaxis"] = v_polar.AngularAxisValidator() - self._validators["bargap"] = v_polar.BargapValidator() - self._validators["barmode"] = v_polar.BarmodeValidator() - self._validators["bgcolor"] = v_polar.BgcolorValidator() - self._validators["domain"] = v_polar.DomainValidator() - self._validators["gridshape"] = v_polar.GridshapeValidator() - self._validators["hole"] = v_polar.HoleValidator() - self._validators["radialaxis"] = v_polar.RadialAxisValidator() - self._validators["sector"] = v_polar.SectorValidator() - self._validators["uirevision"] = v_polar.UirevisionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angularaxis", None) - self["angularaxis"] = angularaxis if angularaxis is not None else _v - _v = arg.pop("bargap", None) - self["bargap"] = bargap if bargap is not None else _v - _v = arg.pop("barmode", None) - self["barmode"] = barmode if barmode is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("gridshape", None) - self["gridshape"] = gridshape if gridshape is not None else _v - _v = arg.pop("hole", None) - self["hole"] = hole if hole is not None else _v - _v = arg.pop("radialaxis", None) - self["radialaxis"] = radialaxis if radialaxis is not None else _v - _v = arg.pop("sector", None) - self["sector"] = sector if sector is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Modebar(_BaseLayoutHierarchyType): - - # activecolor - # ----------- - @property - def activecolor(self): - """ - Sets the color of the active or hovered on icons in the - modebar. - - The 'activecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["activecolor"] - - @activecolor.setter - def activecolor(self, val): - self["activecolor"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the modebar. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the color of the icons in the modebar. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the modebar. - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes related to the - modebar, including `hovermode`, `dragmode`, and `showspikes` at - both the root level and inside subplots. Defaults to - `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - activecolor - Sets the color of the active or hovered on icons in the - modebar. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - uirevision - Controls persistence of user-driven changes related to - the modebar, including `hovermode`, `dragmode`, and - `showspikes` at both the root level and inside - subplots. Defaults to `layout.uirevision`. - """ - - def __init__( - self, - arg=None, - activecolor=None, - bgcolor=None, - color=None, - orientation=None, - uirevision=None, - **kwargs - ): - """ - Construct a new Modebar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Modebar` - activecolor - Sets the color of the active or hovered on icons in the - modebar. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - uirevision - Controls persistence of user-driven changes related to - the modebar, including `hovermode`, `dragmode`, and - `showspikes` at both the root level and inside - subplots. Defaults to `layout.uirevision`. - - Returns - ------- - Modebar - """ - super(Modebar, self).__init__("modebar") - - # Validate arg - # ------------ - 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.Modebar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Modebar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import modebar as v_modebar - - # Initialize validators - # --------------------- - self._validators["activecolor"] = v_modebar.ActivecolorValidator() - self._validators["bgcolor"] = v_modebar.BgcolorValidator() - self._validators["color"] = v_modebar.ColorValidator() - self._validators["orientation"] = v_modebar.OrientationValidator() - self._validators["uirevision"] = v_modebar.UirevisionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("activecolor", None) - self["activecolor"] = activecolor if activecolor is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Margin(_BaseLayoutHierarchyType): - - # autoexpand - # ---------- - @property - def autoexpand(self): - """ - Turns on/off margin expansion computations. Legends, colorbars, - updatemenus, sliders, axis rangeselector and rangeslider are - allowed to push the margins by defaults. - - The 'autoexpand' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autoexpand"] - - @autoexpand.setter - def autoexpand(self, val): - self["autoexpand"] = val - - # b - # - - @property - def b(self): - """ - Sets the bottom margin (in px). - - The 'b' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # l - # - - @property - def l(self): - """ - Sets the left margin (in px). - - The 'l' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["l"] - - @l.setter - def l(self, val): - self["l"] = val - - # pad - # --- - @property - def pad(self): - """ - Sets the amount of padding (in px) between the plotting area - and the axis lines - - The 'pad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # r - # - - @property - def r(self): - """ - Sets the right margin (in px). - - The 'r' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # t - # - - @property - def t(self): - """ - Sets the top margin (in px). - - The 't' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autoexpand - Turns on/off margin expansion computations. Legends, - colorbars, updatemenus, sliders, axis rangeselector and - rangeslider are allowed to push the margins by - defaults. - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the plotting - area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). - """ - - def __init__( - self, - arg=None, - autoexpand=None, - b=None, - l=None, - pad=None, - r=None, - t=None, - **kwargs - ): - """ - Construct a new Margin object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Margin` - autoexpand - Turns on/off margin expansion computations. Legends, - colorbars, updatemenus, sliders, axis rangeselector and - rangeslider are allowed to push the margins by - defaults. - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the plotting - area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). - - Returns - ------- - Margin - """ - super(Margin, self).__init__("margin") - - # Validate arg - # ------------ - 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.Margin -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Margin`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import margin as v_margin - - # Initialize validators - # --------------------- - self._validators["autoexpand"] = v_margin.AutoexpandValidator() - self._validators["b"] = v_margin.BValidator() - self._validators["l"] = v_margin.LValidator() - self._validators["pad"] = v_margin.PadValidator() - self._validators["r"] = v_margin.RValidator() - self._validators["t"] = v_margin.TValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autoexpand", None) - self["autoexpand"] = autoexpand if autoexpand is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("l", None) - self["l"] = l if l is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Mapbox(_BaseLayoutHierarchyType): - - # accesstoken - # ----------- - @property - def accesstoken(self): - """ - Sets the mapbox access token to be used for this mapbox map. - Alternatively, the mapbox access token can be set in the - configuration options under `mapboxAccessToken`. Note that - accessToken are only required when `style` (e.g with values : - basic, streets, outdoors, light, dark, satellite, satellite- - streets ) and/or a layout layer references the Mapbox server. - - The 'accesstoken' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["accesstoken"] - - @accesstoken.setter - def accesstoken(self, val): - self["accesstoken"] = val - - # bearing - # ------- - @property - def bearing(self): - """ - Sets the bearing angle of the map in degrees counter-clockwise - from North (mapbox.bearing). - - The 'bearing' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["bearing"] - - @bearing.setter - def bearing(self, val): - self["bearing"] = val - - # center - # ------ - @property - def center(self): - """ - The 'center' property is an instance of Center - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.Center` - - A dict of string/value properties that will be passed - to the Center constructor - - Supported dict properties: - - lat - Sets the latitude of the center of the map (in - degrees North). - lon - Sets the longitude of the center of the map (in - degrees East). - - Returns - ------- - plotly.graph_objs.layout.mapbox.Center - """ - return self["center"] - - @center.setter - def center(self, val): - self["center"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this mapbox subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this mapbox subplot . - x - Sets the horizontal domain of this mapbox - subplot (in plot fraction). - y - Sets the vertical domain of this mapbox subplot - (in plot fraction). - - Returns - ------- - plotly.graph_objs.layout.mapbox.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # layers - # ------ - @property - def layers(self): - """ - The 'layers' property is a tuple of instances of - Layer that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.mapbox.Layer - - A list or tuple of dicts of string/value properties that - will be passed to the Layer constructor - - Supported dict properties: - - below - Determines if the layer will be inserted before - the layer with the specified ID. If omitted or - set to '', the layer will be inserted above - every existing layer. - circle - :class:`plotly.graph_objects.layout.mapbox.laye - r.Circle` instance or dict with compatible - properties - color - Sets the primary layer color. If `type` is - "circle", color corresponds to the circle color - (mapbox.layer.paint.circle-color) If `type` is - "line", color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is - "fill", color corresponds to the fill color - (mapbox.layer.paint.fill-color) If `type` is - "symbol", color corresponds to the icon color - (mapbox.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom - right, bottom left. Only has an effect for - "image" `sourcetype`. - fill - :class:`plotly.graph_objects.layout.mapbox.laye - r.Fill` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.layout.mapbox.laye - r.Line` instance or dict with compatible - properties - maxzoom - Sets the maximum zoom level - (mapbox.layer.maxzoom). At zoom levels equal to - or greater than the maxzoom, the layer will be - hidden. - minzoom - Sets the minimum zoom level - (mapbox.layer.minzoom). At zoom levels less - than the minzoom, the layer will be hidden. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the layer. If `type` is - "circle", opacity corresponds to the circle - opacity (mapbox.layer.paint.circle-opacity) If - `type` is "line", opacity corresponds to the - line opacity (mapbox.layer.paint.line-opacity) - If `type` is "fill", opacity corresponds to the - fill opacity (mapbox.layer.paint.fill-opacity) - If `type` is "symbol", opacity corresponds to - the icon/text opacity (mapbox.layer.paint.text- - opacity) - source - Sets the source data for this layer - (mapbox.layer.source). When `sourcetype` is set - to "geojson", `source` can be a URL to a - GeoJSON or a GeoJSON object. When `sourcetype` - is set to "vector" or "raster", `source` can be - a URL or an array of tile URLs. When - `sourcetype` is set to "image", `source` can be - a URL to an image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile - source (mapbox.layer.source-layer). Required - for "vector" source type that supports multiple - layers. - sourcetype - Sets the source type for this layer, that is - the type of the layer data. - symbol - :class:`plotly.graph_objects.layout.mapbox.laye - r.Symbol` instance or dict with compatible - properties - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer - data set in `source` will be rendered With - `sourcetype` set to "geojson", the following - values are allowed: "circle", "line", "fill" - and "symbol". but note that "line" and "fill" - are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", - the following values are allowed: "circle", - "line", "fill" and "symbol". With `sourcetype` - set to "raster" or `*image*`, only the "raster" - value is allowed. - visible - Determines whether this layer is displayed - - Returns - ------- - tuple[plotly.graph_objs.layout.mapbox.Layer] - """ - return self["layers"] - - @layers.setter - def layers(self, val): - self["layers"] = val - - # layerdefaults - # ------------- - @property - def layerdefaults(self): - """ - When used in a template (as - layout.template.layout.mapbox.layerdefaults), sets the default - property values to use for elements of layout.mapbox.layers - - The 'layerdefaults' property is an instance of Layer - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.Layer` - - A dict of string/value properties that will be passed - to the Layer constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.mapbox.Layer - """ - return self["layerdefaults"] - - @layerdefaults.setter - def layerdefaults(self, val): - self["layerdefaults"] = val - - # pitch - # ----- - @property - def pitch(self): - """ - Sets the pitch angle of the map (in degrees, where 0 means - perpendicular to the surface of the map) (mapbox.pitch). - - The 'pitch' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["pitch"] - - @pitch.setter - def pitch(self, val): - self["pitch"] = val - - # style - # ----- - @property - def style(self): - """ - Defines the map layers that are rendered by default below the - trace layers defined in `data`, which are themselves by default - rendered below the layers defined in `layout.mapbox.layers`. - These layers can be defined either explicitly as a Mapbox Style - object which can contain multiple layer definitions that load - data from any public or private Tile Map Service (TMS or XYZ) - or Web Map Service (WMS) or implicitly by using one of the - built-in style objects which use WMSes which do not require any - access tokens, or by using a default Mapbox style or custom - Mapbox style URL, both of which require a Mapbox access token - Note that Mapbox access token can be set in the `accesstoken` - attribute or in the `mapboxAccessToken` config option. Mapbox - Style objects are of the form described in the Mapbox GL JS - documentation available at https://docs.mapbox.com/mapbox-gl- - js/style-spec The built-in plotly.js styles objects are: open- - street-map, white-bg, carto-positron, carto-darkmatter, stamen- - terrain, stamen-toner, stamen-watercolor The built-in Mapbox - styles are: basic, streets, outdoors, light, dark, satellite, - satellite-streets Mapbox style URLs are of the form: - mapbox://mapbox.mapbox-- - - The 'style' property accepts values of any type - - Returns - ------- - Any - """ - return self["style"] - - @style.setter - def style(self, val): - self["style"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in the view: - `center`, `zoom`, `bearing`, `pitch`. Defaults to - `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # zoom - # ---- - @property - def zoom(self): - """ - Sets the zoom level of the map (mapbox.zoom). - - The 'zoom' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zoom"] - - @zoom.setter - def zoom(self, val): - self["zoom"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - accesstoken - Sets the mapbox access token to be used for this mapbox - map. Alternatively, the mapbox access token can be set - in the configuration options under `mapboxAccessToken`. - Note that accessToken are only required when `style` - (e.g with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a layout - layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees counter- - clockwise from North (mapbox.bearing). - center - :class:`plotly.graph_objects.layout.mapbox.Center` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.mapbox.Domain` - instance or dict with compatible properties - layers - A tuple of - :class:`plotly.graph_objects.layout.mapbox.Layer` - instances or dicts with compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), sets the - default property values to use for elements of - layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, where 0 - means perpendicular to the surface of the map) - (mapbox.pitch). - style - Defines the map layers that are rendered by default - below the trace layers defined in `data`, which are - themselves by default rendered below the layers defined - in `layout.mapbox.layers`. These layers can be defined - either explicitly as a Mapbox Style object which can - contain multiple layer definitions that load data from - any public or private Tile Map Service (TMS or XYZ) or - Web Map Service (WMS) or implicitly by using one of the - built-in style objects which use WMSes which do not - require any access tokens, or by using a default Mapbox - style or custom Mapbox style URL, both of which require - a Mapbox access token Note that Mapbox access token - can be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox Style - objects are of the form described in the Mapbox GL JS - documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec The - built-in plotly.js styles objects are: open-street-map, - white-bg, carto-positron, carto-darkmatter, stamen- - terrain, stamen-toner, stamen-watercolor The built-in - Mapbox styles are: basic, streets, outdoors, light, - dark, satellite, satellite-streets Mapbox style URLs - are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in the - view: `center`, `zoom`, `bearing`, `pitch`. Defaults to - `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). - """ - - def __init__( - self, - arg=None, - accesstoken=None, - bearing=None, - center=None, - domain=None, - layers=None, - layerdefaults=None, - pitch=None, - style=None, - uirevision=None, - zoom=None, - **kwargs - ): - """ - Construct a new Mapbox object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Mapbox` - accesstoken - Sets the mapbox access token to be used for this mapbox - map. Alternatively, the mapbox access token can be set - in the configuration options under `mapboxAccessToken`. - Note that accessToken are only required when `style` - (e.g with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a layout - layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees counter- - clockwise from North (mapbox.bearing). - center - :class:`plotly.graph_objects.layout.mapbox.Center` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.mapbox.Domain` - instance or dict with compatible properties - layers - A tuple of - :class:`plotly.graph_objects.layout.mapbox.Layer` - instances or dicts with compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), sets the - default property values to use for elements of - layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, where 0 - means perpendicular to the surface of the map) - (mapbox.pitch). - style - Defines the map layers that are rendered by default - below the trace layers defined in `data`, which are - themselves by default rendered below the layers defined - in `layout.mapbox.layers`. These layers can be defined - either explicitly as a Mapbox Style object which can - contain multiple layer definitions that load data from - any public or private Tile Map Service (TMS or XYZ) or - Web Map Service (WMS) or implicitly by using one of the - built-in style objects which use WMSes which do not - require any access tokens, or by using a default Mapbox - style or custom Mapbox style URL, both of which require - a Mapbox access token Note that Mapbox access token - can be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox Style - objects are of the form described in the Mapbox GL JS - documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec The - built-in plotly.js styles objects are: open-street-map, - white-bg, carto-positron, carto-darkmatter, stamen- - terrain, stamen-toner, stamen-watercolor The built-in - Mapbox styles are: basic, streets, outdoors, light, - dark, satellite, satellite-streets Mapbox style URLs - are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in the - view: `center`, `zoom`, `bearing`, `pitch`. Defaults to - `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). - - Returns - ------- - Mapbox - """ - super(Mapbox, self).__init__("mapbox") - - # Validate arg - # ------------ - 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 -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Mapbox`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import mapbox as v_mapbox - - # Initialize validators - # --------------------- - self._validators["accesstoken"] = v_mapbox.AccesstokenValidator() - self._validators["bearing"] = v_mapbox.BearingValidator() - self._validators["center"] = v_mapbox.CenterValidator() - self._validators["domain"] = v_mapbox.DomainValidator() - self._validators["layers"] = v_mapbox.LayersValidator() - self._validators["layerdefaults"] = v_mapbox.LayerValidator() - self._validators["pitch"] = v_mapbox.PitchValidator() - self._validators["style"] = v_mapbox.StyleValidator() - self._validators["uirevision"] = v_mapbox.UirevisionValidator() - self._validators["zoom"] = v_mapbox.ZoomValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("accesstoken", None) - self["accesstoken"] = accesstoken if accesstoken is not None else _v - _v = arg.pop("bearing", None) - self["bearing"] = bearing if bearing is not None else _v - _v = arg.pop("center", None) - self["center"] = center if center is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("layers", None) - self["layers"] = layers if layers is not None else _v - _v = arg.pop("layerdefaults", None) - self["layerdefaults"] = layerdefaults if layerdefaults is not None else _v - _v = arg.pop("pitch", None) - self["pitch"] = pitch if pitch is not None else _v - _v = arg.pop("style", None) - self["style"] = style if style is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("zoom", None) - self["zoom"] = zoom if zoom is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Legend(_BaseLayoutHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the legend. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the legend. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used to text the legend items. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.legend.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.legend.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # itemclick - # --------- - @property - def itemclick(self): - """ - Determines the behavior on legend item click. "toggle" toggles - the visibility of the item clicked on the graph. "toggleothers" - makes the clicked item the sole visible item on the graph. - False disable legend item click interactions. - - The 'itemclick' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['toggle', 'toggleothers', False] - - Returns - ------- - Any - """ - return self["itemclick"] - - @itemclick.setter - def itemclick(self, val): - self["itemclick"] = val - - # itemdoubleclick - # --------------- - @property - def itemdoubleclick(self): - """ - Determines the behavior on legend item double-click. "toggle" - toggles the visibility of the item clicked on the graph. - "toggleothers" makes the clicked item the sole visible item on - the graph. False disable legend item double-click interactions. - - The 'itemdoubleclick' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['toggle', 'toggleothers', False] - - Returns - ------- - Any - """ - return self["itemdoubleclick"] - - @itemdoubleclick.setter - def itemdoubleclick(self, val): - self["itemdoubleclick"] = val - - # itemsizing - # ---------- - @property - def itemsizing(self): - """ - Determines if the legend items symbols scale with their - corresponding "trace" attributes or remain "constant" - independent of the symbol size on the graph. - - The 'itemsizing' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'constant'] - - Returns - ------- - Any - """ - return self["itemsizing"] - - @itemsizing.setter - def itemsizing(self, val): - self["itemsizing"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the legend. - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.legend.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this legend's title font. - side - Determines the location of legend's title with - respect to the legend items. Defaulted to "top" - with `orientation` is "h". Defaulted to "left" - with `orientation` is "v". The *top left* - options could be used to expand legend area in - both x and y sides. - text - Sets the title of the legend. - - Returns - ------- - plotly.graph_objs.layout.legend.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # tracegroupgap - # ------------- - @property - def tracegroupgap(self): - """ - Sets the amount of vertical space (in px) between legend - groups. - - The 'tracegroupgap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tracegroupgap"] - - @tracegroupgap.setter - def tracegroupgap(self, val): - self["tracegroupgap"] = val - - # traceorder - # ---------- - @property - def traceorder(self): - """ - Determines the order at which the legend items are displayed. - If "normal", the items are displayed top-to-bottom in the same - order as the input data. If "reversed", the items are displayed - in the opposite order as "normal". If "grouped", the items are - displayed in groups (when a trace `legendgroup` is provided). - if "grouped+reversed", the items are displayed in the opposite - order as "grouped". - - The 'traceorder' property is a flaglist and may be specified - as a string containing: - - Any combination of ['reversed', 'grouped'] joined with '+' characters - (e.g. 'reversed+grouped') - OR exactly one of ['normal'] (e.g. 'normal') - - Returns - ------- - Any - """ - return self["traceorder"] - - @traceorder.setter - def traceorder(self, val): - self["traceorder"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of legend-driven changes in trace and pie - label visibility. Defaults to `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # valign - # ------ - @property - def valign(self): - """ - Sets the vertical alignment of the symbols with respect to - their associated text. - - The 'valign' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["valign"] - - @valign.setter - def valign(self, val): - self["valign"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position (in normalized coordinates) of the legend. - Defaults to 1.02 for vertical legends and defaults to 0 for - horizontal legends. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the legend's horizontal position anchor. This anchor binds - the `x` position to the "left", "center" or "right" of the - legend. Value "auto" anchors legends to the right for `x` - values greater than or equal to 2/3, anchors legends to the - left for `x` values less than or equal to 1/3 and anchors - legends with respect to their center otherwise. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position (in normalized coordinates) of the legend. - Defaults to 1 for vertical legends, defaults to "-0.1" for - horizontal legends on graphs w/o range sliders and defaults to - 1.1 for horizontal legends on graph with one or multiple range - sliders. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the legend's vertical position anchor This anchor binds - the `y` position to the "top", "middle" or "bottom" of the - legend. Value "auto" anchors legends at their bottom for `y` - values less than or equal to 1/3, anchors legends to at their - top for `y` values greater than or equal to 2/3 and anchors - legends with respect to their middle otherwise. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - bordercolor - Sets the color of the border enclosing the legend. - borderwidth - Sets the width (in px) of the border enclosing the - legend. - font - Sets the font used to text the legend items. - itemclick - Determines the behavior on legend item click. "toggle" - toggles the visibility of the item clicked on the - graph. "toggleothers" makes the clicked item the sole - visible item on the graph. False disable legend item - click interactions. - itemdoubleclick - Determines the behavior on legend item double-click. - "toggle" toggles the visibility of the item clicked on - the graph. "toggleothers" makes the clicked item the - sole visible item on the graph. False disable legend - item double-click interactions. - itemsizing - Determines if the legend items symbols scale with their - corresponding "trace" attributes or remain "constant" - independent of the symbol size on the graph. - orientation - Sets the orientation of the legend. - title - :class:`plotly.graph_objects.layout.legend.Title` - instance or dict with compatible properties - tracegroupgap - Sets the amount of vertical space (in px) between - legend groups. - traceorder - Determines the order at which the legend items are - displayed. If "normal", the items are displayed top-to- - bottom in the same order as the input data. If - "reversed", the items are displayed in the opposite - order as "normal". If "grouped", the items are - displayed in groups (when a trace `legendgroup` is - provided). if "grouped+reversed", the items are - displayed in the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes in trace - and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with respect - to their associated text. - x - Sets the x position (in normalized coordinates) of the - legend. Defaults to 1.02 for vertical legends and - defaults to 0 for horizontal legends. - xanchor - Sets the legend's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the legend. Value "auto" anchors legends - to the right for `x` values greater than or equal to - 2/3, anchors legends to the left for `x` values less - than or equal to 1/3 and anchors legends with respect - to their center otherwise. - y - Sets the y position (in normalized coordinates) of the - legend. Defaults to 1 for vertical legends, defaults to - "-0.1" for horizontal legends on graphs w/o range - sliders and defaults to 1.1 for horizontal legends on - graph with one or multiple range sliders. - yanchor - Sets the legend's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or - "bottom" of the legend. Value "auto" anchors legends at - their bottom for `y` values less than or equal to 1/3, - anchors legends to at their top for `y` values greater - than or equal to 2/3 and anchors legends with respect - to their middle otherwise. - """ - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - font=None, - itemclick=None, - itemdoubleclick=None, - itemsizing=None, - orientation=None, - title=None, - tracegroupgap=None, - traceorder=None, - uirevision=None, - valign=None, - x=None, - xanchor=None, - y=None, - yanchor=None, - **kwargs - ): - """ - Construct a new Legend object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Legend` - bgcolor - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - bordercolor - Sets the color of the border enclosing the legend. - borderwidth - Sets the width (in px) of the border enclosing the - legend. - font - Sets the font used to text the legend items. - itemclick - Determines the behavior on legend item click. "toggle" - toggles the visibility of the item clicked on the - graph. "toggleothers" makes the clicked item the sole - visible item on the graph. False disable legend item - click interactions. - itemdoubleclick - Determines the behavior on legend item double-click. - "toggle" toggles the visibility of the item clicked on - the graph. "toggleothers" makes the clicked item the - sole visible item on the graph. False disable legend - item double-click interactions. - itemsizing - Determines if the legend items symbols scale with their - corresponding "trace" attributes or remain "constant" - independent of the symbol size on the graph. - orientation - Sets the orientation of the legend. - title - :class:`plotly.graph_objects.layout.legend.Title` - instance or dict with compatible properties - tracegroupgap - Sets the amount of vertical space (in px) between - legend groups. - traceorder - Determines the order at which the legend items are - displayed. If "normal", the items are displayed top-to- - bottom in the same order as the input data. If - "reversed", the items are displayed in the opposite - order as "normal". If "grouped", the items are - displayed in groups (when a trace `legendgroup` is - provided). if "grouped+reversed", the items are - displayed in the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes in trace - and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with respect - to their associated text. - x - Sets the x position (in normalized coordinates) of the - legend. Defaults to 1.02 for vertical legends and - defaults to 0 for horizontal legends. - xanchor - Sets the legend's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the legend. Value "auto" anchors legends - to the right for `x` values greater than or equal to - 2/3, anchors legends to the left for `x` values less - than or equal to 1/3 and anchors legends with respect - to their center otherwise. - y - Sets the y position (in normalized coordinates) of the - legend. Defaults to 1 for vertical legends, defaults to - "-0.1" for horizontal legends on graphs w/o range - sliders and defaults to 1.1 for horizontal legends on - graph with one or multiple range sliders. - yanchor - Sets the legend's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or - "bottom" of the legend. Value "auto" anchors legends at - their bottom for `y` values less than or equal to 1/3, - anchors legends to at their top for `y` values greater - than or equal to 2/3 and anchors legends with respect - to their middle otherwise. - - Returns - ------- - Legend - """ - super(Legend, self).__init__("legend") - - # Validate arg - # ------------ - 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.Legend -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Legend`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import legend as v_legend - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_legend.BgcolorValidator() - self._validators["bordercolor"] = v_legend.BordercolorValidator() - self._validators["borderwidth"] = v_legend.BorderwidthValidator() - self._validators["font"] = v_legend.FontValidator() - self._validators["itemclick"] = v_legend.ItemclickValidator() - self._validators["itemdoubleclick"] = v_legend.ItemdoubleclickValidator() - self._validators["itemsizing"] = v_legend.ItemsizingValidator() - self._validators["orientation"] = v_legend.OrientationValidator() - self._validators["title"] = v_legend.TitleValidator() - self._validators["tracegroupgap"] = v_legend.TracegroupgapValidator() - self._validators["traceorder"] = v_legend.TraceorderValidator() - self._validators["uirevision"] = v_legend.UirevisionValidator() - self._validators["valign"] = v_legend.ValignValidator() - self._validators["x"] = v_legend.XValidator() - self._validators["xanchor"] = v_legend.XanchorValidator() - self._validators["y"] = v_legend.YValidator() - self._validators["yanchor"] = v_legend.YanchorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("itemclick", None) - self["itemclick"] = itemclick if itemclick is not None else _v - _v = arg.pop("itemdoubleclick", None) - self["itemdoubleclick"] = itemdoubleclick if itemdoubleclick is not None else _v - _v = arg.pop("itemsizing", None) - self["itemsizing"] = itemsizing if itemsizing is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("tracegroupgap", None) - self["tracegroupgap"] = tracegroupgap if tracegroupgap is not None else _v - _v = arg.pop("traceorder", None) - self["traceorder"] = traceorder if traceorder is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("valign", None) - self["valign"] = valign if valign is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Image(_BaseLayoutHierarchyType): - - # layer - # ----- - @property - def layer(self): - """ - Specifies whether images are drawn below or above traces. When - `xref` and `yref` are both set to `paper`, image is drawn below - the entire plot area. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['below', 'above'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the image. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # sizex - # ----- - @property - def sizex(self): - """ - Sets the image container size horizontally. The image will be - sized based on the `position` value. When `xref` is set to - `paper`, units are sized relative to the plot width. - - The 'sizex' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizex"] - - @sizex.setter - def sizex(self, val): - self["sizex"] = val - - # sizey - # ----- - @property - def sizey(self): - """ - Sets the image container size vertically. The image will be - sized based on the `position` value. When `yref` is set to - `paper`, units are sized relative to the plot height. - - The 'sizey' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizey"] - - @sizey.setter - def sizey(self, val): - self["sizey"] = val - - # sizing - # ------ - @property - def sizing(self): - """ - Specifies which dimension of the image to constrain. - - The 'sizing' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fill', 'contain', 'stretch'] - - Returns - ------- - Any - """ - return self["sizing"] - - @sizing.setter - def sizing(self, val): - self["sizing"] = val - - # source - # ------ - @property - def source(self): - """ - Specifies the URL of the image to be used. The URL must be - accessible from the domain where the plot code is run, and can - be either relative or absolute. - - The 'source' property is an image URI that may be specified as: - - A remote image URI string - (e.g. 'http://www.somewhere.com/image.png') - - A data URI image string - (e.g. 'data:image/png;base64,iVBORw0KGgoAAAANSU') - - A PIL.Image.Image object which will be immediately converted - to a data URI image string - See http://pillow.readthedocs.io/en/latest/reference/Image.html - - Returns - ------- - str - """ - return self["source"] - - @source.setter - def source(self, val): - self["source"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this image is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the image's x position. When `xref` is set to `paper`, - units are sized relative to the plot height. See `xref` for - more info - - The 'x' property accepts values of any type - - Returns - ------- - Any - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the anchor for the x position - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xref - # ---- - @property - def xref(self): - """ - Sets the images's x coordinate axis. If set to a x axis id - (e.g. "x" or "x2"), the `x` position refers to an x data - coordinate If set to "paper", the `x` position refers to the - distance from the left of plot in normalized coordinates where - 0 (1) corresponds to the left (right). - - The 'xref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['paper'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["xref"] - - @xref.setter - def xref(self, val): - self["xref"] = val - - # y - # - - @property - def y(self): - """ - Sets the image's y position. When `yref` is set to `paper`, - units are sized relative to the plot height. See `yref` for - more info - - The 'y' property accepts values of any type - - Returns - ------- - Any - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the anchor for the y position. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # yref - # ---- - @property - def yref(self): - """ - Sets the images's y coordinate axis. If set to a y axis id - (e.g. "y" or "y2"), the `y` position refers to a y data - coordinate. If set to "paper", the `y` position refers to the - distance from the bottom of the plot in normalized coordinates - where 0 (1) corresponds to the bottom (top). - - The 'yref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['paper'] - - A string that matches one of the following regular expressions: - ['^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["yref"] - - @yref.setter - def yref(self, val): - self["yref"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - layer - Specifies whether images are drawn below or above - traces. When `xref` and `yref` are both set to `paper`, - image is drawn below the entire plot area. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The image - will be sized based on the `position` value. When - `xref` is set to `paper`, units are sized relative to - the plot width. - sizey - Sets the image container size vertically. The image - will be sized based on the `position` value. When - `yref` is set to `paper`, units are sized relative to - the plot height. - sizing - Specifies which dimension of the image to constrain. - source - Specifies the URL of the image to be used. The URL must - be accessible from the domain where the plot code is - run, and can be either relative or absolute. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - visible - Determines whether or not this image is visible. - x - Sets the image's x position. When `xref` is set to - `paper`, units are sized relative to the plot height. - See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to a x axis - id (e.g. "x" or "x2"), the `x` position refers to an x - data coordinate If set to "paper", the `x` position - refers to the distance from the left of plot in - normalized coordinates where 0 (1) corresponds to the - left (right). - y - Sets the image's y position. When `yref` is set to - `paper`, units are sized relative to the plot height. - See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to a y axis - id (e.g. "y" or "y2"), the `y` position refers to a y - data coordinate. If set to "paper", the `y` position - refers to the distance from the bottom of the plot in - normalized coordinates where 0 (1) corresponds to the - bottom (top). - """ - - def __init__( - self, - arg=None, - layer=None, - name=None, - opacity=None, - sizex=None, - sizey=None, - sizing=None, - source=None, - templateitemname=None, - visible=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, - **kwargs - ): - """ - Construct a new Image object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Image` - layer - Specifies whether images are drawn below or above - traces. When `xref` and `yref` are both set to `paper`, - image is drawn below the entire plot area. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The image - will be sized based on the `position` value. When - `xref` is set to `paper`, units are sized relative to - the plot width. - sizey - Sets the image container size vertically. The image - will be sized based on the `position` value. When - `yref` is set to `paper`, units are sized relative to - the plot height. - sizing - Specifies which dimension of the image to constrain. - source - Specifies the URL of the image to be used. The URL must - be accessible from the domain where the plot code is - run, and can be either relative or absolute. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - visible - Determines whether or not this image is visible. - x - Sets the image's x position. When `xref` is set to - `paper`, units are sized relative to the plot height. - See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to a x axis - id (e.g. "x" or "x2"), the `x` position refers to an x - data coordinate If set to "paper", the `x` position - refers to the distance from the left of plot in - normalized coordinates where 0 (1) corresponds to the - left (right). - y - Sets the image's y position. When `yref` is set to - `paper`, units are sized relative to the plot height. - See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to a y axis - id (e.g. "y" or "y2"), the `y` position refers to a y - data coordinate. If set to "paper", the `y` position - refers to the distance from the bottom of the plot in - normalized coordinates where 0 (1) corresponds to the - bottom (top). - - Returns - ------- - Image - """ - super(Image, self).__init__("images") - - # Validate arg - # ------------ - 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.Image -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Image`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import image as v_image - - # Initialize validators - # --------------------- - self._validators["layer"] = v_image.LayerValidator() - self._validators["name"] = v_image.NameValidator() - self._validators["opacity"] = v_image.OpacityValidator() - self._validators["sizex"] = v_image.SizexValidator() - self._validators["sizey"] = v_image.SizeyValidator() - self._validators["sizing"] = v_image.SizingValidator() - self._validators["source"] = v_image.SourceValidator() - self._validators["templateitemname"] = v_image.TemplateitemnameValidator() - self._validators["visible"] = v_image.VisibleValidator() - self._validators["x"] = v_image.XValidator() - self._validators["xanchor"] = v_image.XanchorValidator() - self._validators["xref"] = v_image.XrefValidator() - self._validators["y"] = v_image.YValidator() - self._validators["yanchor"] = v_image.YanchorValidator() - self._validators["yref"] = v_image.YrefValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("sizex", None) - self["sizex"] = sizex if sizex is not None else _v - _v = arg.pop("sizey", None) - self["sizey"] = sizey if sizey is not None else _v - _v = arg.pop("sizing", None) - self["sizing"] = sizing if sizing is not None else _v - _v = arg.pop("source", None) - self["source"] = source if source is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xref", None) - self["xref"] = xref if xref is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("yref", None) - self["yref"] = yref if yref is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseLayoutHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - Returns - ------- - Any - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of all hover labels on graph - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of all hover labels on graph. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the default hover label font used by all traces on the - graph. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - Returns - ------- - int - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - bgcolor - Sets the background color of all hover labels on graph - bordercolor - Sets the border color of all hover labels on graph. - font - Sets the default hover label font used by all traces on - the graph. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - """ - - def __init__( - self, - arg=None, - align=None, - bgcolor=None, - bordercolor=None, - font=None, - namelength=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - bgcolor - Sets the background color of all hover labels on graph - bordercolor - Sets the border color of all hover labels on graph. - font - Sets the default hover label font used by all traces on - the graph. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Grid(_BaseLayoutHierarchyType): - - # columns - # ------- - @property - def columns(self): - """ - The number of columns in the grid. If you provide a 2D - `subplots` array, the length of its longest row is used as the - default. If you give an `xaxes` array, its length is used as - the default. But it's also possible to have a different length, - if you want to leave a row at the end for non-cartesian - subplots. - - The 'columns' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["columns"] - - @columns.setter - def columns(self, val): - self["columns"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.grid.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - x - Sets the horizontal domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. - y - Sets the vertical domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. - - Returns - ------- - plotly.graph_objs.layout.grid.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # pattern - # ------- - @property - def pattern(self): - """ - If no `subplots`, `xaxes`, or `yaxes` are given but we do have - `rows` and `columns`, we can generate defaults using - consecutive axis IDs, in two ways: "coupled" gives one x axis - per column and one y axis per row. "independent" uses a new xy - pair for each cell, left-to-right across each row then - iterating rows according to `roworder`. - - The 'pattern' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['independent', 'coupled'] - - Returns - ------- - Any - """ - return self["pattern"] - - @pattern.setter - def pattern(self, val): - self["pattern"] = val - - # roworder - # -------- - @property - def roworder(self): - """ - Is the first row the top or the bottom? Note that columns are - always enumerated from left to right. - - The 'roworder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top to bottom', 'bottom to top'] - - Returns - ------- - Any - """ - return self["roworder"] - - @roworder.setter - def roworder(self, val): - self["roworder"] = val - - # rows - # ---- - @property - def rows(self): - """ - The number of rows in the grid. If you provide a 2D `subplots` - array or a `yaxes` array, its length is used as the default. - But it's also possible to have a different length, if you want - to leave a row at the end for non-cartesian subplots. - - The 'rows' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["rows"] - - @rows.setter - def rows(self, val): - self["rows"] = val - - # subplots - # -------- - @property - def subplots(self): - """ - Used for freeform grids, where some axes may be shared across - subplots but others are not. Each entry should be a cartesian - subplot id, like "xy" or "x3y2", or "" to leave that cell - empty. You may reuse x axes within the same column, and y axes - within the same row. Non-cartesian subplots and traces that - support `domain` can place themselves in this grid separately - using the `gridcell` attribute. - - The 'subplots' property is an info array that may be specified as: - * a 2D list where: - The 'subplots[i][j]' property is an enumeration that may be specified as: - - One of the following enumeration values: - [''] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - list - """ - return self["subplots"] - - @subplots.setter - def subplots(self, val): - self["subplots"] = val - - # xaxes - # ----- - @property - def xaxes(self): - """ - Used with `yaxes` when the x and y axes are shared across - columns and rows. Each entry should be an x axis id like "x", - "x2", etc., or "" to not put an x axis in that column. Entries - other than "" must be unique. Ignored if `subplots` is present. - If missing but `yaxes` is present, will generate consecutive - IDs. - - The 'xaxes' property is an info array that may be specified as: - * a list of elements where: - The 'xaxes[i]' property is an enumeration that may be specified as: - - One of the following enumeration values: - [''] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - list - """ - return self["xaxes"] - - @xaxes.setter - def xaxes(self, val): - self["xaxes"] = val - - # xgap - # ---- - @property - def xgap(self): - """ - Horizontal space between grid cells, expressed as a fraction of - the total width available to one cell. Defaults to 0.1 for - coupled-axes grids and 0.2 for independent grids. - - The 'xgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["xgap"] - - @xgap.setter - def xgap(self, val): - self["xgap"] = val - - # xside - # ----- - @property - def xside(self): - """ - Sets where the x axis labels and titles go. "bottom" means the - very bottom of the grid. "bottom plot" is the lowest plot that - each x axis is used in. "top" and "top plot" are similar. - - The 'xside' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['bottom', 'bottom plot', 'top plot', 'top'] - - Returns - ------- - Any - """ - return self["xside"] - - @xside.setter - def xside(self, val): - self["xside"] = val - - # yaxes - # ----- - @property - def yaxes(self): - """ - Used with `yaxes` when the x and y axes are shared across - columns and rows. Each entry should be an y axis id like "y", - "y2", etc., or "" to not put a y axis in that row. Entries - other than "" must be unique. Ignored if `subplots` is present. - If missing but `xaxes` is present, will generate consecutive - IDs. - - The 'yaxes' property is an info array that may be specified as: - * a list of elements where: - The 'yaxes[i]' property is an enumeration that may be specified as: - - One of the following enumeration values: - [''] - - A string that matches one of the following regular expressions: - ['^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - list - """ - return self["yaxes"] - - @yaxes.setter - def yaxes(self, val): - self["yaxes"] = val - - # ygap - # ---- - @property - def ygap(self): - """ - Vertical space between grid cells, expressed as a fraction of - the total height available to one cell. Defaults to 0.1 for - coupled-axes grids and 0.3 for independent grids. - - The 'ygap' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ygap"] - - @ygap.setter - def ygap(self, val): - self["ygap"] = val - - # yside - # ----- - @property - def yside(self): - """ - Sets where the y axis labels and titles go. "left" means the - very left edge of the grid. *left plot* is the leftmost plot - that each y axis is used in. "right" and *right plot* are - similar. - - The 'yside' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'left plot', 'right plot', 'right'] - - Returns - ------- - Any - """ - return self["yside"] - - @yside.setter - def yside(self, val): - self["yside"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - columns - The number of columns in the grid. If you provide a 2D - `subplots` array, the length of its longest row is used - as the default. If you give an `xaxes` array, its - length is used as the default. But it's also possible - to have a different length, if you want to leave a row - at the end for non-cartesian subplots. - domain - :class:`plotly.graph_objects.layout.grid.Domain` - instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given but we - do have `rows` and `columns`, we can generate defaults - using consecutive axis IDs, in two ways: "coupled" - gives one x axis per column and one y axis per row. - "independent" uses a new xy pair for each cell, left- - to-right across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note that - columns are always enumerated from left to right. - rows - The number of rows in the grid. If you provide a 2D - `subplots` array or a `yaxes` array, its length is used - as the default. But it's also possible to have a - different length, if you want to leave a row at the end - for non-cartesian subplots. - subplots - Used for freeform grids, where some axes may be shared - across subplots but others are not. Each entry should - be a cartesian subplot id, like "xy" or "x3y2", or "" - to leave that cell empty. You may reuse x axes within - the same column, and y axes within the same row. Non- - cartesian subplots and traces that support `domain` can - place themselves in this grid separately using the - `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are shared - across columns and rows. Each entry should be an x axis - id like "x", "x2", etc., or "" to not put an x axis in - that column. Entries other than "" must be unique. - Ignored if `subplots` is present. If missing but - `yaxes` is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed as a - fraction of the total width available to one cell. - Defaults to 0.1 for coupled-axes grids and 0.2 for - independent grids. - xside - Sets where the x axis labels and titles go. "bottom" - means the very bottom of the grid. "bottom plot" is the - lowest plot that each x axis is used in. "top" and "top - plot" are similar. - yaxes - Used with `yaxes` when the x and y axes are shared - across columns and rows. Each entry should be an y axis - id like "y", "y2", etc., or "" to not put a y axis in - that row. Entries other than "" must be unique. Ignored - if `subplots` is present. If missing but `xaxes` is - present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as a - fraction of the total height available to one cell. - Defaults to 0.1 for coupled-axes grids and 0.3 for - independent grids. - yside - Sets where the y axis labels and titles go. "left" - means the very left edge of the grid. *left plot* is - the leftmost plot that each y axis is used in. "right" - and *right plot* are similar. - """ - - def __init__( - self, - arg=None, - columns=None, - domain=None, - pattern=None, - roworder=None, - rows=None, - subplots=None, - xaxes=None, - xgap=None, - xside=None, - yaxes=None, - ygap=None, - yside=None, - **kwargs - ): - """ - Construct a new Grid object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Grid` - columns - The number of columns in the grid. If you provide a 2D - `subplots` array, the length of its longest row is used - as the default. If you give an `xaxes` array, its - length is used as the default. But it's also possible - to have a different length, if you want to leave a row - at the end for non-cartesian subplots. - domain - :class:`plotly.graph_objects.layout.grid.Domain` - instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given but we - do have `rows` and `columns`, we can generate defaults - using consecutive axis IDs, in two ways: "coupled" - gives one x axis per column and one y axis per row. - "independent" uses a new xy pair for each cell, left- - to-right across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note that - columns are always enumerated from left to right. - rows - The number of rows in the grid. If you provide a 2D - `subplots` array or a `yaxes` array, its length is used - as the default. But it's also possible to have a - different length, if you want to leave a row at the end - for non-cartesian subplots. - subplots - Used for freeform grids, where some axes may be shared - across subplots but others are not. Each entry should - be a cartesian subplot id, like "xy" or "x3y2", or "" - to leave that cell empty. You may reuse x axes within - the same column, and y axes within the same row. Non- - cartesian subplots and traces that support `domain` can - place themselves in this grid separately using the - `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are shared - across columns and rows. Each entry should be an x axis - id like "x", "x2", etc., or "" to not put an x axis in - that column. Entries other than "" must be unique. - Ignored if `subplots` is present. If missing but - `yaxes` is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed as a - fraction of the total width available to one cell. - Defaults to 0.1 for coupled-axes grids and 0.2 for - independent grids. - xside - Sets where the x axis labels and titles go. "bottom" - means the very bottom of the grid. "bottom plot" is the - lowest plot that each x axis is used in. "top" and "top - plot" are similar. - yaxes - Used with `yaxes` when the x and y axes are shared - across columns and rows. Each entry should be an y axis - id like "y", "y2", etc., or "" to not put a y axis in - that row. Entries other than "" must be unique. Ignored - if `subplots` is present. If missing but `xaxes` is - present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as a - fraction of the total height available to one cell. - Defaults to 0.1 for coupled-axes grids and 0.3 for - independent grids. - yside - Sets where the y axis labels and titles go. "left" - means the very left edge of the grid. *left plot* is - the leftmost plot that each y axis is used in. "right" - and *right plot* are similar. - - Returns - ------- - Grid - """ - super(Grid, self).__init__("grid") - - # Validate arg - # ------------ - 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.Grid -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Grid`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import grid as v_grid - - # Initialize validators - # --------------------- - self._validators["columns"] = v_grid.ColumnsValidator() - self._validators["domain"] = v_grid.DomainValidator() - self._validators["pattern"] = v_grid.PatternValidator() - self._validators["roworder"] = v_grid.RoworderValidator() - self._validators["rows"] = v_grid.RowsValidator() - self._validators["subplots"] = v_grid.SubplotsValidator() - self._validators["xaxes"] = v_grid.XaxesValidator() - self._validators["xgap"] = v_grid.XgapValidator() - self._validators["xside"] = v_grid.XsideValidator() - self._validators["yaxes"] = v_grid.YaxesValidator() - self._validators["ygap"] = v_grid.YgapValidator() - self._validators["yside"] = v_grid.YsideValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("columns", None) - self["columns"] = columns if columns is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("pattern", None) - self["pattern"] = pattern if pattern is not None else _v - _v = arg.pop("roworder", None) - self["roworder"] = roworder if roworder is not None else _v - _v = arg.pop("rows", None) - self["rows"] = rows if rows is not None else _v - _v = arg.pop("subplots", None) - self["subplots"] = subplots if subplots is not None else _v - _v = arg.pop("xaxes", None) - self["xaxes"] = xaxes if xaxes is not None else _v - _v = arg.pop("xgap", None) - self["xgap"] = xgap if xgap is not None else _v - _v = arg.pop("xside", None) - self["xside"] = xside if xside is not None else _v - _v = arg.pop("yaxes", None) - self["yaxes"] = yaxes if yaxes is not None else _v - _v = arg.pop("ygap", None) - self["ygap"] = ygap if ygap is not None else _v - _v = arg.pop("yside", None) - self["yside"] = yside if yside is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Geo(_BaseLayoutHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Set the background color of the map - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # center - # ------ - @property - def center(self): - """ - The 'center' property is an instance of Center - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.geo.Center` - - A dict of string/value properties that will be passed - to the Center constructor - - Supported dict properties: - - lat - Sets the latitude of the map's center. For all - projection types, the map's latitude center - lies at the middle of the latitude range by - default. - lon - Sets the longitude of the map's center. By - default, the map's longitude center lies at the - middle of the longitude range for scoped - projection and above `projection.rotation.lon` - otherwise. - - Returns - ------- - plotly.graph_objs.layout.geo.Center - """ - return self["center"] - - @center.setter - def center(self, val): - self["center"] = val - - # coastlinecolor - # -------------- - @property - def coastlinecolor(self): - """ - Sets the coastline color. - - The 'coastlinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["coastlinecolor"] - - @coastlinecolor.setter - def coastlinecolor(self, val): - self["coastlinecolor"] = val - - # coastlinewidth - # -------------- - @property - def coastlinewidth(self): - """ - Sets the coastline stroke width (in px). - - The 'coastlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["coastlinewidth"] - - @coastlinewidth.setter - def coastlinewidth(self, val): - self["coastlinewidth"] = val - - # countrycolor - # ------------ - @property - def countrycolor(self): - """ - Sets line color of the country boundaries. - - The 'countrycolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["countrycolor"] - - @countrycolor.setter - def countrycolor(self, val): - self["countrycolor"] = val - - # countrywidth - # ------------ - @property - def countrywidth(self): - """ - Sets line width (in px) of the country boundaries. - - The 'countrywidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["countrywidth"] - - @countrywidth.setter - def countrywidth(self, val): - self["countrywidth"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.geo.Domain` - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - row - If there is a layout grid, use the domain for - this row in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - x - Sets the horizontal domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - y - Sets the vertical domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - - Returns - ------- - plotly.graph_objs.layout.geo.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # fitbounds - # --------- - @property - def fitbounds(self): - """ - Determines if this subplot's view settings are auto-computed to - fit trace data. On scoped maps, setting `fitbounds` leads to - `center.lon` and `center.lat` getting auto-filled. On maps with - a non-clipped projection, setting `fitbounds` leads to - `center.lon`, `center.lat`, and `projection.rotation.lon` - getting auto-filled. On maps with a clipped projection, setting - `fitbounds` leads to `center.lon`, `center.lat`, - `projection.rotation.lon`, `projection.rotation.lat`, - `lonaxis.range` and `lonaxis.range` getting auto-filled. If - "locations", only the trace's visible locations are considered - in the `fitbounds` computations. If "geojson", the entire trace - input `geojson` (if provided) is considered in the `fitbounds` - computations, Defaults to False. - - The 'fitbounds' property is an enumeration that may be specified as: - - One of the following enumeration values: - [False, 'locations', 'geojson'] - - Returns - ------- - Any - """ - return self["fitbounds"] - - @fitbounds.setter - def fitbounds(self, val): - self["fitbounds"] = val - - # framecolor - # ---------- - @property - def framecolor(self): - """ - Sets the color the frame. - - The 'framecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["framecolor"] - - @framecolor.setter - def framecolor(self, val): - self["framecolor"] = val - - # framewidth - # ---------- - @property - def framewidth(self): - """ - Sets the stroke width (in px) of the frame. - - The 'framewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["framewidth"] - - @framewidth.setter - def framewidth(self, val): - self["framewidth"] = val - - # lakecolor - # --------- - @property - def lakecolor(self): - """ - Sets the color of the lakes. - - The 'lakecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["lakecolor"] - - @lakecolor.setter - def lakecolor(self, val): - self["lakecolor"] = val - - # landcolor - # --------- - @property - def landcolor(self): - """ - Sets the land mass color. - - The 'landcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["landcolor"] - - @landcolor.setter - def landcolor(self, val): - self["landcolor"] = val - - # lataxis - # ------- - @property - def lataxis(self): - """ - The 'lataxis' property is an instance of Lataxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.geo.Lataxis` - - A dict of string/value properties that will be passed - to the Lataxis constructor - - Supported dict properties: - - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. - - Returns - ------- - plotly.graph_objs.layout.geo.Lataxis - """ - return self["lataxis"] - - @lataxis.setter - def lataxis(self, val): - self["lataxis"] = val - - # lonaxis - # ------- - @property - def lonaxis(self): - """ - The 'lonaxis' property is an instance of Lonaxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.geo.Lonaxis` - - A dict of string/value properties that will be passed - to the Lonaxis constructor - - Supported dict properties: - - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. - - Returns - ------- - plotly.graph_objs.layout.geo.Lonaxis - """ - return self["lonaxis"] - - @lonaxis.setter - def lonaxis(self, val): - self["lonaxis"] = val - - # oceancolor - # ---------- - @property - def oceancolor(self): - """ - Sets the ocean color - - The 'oceancolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["oceancolor"] - - @oceancolor.setter - def oceancolor(self, val): - self["oceancolor"] = val - - # projection - # ---------- - @property - def projection(self): - """ - The 'projection' property is an instance of Projection - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.geo.Projection` - - A dict of string/value properties that will be passed - to the Projection constructor - - Supported dict properties: - - parallels - For conic projection types only. Sets the - parallels (tangent, secant) where the cone - intersects the sphere. - rotation - :class:`plotly.graph_objects.layout.geo.project - ion.Rotation` instance or dict with compatible - properties - scale - Zooms in or out on the map view. A scale of 1 - corresponds to the largest zoom level that fits - the map's lon and lat ranges. - type - Sets the projection type. - - Returns - ------- - plotly.graph_objs.layout.geo.Projection - """ - return self["projection"] - - @projection.setter - def projection(self, val): - self["projection"] = val - - # resolution - # ---------- - @property - def resolution(self): - """ - Sets the resolution of the base layers. The values have units - of km/mm e.g. 110 corresponds to a scale ratio of - 1:110,000,000. - - The 'resolution' property is an enumeration that may be specified as: - - One of the following enumeration values: - [110, 50] - - Returns - ------- - Any - """ - return self["resolution"] - - @resolution.setter - def resolution(self, val): - self["resolution"] = val - - # rivercolor - # ---------- - @property - def rivercolor(self): - """ - Sets color of the rivers. - - The 'rivercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["rivercolor"] - - @rivercolor.setter - def rivercolor(self, val): - self["rivercolor"] = val - - # riverwidth - # ---------- - @property - def riverwidth(self): - """ - Sets the stroke width (in px) of the rivers. - - The 'riverwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["riverwidth"] - - @riverwidth.setter - def riverwidth(self, val): - self["riverwidth"] = val - - # scope - # ----- - @property - def scope(self): - """ - Set the scope of the map. - - The 'scope' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['world', 'usa', 'europe', 'asia', 'africa', 'north - america', 'south america'] - - Returns - ------- - Any - """ - return self["scope"] - - @scope.setter - def scope(self, val): - self["scope"] = val - - # showcoastlines - # -------------- - @property - def showcoastlines(self): - """ - Sets whether or not the coastlines are drawn. - - The 'showcoastlines' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showcoastlines"] - - @showcoastlines.setter - def showcoastlines(self, val): - self["showcoastlines"] = val - - # showcountries - # ------------- - @property - def showcountries(self): - """ - Sets whether or not country boundaries are drawn. - - The 'showcountries' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showcountries"] - - @showcountries.setter - def showcountries(self, val): - self["showcountries"] = val - - # showframe - # --------- - @property - def showframe(self): - """ - Sets whether or not a frame is drawn around the map. - - The 'showframe' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showframe"] - - @showframe.setter - def showframe(self, val): - self["showframe"] = val - - # showlakes - # --------- - @property - def showlakes(self): - """ - Sets whether or not lakes are drawn. - - The 'showlakes' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlakes"] - - @showlakes.setter - def showlakes(self, val): - self["showlakes"] = val - - # showland - # -------- - @property - def showland(self): - """ - Sets whether or not land masses are filled in color. - - The 'showland' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showland"] - - @showland.setter - def showland(self, val): - self["showland"] = val - - # showocean - # --------- - @property - def showocean(self): - """ - Sets whether or not oceans are filled in color. - - The 'showocean' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showocean"] - - @showocean.setter - def showocean(self, val): - self["showocean"] = val - - # showrivers - # ---------- - @property - def showrivers(self): - """ - Sets whether or not rivers are drawn. - - The 'showrivers' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showrivers"] - - @showrivers.setter - def showrivers(self, val): - self["showrivers"] = val - - # showsubunits - # ------------ - @property - def showsubunits(self): - """ - Sets whether or not boundaries of subunits within countries - (e.g. states, provinces) are drawn. - - The 'showsubunits' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showsubunits"] - - @showsubunits.setter - def showsubunits(self, val): - self["showsubunits"] = val - - # subunitcolor - # ------------ - @property - def subunitcolor(self): - """ - Sets the color of the subunits boundaries. - - The 'subunitcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["subunitcolor"] - - @subunitcolor.setter - def subunitcolor(self, val): - self["subunitcolor"] = val - - # subunitwidth - # ------------ - @property - def subunitwidth(self): - """ - Sets the stroke width (in px) of the subunits boundaries. - - The 'subunitwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["subunitwidth"] - - @subunitwidth.setter - def subunitwidth(self, val): - self["subunitwidth"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in the view - (projection and center). Defaults to `layout.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Sets the default visibility of the base layers. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Set the background color of the map - center - :class:`plotly.graph_objects.layout.geo.Center` - instance or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country boundaries. - domain - :class:`plotly.graph_objects.layout.geo.Domain` - instance or dict with compatible properties - fitbounds - Determines if this subplot's view settings are auto- - computed to fit trace data. On scoped maps, setting - `fitbounds` leads to `center.lon` and `center.lat` - getting auto-filled. On maps with a non-clipped - projection, setting `fitbounds` leads to `center.lon`, - `center.lat`, and `projection.rotation.lon` getting - auto-filled. On maps with a clipped projection, setting - `fitbounds` leads to `center.lon`, `center.lat`, - `projection.rotation.lon`, `projection.rotation.lat`, - `lonaxis.range` and `lonaxis.range` getting auto- - filled. If "locations", only the trace's visible - locations are considered in the `fitbounds` - computations. If "geojson", the entire trace input - `geojson` (if provided) is considered in the - `fitbounds` computations, Defaults to False. - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - :class:`plotly.graph_objects.layout.geo.Lataxis` - instance or dict with compatible properties - lonaxis - :class:`plotly.graph_objects.layout.geo.Lonaxis` - instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - :class:`plotly.graph_objects.layout.geo.Projection` - instance or dict with compatible properties - resolution - Sets the resolution of the base layers. The values have - units of km/mm e.g. 110 corresponds to a scale ratio of - 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are drawn. - showframe - Sets whether or not a frame is drawn around the map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits within - countries (e.g. states, provinces) are drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in the view - (projection and center). Defaults to - `layout.uirevision`. - visible - Sets the default visibility of the base layers. - """ - - def __init__( - self, - arg=None, - bgcolor=None, - center=None, - coastlinecolor=None, - coastlinewidth=None, - countrycolor=None, - countrywidth=None, - domain=None, - fitbounds=None, - framecolor=None, - framewidth=None, - lakecolor=None, - landcolor=None, - lataxis=None, - lonaxis=None, - oceancolor=None, - projection=None, - resolution=None, - rivercolor=None, - riverwidth=None, - scope=None, - showcoastlines=None, - showcountries=None, - showframe=None, - showlakes=None, - showland=None, - showocean=None, - showrivers=None, - showsubunits=None, - subunitcolor=None, - subunitwidth=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new Geo object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Geo` - bgcolor - Set the background color of the map - center - :class:`plotly.graph_objects.layout.geo.Center` - instance or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country boundaries. - domain - :class:`plotly.graph_objects.layout.geo.Domain` - instance or dict with compatible properties - fitbounds - Determines if this subplot's view settings are auto- - computed to fit trace data. On scoped maps, setting - `fitbounds` leads to `center.lon` and `center.lat` - getting auto-filled. On maps with a non-clipped - projection, setting `fitbounds` leads to `center.lon`, - `center.lat`, and `projection.rotation.lon` getting - auto-filled. On maps with a clipped projection, setting - `fitbounds` leads to `center.lon`, `center.lat`, - `projection.rotation.lon`, `projection.rotation.lat`, - `lonaxis.range` and `lonaxis.range` getting auto- - filled. If "locations", only the trace's visible - locations are considered in the `fitbounds` - computations. If "geojson", the entire trace input - `geojson` (if provided) is considered in the - `fitbounds` computations, Defaults to False. - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - :class:`plotly.graph_objects.layout.geo.Lataxis` - instance or dict with compatible properties - lonaxis - :class:`plotly.graph_objects.layout.geo.Lonaxis` - instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - :class:`plotly.graph_objects.layout.geo.Projection` - instance or dict with compatible properties - resolution - Sets the resolution of the base layers. The values have - units of km/mm e.g. 110 corresponds to a scale ratio of - 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are drawn. - showframe - Sets whether or not a frame is drawn around the map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits within - countries (e.g. states, provinces) are drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in the view - (projection and center). Defaults to - `layout.uirevision`. - visible - Sets the default visibility of the base layers. - - Returns - ------- - Geo - """ - super(Geo, self).__init__("geo") - - # Validate arg - # ------------ - 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.Geo -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Geo`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import geo as v_geo - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_geo.BgcolorValidator() - self._validators["center"] = v_geo.CenterValidator() - self._validators["coastlinecolor"] = v_geo.CoastlinecolorValidator() - self._validators["coastlinewidth"] = v_geo.CoastlinewidthValidator() - self._validators["countrycolor"] = v_geo.CountrycolorValidator() - self._validators["countrywidth"] = v_geo.CountrywidthValidator() - self._validators["domain"] = v_geo.DomainValidator() - self._validators["fitbounds"] = v_geo.FitboundsValidator() - self._validators["framecolor"] = v_geo.FramecolorValidator() - self._validators["framewidth"] = v_geo.FramewidthValidator() - self._validators["lakecolor"] = v_geo.LakecolorValidator() - self._validators["landcolor"] = v_geo.LandcolorValidator() - self._validators["lataxis"] = v_geo.LataxisValidator() - self._validators["lonaxis"] = v_geo.LonaxisValidator() - self._validators["oceancolor"] = v_geo.OceancolorValidator() - self._validators["projection"] = v_geo.ProjectionValidator() - self._validators["resolution"] = v_geo.ResolutionValidator() - self._validators["rivercolor"] = v_geo.RivercolorValidator() - self._validators["riverwidth"] = v_geo.RiverwidthValidator() - self._validators["scope"] = v_geo.ScopeValidator() - self._validators["showcoastlines"] = v_geo.ShowcoastlinesValidator() - self._validators["showcountries"] = v_geo.ShowcountriesValidator() - self._validators["showframe"] = v_geo.ShowframeValidator() - self._validators["showlakes"] = v_geo.ShowlakesValidator() - self._validators["showland"] = v_geo.ShowlandValidator() - self._validators["showocean"] = v_geo.ShowoceanValidator() - self._validators["showrivers"] = v_geo.ShowriversValidator() - self._validators["showsubunits"] = v_geo.ShowsubunitsValidator() - self._validators["subunitcolor"] = v_geo.SubunitcolorValidator() - self._validators["subunitwidth"] = v_geo.SubunitwidthValidator() - self._validators["uirevision"] = v_geo.UirevisionValidator() - self._validators["visible"] = v_geo.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("center", None) - self["center"] = center if center is not None else _v - _v = arg.pop("coastlinecolor", None) - self["coastlinecolor"] = coastlinecolor if coastlinecolor is not None else _v - _v = arg.pop("coastlinewidth", None) - self["coastlinewidth"] = coastlinewidth if coastlinewidth is not None else _v - _v = arg.pop("countrycolor", None) - self["countrycolor"] = countrycolor if countrycolor is not None else _v - _v = arg.pop("countrywidth", None) - self["countrywidth"] = countrywidth if countrywidth is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("fitbounds", None) - self["fitbounds"] = fitbounds if fitbounds is not None else _v - _v = arg.pop("framecolor", None) - self["framecolor"] = framecolor if framecolor is not None else _v - _v = arg.pop("framewidth", None) - self["framewidth"] = framewidth if framewidth is not None else _v - _v = arg.pop("lakecolor", None) - self["lakecolor"] = lakecolor if lakecolor is not None else _v - _v = arg.pop("landcolor", None) - self["landcolor"] = landcolor if landcolor is not None else _v - _v = arg.pop("lataxis", None) - self["lataxis"] = lataxis if lataxis is not None else _v - _v = arg.pop("lonaxis", None) - self["lonaxis"] = lonaxis if lonaxis is not None else _v - _v = arg.pop("oceancolor", None) - self["oceancolor"] = oceancolor if oceancolor is not None else _v - _v = arg.pop("projection", None) - self["projection"] = projection if projection is not None else _v - _v = arg.pop("resolution", None) - self["resolution"] = resolution if resolution is not None else _v - _v = arg.pop("rivercolor", None) - self["rivercolor"] = rivercolor if rivercolor is not None else _v - _v = arg.pop("riverwidth", None) - self["riverwidth"] = riverwidth if riverwidth is not None else _v - _v = arg.pop("scope", None) - self["scope"] = scope if scope is not None else _v - _v = arg.pop("showcoastlines", None) - self["showcoastlines"] = showcoastlines if showcoastlines is not None else _v - _v = arg.pop("showcountries", None) - self["showcountries"] = showcountries if showcountries is not None else _v - _v = arg.pop("showframe", None) - self["showframe"] = showframe if showframe is not None else _v - _v = arg.pop("showlakes", None) - self["showlakes"] = showlakes if showlakes is not None else _v - _v = arg.pop("showland", None) - self["showland"] = showland if showland is not None else _v - _v = arg.pop("showocean", None) - self["showocean"] = showocean if showocean is not None else _v - _v = arg.pop("showrivers", None) - self["showrivers"] = showrivers if showrivers is not None else _v - _v = arg.pop("showsubunits", None) - self["showsubunits"] = showsubunits if showsubunits is not None else _v - _v = arg.pop("subunitcolor", None) - self["subunitcolor"] = subunitcolor if subunitcolor is not None else _v - _v = arg.pop("subunitwidth", None) - self["subunitwidth"] = subunitwidth if subunitwidth is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the global font. Note that fonts used in traces and other - layout components inherit from the global font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Colorscale(_BaseLayoutHierarchyType): - - # diverging - # --------- - @property - def diverging(self): - """ - Sets the default diverging colorscale. Note that - `autocolorscale` must be true for this attribute to work. - - The 'diverging' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["diverging"] - - @diverging.setter - def diverging(self, val): - self["diverging"] = val - - # sequential - # ---------- - @property - def sequential(self): - """ - Sets the default sequential colorscale for positive values. - Note that `autocolorscale` must be true for this attribute to - work. - - The 'sequential' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["sequential"] - - @sequential.setter - def sequential(self, val): - self["sequential"] = val - - # sequentialminus - # --------------- - @property - def sequentialminus(self): - """ - Sets the default sequential colorscale for negative values. - Note that `autocolorscale` must be true for this attribute to - work. - - The 'sequentialminus' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["sequentialminus"] - - @sequentialminus.setter - def sequentialminus(self, val): - self["sequentialminus"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - diverging - Sets the default diverging colorscale. Note that - `autocolorscale` must be true for this attribute to - work. - sequential - Sets the default sequential colorscale for positive - values. Note that `autocolorscale` must be true for - this attribute to work. - sequentialminus - Sets the default sequential colorscale for negative - values. Note that `autocolorscale` must be true for - this attribute to work. - """ - - def __init__( - self, arg=None, diverging=None, sequential=None, sequentialminus=None, **kwargs - ): - """ - Construct a new Colorscale object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Colorscale` - diverging - Sets the default diverging colorscale. Note that - `autocolorscale` must be true for this attribute to - work. - sequential - Sets the default sequential colorscale for positive - values. Note that `autocolorscale` must be true for - this attribute to work. - sequentialminus - Sets the default sequential colorscale for negative - values. Note that `autocolorscale` must be true for - this attribute to work. - - Returns - ------- - Colorscale - """ - super(Colorscale, self).__init__("colorscale") - - # Validate arg - # ------------ - 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.Colorscale -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Colorscale`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import colorscale as v_colorscale - - # Initialize validators - # --------------------- - self._validators["diverging"] = v_colorscale.DivergingValidator() - self._validators["sequential"] = v_colorscale.SequentialValidator() - self._validators["sequentialminus"] = v_colorscale.SequentialminusValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("diverging", None) - self["diverging"] = diverging if diverging is not None else _v - _v = arg.pop("sequential", None) - self["sequential"] = sequential if sequential is not None else _v - _v = arg.pop("sequentialminus", None) - self["sequentialminus"] = sequentialminus if sequentialminus is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Coloraxis(_BaseLayoutHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here corresponding trace color - array(s)) or the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as corresponding trace color array(s) and if set, - `cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as corresponding trace color array(s). Has no effect - when `cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as corresponding trace color array(s) and if set, - `cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.coloraxis.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - coloraxis.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.coloraxis.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.coloraxis.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.coloraxis.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.coloraxis.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - layout.coloraxis.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.layout.coloraxis.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here corresponding - trace color array(s)) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and `cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as corresponding trace color - array(s) and if set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as corresponding trace - color array(s). Has no effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as corresponding trace color - array(s) and if set, `cmax` must be set as well. - colorbar - :class:`plotly.graph_objects.layout.coloraxis.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - colorbar=None, - colorscale=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Coloraxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Coloraxis` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here corresponding - trace color array(s)) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and `cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as corresponding trace color - array(s) and if set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as corresponding trace - color array(s). Has no effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as corresponding trace color - array(s) and if set, `cmax` must be set as well. - colorbar - :class:`plotly.graph_objects.layout.coloraxis.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. - - Returns - ------- - Coloraxis - """ - super(Coloraxis, self).__init__("coloraxis") - - # Validate arg - # ------------ - 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.Coloraxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Coloraxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import coloraxis as v_coloraxis - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_coloraxis.AutocolorscaleValidator() - self._validators["cauto"] = v_coloraxis.CautoValidator() - self._validators["cmax"] = v_coloraxis.CmaxValidator() - self._validators["cmid"] = v_coloraxis.CmidValidator() - self._validators["cmin"] = v_coloraxis.CminValidator() - self._validators["colorbar"] = v_coloraxis.ColorBarValidator() - self._validators["colorscale"] = v_coloraxis.ColorscaleValidator() - self._validators["reversescale"] = v_coloraxis.ReversescaleValidator() - self._validators["showscale"] = v_coloraxis.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Annotation(_BaseLayoutHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the `text` within the box. Has - an effect only if `text` spans two or more lines (i.e. `text` - contains one or more
HTML tags) or if an explicit width is - set to override the text width. - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # arrowcolor - # ---------- - @property - def arrowcolor(self): - """ - Sets the color of the annotation arrow. - - The 'arrowcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["arrowcolor"] - - @arrowcolor.setter - def arrowcolor(self, val): - self["arrowcolor"] = val - - # arrowhead - # --------- - @property - def arrowhead(self): - """ - Sets the end annotation arrow head style. - - The 'arrowhead' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 8] - - Returns - ------- - int - """ - return self["arrowhead"] - - @arrowhead.setter - def arrowhead(self, val): - self["arrowhead"] = val - - # arrowside - # --------- - @property - def arrowside(self): - """ - Sets the annotation arrow head position. - - The 'arrowside' property is a flaglist and may be specified - as a string containing: - - Any combination of ['end', 'start'] joined with '+' characters - (e.g. 'end+start') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["arrowside"] - - @arrowside.setter - def arrowside(self, val): - self["arrowside"] = val - - # arrowsize - # --------- - @property - def arrowsize(self): - """ - Sets the size of the end annotation arrow head, relative to - `arrowwidth`. A value of 1 (default) gives a head about 3x as - wide as the line. - - The 'arrowsize' property is a number and may be specified as: - - An int or float in the interval [0.3, inf] - - Returns - ------- - int|float - """ - return self["arrowsize"] - - @arrowsize.setter - def arrowsize(self, val): - self["arrowsize"] = val - - # arrowwidth - # ---------- - @property - def arrowwidth(self): - """ - Sets the width (in px) of annotation arrow line. - - The 'arrowwidth' property is a number and may be specified as: - - An int or float in the interval [0.1, inf] - - Returns - ------- - int|float - """ - return self["arrowwidth"] - - @arrowwidth.setter - def arrowwidth(self, val): - self["arrowwidth"] = val - - # ax - # -- - @property - def ax(self): - """ - Sets the x component of the arrow tail about the arrow head. If - `axref` is `pixel`, a positive (negative) component - corresponds to an arrow pointing from right to left (left to - right). If `axref` is an axis, this is an absolute value on - that axis, like `x`, NOT a relative value. - - The 'ax' property accepts values of any type - - Returns - ------- - Any - """ - return self["ax"] - - @ax.setter - def ax(self, val): - self["ax"] = val - - # axref - # ----- - @property - def axref(self): - """ - Indicates in what terms the tail of the annotation (ax,ay) is - specified. If `pixel`, `ax` is a relative offset in pixels - from `x`. If set to an x axis id (e.g. "x" or "x2"), `ax` is - specified in the same terms as that axis. This is useful for - trendline annotations which should continue to indicate the - correct trend when zoomed. - - The 'axref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['pixel'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["axref"] - - @axref.setter - def axref(self, val): - self["axref"] = val - - # ay - # -- - @property - def ay(self): - """ - Sets the y component of the arrow tail about the arrow head. If - `ayref` is `pixel`, a positive (negative) component - corresponds to an arrow pointing from bottom to top (top to - bottom). If `ayref` is an axis, this is an absolute value on - that axis, like `y`, NOT a relative value. - - The 'ay' property accepts values of any type - - Returns - ------- - Any - """ - return self["ay"] - - @ay.setter - def ay(self, val): - self["ay"] = val - - # ayref - # ----- - @property - def ayref(self): - """ - Indicates in what terms the tail of the annotation (ax,ay) is - specified. If `pixel`, `ay` is a relative offset in pixels - from `y`. If set to a y axis id (e.g. "y" or "y2"), `ay` is - specified in the same terms as that axis. This is useful for - trendline annotations which should continue to indicate the - correct trend when zoomed. - - The 'ayref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['pixel'] - - A string that matches one of the following regular expressions: - ['^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["ayref"] - - @ayref.setter - def ayref(self, val): - self["ayref"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the annotation. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the annotation `text`. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderpad - # --------- - @property - def borderpad(self): - """ - Sets the padding (in px) between the `text` and the enclosing - border. - - The 'borderpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderpad"] - - @borderpad.setter - def borderpad(self, val): - self["borderpad"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the annotation - `text`. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # captureevents - # ------------- - @property - def captureevents(self): - """ - Determines whether the annotation text box captures mouse move - and click events, or allows those events to pass through to - data points in the plot that may be behind the annotation. By - default `captureevents` is False unless `hovertext` is - provided. If you use the event `plotly_clickannotation` without - `hovertext` you must explicitly enable `captureevents`. - - The 'captureevents' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["captureevents"] - - @captureevents.setter - def captureevents(self, val): - self["captureevents"] = val - - # clicktoshow - # ----------- - @property - def clicktoshow(self): - """ - Makes this annotation respond to clicks on the plot. If you - click a data point that exactly matches the `x` and `y` values - of this annotation, and it is hidden (visible: false), it will - appear. In "onoff" mode, you must click the same point again to - make it disappear, so if you click multiple points, you can - show multiple annotations. In "onout" mode, a click anywhere - else in the plot (on another data point or not) will hide this - annotation. If you need to show/hide this annotation in - response to different `x` or `y` values, you can set `xclick` - and/or `yclick`. This is useful for example to label the side - of a bar. To label markers though, `standoff` is preferred over - `xclick` and `yclick`. - - The 'clicktoshow' property is an enumeration that may be specified as: - - One of the following enumeration values: - [False, 'onoff', 'onout'] - - Returns - ------- - Any - """ - return self["clicktoshow"] - - @clicktoshow.setter - def clicktoshow(self, val): - self["clicktoshow"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the annotation text font. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.annotation.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.annotation.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # height - # ------ - @property - def height(self): - """ - Sets an explicit height for the text box. null (default) lets - the text set the box height. Taller text will be clipped. - - The 'height' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - Returns - ------- - int|float - """ - return self["height"] - - @height.setter - def height(self, val): - self["height"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. - - Returns - ------- - plotly.graph_objs.layout.annotation.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets text to appear when hovering over this annotation. If - omitted or blank, no hover label will appear. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the annotation (text + arrow). - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # showarrow - # --------- - @property - def showarrow(self): - """ - Determines whether or not the annotation is drawn with an - arrow. If True, `text` is placed near the arrow's tail. If - False, `text` lines up with the `x` and `y` provided. - - The 'showarrow' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showarrow"] - - @showarrow.setter - def showarrow(self, val): - self["showarrow"] = val - - # standoff - # -------- - @property - def standoff(self): - """ - Sets a distance, in pixels, to move the end arrowhead away from - the position it is pointing at, for example to point at the - edge of a marker independent of zoom. Note that this shortens - the arrow from the `ax` / `ay` vector, in contrast to `xshift` - / `yshift` which moves everything by this amount. - - The 'standoff' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["standoff"] - - @standoff.setter - def standoff(self, val): - self["standoff"] = val - - # startarrowhead - # -------------- - @property - def startarrowhead(self): - """ - Sets the start annotation arrow head style. - - The 'startarrowhead' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 8] - - Returns - ------- - int - """ - return self["startarrowhead"] - - @startarrowhead.setter - def startarrowhead(self, val): - self["startarrowhead"] = val - - # startarrowsize - # -------------- - @property - def startarrowsize(self): - """ - Sets the size of the start annotation arrow head, relative to - `arrowwidth`. A value of 1 (default) gives a head about 3x as - wide as the line. - - The 'startarrowsize' property is a number and may be specified as: - - An int or float in the interval [0.3, inf] - - Returns - ------- - int|float - """ - return self["startarrowsize"] - - @startarrowsize.setter - def startarrowsize(self, val): - self["startarrowsize"] = val - - # startstandoff - # ------------- - @property - def startstandoff(self): - """ - Sets a distance, in pixels, to move the start arrowhead away - from the position it is pointing at, for example to point at - the edge of a marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, in contrast to - `xshift` / `yshift` which moves everything by this amount. - - The 'startstandoff' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["startstandoff"] - - @startstandoff.setter - def startstandoff(self, val): - self["startstandoff"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text associated with this annotation. Plotly uses a - subset of HTML tags to do things like newline (
), bold - (), italics (), hyperlinks (). - Tags , , are also supported. - - 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 - - # textangle - # --------- - @property - def textangle(self): - """ - Sets the angle at which the `text` is drawn with respect to the - horizontal. - - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["textangle"] - - @textangle.setter - def textangle(self, val): - self["textangle"] = val - - # valign - # ------ - @property - def valign(self): - """ - Sets the vertical alignment of the `text` within the box. Has - an effect only if an explicit height is set to override the - text height. - - The 'valign' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["valign"] - - @valign.setter - def valign(self, val): - self["valign"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this annotation is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets an explicit width for the text box. null (default) lets - the text set the box width. Wider text will be clipped. There - is no automatic wrapping; use
to start a new line. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # x - # - - @property - def x(self): - """ - Sets the annotation's x position. If the axis `type` is "log", - then you must take the log of your desired range. If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'x' property accepts values of any type - - Returns - ------- - Any - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the text box's horizontal position anchor This anchor - binds the `x` position to the "left", "center" or "right" of - the annotation. For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the right-most portion of - the annotation lines up with the right-most edge of the - plotting area. If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is an arrow, - whereas for paper-referenced with no arrow, the anchor picked - corresponds to the closest side. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xclick - # ------ - @property - def xclick(self): - """ - Toggle this annotation when clicking a data point whose `x` - value is `xclick` rather than the annotation's `x` value. - - The 'xclick' property accepts values of any type - - Returns - ------- - Any - """ - return self["xclick"] - - @xclick.setter - def xclick(self, val): - self["xclick"] = val - - # xref - # ---- - @property - def xref(self): - """ - Sets the annotation's x coordinate axis. If set to an x axis id - (e.g. "x" or "x2"), the `x` position refers to an x coordinate - If set to "paper", the `x` position refers to the distance from - the left side of the plotting area in normalized coordinates - where 0 (1) corresponds to the left (right) side. - - The 'xref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['paper'] - - A string that matches one of the following regular expressions: - ['^x([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["xref"] - - @xref.setter - def xref(self, val): - self["xref"] = val - - # xshift - # ------ - @property - def xshift(self): - """ - Shifts the position of the whole annotation and arrow to the - right (positive) or left (negative) by this many pixels. - - The 'xshift' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["xshift"] - - @xshift.setter - def xshift(self, val): - self["xshift"] = val - - # y - # - - @property - def y(self): - """ - Sets the annotation's y position. If the axis `type` is "log", - then you must take the log of your desired range. If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'y' property accepts values of any type - - Returns - ------- - Any - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the text box's vertical position anchor This anchor binds - the `y` position to the "top", "middle" or "bottom" of the - annotation. For example, if `y` is set to 1, `yref` to "paper" - and `yanchor` to "top" then the top-most portion of the - annotation lines up with the top-most edge of the plotting - area. If "auto", the anchor is equivalent to "middle" for data- - referenced annotations or if there is an arrow, whereas for - paper-referenced with no arrow, the anchor picked corresponds - to the closest side. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # yclick - # ------ - @property - def yclick(self): - """ - Toggle this annotation when clicking a data point whose `y` - value is `yclick` rather than the annotation's `y` value. - - The 'yclick' property accepts values of any type - - Returns - ------- - Any - """ - return self["yclick"] - - @yclick.setter - def yclick(self, val): - self["yclick"] = val - - # yref - # ---- - @property - def yref(self): - """ - Sets the annotation's y coordinate axis. If set to an y axis id - (e.g. "y" or "y2"), the `y` position refers to an y coordinate - If set to "paper", the `y` position refers to the distance from - the bottom of the plotting area in normalized coordinates where - 0 (1) corresponds to the bottom (top). - - The 'yref' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['paper'] - - A string that matches one of the following regular expressions: - ['^y([2-9]|[1-9][0-9]+)?$'] - - Returns - ------- - Any - """ - return self["yref"] - - @yref.setter - def yref(self, val): - self["yref"] = val - - # yshift - # ------ - @property - def yshift(self): - """ - Shifts the position of the whole annotation and arrow up - (positive) or down (negative) by this many pixels. - - The 'yshift' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["yshift"] - - @yshift.setter - def yshift(self, val): - self["yshift"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - arrowwidth - Sets the width (in px) of annotation arrow line. - ax - Sets the x component of the arrow tail about the arrow - head. If `axref` is `pixel`, a positive (negative) - component corresponds to an arrow pointing from right - to left (left to right). If `axref` is an axis, this is - an absolute value on that axis, like `x`, NOT a - relative value. - axref - Indicates in what terms the tail of the annotation - (ax,ay) is specified. If `pixel`, `ax` is a relative - offset in pixels from `x`. If set to an x axis id - (e.g. "x" or "x2"), `ax` is specified in the same - terms as that axis. This is useful for trendline - annotations which should continue to indicate the - correct trend when zoomed. - ay - Sets the y component of the arrow tail about the arrow - head. If `ayref` is `pixel`, a positive (negative) - component corresponds to an arrow pointing from bottom - to top (top to bottom). If `ayref` is an axis, this is - an absolute value on that axis, like `y`, NOT a - relative value. - ayref - Indicates in what terms the tail of the annotation - (ax,ay) is specified. If `pixel`, `ay` is a relative - offset in pixels from `y`. If set to a y axis id (e.g. - "y" or "y2"), `ay` is specified in the same terms as - that axis. This is useful for trendline annotations - which should continue to indicate the correct trend - when zoomed. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the annotation - `text`. - borderpad - Sets the padding (in px) between the `text` and the - enclosing border. - borderwidth - Sets the width (in px) of the border enclosing the - annotation `text`. - captureevents - Determines whether the annotation text box captures - mouse move and click events, or allows those events to - pass through to data points in the plot that may be - behind the annotation. By default `captureevents` is - False unless `hovertext` is provided. If you use the - event `plotly_clickannotation` without `hovertext` you - must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the plot. If - you click a data point that exactly matches the `x` and - `y` values of this annotation, and it is hidden - (visible: false), it will appear. In "onoff" mode, you - must click the same point again to make it disappear, - so if you click multiple points, you can show multiple - annotations. In "onout" mode, a click anywhere else in - the plot (on another data point or not) will hide this - annotation. If you need to show/hide this annotation in - response to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for example to - label the side of a bar. To label markers though, - `standoff` is preferred over `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. Taller text - will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.annotation.Hoverlab - el` instance or dict with compatible properties - hovertext - Sets text to appear when hovering over this annotation. - If omitted or blank, no hover label will appear. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the annotation (text + arrow). - showarrow - Determines whether or not the annotation is drawn with - an arrow. If True, `text` is placed near the arrow's - tail. If False, `text` lines up with the `x` and `y` - provided. - standoff - Sets a distance, in pixels, to move the end arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - startstandoff - Sets a distance, in pixels, to move the start arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. Plotly - uses a subset of HTML tags to do things like newline - (
), bold (), italics (), hyperlinks - (). Tags , , - are also supported. - textangle - Sets the angle at which the `text` is drawn with - respect to the horizontal. - valign - Sets the vertical alignment of the `text` within the - box. Has an effect only if an explicit height is set to - override the text height. - visible - Determines whether or not this annotation is visible. - width - Sets an explicit width for the text box. null (default) - lets the text set the box width. Wider text will be - clipped. There is no automatic wrapping; use
to - start a new line. - x - Sets the annotation's x position. If the axis `type` is - "log", then you must take the log of your desired - range. If the axis `type` is "date", it should be date - strings, like date data, though Date objects and unix - milliseconds will be accepted and converted to strings. - If the axis `type` is "category", it should be numbers, - using the scale where each category is assigned a - serial number from zero in the order it appears. - xanchor - Sets the text box's horizontal position anchor This - anchor binds the `x` position to the "left", "center" - or "right" of the annotation. For example, if `x` is - set to 1, `xref` to "paper" and `xanchor` to "right" - then the right-most portion of the annotation lines up - with the right-most edge of the plotting area. If - "auto", the anchor is equivalent to "center" for data- - referenced annotations or if there is an arrow, whereas - for paper-referenced with no arrow, the anchor picked - corresponds to the closest side. - xclick - Toggle this annotation when clicking a data point whose - `x` value is `xclick` rather than the annotation's `x` - value. - xref - Sets the annotation's x coordinate axis. If set to an x - axis id (e.g. "x" or "x2"), the `x` position refers to - an x coordinate If set to "paper", the `x` position - refers to the distance from the left side of the - plotting area in normalized coordinates where 0 (1) - corresponds to the left (right) side. - xshift - Shifts the position of the whole annotation and arrow - to the right (positive) or left (negative) by this many - pixels. - y - Sets the annotation's y position. If the axis `type` is - "log", then you must take the log of your desired - range. If the axis `type` is "date", it should be date - strings, like date data, though Date objects and unix - milliseconds will be accepted and converted to strings. - If the axis `type` is "category", it should be numbers, - using the scale where each category is assigned a - serial number from zero in the order it appears. - yanchor - Sets the text box's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the annotation. For example, if `y` is set - to 1, `yref` to "paper" and `yanchor` to "top" then the - top-most portion of the annotation lines up with the - top-most edge of the plotting area. If "auto", the - anchor is equivalent to "middle" for data-referenced - annotations or if there is an arrow, whereas for paper- - referenced with no arrow, the anchor picked corresponds - to the closest side. - yclick - Toggle this annotation when clicking a data point whose - `y` value is `yclick` rather than the annotation's `y` - value. - yref - Sets the annotation's y coordinate axis. If set to an y - axis id (e.g. "y" or "y2"), the `y` position refers to - an y coordinate If set to "paper", the `y` position - refers to the distance from the bottom of the plotting - area in normalized coordinates where 0 (1) corresponds - to the bottom (top). - yshift - Shifts the position of the whole annotation and arrow - up (positive) or down (negative) by this many pixels. - """ - - def __init__( - self, - arg=None, - align=None, - arrowcolor=None, - arrowhead=None, - arrowside=None, - arrowsize=None, - arrowwidth=None, - ax=None, - axref=None, - ay=None, - ayref=None, - bgcolor=None, - bordercolor=None, - borderpad=None, - borderwidth=None, - captureevents=None, - clicktoshow=None, - font=None, - height=None, - hoverlabel=None, - hovertext=None, - name=None, - opacity=None, - showarrow=None, - standoff=None, - startarrowhead=None, - startarrowsize=None, - startstandoff=None, - templateitemname=None, - text=None, - textangle=None, - valign=None, - visible=None, - width=None, - x=None, - xanchor=None, - xclick=None, - xref=None, - xshift=None, - y=None, - yanchor=None, - yclick=None, - yref=None, - yshift=None, - **kwargs - ): - """ - Construct a new Annotation object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.Annotation` - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - arrowwidth - Sets the width (in px) of annotation arrow line. - ax - Sets the x component of the arrow tail about the arrow - head. If `axref` is `pixel`, a positive (negative) - component corresponds to an arrow pointing from right - to left (left to right). If `axref` is an axis, this is - an absolute value on that axis, like `x`, NOT a - relative value. - axref - Indicates in what terms the tail of the annotation - (ax,ay) is specified. If `pixel`, `ax` is a relative - offset in pixels from `x`. If set to an x axis id - (e.g. "x" or "x2"), `ax` is specified in the same - terms as that axis. This is useful for trendline - annotations which should continue to indicate the - correct trend when zoomed. - ay - Sets the y component of the arrow tail about the arrow - head. If `ayref` is `pixel`, a positive (negative) - component corresponds to an arrow pointing from bottom - to top (top to bottom). If `ayref` is an axis, this is - an absolute value on that axis, like `y`, NOT a - relative value. - ayref - Indicates in what terms the tail of the annotation - (ax,ay) is specified. If `pixel`, `ay` is a relative - offset in pixels from `y`. If set to a y axis id (e.g. - "y" or "y2"), `ay` is specified in the same terms as - that axis. This is useful for trendline annotations - which should continue to indicate the correct trend - when zoomed. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the annotation - `text`. - borderpad - Sets the padding (in px) between the `text` and the - enclosing border. - borderwidth - Sets the width (in px) of the border enclosing the - annotation `text`. - captureevents - Determines whether the annotation text box captures - mouse move and click events, or allows those events to - pass through to data points in the plot that may be - behind the annotation. By default `captureevents` is - False unless `hovertext` is provided. If you use the - event `plotly_clickannotation` without `hovertext` you - must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the plot. If - you click a data point that exactly matches the `x` and - `y` values of this annotation, and it is hidden - (visible: false), it will appear. In "onoff" mode, you - must click the same point again to make it disappear, - so if you click multiple points, you can show multiple - annotations. In "onout" mode, a click anywhere else in - the plot (on another data point or not) will hide this - annotation. If you need to show/hide this annotation in - response to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for example to - label the side of a bar. To label markers though, - `standoff` is preferred over `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. Taller text - will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.annotation.Hoverlab - el` instance or dict with compatible properties - hovertext - Sets text to appear when hovering over this annotation. - If omitted or blank, no hover label will appear. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the annotation (text + arrow). - showarrow - Determines whether or not the annotation is drawn with - an arrow. If True, `text` is placed near the arrow's - tail. If False, `text` lines up with the `x` and `y` - provided. - standoff - Sets a distance, in pixels, to move the end arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - startstandoff - Sets a distance, in pixels, to move the start arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. Plotly - uses a subset of HTML tags to do things like newline - (
), bold (), italics (), hyperlinks - (). Tags , , - are also supported. - textangle - Sets the angle at which the `text` is drawn with - respect to the horizontal. - valign - Sets the vertical alignment of the `text` within the - box. Has an effect only if an explicit height is set to - override the text height. - visible - Determines whether or not this annotation is visible. - width - Sets an explicit width for the text box. null (default) - lets the text set the box width. Wider text will be - clipped. There is no automatic wrapping; use
to - start a new line. - x - Sets the annotation's x position. If the axis `type` is - "log", then you must take the log of your desired - range. If the axis `type` is "date", it should be date - strings, like date data, though Date objects and unix - milliseconds will be accepted and converted to strings. - If the axis `type` is "category", it should be numbers, - using the scale where each category is assigned a - serial number from zero in the order it appears. - xanchor - Sets the text box's horizontal position anchor This - anchor binds the `x` position to the "left", "center" - or "right" of the annotation. For example, if `x` is - set to 1, `xref` to "paper" and `xanchor` to "right" - then the right-most portion of the annotation lines up - with the right-most edge of the plotting area. If - "auto", the anchor is equivalent to "center" for data- - referenced annotations or if there is an arrow, whereas - for paper-referenced with no arrow, the anchor picked - corresponds to the closest side. - xclick - Toggle this annotation when clicking a data point whose - `x` value is `xclick` rather than the annotation's `x` - value. - xref - Sets the annotation's x coordinate axis. If set to an x - axis id (e.g. "x" or "x2"), the `x` position refers to - an x coordinate If set to "paper", the `x` position - refers to the distance from the left side of the - plotting area in normalized coordinates where 0 (1) - corresponds to the left (right) side. - xshift - Shifts the position of the whole annotation and arrow - to the right (positive) or left (negative) by this many - pixels. - y - Sets the annotation's y position. If the axis `type` is - "log", then you must take the log of your desired - range. If the axis `type` is "date", it should be date - strings, like date data, though Date objects and unix - milliseconds will be accepted and converted to strings. - If the axis `type` is "category", it should be numbers, - using the scale where each category is assigned a - serial number from zero in the order it appears. - yanchor - Sets the text box's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the annotation. For example, if `y` is set - to 1, `yref` to "paper" and `yanchor` to "top" then the - top-most portion of the annotation lines up with the - top-most edge of the plotting area. If "auto", the - anchor is equivalent to "middle" for data-referenced - annotations or if there is an arrow, whereas for paper- - referenced with no arrow, the anchor picked corresponds - to the closest side. - yclick - Toggle this annotation when clicking a data point whose - `y` value is `yclick` rather than the annotation's `y` - value. - yref - Sets the annotation's y coordinate axis. If set to an y - axis id (e.g. "y" or "y2"), the `y` position refers to - an y coordinate If set to "paper", the `y` position - refers to the distance from the bottom of the plotting - area in normalized coordinates where 0 (1) corresponds - to the bottom (top). - yshift - Shifts the position of the whole annotation and arrow - up (positive) or down (negative) by this many pixels. - - Returns - ------- - Annotation - """ - super(Annotation, self).__init__("annotations") - - # Validate arg - # ------------ - 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.Annotation -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.Annotation`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import annotation as v_annotation - - # Initialize validators - # --------------------- - self._validators["align"] = v_annotation.AlignValidator() - self._validators["arrowcolor"] = v_annotation.ArrowcolorValidator() - self._validators["arrowhead"] = v_annotation.ArrowheadValidator() - self._validators["arrowside"] = v_annotation.ArrowsideValidator() - self._validators["arrowsize"] = v_annotation.ArrowsizeValidator() - self._validators["arrowwidth"] = v_annotation.ArrowwidthValidator() - self._validators["ax"] = v_annotation.AxValidator() - self._validators["axref"] = v_annotation.AxrefValidator() - self._validators["ay"] = v_annotation.AyValidator() - self._validators["ayref"] = v_annotation.AyrefValidator() - self._validators["bgcolor"] = v_annotation.BgcolorValidator() - self._validators["bordercolor"] = v_annotation.BordercolorValidator() - self._validators["borderpad"] = v_annotation.BorderpadValidator() - self._validators["borderwidth"] = v_annotation.BorderwidthValidator() - self._validators["captureevents"] = v_annotation.CaptureeventsValidator() - self._validators["clicktoshow"] = v_annotation.ClicktoshowValidator() - self._validators["font"] = v_annotation.FontValidator() - self._validators["height"] = v_annotation.HeightValidator() - self._validators["hoverlabel"] = v_annotation.HoverlabelValidator() - self._validators["hovertext"] = v_annotation.HovertextValidator() - self._validators["name"] = v_annotation.NameValidator() - self._validators["opacity"] = v_annotation.OpacityValidator() - self._validators["showarrow"] = v_annotation.ShowarrowValidator() - self._validators["standoff"] = v_annotation.StandoffValidator() - self._validators["startarrowhead"] = v_annotation.StartarrowheadValidator() - self._validators["startarrowsize"] = v_annotation.StartarrowsizeValidator() - self._validators["startstandoff"] = v_annotation.StartstandoffValidator() - self._validators["templateitemname"] = v_annotation.TemplateitemnameValidator() - self._validators["text"] = v_annotation.TextValidator() - self._validators["textangle"] = v_annotation.TextangleValidator() - self._validators["valign"] = v_annotation.ValignValidator() - self._validators["visible"] = v_annotation.VisibleValidator() - self._validators["width"] = v_annotation.WidthValidator() - self._validators["x"] = v_annotation.XValidator() - self._validators["xanchor"] = v_annotation.XanchorValidator() - self._validators["xclick"] = v_annotation.XclickValidator() - self._validators["xref"] = v_annotation.XrefValidator() - self._validators["xshift"] = v_annotation.XshiftValidator() - self._validators["y"] = v_annotation.YValidator() - self._validators["yanchor"] = v_annotation.YanchorValidator() - self._validators["yclick"] = v_annotation.YclickValidator() - self._validators["yref"] = v_annotation.YrefValidator() - self._validators["yshift"] = v_annotation.YshiftValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("arrowcolor", None) - self["arrowcolor"] = arrowcolor if arrowcolor is not None else _v - _v = arg.pop("arrowhead", None) - self["arrowhead"] = arrowhead if arrowhead is not None else _v - _v = arg.pop("arrowside", None) - self["arrowside"] = arrowside if arrowside is not None else _v - _v = arg.pop("arrowsize", None) - self["arrowsize"] = arrowsize if arrowsize is not None else _v - _v = arg.pop("arrowwidth", None) - self["arrowwidth"] = arrowwidth if arrowwidth is not None else _v - _v = arg.pop("ax", None) - self["ax"] = ax if ax is not None else _v - _v = arg.pop("axref", None) - self["axref"] = axref if axref is not None else _v - _v = arg.pop("ay", None) - self["ay"] = ay if ay is not None else _v - _v = arg.pop("ayref", None) - self["ayref"] = ayref if ayref is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderpad", None) - self["borderpad"] = borderpad if borderpad is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("captureevents", None) - self["captureevents"] = captureevents if captureevents is not None else _v - _v = arg.pop("clicktoshow", None) - self["clicktoshow"] = clicktoshow if clicktoshow is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("height", None) - self["height"] = height if height is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("showarrow", None) - self["showarrow"] = showarrow if showarrow is not None else _v - _v = arg.pop("standoff", None) - self["standoff"] = standoff if standoff is not None else _v - _v = arg.pop("startarrowhead", None) - self["startarrowhead"] = startarrowhead if startarrowhead is not None else _v - _v = arg.pop("startarrowsize", None) - self["startarrowsize"] = startarrowsize if startarrowsize is not None else _v - _v = arg.pop("startstandoff", None) - self["startstandoff"] = startstandoff if startstandoff is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("valign", None) - self["valign"] = valign if valign is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xclick", None) - self["xclick"] = xclick if xclick is not None else _v - _v = arg.pop("xref", None) - self["xref"] = xref if xref is not None else _v - _v = arg.pop("xshift", None) - self["xshift"] = xshift if xshift is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("yclick", None) - self["yclick"] = yclick if yclick is not None else _v - _v = arg.pop("yref", None) - self["yref"] = yref if yref is not None else _v - _v = arg.pop("yshift", None) - self["yshift"] = yshift if yshift is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class AngularAxis(_BaseLayoutHierarchyType): - - # domain - # ------ - @property - def domain(self): - """ - Polar chart subplots are not supported yet. This key has - currently no effect. - - The 'domain' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'domain[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'domain[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # endpadding - # ---------- - @property - def endpadding(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. - - The 'endpadding' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["endpadding"] - - @endpadding.setter - def endpadding(self, val): - self["endpadding"] = val - - # range - # ----- - @property - def range(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Defines the start and end point of this angular axis. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # showline - # -------- - @property - def showline(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Determines whether or not the line bounding this - angular axis will be shown on the figure. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Determines whether or not the angular axis ticks will - feature tick labels. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the color of the tick lines on this angular - axis. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the length of the tick lines on this angular - axis. - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickorientation - # --------------- - @property - def tickorientation(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the orientation (from the paper perspective) of - the angular axis tick labels. - - The 'tickorientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['horizontal', 'vertical'] - - Returns - ------- - Any - """ - return self["tickorientation"] - - @tickorientation.setter - def tickorientation(self, val): - self["tickorientation"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the length of the tick lines on this angular - axis. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # visible - # ------- - @property - def visible(self): - """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Determines whether or not this axis will be visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - domain - Polar chart subplots are not supported yet. This key - has currently no effect. - endpadding - Legacy polar charts are deprecated! Please switch to - "polar" subplots. - range - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Defines the start and end point of - this angular axis. - showline - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the line - bounding this angular axis will be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the angular - axis ticks will feature tick labels. - tickcolor - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the color of the tick lines on - this angular axis. - ticklen - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this angular axis. - tickorientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the orientation (from the paper - perspective) of the angular axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this angular axis. - visible - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not this axis - will be visible. - """ - - def __init__( - self, - arg=None, - domain=None, - endpadding=None, - range=None, - showline=None, - showticklabels=None, - tickcolor=None, - ticklen=None, - tickorientation=None, - ticksuffix=None, - visible=None, - **kwargs - ): - """ - Construct a new AngularAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.AngularAxis` - domain - Polar chart subplots are not supported yet. This key - has currently no effect. - endpadding - Legacy polar charts are deprecated! Please switch to - "polar" subplots. - range - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Defines the start and end point of - this angular axis. - showline - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the line - bounding this angular axis will be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not the angular - axis ticks will feature tick labels. - tickcolor - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the color of the tick lines on - this angular axis. - ticklen - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this angular axis. - tickorientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the orientation (from the paper - perspective) of the angular axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the length of the tick lines on - this angular axis. - visible - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Determines whether or not this axis - will be visible. - - Returns - ------- - AngularAxis - """ - super(AngularAxis, self).__init__("angularaxis") - - # Validate arg - # ------------ - 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.AngularAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.AngularAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout import angularaxis as v_angularaxis - - # Initialize validators - # --------------------- - self._validators["domain"] = v_angularaxis.DomainValidator() - self._validators["endpadding"] = v_angularaxis.EndpaddingValidator() - self._validators["range"] = v_angularaxis.RangeValidator() - self._validators["showline"] = v_angularaxis.ShowlineValidator() - self._validators["showticklabels"] = v_angularaxis.ShowticklabelsValidator() - self._validators["tickcolor"] = v_angularaxis.TickcolorValidator() - self._validators["ticklen"] = v_angularaxis.TicklenValidator() - self._validators["tickorientation"] = v_angularaxis.TickorientationValidator() - self._validators["ticksuffix"] = v_angularaxis.TicksuffixValidator() - self._validators["visible"] = v_angularaxis.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("endpadding", None) - self["endpadding"] = endpadding if endpadding is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickorientation", None) - self["tickorientation"] = tickorientation if tickorientation is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "AngularAxis", - "Annotation", - "Annotation", - "Coloraxis", - "Colorscale", - "Font", - "Geo", - "Grid", - "Hoverlabel", - "Image", - "Image", - "Legend", - "Mapbox", - "Margin", - "Modebar", - "Polar", - "RadialAxis", - "Scene", - "Shape", - "Shape", - "Slider", - "Slider", - "Template", - "Ternary", - "Title", - "Transition", - "Uniformtext", - "Updatemenu", - "Updatemenu", - "XAxis", - "YAxis", - "annotation", - "coloraxis", - "geo", - "grid", - "hoverlabel", - "legend", - "mapbox", - "polar", - "scene", - "shape", - "slider", - "template", - "ternary", - "title", - "updatemenu", - "xaxis", - "yaxis", -] - -from plotly.graph_objs.layout import yaxis -from plotly.graph_objs.layout import xaxis -from plotly.graph_objs.layout import updatemenu -from plotly.graph_objs.layout import title -from plotly.graph_objs.layout import ternary -from plotly.graph_objs.layout import template -from plotly.graph_objs.layout import slider -from plotly.graph_objs.layout import shape -from plotly.graph_objs.layout import scene -from plotly.graph_objs.layout import polar -from plotly.graph_objs.layout import mapbox -from plotly.graph_objs.layout import legend -from plotly.graph_objs.layout import hoverlabel -from plotly.graph_objs.layout import grid -from plotly.graph_objs.layout import geo -from plotly.graph_objs.layout import coloraxis -from plotly.graph_objs.layout import annotation +import sys + +if sys.version_info < (3, 7): + from ._yaxis import YAxis + from ._xaxis import XAxis + from ._updatemenu import Updatemenu + from ._uniformtext import Uniformtext + from ._transition import Transition + from ._title import Title + from ._ternary import Ternary + from ._template import Template + from ._slider import Slider + from ._shape import Shape + from ._scene import Scene + from ._radialaxis import RadialAxis + from ._polar import Polar + from ._modebar import Modebar + from ._margin import Margin + from ._mapbox import Mapbox + from ._legend import Legend + from ._image import Image + from ._hoverlabel import Hoverlabel + from ._grid import Grid + from ._geo import Geo + from ._font import Font + from ._colorscale import Colorscale + from ._coloraxis import Coloraxis + from ._annotation import Annotation + from ._angularaxis import AngularAxis + from . import yaxis + from . import xaxis + from . import updatemenu + from . import title + from . import ternary + from . import template + from . import slider + from . import shape + from . import scene + from . import polar + from . import mapbox + from . import legend + from . import hoverlabel + from . import grid + from . import geo + from . import coloraxis + from . import annotation +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".yaxis", + ".xaxis", + ".updatemenu", + ".title", + ".ternary", + ".template", + ".slider", + ".shape", + ".scene", + ".polar", + ".mapbox", + ".legend", + ".hoverlabel", + ".grid", + ".geo", + ".coloraxis", + ".annotation", + ], + [ + "._yaxis.YAxis", + "._xaxis.XAxis", + "._updatemenu.Updatemenu", + "._uniformtext.Uniformtext", + "._transition.Transition", + "._title.Title", + "._ternary.Ternary", + "._template.Template", + "._slider.Slider", + "._shape.Shape", + "._scene.Scene", + "._radialaxis.RadialAxis", + "._polar.Polar", + "._modebar.Modebar", + "._margin.Margin", + "._mapbox.Mapbox", + "._legend.Legend", + "._image.Image", + "._hoverlabel.Hoverlabel", + "._grid.Grid", + "._geo.Geo", + "._font.Font", + "._colorscale.Colorscale", + "._coloraxis.Coloraxis", + "._annotation.Annotation", + "._angularaxis.AngularAxis", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/_angularaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_angularaxis.py new file mode 100644 index 00000000000..063ae096ba4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_angularaxis.py @@ -0,0 +1,478 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class AngularAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.angularaxis" + _valid_props = { + "domain", + "endpadding", + "range", + "showline", + "showticklabels", + "tickcolor", + "ticklen", + "tickorientation", + "ticksuffix", + "visible", + } + + # domain + # ------ + @property + def domain(self): + """ + Polar chart subplots are not supported yet. This key has + currently no effect. + + The 'domain' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'domain[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'domain[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # endpadding + # ---------- + @property + def endpadding(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. + + The 'endpadding' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["endpadding"] + + @endpadding.setter + def endpadding(self, val): + self["endpadding"] = val + + # range + # ----- + @property + def range(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Defines the start and end point of this angular axis. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # showline + # -------- + @property + def showline(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Determines whether or not the line bounding this + angular axis will be shown on the figure. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Determines whether or not the angular axis ticks will + feature tick labels. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the color of the tick lines on this angular + axis. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the length of the tick lines on this angular + axis. + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickorientation + # --------------- + @property + def tickorientation(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the orientation (from the paper perspective) of + the angular axis tick labels. + + The 'tickorientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['horizontal', 'vertical'] + + Returns + ------- + Any + """ + return self["tickorientation"] + + @tickorientation.setter + def tickorientation(self, val): + self["tickorientation"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the length of the tick lines on this angular + axis. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # visible + # ------- + @property + def visible(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Determines whether or not this axis will be visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + domain + Polar chart subplots are not supported yet. This key + has currently no effect. + endpadding + Legacy polar charts are deprecated! Please switch to + "polar" subplots. + range + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Defines the start and end point of + this angular axis. + showline + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the line + bounding this angular axis will be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the angular + axis ticks will feature tick labels. + tickcolor + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the color of the tick lines on + this angular axis. + ticklen + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this angular axis. + tickorientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the orientation (from the paper + perspective) of the angular axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this angular axis. + visible + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not this axis + will be visible. + """ + + def __init__( + self, + arg=None, + domain=None, + endpadding=None, + range=None, + showline=None, + showticklabels=None, + tickcolor=None, + ticklen=None, + tickorientation=None, + ticksuffix=None, + visible=None, + **kwargs + ): + """ + Construct a new AngularAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.AngularAxis` + domain + Polar chart subplots are not supported yet. This key + has currently no effect. + endpadding + Legacy polar charts are deprecated! Please switch to + "polar" subplots. + range + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Defines the start and end point of + this angular axis. + showline + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the line + bounding this angular axis will be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the angular + axis ticks will feature tick labels. + tickcolor + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the color of the tick lines on + this angular axis. + ticklen + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this angular axis. + tickorientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the orientation (from the paper + perspective) of the angular axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this angular axis. + visible + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not this axis + will be visible. + + Returns + ------- + AngularAxis + """ + super(AngularAxis, self).__init__("angularaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.AngularAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.AngularAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("endpadding", None) + _v = endpadding if endpadding is not None else _v + if _v is not None: + self["endpadding"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickorientation", None) + _v = tickorientation if tickorientation is not None else _v + if _v is not None: + self["tickorientation"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_annotation.py b/packages/python/plotly/plotly/graph_objs/layout/_annotation.py new file mode 100644 index 00000000000..57072714cea --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_annotation.py @@ -0,0 +1,1946 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Annotation(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.annotation" + _valid_props = { + "align", + "arrowcolor", + "arrowhead", + "arrowside", + "arrowsize", + "arrowwidth", + "ax", + "axref", + "ay", + "ayref", + "bgcolor", + "bordercolor", + "borderpad", + "borderwidth", + "captureevents", + "clicktoshow", + "font", + "height", + "hoverlabel", + "hovertext", + "name", + "opacity", + "showarrow", + "standoff", + "startarrowhead", + "startarrowsize", + "startstandoff", + "templateitemname", + "text", + "textangle", + "valign", + "visible", + "width", + "x", + "xanchor", + "xclick", + "xref", + "xshift", + "y", + "yanchor", + "yclick", + "yref", + "yshift", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the `text` within the box. Has + an effect only if `text` spans two or more lines (i.e. `text` + contains one or more
HTML tags) or if an explicit width is + set to override the text width. + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # arrowcolor + # ---------- + @property + def arrowcolor(self): + """ + Sets the color of the annotation arrow. + + The 'arrowcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["arrowcolor"] + + @arrowcolor.setter + def arrowcolor(self, val): + self["arrowcolor"] = val + + # arrowhead + # --------- + @property + def arrowhead(self): + """ + Sets the end annotation arrow head style. + + The 'arrowhead' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 8] + + Returns + ------- + int + """ + return self["arrowhead"] + + @arrowhead.setter + def arrowhead(self, val): + self["arrowhead"] = val + + # arrowside + # --------- + @property + def arrowside(self): + """ + Sets the annotation arrow head position. + + The 'arrowside' property is a flaglist and may be specified + as a string containing: + - Any combination of ['end', 'start'] joined with '+' characters + (e.g. 'end+start') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["arrowside"] + + @arrowside.setter + def arrowside(self, val): + self["arrowside"] = val + + # arrowsize + # --------- + @property + def arrowsize(self): + """ + Sets the size of the end annotation arrow head, relative to + `arrowwidth`. A value of 1 (default) gives a head about 3x as + wide as the line. + + The 'arrowsize' property is a number and may be specified as: + - An int or float in the interval [0.3, inf] + + Returns + ------- + int|float + """ + return self["arrowsize"] + + @arrowsize.setter + def arrowsize(self, val): + self["arrowsize"] = val + + # arrowwidth + # ---------- + @property + def arrowwidth(self): + """ + Sets the width (in px) of annotation arrow line. + + The 'arrowwidth' property is a number and may be specified as: + - An int or float in the interval [0.1, inf] + + Returns + ------- + int|float + """ + return self["arrowwidth"] + + @arrowwidth.setter + def arrowwidth(self, val): + self["arrowwidth"] = val + + # ax + # -- + @property + def ax(self): + """ + Sets the x component of the arrow tail about the arrow head. If + `axref` is `pixel`, a positive (negative) component + corresponds to an arrow pointing from right to left (left to + right). If `axref` is an axis, this is an absolute value on + that axis, like `x`, NOT a relative value. + + The 'ax' property accepts values of any type + + Returns + ------- + Any + """ + return self["ax"] + + @ax.setter + def ax(self, val): + self["ax"] = val + + # axref + # ----- + @property + def axref(self): + """ + Indicates in what terms the tail of the annotation (ax,ay) is + specified. If `pixel`, `ax` is a relative offset in pixels + from `x`. If set to an x axis id (e.g. "x" or "x2"), `ax` is + specified in the same terms as that axis. This is useful for + trendline annotations which should continue to indicate the + correct trend when zoomed. + + The 'axref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['pixel'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["axref"] + + @axref.setter + def axref(self, val): + self["axref"] = val + + # ay + # -- + @property + def ay(self): + """ + Sets the y component of the arrow tail about the arrow head. If + `ayref` is `pixel`, a positive (negative) component + corresponds to an arrow pointing from bottom to top (top to + bottom). If `ayref` is an axis, this is an absolute value on + that axis, like `y`, NOT a relative value. + + The 'ay' property accepts values of any type + + Returns + ------- + Any + """ + return self["ay"] + + @ay.setter + def ay(self, val): + self["ay"] = val + + # ayref + # ----- + @property + def ayref(self): + """ + Indicates in what terms the tail of the annotation (ax,ay) is + specified. If `pixel`, `ay` is a relative offset in pixels + from `y`. If set to a y axis id (e.g. "y" or "y2"), `ay` is + specified in the same terms as that axis. This is useful for + trendline annotations which should continue to indicate the + correct trend when zoomed. + + The 'ayref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['pixel'] + - A string that matches one of the following regular expressions: + ['^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["ayref"] + + @ayref.setter + def ayref(self, val): + self["ayref"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the annotation. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the annotation `text`. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderpad + # --------- + @property + def borderpad(self): + """ + Sets the padding (in px) between the `text` and the enclosing + border. + + The 'borderpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderpad"] + + @borderpad.setter + def borderpad(self, val): + self["borderpad"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the annotation + `text`. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # captureevents + # ------------- + @property + def captureevents(self): + """ + Determines whether the annotation text box captures mouse move + and click events, or allows those events to pass through to + data points in the plot that may be behind the annotation. By + default `captureevents` is False unless `hovertext` is + provided. If you use the event `plotly_clickannotation` without + `hovertext` you must explicitly enable `captureevents`. + + The 'captureevents' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["captureevents"] + + @captureevents.setter + def captureevents(self, val): + self["captureevents"] = val + + # clicktoshow + # ----------- + @property + def clicktoshow(self): + """ + Makes this annotation respond to clicks on the plot. If you + click a data point that exactly matches the `x` and `y` values + of this annotation, and it is hidden (visible: false), it will + appear. In "onoff" mode, you must click the same point again to + make it disappear, so if you click multiple points, you can + show multiple annotations. In "onout" mode, a click anywhere + else in the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set `xclick` + and/or `yclick`. This is useful for example to label the side + of a bar. To label markers though, `standoff` is preferred over + `xclick` and `yclick`. + + The 'clicktoshow' property is an enumeration that may be specified as: + - One of the following enumeration values: + [False, 'onoff', 'onout'] + + Returns + ------- + Any + """ + return self["clicktoshow"] + + @clicktoshow.setter + def clicktoshow(self, val): + self["clicktoshow"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the annotation text font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.annotation.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.annotation.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # height + # ------ + @property + def height(self): + """ + Sets an explicit height for the text box. null (default) lets + the text set the box height. Taller text will be clipped. + + The 'height' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["height"] + + @height.setter + def height(self, val): + self["height"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + bgcolor + Sets the background color of the hover label. + By default uses the annotation's `bgcolor` made + opaque, or white if it was transparent. + bordercolor + Sets the border color of the hover label. By + default uses either dark grey or white, for + maximum contrast with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses + the global hover font and size, with color from + `hoverlabel.bordercolor`. + + Returns + ------- + plotly.graph_objs.layout.annotation.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets text to appear when hovering over this annotation. If + omitted or blank, no hover label will appear. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the annotation (text + arrow). + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # showarrow + # --------- + @property + def showarrow(self): + """ + Determines whether or not the annotation is drawn with an + arrow. If True, `text` is placed near the arrow's tail. If + False, `text` lines up with the `x` and `y` provided. + + The 'showarrow' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + # standoff + # -------- + @property + def standoff(self): + """ + Sets a distance, in pixels, to move the end arrowhead away from + the position it is pointing at, for example to point at the + edge of a marker independent of zoom. Note that this shortens + the arrow from the `ax` / `ay` vector, in contrast to `xshift` + / `yshift` which moves everything by this amount. + + The 'standoff' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["standoff"] + + @standoff.setter + def standoff(self, val): + self["standoff"] = val + + # startarrowhead + # -------------- + @property + def startarrowhead(self): + """ + Sets the start annotation arrow head style. + + The 'startarrowhead' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 8] + + Returns + ------- + int + """ + return self["startarrowhead"] + + @startarrowhead.setter + def startarrowhead(self, val): + self["startarrowhead"] = val + + # startarrowsize + # -------------- + @property + def startarrowsize(self): + """ + Sets the size of the start annotation arrow head, relative to + `arrowwidth`. A value of 1 (default) gives a head about 3x as + wide as the line. + + The 'startarrowsize' property is a number and may be specified as: + - An int or float in the interval [0.3, inf] + + Returns + ------- + int|float + """ + return self["startarrowsize"] + + @startarrowsize.setter + def startarrowsize(self, val): + self["startarrowsize"] = val + + # startstandoff + # ------------- + @property + def startstandoff(self): + """ + Sets a distance, in pixels, to move the start arrowhead away + from the position it is pointing at, for example to point at + the edge of a marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, in contrast to + `xshift` / `yshift` which moves everything by this amount. + + The 'startstandoff' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["startstandoff"] + + @startstandoff.setter + def startstandoff(self, val): + self["startstandoff"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text associated with this annotation. Plotly uses a + subset of HTML tags to do things like newline (
), bold + (), italics (), hyperlinks (). + Tags , , are also supported. + + 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 + + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle at which the `text` is drawn with respect to the + horizontal. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # valign + # ------ + @property + def valign(self): + """ + Sets the vertical alignment of the `text` within the box. Has + an effect only if an explicit height is set to override the + text height. + + The 'valign' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["valign"] + + @valign.setter + def valign(self, val): + self["valign"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this annotation is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets an explicit width for the text box. null (default) lets + the text set the box width. Wider text will be clipped. There + is no automatic wrapping; use
to start a new line. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # x + # - + @property + def x(self): + """ + Sets the annotation's x position. If the axis `type` is "log", + then you must take the log of your desired range. If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'x' property accepts values of any type + + Returns + ------- + Any + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the text box's horizontal position anchor This anchor + binds the `x` position to the "left", "center" or "right" of + the annotation. For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the right-most portion of + the annotation lines up with the right-most edge of the + plotting area. If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is an arrow, + whereas for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xclick + # ------ + @property + def xclick(self): + """ + Toggle this annotation when clicking a data point whose `x` + value is `xclick` rather than the annotation's `x` value. + + The 'xclick' property accepts values of any type + + Returns + ------- + Any + """ + return self["xclick"] + + @xclick.setter + def xclick(self, val): + self["xclick"] = val + + # xref + # ---- + @property + def xref(self): + """ + Sets the annotation's x coordinate axis. If set to an x axis id + (e.g. "x" or "x2"), the `x` position refers to an x coordinate + If set to "paper", the `x` position refers to the distance from + the left side of the plotting area in normalized coordinates + where 0 (1) corresponds to the left (right) side. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['paper'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + # xshift + # ------ + @property + def xshift(self): + """ + Shifts the position of the whole annotation and arrow to the + right (positive) or left (negative) by this many pixels. + + The 'xshift' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["xshift"] + + @xshift.setter + def xshift(self, val): + self["xshift"] = val + + # y + # - + @property + def y(self): + """ + Sets the annotation's y position. If the axis `type` is "log", + then you must take the log of your desired range. If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'y' property accepts values of any type + + Returns + ------- + Any + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the text box's vertical position anchor This anchor binds + the `y` position to the "top", "middle" or "bottom" of the + annotation. For example, if `y` is set to 1, `yref` to "paper" + and `yanchor` to "top" then the top-most portion of the + annotation lines up with the top-most edge of the plotting + area. If "auto", the anchor is equivalent to "middle" for data- + referenced annotations or if there is an arrow, whereas for + paper-referenced with no arrow, the anchor picked corresponds + to the closest side. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # yclick + # ------ + @property + def yclick(self): + """ + Toggle this annotation when clicking a data point whose `y` + value is `yclick` rather than the annotation's `y` value. + + The 'yclick' property accepts values of any type + + Returns + ------- + Any + """ + return self["yclick"] + + @yclick.setter + def yclick(self, val): + self["yclick"] = val + + # yref + # ---- + @property + def yref(self): + """ + Sets the annotation's y coordinate axis. If set to an y axis id + (e.g. "y" or "y2"), the `y` position refers to an y coordinate + If set to "paper", the `y` position refers to the distance from + the bottom of the plotting area in normalized coordinates where + 0 (1) corresponds to the bottom (top). + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['paper'] + - A string that matches one of the following regular expressions: + ['^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + # yshift + # ------ + @property + def yshift(self): + """ + Shifts the position of the whole annotation and arrow up + (positive) or down (negative) by this many pixels. + + The 'yshift' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["yshift"] + + @yshift.setter + def yshift(self, val): + self["yshift"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head. If `axref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from right + to left (left to right). If `axref` is an axis, this is + an absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ax` is a relative + offset in pixels from `x`. If set to an x axis id + (e.g. "x" or "x2"), `ax` is specified in the same + terms as that axis. This is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. + ay + Sets the y component of the arrow tail about the arrow + head. If `ayref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from bottom + to top (top to bottom). If `ayref` is an axis, this is + an absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ay` is a relative + offset in pixels from `y`. If set to a y axis id (e.g. + "y" or "y2"), `ay` is specified in the same terms as + that axis. This is useful for trendline annotations + which should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the plot. If + you click a data point that exactly matches the `x` and + `y` values of this annotation, and it is hidden + (visible: false), it will appear. In "onoff" mode, you + must click the same point again to make it disappear, + so if you click multiple points, you can show multiple + annotations. In "onout" mode, a click anywhere else in + the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for example to + label the side of a bar. To label markers though, + `standoff` is preferred over `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.annotation.Hoverlab + el` instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (
), bold (), italics (), hyperlinks + (). Tags , , + are also supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xclick + Toggle this annotation when clicking a data point whose + `x` value is `xclick` rather than the annotation's `x` + value. + xref + Sets the annotation's x coordinate axis. If set to an x + axis id (e.g. "x" or "x2"), the `x` position refers to + an x coordinate If set to "paper", the `x` position + refers to the distance from the left side of the + plotting area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yclick + Toggle this annotation when clicking a data point whose + `y` value is `yclick` rather than the annotation's `y` + value. + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + """ + + def __init__( + self, + arg=None, + align=None, + arrowcolor=None, + arrowhead=None, + arrowside=None, + arrowsize=None, + arrowwidth=None, + ax=None, + axref=None, + ay=None, + ayref=None, + bgcolor=None, + bordercolor=None, + borderpad=None, + borderwidth=None, + captureevents=None, + clicktoshow=None, + font=None, + height=None, + hoverlabel=None, + hovertext=None, + name=None, + opacity=None, + showarrow=None, + standoff=None, + startarrowhead=None, + startarrowsize=None, + startstandoff=None, + templateitemname=None, + text=None, + textangle=None, + valign=None, + visible=None, + width=None, + x=None, + xanchor=None, + xclick=None, + xref=None, + xshift=None, + y=None, + yanchor=None, + yclick=None, + yref=None, + yshift=None, + **kwargs + ): + """ + Construct a new Annotation object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Annotation` + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head. If `axref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from right + to left (left to right). If `axref` is an axis, this is + an absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ax` is a relative + offset in pixels from `x`. If set to an x axis id + (e.g. "x" or "x2"), `ax` is specified in the same + terms as that axis. This is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. + ay + Sets the y component of the arrow tail about the arrow + head. If `ayref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from bottom + to top (top to bottom). If `ayref` is an axis, this is + an absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ay` is a relative + offset in pixels from `y`. If set to a y axis id (e.g. + "y" or "y2"), `ay` is specified in the same terms as + that axis. This is useful for trendline annotations + which should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the plot. If + you click a data point that exactly matches the `x` and + `y` values of this annotation, and it is hidden + (visible: false), it will appear. In "onoff" mode, you + must click the same point again to make it disappear, + so if you click multiple points, you can show multiple + annotations. In "onout" mode, a click anywhere else in + the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for example to + label the side of a bar. To label markers though, + `standoff` is preferred over `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.annotation.Hoverlab + el` instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (
), bold (), italics (), hyperlinks + (). Tags , , + are also supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xclick + Toggle this annotation when clicking a data point whose + `x` value is `xclick` rather than the annotation's `x` + value. + xref + Sets the annotation's x coordinate axis. If set to an x + axis id (e.g. "x" or "x2"), the `x` position refers to + an x coordinate If set to "paper", the `x` position + refers to the distance from the left side of the + plotting area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yclick + Toggle this annotation when clicking a data point whose + `y` value is `yclick` rather than the annotation's `y` + value. + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + + Returns + ------- + Annotation + """ + super(Annotation, self).__init__("annotations") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Annotation +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Annotation`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("arrowcolor", None) + _v = arrowcolor if arrowcolor is not None else _v + if _v is not None: + self["arrowcolor"] = _v + _v = arg.pop("arrowhead", None) + _v = arrowhead if arrowhead is not None else _v + if _v is not None: + self["arrowhead"] = _v + _v = arg.pop("arrowside", None) + _v = arrowside if arrowside is not None else _v + if _v is not None: + self["arrowside"] = _v + _v = arg.pop("arrowsize", None) + _v = arrowsize if arrowsize is not None else _v + if _v is not None: + self["arrowsize"] = _v + _v = arg.pop("arrowwidth", None) + _v = arrowwidth if arrowwidth is not None else _v + if _v is not None: + self["arrowwidth"] = _v + _v = arg.pop("ax", None) + _v = ax if ax is not None else _v + if _v is not None: + self["ax"] = _v + _v = arg.pop("axref", None) + _v = axref if axref is not None else _v + if _v is not None: + self["axref"] = _v + _v = arg.pop("ay", None) + _v = ay if ay is not None else _v + if _v is not None: + self["ay"] = _v + _v = arg.pop("ayref", None) + _v = ayref if ayref is not None else _v + if _v is not None: + self["ayref"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderpad", None) + _v = borderpad if borderpad is not None else _v + if _v is not None: + self["borderpad"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("captureevents", None) + _v = captureevents if captureevents is not None else _v + if _v is not None: + self["captureevents"] = _v + _v = arg.pop("clicktoshow", None) + _v = clicktoshow if clicktoshow is not None else _v + if _v is not None: + self["clicktoshow"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("height", None) + _v = height if height is not None else _v + if _v is not None: + self["height"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("showarrow", None) + _v = showarrow if showarrow is not None else _v + if _v is not None: + self["showarrow"] = _v + _v = arg.pop("standoff", None) + _v = standoff if standoff is not None else _v + if _v is not None: + self["standoff"] = _v + _v = arg.pop("startarrowhead", None) + _v = startarrowhead if startarrowhead is not None else _v + if _v is not None: + self["startarrowhead"] = _v + _v = arg.pop("startarrowsize", None) + _v = startarrowsize if startarrowsize is not None else _v + if _v is not None: + self["startarrowsize"] = _v + _v = arg.pop("startstandoff", None) + _v = startstandoff if startstandoff is not None else _v + if _v is not None: + self["startstandoff"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textangle", None) + _v = textangle if textangle is not None else _v + if _v is not None: + self["textangle"] = _v + _v = arg.pop("valign", None) + _v = valign if valign is not None else _v + if _v is not None: + self["valign"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xclick", None) + _v = xclick if xclick is not None else _v + if _v is not None: + self["xclick"] = _v + _v = arg.pop("xref", None) + _v = xref if xref is not None else _v + if _v is not None: + self["xref"] = _v + _v = arg.pop("xshift", None) + _v = xshift if xshift is not None else _v + if _v is not None: + self["xshift"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("yclick", None) + _v = yclick if yclick is not None else _v + if _v is not None: + self["yclick"] = _v + _v = arg.pop("yref", None) + _v = yref if yref is not None else _v + if _v is not None: + self["yref"] = _v + _v = arg.pop("yshift", None) + _v = yshift if yshift is not None else _v + if _v is not None: + self["yshift"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_coloraxis.py b/packages/python/plotly/plotly/graph_objs/layout/_coloraxis.py new file mode 100644 index 00000000000..19b89908dd4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_coloraxis.py @@ -0,0 +1,671 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Coloraxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.coloraxis" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "colorbar", + "colorscale", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here corresponding trace color + array(s)) or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as corresponding trace color array(s) and if set, + `cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as corresponding trace color array(s). Has no effect + when `cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as corresponding trace color array(s) and if set, + `cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.coloraxis.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + coloraxis.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.coloraxis.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of + layout.coloraxis.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.coloraxis.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.coloraxis.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + layout.coloraxis.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.layout.coloraxis.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here corresponding + trace color array(s)) or the bounds set in `cmin` and + `cmax` Defaults to `false` when `cmin` and `cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as corresponding trace color + array(s) and if set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as corresponding trace + color array(s). Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as corresponding trace color + array(s) and if set, `cmax` must be set as well. + colorbar + :class:`plotly.graph_objects.layout.coloraxis.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + colorbar=None, + colorscale=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Coloraxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Coloraxis` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here corresponding + trace color array(s)) or the bounds set in `cmin` and + `cmax` Defaults to `false` when `cmin` and `cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as corresponding trace color + array(s) and if set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as corresponding trace + color array(s). Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as corresponding trace color + array(s) and if set, `cmax` must be set as well. + colorbar + :class:`plotly.graph_objects.layout.coloraxis.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. + + Returns + ------- + Coloraxis + """ + super(Coloraxis, self).__init__("coloraxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Coloraxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Coloraxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_colorscale.py b/packages/python/plotly/plotly/graph_objs/layout/_colorscale.py new file mode 100644 index 00000000000..a264dde273c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_colorscale.py @@ -0,0 +1,242 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Colorscale(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.colorscale" + _valid_props = {"diverging", "sequential", "sequentialminus"} + + # diverging + # --------- + @property + def diverging(self): + """ + Sets the default diverging colorscale. Note that + `autocolorscale` must be true for this attribute to work. + + The 'diverging' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["diverging"] + + @diverging.setter + def diverging(self, val): + self["diverging"] = val + + # sequential + # ---------- + @property + def sequential(self): + """ + Sets the default sequential colorscale for positive values. + Note that `autocolorscale` must be true for this attribute to + work. + + The 'sequential' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["sequential"] + + @sequential.setter + def sequential(self, val): + self["sequential"] = val + + # sequentialminus + # --------------- + @property + def sequentialminus(self): + """ + Sets the default sequential colorscale for negative values. + Note that `autocolorscale` must be true for this attribute to + work. + + The 'sequentialminus' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["sequentialminus"] + + @sequentialminus.setter + def sequentialminus(self, val): + self["sequentialminus"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + diverging + Sets the default diverging colorscale. Note that + `autocolorscale` must be true for this attribute to + work. + sequential + Sets the default sequential colorscale for positive + values. Note that `autocolorscale` must be true for + this attribute to work. + sequentialminus + Sets the default sequential colorscale for negative + values. Note that `autocolorscale` must be true for + this attribute to work. + """ + + def __init__( + self, arg=None, diverging=None, sequential=None, sequentialminus=None, **kwargs + ): + """ + Construct a new Colorscale object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Colorscale` + diverging + Sets the default diverging colorscale. Note that + `autocolorscale` must be true for this attribute to + work. + sequential + Sets the default sequential colorscale for positive + values. Note that `autocolorscale` must be true for + this attribute to work. + sequentialminus + Sets the default sequential colorscale for negative + values. Note that `autocolorscale` must be true for + this attribute to work. + + Returns + ------- + Colorscale + """ + super(Colorscale, self).__init__("colorscale") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Colorscale +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Colorscale`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("diverging", None) + _v = diverging if diverging is not None else _v + if _v is not None: + self["diverging"] = _v + _v = arg.pop("sequential", None) + _v = sequential if sequential is not None else _v + if _v is not None: + self["sequential"] = _v + _v = arg.pop("sequentialminus", None) + _v = sequentialminus if sequentialminus is not None else _v + if _v is not None: + self["sequentialminus"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_font.py b/packages/python/plotly/plotly/graph_objs/layout/_font.py new file mode 100644 index 00000000000..d40eb5f9a7f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the global font. Note that fonts used in traces and other + layout components inherit from the global font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_geo.py b/packages/python/plotly/plotly/graph_objs/layout/_geo.py new file mode 100644 index 00000000000..feacbea24eb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_geo.py @@ -0,0 +1,1557 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Geo(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.geo" + _valid_props = { + "bgcolor", + "center", + "coastlinecolor", + "coastlinewidth", + "countrycolor", + "countrywidth", + "domain", + "fitbounds", + "framecolor", + "framewidth", + "lakecolor", + "landcolor", + "lataxis", + "lonaxis", + "oceancolor", + "projection", + "resolution", + "rivercolor", + "riverwidth", + "scope", + "showcoastlines", + "showcountries", + "showframe", + "showlakes", + "showland", + "showocean", + "showrivers", + "showsubunits", + "subunitcolor", + "subunitwidth", + "uirevision", + "visible", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Set the background color of the map + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # center + # ------ + @property + def center(self): + """ + The 'center' property is an instance of Center + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.geo.Center` + - A dict of string/value properties that will be passed + to the Center constructor + + Supported dict properties: + + lat + Sets the latitude of the map's center. For all + projection types, the map's latitude center + lies at the middle of the latitude range by + default. + lon + Sets the longitude of the map's center. By + default, the map's longitude center lies at the + middle of the longitude range for scoped + projection and above `projection.rotation.lon` + otherwise. + + Returns + ------- + plotly.graph_objs.layout.geo.Center + """ + return self["center"] + + @center.setter + def center(self, val): + self["center"] = val + + # coastlinecolor + # -------------- + @property + def coastlinecolor(self): + """ + Sets the coastline color. + + The 'coastlinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["coastlinecolor"] + + @coastlinecolor.setter + def coastlinecolor(self, val): + self["coastlinecolor"] = val + + # coastlinewidth + # -------------- + @property + def coastlinewidth(self): + """ + Sets the coastline stroke width (in px). + + The 'coastlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["coastlinewidth"] + + @coastlinewidth.setter + def coastlinewidth(self, val): + self["coastlinewidth"] = val + + # countrycolor + # ------------ + @property + def countrycolor(self): + """ + Sets line color of the country boundaries. + + The 'countrycolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["countrycolor"] + + @countrycolor.setter + def countrycolor(self, val): + self["countrycolor"] = val + + # countrywidth + # ------------ + @property + def countrywidth(self): + """ + Sets line width (in px) of the country boundaries. + + The 'countrywidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["countrywidth"] + + @countrywidth.setter + def countrywidth(self, val): + self["countrywidth"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.geo.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this geo subplot . + Note that geo subplots are constrained by + domain. In general, when `projection.scale` is + set to 1. a map will fit either its x or y + domain, but not both. + row + If there is a layout grid, use the domain for + this row in the grid for this geo subplot . + Note that geo subplots are constrained by + domain. In general, when `projection.scale` is + set to 1. a map will fit either its x or y + domain, but not both. + x + Sets the horizontal domain of this geo subplot + (in plot fraction). Note that geo subplots are + constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit + either its x or y domain, but not both. + y + Sets the vertical domain of this geo subplot + (in plot fraction). Note that geo subplots are + constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit + either its x or y domain, but not both. + + Returns + ------- + plotly.graph_objs.layout.geo.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # fitbounds + # --------- + @property + def fitbounds(self): + """ + Determines if this subplot's view settings are auto-computed to + fit trace data. On scoped maps, setting `fitbounds` leads to + `center.lon` and `center.lat` getting auto-filled. On maps with + a non-clipped projection, setting `fitbounds` leads to + `center.lon`, `center.lat`, and `projection.rotation.lon` + getting auto-filled. On maps with a clipped projection, setting + `fitbounds` leads to `center.lon`, `center.lat`, + `projection.rotation.lon`, `projection.rotation.lat`, + `lonaxis.range` and `lonaxis.range` getting auto-filled. If + "locations", only the trace's visible locations are considered + in the `fitbounds` computations. If "geojson", the entire trace + input `geojson` (if provided) is considered in the `fitbounds` + computations, Defaults to False. + + The 'fitbounds' property is an enumeration that may be specified as: + - One of the following enumeration values: + [False, 'locations', 'geojson'] + + Returns + ------- + Any + """ + return self["fitbounds"] + + @fitbounds.setter + def fitbounds(self, val): + self["fitbounds"] = val + + # framecolor + # ---------- + @property + def framecolor(self): + """ + Sets the color the frame. + + The 'framecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["framecolor"] + + @framecolor.setter + def framecolor(self, val): + self["framecolor"] = val + + # framewidth + # ---------- + @property + def framewidth(self): + """ + Sets the stroke width (in px) of the frame. + + The 'framewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["framewidth"] + + @framewidth.setter + def framewidth(self, val): + self["framewidth"] = val + + # lakecolor + # --------- + @property + def lakecolor(self): + """ + Sets the color of the lakes. + + The 'lakecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["lakecolor"] + + @lakecolor.setter + def lakecolor(self, val): + self["lakecolor"] = val + + # landcolor + # --------- + @property + def landcolor(self): + """ + Sets the land mass color. + + The 'landcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["landcolor"] + + @landcolor.setter + def landcolor(self, val): + self["landcolor"] = val + + # lataxis + # ------- + @property + def lataxis(self): + """ + The 'lataxis' property is an instance of Lataxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.geo.Lataxis` + - A dict of string/value properties that will be passed + to the Lataxis constructor + + Supported dict properties: + + dtick + Sets the graticule's longitude/latitude tick + step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets + the map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the + map. + tick0 + Sets the graticule's starting tick + longitude/latitude. + + Returns + ------- + plotly.graph_objs.layout.geo.Lataxis + """ + return self["lataxis"] + + @lataxis.setter + def lataxis(self, val): + self["lataxis"] = val + + # lonaxis + # ------- + @property + def lonaxis(self): + """ + The 'lonaxis' property is an instance of Lonaxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.geo.Lonaxis` + - A dict of string/value properties that will be passed + to the Lonaxis constructor + + Supported dict properties: + + dtick + Sets the graticule's longitude/latitude tick + step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets + the map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the + map. + tick0 + Sets the graticule's starting tick + longitude/latitude. + + Returns + ------- + plotly.graph_objs.layout.geo.Lonaxis + """ + return self["lonaxis"] + + @lonaxis.setter + def lonaxis(self, val): + self["lonaxis"] = val + + # oceancolor + # ---------- + @property + def oceancolor(self): + """ + Sets the ocean color + + The 'oceancolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["oceancolor"] + + @oceancolor.setter + def oceancolor(self, val): + self["oceancolor"] = val + + # projection + # ---------- + @property + def projection(self): + """ + The 'projection' property is an instance of Projection + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.geo.Projection` + - A dict of string/value properties that will be passed + to the Projection constructor + + Supported dict properties: + + parallels + For conic projection types only. Sets the + parallels (tangent, secant) where the cone + intersects the sphere. + rotation + :class:`plotly.graph_objects.layout.geo.project + ion.Rotation` instance or dict with compatible + properties + scale + Zooms in or out on the map view. A scale of 1 + corresponds to the largest zoom level that fits + the map's lon and lat ranges. + type + Sets the projection type. + + Returns + ------- + plotly.graph_objs.layout.geo.Projection + """ + return self["projection"] + + @projection.setter + def projection(self, val): + self["projection"] = val + + # resolution + # ---------- + @property + def resolution(self): + """ + Sets the resolution of the base layers. The values have units + of km/mm e.g. 110 corresponds to a scale ratio of + 1:110,000,000. + + The 'resolution' property is an enumeration that may be specified as: + - One of the following enumeration values: + [110, 50] + + Returns + ------- + Any + """ + return self["resolution"] + + @resolution.setter + def resolution(self, val): + self["resolution"] = val + + # rivercolor + # ---------- + @property + def rivercolor(self): + """ + Sets color of the rivers. + + The 'rivercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["rivercolor"] + + @rivercolor.setter + def rivercolor(self, val): + self["rivercolor"] = val + + # riverwidth + # ---------- + @property + def riverwidth(self): + """ + Sets the stroke width (in px) of the rivers. + + The 'riverwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["riverwidth"] + + @riverwidth.setter + def riverwidth(self, val): + self["riverwidth"] = val + + # scope + # ----- + @property + def scope(self): + """ + Set the scope of the map. + + The 'scope' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['world', 'usa', 'europe', 'asia', 'africa', 'north + america', 'south america'] + + Returns + ------- + Any + """ + return self["scope"] + + @scope.setter + def scope(self, val): + self["scope"] = val + + # showcoastlines + # -------------- + @property + def showcoastlines(self): + """ + Sets whether or not the coastlines are drawn. + + The 'showcoastlines' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showcoastlines"] + + @showcoastlines.setter + def showcoastlines(self, val): + self["showcoastlines"] = val + + # showcountries + # ------------- + @property + def showcountries(self): + """ + Sets whether or not country boundaries are drawn. + + The 'showcountries' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showcountries"] + + @showcountries.setter + def showcountries(self, val): + self["showcountries"] = val + + # showframe + # --------- + @property + def showframe(self): + """ + Sets whether or not a frame is drawn around the map. + + The 'showframe' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showframe"] + + @showframe.setter + def showframe(self, val): + self["showframe"] = val + + # showlakes + # --------- + @property + def showlakes(self): + """ + Sets whether or not lakes are drawn. + + The 'showlakes' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlakes"] + + @showlakes.setter + def showlakes(self, val): + self["showlakes"] = val + + # showland + # -------- + @property + def showland(self): + """ + Sets whether or not land masses are filled in color. + + The 'showland' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showland"] + + @showland.setter + def showland(self, val): + self["showland"] = val + + # showocean + # --------- + @property + def showocean(self): + """ + Sets whether or not oceans are filled in color. + + The 'showocean' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showocean"] + + @showocean.setter + def showocean(self, val): + self["showocean"] = val + + # showrivers + # ---------- + @property + def showrivers(self): + """ + Sets whether or not rivers are drawn. + + The 'showrivers' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showrivers"] + + @showrivers.setter + def showrivers(self, val): + self["showrivers"] = val + + # showsubunits + # ------------ + @property + def showsubunits(self): + """ + Sets whether or not boundaries of subunits within countries + (e.g. states, provinces) are drawn. + + The 'showsubunits' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showsubunits"] + + @showsubunits.setter + def showsubunits(self, val): + self["showsubunits"] = val + + # subunitcolor + # ------------ + @property + def subunitcolor(self): + """ + Sets the color of the subunits boundaries. + + The 'subunitcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["subunitcolor"] + + @subunitcolor.setter + def subunitcolor(self, val): + self["subunitcolor"] = val + + # subunitwidth + # ------------ + @property + def subunitwidth(self): + """ + Sets the stroke width (in px) of the subunits boundaries. + + The 'subunitwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["subunitwidth"] + + @subunitwidth.setter + def subunitwidth(self, val): + self["subunitwidth"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in the view + (projection and center). Defaults to `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + Sets the default visibility of the base layers. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Set the background color of the map + center + :class:`plotly.graph_objects.layout.geo.Center` + instance or dict with compatible properties + coastlinecolor + Sets the coastline color. + coastlinewidth + Sets the coastline stroke width (in px). + countrycolor + Sets line color of the country boundaries. + countrywidth + Sets line width (in px) of the country boundaries. + domain + :class:`plotly.graph_objects.layout.geo.Domain` + instance or dict with compatible properties + fitbounds + Determines if this subplot's view settings are auto- + computed to fit trace data. On scoped maps, setting + `fitbounds` leads to `center.lon` and `center.lat` + getting auto-filled. On maps with a non-clipped + projection, setting `fitbounds` leads to `center.lon`, + `center.lat`, and `projection.rotation.lon` getting + auto-filled. On maps with a clipped projection, setting + `fitbounds` leads to `center.lon`, `center.lat`, + `projection.rotation.lon`, `projection.rotation.lat`, + `lonaxis.range` and `lonaxis.range` getting auto- + filled. If "locations", only the trace's visible + locations are considered in the `fitbounds` + computations. If "geojson", the entire trace input + `geojson` (if provided) is considered in the + `fitbounds` computations, Defaults to False. + framecolor + Sets the color the frame. + framewidth + Sets the stroke width (in px) of the frame. + lakecolor + Sets the color of the lakes. + landcolor + Sets the land mass color. + lataxis + :class:`plotly.graph_objects.layout.geo.Lataxis` + instance or dict with compatible properties + lonaxis + :class:`plotly.graph_objects.layout.geo.Lonaxis` + instance or dict with compatible properties + oceancolor + Sets the ocean color + projection + :class:`plotly.graph_objects.layout.geo.Projection` + instance or dict with compatible properties + resolution + Sets the resolution of the base layers. The values have + units of km/mm e.g. 110 corresponds to a scale ratio of + 1:110,000,000. + rivercolor + Sets color of the rivers. + riverwidth + Sets the stroke width (in px) of the rivers. + scope + Set the scope of the map. + showcoastlines + Sets whether or not the coastlines are drawn. + showcountries + Sets whether or not country boundaries are drawn. + showframe + Sets whether or not a frame is drawn around the map. + showlakes + Sets whether or not lakes are drawn. + showland + Sets whether or not land masses are filled in color. + showocean + Sets whether or not oceans are filled in color. + showrivers + Sets whether or not rivers are drawn. + showsubunits + Sets whether or not boundaries of subunits within + countries (e.g. states, provinces) are drawn. + subunitcolor + Sets the color of the subunits boundaries. + subunitwidth + Sets the stroke width (in px) of the subunits + boundaries. + uirevision + Controls persistence of user-driven changes in the view + (projection and center). Defaults to + `layout.uirevision`. + visible + Sets the default visibility of the base layers. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + center=None, + coastlinecolor=None, + coastlinewidth=None, + countrycolor=None, + countrywidth=None, + domain=None, + fitbounds=None, + framecolor=None, + framewidth=None, + lakecolor=None, + landcolor=None, + lataxis=None, + lonaxis=None, + oceancolor=None, + projection=None, + resolution=None, + rivercolor=None, + riverwidth=None, + scope=None, + showcoastlines=None, + showcountries=None, + showframe=None, + showlakes=None, + showland=None, + showocean=None, + showrivers=None, + showsubunits=None, + subunitcolor=None, + subunitwidth=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new Geo object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Geo` + bgcolor + Set the background color of the map + center + :class:`plotly.graph_objects.layout.geo.Center` + instance or dict with compatible properties + coastlinecolor + Sets the coastline color. + coastlinewidth + Sets the coastline stroke width (in px). + countrycolor + Sets line color of the country boundaries. + countrywidth + Sets line width (in px) of the country boundaries. + domain + :class:`plotly.graph_objects.layout.geo.Domain` + instance or dict with compatible properties + fitbounds + Determines if this subplot's view settings are auto- + computed to fit trace data. On scoped maps, setting + `fitbounds` leads to `center.lon` and `center.lat` + getting auto-filled. On maps with a non-clipped + projection, setting `fitbounds` leads to `center.lon`, + `center.lat`, and `projection.rotation.lon` getting + auto-filled. On maps with a clipped projection, setting + `fitbounds` leads to `center.lon`, `center.lat`, + `projection.rotation.lon`, `projection.rotation.lat`, + `lonaxis.range` and `lonaxis.range` getting auto- + filled. If "locations", only the trace's visible + locations are considered in the `fitbounds` + computations. If "geojson", the entire trace input + `geojson` (if provided) is considered in the + `fitbounds` computations, Defaults to False. + framecolor + Sets the color the frame. + framewidth + Sets the stroke width (in px) of the frame. + lakecolor + Sets the color of the lakes. + landcolor + Sets the land mass color. + lataxis + :class:`plotly.graph_objects.layout.geo.Lataxis` + instance or dict with compatible properties + lonaxis + :class:`plotly.graph_objects.layout.geo.Lonaxis` + instance or dict with compatible properties + oceancolor + Sets the ocean color + projection + :class:`plotly.graph_objects.layout.geo.Projection` + instance or dict with compatible properties + resolution + Sets the resolution of the base layers. The values have + units of km/mm e.g. 110 corresponds to a scale ratio of + 1:110,000,000. + rivercolor + Sets color of the rivers. + riverwidth + Sets the stroke width (in px) of the rivers. + scope + Set the scope of the map. + showcoastlines + Sets whether or not the coastlines are drawn. + showcountries + Sets whether or not country boundaries are drawn. + showframe + Sets whether or not a frame is drawn around the map. + showlakes + Sets whether or not lakes are drawn. + showland + Sets whether or not land masses are filled in color. + showocean + Sets whether or not oceans are filled in color. + showrivers + Sets whether or not rivers are drawn. + showsubunits + Sets whether or not boundaries of subunits within + countries (e.g. states, provinces) are drawn. + subunitcolor + Sets the color of the subunits boundaries. + subunitwidth + Sets the stroke width (in px) of the subunits + boundaries. + uirevision + Controls persistence of user-driven changes in the view + (projection and center). Defaults to + `layout.uirevision`. + visible + Sets the default visibility of the base layers. + + Returns + ------- + Geo + """ + super(Geo, self).__init__("geo") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Geo +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Geo`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("center", None) + _v = center if center is not None else _v + if _v is not None: + self["center"] = _v + _v = arg.pop("coastlinecolor", None) + _v = coastlinecolor if coastlinecolor is not None else _v + if _v is not None: + self["coastlinecolor"] = _v + _v = arg.pop("coastlinewidth", None) + _v = coastlinewidth if coastlinewidth is not None else _v + if _v is not None: + self["coastlinewidth"] = _v + _v = arg.pop("countrycolor", None) + _v = countrycolor if countrycolor is not None else _v + if _v is not None: + self["countrycolor"] = _v + _v = arg.pop("countrywidth", None) + _v = countrywidth if countrywidth is not None else _v + if _v is not None: + self["countrywidth"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("fitbounds", None) + _v = fitbounds if fitbounds is not None else _v + if _v is not None: + self["fitbounds"] = _v + _v = arg.pop("framecolor", None) + _v = framecolor if framecolor is not None else _v + if _v is not None: + self["framecolor"] = _v + _v = arg.pop("framewidth", None) + _v = framewidth if framewidth is not None else _v + if _v is not None: + self["framewidth"] = _v + _v = arg.pop("lakecolor", None) + _v = lakecolor if lakecolor is not None else _v + if _v is not None: + self["lakecolor"] = _v + _v = arg.pop("landcolor", None) + _v = landcolor if landcolor is not None else _v + if _v is not None: + self["landcolor"] = _v + _v = arg.pop("lataxis", None) + _v = lataxis if lataxis is not None else _v + if _v is not None: + self["lataxis"] = _v + _v = arg.pop("lonaxis", None) + _v = lonaxis if lonaxis is not None else _v + if _v is not None: + self["lonaxis"] = _v + _v = arg.pop("oceancolor", None) + _v = oceancolor if oceancolor is not None else _v + if _v is not None: + self["oceancolor"] = _v + _v = arg.pop("projection", None) + _v = projection if projection is not None else _v + if _v is not None: + self["projection"] = _v + _v = arg.pop("resolution", None) + _v = resolution if resolution is not None else _v + if _v is not None: + self["resolution"] = _v + _v = arg.pop("rivercolor", None) + _v = rivercolor if rivercolor is not None else _v + if _v is not None: + self["rivercolor"] = _v + _v = arg.pop("riverwidth", None) + _v = riverwidth if riverwidth is not None else _v + if _v is not None: + self["riverwidth"] = _v + _v = arg.pop("scope", None) + _v = scope if scope is not None else _v + if _v is not None: + self["scope"] = _v + _v = arg.pop("showcoastlines", None) + _v = showcoastlines if showcoastlines is not None else _v + if _v is not None: + self["showcoastlines"] = _v + _v = arg.pop("showcountries", None) + _v = showcountries if showcountries is not None else _v + if _v is not None: + self["showcountries"] = _v + _v = arg.pop("showframe", None) + _v = showframe if showframe is not None else _v + if _v is not None: + self["showframe"] = _v + _v = arg.pop("showlakes", None) + _v = showlakes if showlakes is not None else _v + if _v is not None: + self["showlakes"] = _v + _v = arg.pop("showland", None) + _v = showland if showland is not None else _v + if _v is not None: + self["showland"] = _v + _v = arg.pop("showocean", None) + _v = showocean if showocean is not None else _v + if _v is not None: + self["showocean"] = _v + _v = arg.pop("showrivers", None) + _v = showrivers if showrivers is not None else _v + if _v is not None: + self["showrivers"] = _v + _v = arg.pop("showsubunits", None) + _v = showsubunits if showsubunits is not None else _v + if _v is not None: + self["showsubunits"] = _v + _v = arg.pop("subunitcolor", None) + _v = subunitcolor if subunitcolor is not None else _v + if _v is not None: + self["subunitcolor"] = _v + _v = arg.pop("subunitwidth", None) + _v = subunitwidth if subunitwidth is not None else _v + if _v is not None: + self["subunitwidth"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_grid.py b/packages/python/plotly/plotly/graph_objs/layout/_grid.py new file mode 100644 index 00000000000..8a68e31e26b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_grid.py @@ -0,0 +1,600 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Grid(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.grid" + _valid_props = { + "columns", + "domain", + "pattern", + "roworder", + "rows", + "subplots", + "xaxes", + "xgap", + "xside", + "yaxes", + "ygap", + "yside", + } + + # columns + # ------- + @property + def columns(self): + """ + The number of columns in the grid. If you provide a 2D + `subplots` array, the length of its longest row is used as the + default. If you give an `xaxes` array, its length is used as + the default. But it's also possible to have a different length, + if you want to leave a row at the end for non-cartesian + subplots. + + The 'columns' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["columns"] + + @columns.setter + def columns(self, val): + self["columns"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.grid.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + x + Sets the horizontal domain of this grid subplot + (in plot fraction). The first and last cells + end exactly at the domain edges, with no grout + around the edges. + y + Sets the vertical domain of this grid subplot + (in plot fraction). The first and last cells + end exactly at the domain edges, with no grout + around the edges. + + Returns + ------- + plotly.graph_objs.layout.grid.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # pattern + # ------- + @property + def pattern(self): + """ + If no `subplots`, `xaxes`, or `yaxes` are given but we do have + `rows` and `columns`, we can generate defaults using + consecutive axis IDs, in two ways: "coupled" gives one x axis + per column and one y axis per row. "independent" uses a new xy + pair for each cell, left-to-right across each row then + iterating rows according to `roworder`. + + The 'pattern' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['independent', 'coupled'] + + Returns + ------- + Any + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + # roworder + # -------- + @property + def roworder(self): + """ + Is the first row the top or the bottom? Note that columns are + always enumerated from left to right. + + The 'roworder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top to bottom', 'bottom to top'] + + Returns + ------- + Any + """ + return self["roworder"] + + @roworder.setter + def roworder(self, val): + self["roworder"] = val + + # rows + # ---- + @property + def rows(self): + """ + The number of rows in the grid. If you provide a 2D `subplots` + array or a `yaxes` array, its length is used as the default. + But it's also possible to have a different length, if you want + to leave a row at the end for non-cartesian subplots. + + The 'rows' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["rows"] + + @rows.setter + def rows(self, val): + self["rows"] = val + + # subplots + # -------- + @property + def subplots(self): + """ + Used for freeform grids, where some axes may be shared across + subplots but others are not. Each entry should be a cartesian + subplot id, like "xy" or "x3y2", or "" to leave that cell + empty. You may reuse x axes within the same column, and y axes + within the same row. Non-cartesian subplots and traces that + support `domain` can place themselves in this grid separately + using the `gridcell` attribute. + + The 'subplots' property is an info array that may be specified as: + * a 2D list where: + The 'subplots[i][j]' property is an enumeration that may be specified as: + - One of the following enumeration values: + [''] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + list + """ + return self["subplots"] + + @subplots.setter + def subplots(self, val): + self["subplots"] = val + + # xaxes + # ----- + @property + def xaxes(self): + """ + Used with `yaxes` when the x and y axes are shared across + columns and rows. Each entry should be an x axis id like "x", + "x2", etc., or "" to not put an x axis in that column. Entries + other than "" must be unique. Ignored if `subplots` is present. + If missing but `yaxes` is present, will generate consecutive + IDs. + + The 'xaxes' property is an info array that may be specified as: + * a list of elements where: + The 'xaxes[i]' property is an enumeration that may be specified as: + - One of the following enumeration values: + [''] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + list + """ + return self["xaxes"] + + @xaxes.setter + def xaxes(self, val): + self["xaxes"] = val + + # xgap + # ---- + @property + def xgap(self): + """ + Horizontal space between grid cells, expressed as a fraction of + the total width available to one cell. Defaults to 0.1 for + coupled-axes grids and 0.2 for independent grids. + + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + + # xside + # ----- + @property + def xside(self): + """ + Sets where the x axis labels and titles go. "bottom" means the + very bottom of the grid. "bottom plot" is the lowest plot that + each x axis is used in. "top" and "top plot" are similar. + + The 'xside' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['bottom', 'bottom plot', 'top plot', 'top'] + + Returns + ------- + Any + """ + return self["xside"] + + @xside.setter + def xside(self, val): + self["xside"] = val + + # yaxes + # ----- + @property + def yaxes(self): + """ + Used with `yaxes` when the x and y axes are shared across + columns and rows. Each entry should be an y axis id like "y", + "y2", etc., or "" to not put a y axis in that row. Entries + other than "" must be unique. Ignored if `subplots` is present. + If missing but `xaxes` is present, will generate consecutive + IDs. + + The 'yaxes' property is an info array that may be specified as: + * a list of elements where: + The 'yaxes[i]' property is an enumeration that may be specified as: + - One of the following enumeration values: + [''] + - A string that matches one of the following regular expressions: + ['^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + list + """ + return self["yaxes"] + + @yaxes.setter + def yaxes(self, val): + self["yaxes"] = val + + # ygap + # ---- + @property + def ygap(self): + """ + Vertical space between grid cells, expressed as a fraction of + the total height available to one cell. Defaults to 0.1 for + coupled-axes grids and 0.3 for independent grids. + + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ygap"] + + @ygap.setter + def ygap(self, val): + self["ygap"] = val + + # yside + # ----- + @property + def yside(self): + """ + Sets where the y axis labels and titles go. "left" means the + very left edge of the grid. *left plot* is the leftmost plot + that each y axis is used in. "right" and *right plot* are + similar. + + The 'yside' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'left plot', 'right plot', 'right'] + + Returns + ------- + Any + """ + return self["yside"] + + @yside.setter + def yside(self, val): + self["yside"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + columns + The number of columns in the grid. If you provide a 2D + `subplots` array, the length of its longest row is used + as the default. If you give an `xaxes` array, its + length is used as the default. But it's also possible + to have a different length, if you want to leave a row + at the end for non-cartesian subplots. + domain + :class:`plotly.graph_objects.layout.grid.Domain` + instance or dict with compatible properties + pattern + If no `subplots`, `xaxes`, or `yaxes` are given but we + do have `rows` and `columns`, we can generate defaults + using consecutive axis IDs, in two ways: "coupled" + gives one x axis per column and one y axis per row. + "independent" uses a new xy pair for each cell, left- + to-right across each row then iterating rows according + to `roworder`. + roworder + Is the first row the top or the bottom? Note that + columns are always enumerated from left to right. + rows + The number of rows in the grid. If you provide a 2D + `subplots` array or a `yaxes` array, its length is used + as the default. But it's also possible to have a + different length, if you want to leave a row at the end + for non-cartesian subplots. + subplots + Used for freeform grids, where some axes may be shared + across subplots but others are not. Each entry should + be a cartesian subplot id, like "xy" or "x3y2", or "" + to leave that cell empty. You may reuse x axes within + the same column, and y axes within the same row. Non- + cartesian subplots and traces that support `domain` can + place themselves in this grid separately using the + `gridcell` attribute. + xaxes + Used with `yaxes` when the x and y axes are shared + across columns and rows. Each entry should be an x axis + id like "x", "x2", etc., or "" to not put an x axis in + that column. Entries other than "" must be unique. + Ignored if `subplots` is present. If missing but + `yaxes` is present, will generate consecutive IDs. + xgap + Horizontal space between grid cells, expressed as a + fraction of the total width available to one cell. + Defaults to 0.1 for coupled-axes grids and 0.2 for + independent grids. + xside + Sets where the x axis labels and titles go. "bottom" + means the very bottom of the grid. "bottom plot" is the + lowest plot that each x axis is used in. "top" and "top + plot" are similar. + yaxes + Used with `yaxes` when the x and y axes are shared + across columns and rows. Each entry should be an y axis + id like "y", "y2", etc., or "" to not put a y axis in + that row. Entries other than "" must be unique. Ignored + if `subplots` is present. If missing but `xaxes` is + present, will generate consecutive IDs. + ygap + Vertical space between grid cells, expressed as a + fraction of the total height available to one cell. + Defaults to 0.1 for coupled-axes grids and 0.3 for + independent grids. + yside + Sets where the y axis labels and titles go. "left" + means the very left edge of the grid. *left plot* is + the leftmost plot that each y axis is used in. "right" + and *right plot* are similar. + """ + + def __init__( + self, + arg=None, + columns=None, + domain=None, + pattern=None, + roworder=None, + rows=None, + subplots=None, + xaxes=None, + xgap=None, + xside=None, + yaxes=None, + ygap=None, + yside=None, + **kwargs + ): + """ + Construct a new Grid object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Grid` + columns + The number of columns in the grid. If you provide a 2D + `subplots` array, the length of its longest row is used + as the default. If you give an `xaxes` array, its + length is used as the default. But it's also possible + to have a different length, if you want to leave a row + at the end for non-cartesian subplots. + domain + :class:`plotly.graph_objects.layout.grid.Domain` + instance or dict with compatible properties + pattern + If no `subplots`, `xaxes`, or `yaxes` are given but we + do have `rows` and `columns`, we can generate defaults + using consecutive axis IDs, in two ways: "coupled" + gives one x axis per column and one y axis per row. + "independent" uses a new xy pair for each cell, left- + to-right across each row then iterating rows according + to `roworder`. + roworder + Is the first row the top or the bottom? Note that + columns are always enumerated from left to right. + rows + The number of rows in the grid. If you provide a 2D + `subplots` array or a `yaxes` array, its length is used + as the default. But it's also possible to have a + different length, if you want to leave a row at the end + for non-cartesian subplots. + subplots + Used for freeform grids, where some axes may be shared + across subplots but others are not. Each entry should + be a cartesian subplot id, like "xy" or "x3y2", or "" + to leave that cell empty. You may reuse x axes within + the same column, and y axes within the same row. Non- + cartesian subplots and traces that support `domain` can + place themselves in this grid separately using the + `gridcell` attribute. + xaxes + Used with `yaxes` when the x and y axes are shared + across columns and rows. Each entry should be an x axis + id like "x", "x2", etc., or "" to not put an x axis in + that column. Entries other than "" must be unique. + Ignored if `subplots` is present. If missing but + `yaxes` is present, will generate consecutive IDs. + xgap + Horizontal space between grid cells, expressed as a + fraction of the total width available to one cell. + Defaults to 0.1 for coupled-axes grids and 0.2 for + independent grids. + xside + Sets where the x axis labels and titles go. "bottom" + means the very bottom of the grid. "bottom plot" is the + lowest plot that each x axis is used in. "top" and "top + plot" are similar. + yaxes + Used with `yaxes` when the x and y axes are shared + across columns and rows. Each entry should be an y axis + id like "y", "y2", etc., or "" to not put a y axis in + that row. Entries other than "" must be unique. Ignored + if `subplots` is present. If missing but `xaxes` is + present, will generate consecutive IDs. + ygap + Vertical space between grid cells, expressed as a + fraction of the total height available to one cell. + Defaults to 0.1 for coupled-axes grids and 0.3 for + independent grids. + yside + Sets where the y axis labels and titles go. "left" + means the very left edge of the grid. *left plot* is + the leftmost plot that each y axis is used in. "right" + and *right plot* are similar. + + Returns + ------- + Grid + """ + super(Grid, self).__init__("grid") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Grid +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Grid`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("columns", None) + _v = columns if columns is not None else _v + if _v is not None: + self["columns"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("pattern", None) + _v = pattern if pattern is not None else _v + if _v is not None: + self["pattern"] = _v + _v = arg.pop("roworder", None) + _v = roworder if roworder is not None else _v + if _v is not None: + self["roworder"] = _v + _v = arg.pop("rows", None) + _v = rows if rows is not None else _v + if _v is not None: + self["rows"] = _v + _v = arg.pop("subplots", None) + _v = subplots if subplots is not None else _v + if _v is not None: + self["subplots"] = _v + _v = arg.pop("xaxes", None) + _v = xaxes if xaxes is not None else _v + if _v is not None: + self["xaxes"] = _v + _v = arg.pop("xgap", None) + _v = xgap if xgap is not None else _v + if _v is not None: + self["xgap"] = _v + _v = arg.pop("xside", None) + _v = xside if xside is not None else _v + if _v is not None: + self["xside"] = _v + _v = arg.pop("yaxes", None) + _v = yaxes if yaxes is not None else _v + if _v is not None: + self["yaxes"] = _v + _v = arg.pop("ygap", None) + _v = ygap if ygap is not None else _v + if _v is not None: + self["ygap"] = _v + _v = arg.pop("yside", None) + _v = yside if yside is not None else _v + if _v is not None: + self["yside"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/layout/_hoverlabel.py new file mode 100644 index 00000000000..30a7094e3ca --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_hoverlabel.py @@ -0,0 +1,351 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.hoverlabel" + _valid_props = {"align", "bgcolor", "bordercolor", "font", "namelength"} + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + + Returns + ------- + Any + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of all hover labels on graph + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of all hover labels on graph. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the default hover label font used by all traces on the + graph. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + + Returns + ------- + int + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + bgcolor + Sets the background color of all hover labels on graph + bordercolor + Sets the border color of all hover labels on graph. + font + Sets the default hover label font used by all traces on + the graph. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + """ + + def __init__( + self, + arg=None, + align=None, + bgcolor=None, + bordercolor=None, + font=None, + namelength=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + bgcolor + Sets the background color of all hover labels on graph + bordercolor + Sets the border color of all hover labels on graph. + font + Sets the default hover label font used by all traces on + the graph. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_image.py b/packages/python/plotly/plotly/graph_objs/layout/_image.py new file mode 100644 index 00000000000..3c85374c2ac --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_image.py @@ -0,0 +1,651 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Image(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.image" + _valid_props = { + "layer", + "name", + "opacity", + "sizex", + "sizey", + "sizing", + "source", + "templateitemname", + "visible", + "x", + "xanchor", + "xref", + "y", + "yanchor", + "yref", + } + + # layer + # ----- + @property + def layer(self): + """ + Specifies whether images are drawn below or above traces. When + `xref` and `yref` are both set to `paper`, image is drawn below + the entire plot area. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['below', 'above'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the image. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # sizex + # ----- + @property + def sizex(self): + """ + Sets the image container size horizontally. The image will be + sized based on the `position` value. When `xref` is set to + `paper`, units are sized relative to the plot width. + + The 'sizex' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizex"] + + @sizex.setter + def sizex(self, val): + self["sizex"] = val + + # sizey + # ----- + @property + def sizey(self): + """ + Sets the image container size vertically. The image will be + sized based on the `position` value. When `yref` is set to + `paper`, units are sized relative to the plot height. + + The 'sizey' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizey"] + + @sizey.setter + def sizey(self, val): + self["sizey"] = val + + # sizing + # ------ + @property + def sizing(self): + """ + Specifies which dimension of the image to constrain. + + The 'sizing' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fill', 'contain', 'stretch'] + + Returns + ------- + Any + """ + return self["sizing"] + + @sizing.setter + def sizing(self, val): + self["sizing"] = val + + # source + # ------ + @property + def source(self): + """ + Specifies the URL of the image to be used. The URL must be + accessible from the domain where the plot code is run, and can + be either relative or absolute. + + The 'source' property is an image URI that may be specified as: + - A remote image URI string + (e.g. 'http://www.somewhere.com/image.png') + - A data URI image string + (e.g. 'data:image/png;base64,iVBORw0KGgoAAAANSU') + - A PIL.Image.Image object which will be immediately converted + to a data URI image string + See http://pillow.readthedocs.io/en/latest/reference/Image.html + + Returns + ------- + str + """ + return self["source"] + + @source.setter + def source(self, val): + self["source"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this image is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the image's x position. When `xref` is set to `paper`, + units are sized relative to the plot height. See `xref` for + more info + + The 'x' property accepts values of any type + + Returns + ------- + Any + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the anchor for the x position + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xref + # ---- + @property + def xref(self): + """ + Sets the images's x coordinate axis. If set to a x axis id + (e.g. "x" or "x2"), the `x` position refers to an x data + coordinate If set to "paper", the `x` position refers to the + distance from the left of plot in normalized coordinates where + 0 (1) corresponds to the left (right). + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['paper'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + # y + # - + @property + def y(self): + """ + Sets the image's y position. When `yref` is set to `paper`, + units are sized relative to the plot height. See `yref` for + more info + + The 'y' property accepts values of any type + + Returns + ------- + Any + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the anchor for the y position. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # yref + # ---- + @property + def yref(self): + """ + Sets the images's y coordinate axis. If set to a y axis id + (e.g. "y" or "y2"), the `y` position refers to a y data + coordinate. If set to "paper", the `y` position refers to the + distance from the bottom of the plot in normalized coordinates + where 0 (1) corresponds to the bottom (top). + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['paper'] + - A string that matches one of the following regular expressions: + ['^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + layer + Specifies whether images are drawn below or above + traces. When `xref` and `yref` are both set to `paper`, + image is drawn below the entire plot area. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The image + will be sized based on the `position` value. When + `xref` is set to `paper`, units are sized relative to + the plot width. + sizey + Sets the image container size vertically. The image + will be sized based on the `position` value. When + `yref` is set to `paper`, units are sized relative to + the plot height. + sizing + Specifies which dimension of the image to constrain. + source + Specifies the URL of the image to be used. The URL must + be accessible from the domain where the plot code is + run, and can be either relative or absolute. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this image is visible. + x + Sets the image's x position. When `xref` is set to + `paper`, units are sized relative to the plot height. + See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + data coordinate If set to "paper", the `x` position + refers to the distance from the left of plot in + normalized coordinates where 0 (1) corresponds to the + left (right). + y + Sets the image's y position. When `yref` is set to + `paper`, units are sized relative to the plot height. + See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + data coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds to the + bottom (top). + """ + + def __init__( + self, + arg=None, + layer=None, + name=None, + opacity=None, + sizex=None, + sizey=None, + sizing=None, + source=None, + templateitemname=None, + visible=None, + x=None, + xanchor=None, + xref=None, + y=None, + yanchor=None, + yref=None, + **kwargs + ): + """ + Construct a new Image object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Image` + layer + Specifies whether images are drawn below or above + traces. When `xref` and `yref` are both set to `paper`, + image is drawn below the entire plot area. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The image + will be sized based on the `position` value. When + `xref` is set to `paper`, units are sized relative to + the plot width. + sizey + Sets the image container size vertically. The image + will be sized based on the `position` value. When + `yref` is set to `paper`, units are sized relative to + the plot height. + sizing + Specifies which dimension of the image to constrain. + source + Specifies the URL of the image to be used. The URL must + be accessible from the domain where the plot code is + run, and can be either relative or absolute. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this image is visible. + x + Sets the image's x position. When `xref` is set to + `paper`, units are sized relative to the plot height. + See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + data coordinate If set to "paper", the `x` position + refers to the distance from the left of plot in + normalized coordinates where 0 (1) corresponds to the + left (right). + y + Sets the image's y position. When `yref` is set to + `paper`, units are sized relative to the plot height. + See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + data coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds to the + bottom (top). + + Returns + ------- + Image + """ + super(Image, self).__init__("images") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Image +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Image`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("sizex", None) + _v = sizex if sizex is not None else _v + if _v is not None: + self["sizex"] = _v + _v = arg.pop("sizey", None) + _v = sizey if sizey is not None else _v + if _v is not None: + self["sizey"] = _v + _v = arg.pop("sizing", None) + _v = sizing if sizing is not None else _v + if _v is not None: + self["sizing"] = _v + _v = arg.pop("source", None) + _v = source if source is not None else _v + if _v is not None: + self["source"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xref", None) + _v = xref if xref is not None else _v + if _v is not None: + self["xref"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("yref", None) + _v = yref if yref is not None else _v + if _v is not None: + self["yref"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_legend.py b/packages/python/plotly/plotly/graph_objs/layout/_legend.py new file mode 100644 index 00000000000..31864ec633d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_legend.py @@ -0,0 +1,830 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Legend(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.legend" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "font", + "itemclick", + "itemdoubleclick", + "itemsizing", + "orientation", + "title", + "tracegroupgap", + "traceorder", + "uirevision", + "valign", + "x", + "xanchor", + "y", + "yanchor", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the legend background color. Defaults to + `layout.paper_bgcolor`. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the legend. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the legend. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used to text the legend items. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.legend.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.legend.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # itemclick + # --------- + @property + def itemclick(self): + """ + Determines the behavior on legend item click. "toggle" toggles + the visibility of the item clicked on the graph. "toggleothers" + makes the clicked item the sole visible item on the graph. + False disable legend item click interactions. + + The 'itemclick' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['toggle', 'toggleothers', False] + + Returns + ------- + Any + """ + return self["itemclick"] + + @itemclick.setter + def itemclick(self, val): + self["itemclick"] = val + + # itemdoubleclick + # --------------- + @property + def itemdoubleclick(self): + """ + Determines the behavior on legend item double-click. "toggle" + toggles the visibility of the item clicked on the graph. + "toggleothers" makes the clicked item the sole visible item on + the graph. False disable legend item double-click interactions. + + The 'itemdoubleclick' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['toggle', 'toggleothers', False] + + Returns + ------- + Any + """ + return self["itemdoubleclick"] + + @itemdoubleclick.setter + def itemdoubleclick(self, val): + self["itemdoubleclick"] = val + + # itemsizing + # ---------- + @property + def itemsizing(self): + """ + Determines if the legend items symbols scale with their + corresponding "trace" attributes or remain "constant" + independent of the symbol size on the graph. + + The 'itemsizing' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'constant'] + + Returns + ------- + Any + """ + return self["itemsizing"] + + @itemsizing.setter + def itemsizing(self, val): + self["itemsizing"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the legend. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.legend.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this legend's title font. + side + Determines the location of legend's title with + respect to the legend items. Defaulted to "top" + with `orientation` is "h". Defaulted to "left" + with `orientation` is "v". The *top left* + options could be used to expand legend area in + both x and y sides. + text + Sets the title of the legend. + + Returns + ------- + plotly.graph_objs.layout.legend.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # tracegroupgap + # ------------- + @property + def tracegroupgap(self): + """ + Sets the amount of vertical space (in px) between legend + groups. + + The 'tracegroupgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tracegroupgap"] + + @tracegroupgap.setter + def tracegroupgap(self, val): + self["tracegroupgap"] = val + + # traceorder + # ---------- + @property + def traceorder(self): + """ + Determines the order at which the legend items are displayed. + If "normal", the items are displayed top-to-bottom in the same + order as the input data. If "reversed", the items are displayed + in the opposite order as "normal". If "grouped", the items are + displayed in groups (when a trace `legendgroup` is provided). + if "grouped+reversed", the items are displayed in the opposite + order as "grouped". + + The 'traceorder' property is a flaglist and may be specified + as a string containing: + - Any combination of ['reversed', 'grouped'] joined with '+' characters + (e.g. 'reversed+grouped') + OR exactly one of ['normal'] (e.g. 'normal') + + Returns + ------- + Any + """ + return self["traceorder"] + + @traceorder.setter + def traceorder(self, val): + self["traceorder"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of legend-driven changes in trace and pie + label visibility. Defaults to `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # valign + # ------ + @property + def valign(self): + """ + Sets the vertical alignment of the symbols with respect to + their associated text. + + The 'valign' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["valign"] + + @valign.setter + def valign(self, val): + self["valign"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position (in normalized coordinates) of the legend. + Defaults to 1.02 for vertical legends and defaults to 0 for + horizontal legends. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the legend's horizontal position anchor. This anchor binds + the `x` position to the "left", "center" or "right" of the + legend. Value "auto" anchors legends to the right for `x` + values greater than or equal to 2/3, anchors legends to the + left for `x` values less than or equal to 1/3 and anchors + legends with respect to their center otherwise. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position (in normalized coordinates) of the legend. + Defaults to 1 for vertical legends, defaults to "-0.1" for + horizontal legends on graphs w/o range sliders and defaults to + 1.1 for horizontal legends on graph with one or multiple range + sliders. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the legend's vertical position anchor This anchor binds + the `y` position to the "top", "middle" or "bottom" of the + legend. Value "auto" anchors legends at their bottom for `y` + values less than or equal to 1/3, anchors legends to at their + top for `y` values greater than or equal to 2/3 and anchors + legends with respect to their middle otherwise. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the legend background color. Defaults to + `layout.paper_bgcolor`. + bordercolor + Sets the color of the border enclosing the legend. + borderwidth + Sets the width (in px) of the border enclosing the + legend. + font + Sets the font used to text the legend items. + itemclick + Determines the behavior on legend item click. "toggle" + toggles the visibility of the item clicked on the + graph. "toggleothers" makes the clicked item the sole + visible item on the graph. False disable legend item + click interactions. + itemdoubleclick + Determines the behavior on legend item double-click. + "toggle" toggles the visibility of the item clicked on + the graph. "toggleothers" makes the clicked item the + sole visible item on the graph. False disable legend + item double-click interactions. + itemsizing + Determines if the legend items symbols scale with their + corresponding "trace" attributes or remain "constant" + independent of the symbol size on the graph. + orientation + Sets the orientation of the legend. + title + :class:`plotly.graph_objects.layout.legend.Title` + instance or dict with compatible properties + tracegroupgap + Sets the amount of vertical space (in px) between + legend groups. + traceorder + Determines the order at which the legend items are + displayed. If "normal", the items are displayed top-to- + bottom in the same order as the input data. If + "reversed", the items are displayed in the opposite + order as "normal". If "grouped", the items are + displayed in groups (when a trace `legendgroup` is + provided). if "grouped+reversed", the items are + displayed in the opposite order as "grouped". + uirevision + Controls persistence of legend-driven changes in trace + and pie label visibility. Defaults to + `layout.uirevision`. + valign + Sets the vertical alignment of the symbols with respect + to their associated text. + x + Sets the x position (in normalized coordinates) of the + legend. Defaults to 1.02 for vertical legends and + defaults to 0 for horizontal legends. + xanchor + Sets the legend's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the legend. Value "auto" anchors legends + to the right for `x` values greater than or equal to + 2/3, anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with respect + to their center otherwise. + y + Sets the y position (in normalized coordinates) of the + legend. Defaults to 1 for vertical legends, defaults to + "-0.1" for horizontal legends on graphs w/o range + sliders and defaults to 1.1 for horizontal legends on + graph with one or multiple range sliders. + yanchor + Sets the legend's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or + "bottom" of the legend. Value "auto" anchors legends at + their bottom for `y` values less than or equal to 1/3, + anchors legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with respect + to their middle otherwise. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + font=None, + itemclick=None, + itemdoubleclick=None, + itemsizing=None, + orientation=None, + title=None, + tracegroupgap=None, + traceorder=None, + uirevision=None, + valign=None, + x=None, + xanchor=None, + y=None, + yanchor=None, + **kwargs + ): + """ + Construct a new Legend object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Legend` + bgcolor + Sets the legend background color. Defaults to + `layout.paper_bgcolor`. + bordercolor + Sets the color of the border enclosing the legend. + borderwidth + Sets the width (in px) of the border enclosing the + legend. + font + Sets the font used to text the legend items. + itemclick + Determines the behavior on legend item click. "toggle" + toggles the visibility of the item clicked on the + graph. "toggleothers" makes the clicked item the sole + visible item on the graph. False disable legend item + click interactions. + itemdoubleclick + Determines the behavior on legend item double-click. + "toggle" toggles the visibility of the item clicked on + the graph. "toggleothers" makes the clicked item the + sole visible item on the graph. False disable legend + item double-click interactions. + itemsizing + Determines if the legend items symbols scale with their + corresponding "trace" attributes or remain "constant" + independent of the symbol size on the graph. + orientation + Sets the orientation of the legend. + title + :class:`plotly.graph_objects.layout.legend.Title` + instance or dict with compatible properties + tracegroupgap + Sets the amount of vertical space (in px) between + legend groups. + traceorder + Determines the order at which the legend items are + displayed. If "normal", the items are displayed top-to- + bottom in the same order as the input data. If + "reversed", the items are displayed in the opposite + order as "normal". If "grouped", the items are + displayed in groups (when a trace `legendgroup` is + provided). if "grouped+reversed", the items are + displayed in the opposite order as "grouped". + uirevision + Controls persistence of legend-driven changes in trace + and pie label visibility. Defaults to + `layout.uirevision`. + valign + Sets the vertical alignment of the symbols with respect + to their associated text. + x + Sets the x position (in normalized coordinates) of the + legend. Defaults to 1.02 for vertical legends and + defaults to 0 for horizontal legends. + xanchor + Sets the legend's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the legend. Value "auto" anchors legends + to the right for `x` values greater than or equal to + 2/3, anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with respect + to their center otherwise. + y + Sets the y position (in normalized coordinates) of the + legend. Defaults to 1 for vertical legends, defaults to + "-0.1" for horizontal legends on graphs w/o range + sliders and defaults to 1.1 for horizontal legends on + graph with one or multiple range sliders. + yanchor + Sets the legend's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or + "bottom" of the legend. Value "auto" anchors legends at + their bottom for `y` values less than or equal to 1/3, + anchors legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with respect + to their middle otherwise. + + Returns + ------- + Legend + """ + super(Legend, self).__init__("legend") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Legend +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Legend`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("itemclick", None) + _v = itemclick if itemclick is not None else _v + if _v is not None: + self["itemclick"] = _v + _v = arg.pop("itemdoubleclick", None) + _v = itemdoubleclick if itemdoubleclick is not None else _v + if _v is not None: + self["itemdoubleclick"] = _v + _v = arg.pop("itemsizing", None) + _v = itemsizing if itemsizing is not None else _v + if _v is not None: + self["itemsizing"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("tracegroupgap", None) + _v = tracegroupgap if tracegroupgap is not None else _v + if _v is not None: + self["tracegroupgap"] = _v + _v = arg.pop("traceorder", None) + _v = traceorder if traceorder is not None else _v + if _v is not None: + self["traceorder"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("valign", None) + _v = valign if valign is not None else _v + if _v is not None: + self["valign"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_mapbox.py b/packages/python/plotly/plotly/graph_objs/layout/_mapbox.py new file mode 100644 index 00000000000..cce4217df95 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_mapbox.py @@ -0,0 +1,631 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Mapbox(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.mapbox" + _valid_props = { + "accesstoken", + "bearing", + "center", + "domain", + "layerdefaults", + "layers", + "pitch", + "style", + "uirevision", + "zoom", + } + + # accesstoken + # ----------- + @property + def accesstoken(self): + """ + Sets the mapbox access token to be used for this mapbox map. + Alternatively, the mapbox access token can be set in the + configuration options under `mapboxAccessToken`. Note that + accessToken are only required when `style` (e.g with values : + basic, streets, outdoors, light, dark, satellite, satellite- + streets ) and/or a layout layer references the Mapbox server. + + The 'accesstoken' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["accesstoken"] + + @accesstoken.setter + def accesstoken(self, val): + self["accesstoken"] = val + + # bearing + # ------- + @property + def bearing(self): + """ + Sets the bearing angle of the map in degrees counter-clockwise + from North (mapbox.bearing). + + The 'bearing' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["bearing"] + + @bearing.setter + def bearing(self, val): + self["bearing"] = val + + # center + # ------ + @property + def center(self): + """ + The 'center' property is an instance of Center + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.Center` + - A dict of string/value properties that will be passed + to the Center constructor + + Supported dict properties: + + lat + Sets the latitude of the center of the map (in + degrees North). + lon + Sets the longitude of the center of the map (in + degrees East). + + Returns + ------- + plotly.graph_objs.layout.mapbox.Center + """ + return self["center"] + + @center.setter + def center(self, val): + self["center"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this mapbox subplot + . + row + If there is a layout grid, use the domain for + this row in the grid for this mapbox subplot . + x + Sets the horizontal domain of this mapbox + subplot (in plot fraction). + y + Sets the vertical domain of this mapbox subplot + (in plot fraction). + + Returns + ------- + plotly.graph_objs.layout.mapbox.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # layers + # ------ + @property + def layers(self): + """ + The 'layers' property is a tuple of instances of + Layer that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.mapbox.Layer + - A list or tuple of dicts of string/value properties that + will be passed to the Layer constructor + + Supported dict properties: + + below + Determines if the layer will be inserted before + the layer with the specified ID. If omitted or + set to '', the layer will be inserted above + every existing layer. + circle + :class:`plotly.graph_objects.layout.mapbox.laye + r.Circle` instance or dict with compatible + properties + color + Sets the primary layer color. If `type` is + "circle", color corresponds to the circle color + (mapbox.layer.paint.circle-color) If `type` is + "line", color corresponds to the line color + (mapbox.layer.paint.line-color) If `type` is + "fill", color corresponds to the fill color + (mapbox.layer.paint.fill-color) If `type` is + "symbol", color corresponds to the icon color + (mapbox.layer.paint.icon-color) + coordinates + Sets the coordinates array contains [longitude, + latitude] pairs for the image corners listed in + clockwise order: top left, top right, bottom + right, bottom left. Only has an effect for + "image" `sourcetype`. + fill + :class:`plotly.graph_objects.layout.mapbox.laye + r.Fill` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.layout.mapbox.laye + r.Line` instance or dict with compatible + properties + maxzoom + Sets the maximum zoom level + (mapbox.layer.maxzoom). At zoom levels equal to + or greater than the maxzoom, the layer will be + hidden. + minzoom + Sets the minimum zoom level + (mapbox.layer.minzoom). At zoom levels less + than the minzoom, the layer will be hidden. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the layer. If `type` is + "circle", opacity corresponds to the circle + opacity (mapbox.layer.paint.circle-opacity) If + `type` is "line", opacity corresponds to the + line opacity (mapbox.layer.paint.line-opacity) + If `type` is "fill", opacity corresponds to the + fill opacity (mapbox.layer.paint.fill-opacity) + If `type` is "symbol", opacity corresponds to + the icon/text opacity (mapbox.layer.paint.text- + opacity) + source + Sets the source data for this layer + (mapbox.layer.source). When `sourcetype` is set + to "geojson", `source` can be a URL to a + GeoJSON or a GeoJSON object. When `sourcetype` + is set to "vector" or "raster", `source` can be + a URL or an array of tile URLs. When + `sourcetype` is set to "image", `source` can be + a URL to an image. + sourceattribution + Sets the attribution for this source. + sourcelayer + Specifies the layer to use from a vector tile + source (mapbox.layer.source-layer). Required + for "vector" source type that supports multiple + layers. + sourcetype + Sets the source type for this layer, that is + the type of the layer data. + symbol + :class:`plotly.graph_objects.layout.mapbox.laye + r.Symbol` instance or dict with compatible + properties + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Sets the layer type, that is the how the layer + data set in `source` will be rendered With + `sourcetype` set to "geojson", the following + values are allowed: "circle", "line", "fill" + and "symbol". but note that "line" and "fill" + are not compatible with Point GeoJSON + geometries. With `sourcetype` set to "vector", + the following values are allowed: "circle", + "line", "fill" and "symbol". With `sourcetype` + set to "raster" or `*image*`, only the "raster" + value is allowed. + visible + Determines whether this layer is displayed + + Returns + ------- + tuple[plotly.graph_objs.layout.mapbox.Layer] + """ + return self["layers"] + + @layers.setter + def layers(self, val): + self["layers"] = val + + # layerdefaults + # ------------- + @property + def layerdefaults(self): + """ + When used in a template (as + layout.template.layout.mapbox.layerdefaults), sets the default + property values to use for elements of layout.mapbox.layers + + The 'layerdefaults' property is an instance of Layer + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.Layer` + - A dict of string/value properties that will be passed + to the Layer constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.mapbox.Layer + """ + return self["layerdefaults"] + + @layerdefaults.setter + def layerdefaults(self, val): + self["layerdefaults"] = val + + # pitch + # ----- + @property + def pitch(self): + """ + Sets the pitch angle of the map (in degrees, where 0 means + perpendicular to the surface of the map) (mapbox.pitch). + + The 'pitch' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["pitch"] + + @pitch.setter + def pitch(self, val): + self["pitch"] = val + + # style + # ----- + @property + def style(self): + """ + Defines the map layers that are rendered by default below the + trace layers defined in `data`, which are themselves by default + rendered below the layers defined in `layout.mapbox.layers`. + These layers can be defined either explicitly as a Mapbox Style + object which can contain multiple layer definitions that load + data from any public or private Tile Map Service (TMS or XYZ) + or Web Map Service (WMS) or implicitly by using one of the + built-in style objects which use WMSes which do not require any + access tokens, or by using a default Mapbox style or custom + Mapbox style URL, both of which require a Mapbox access token + Note that Mapbox access token can be set in the `accesstoken` + attribute or in the `mapboxAccessToken` config option. Mapbox + Style objects are of the form described in the Mapbox GL JS + documentation available at https://docs.mapbox.com/mapbox-gl- + js/style-spec The built-in plotly.js styles objects are: open- + street-map, white-bg, carto-positron, carto-darkmatter, stamen- + terrain, stamen-toner, stamen-watercolor The built-in Mapbox + styles are: basic, streets, outdoors, light, dark, satellite, + satellite-streets Mapbox style URLs are of the form: + mapbox://mapbox.mapbox-- + + The 'style' property accepts values of any type + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in the view: + `center`, `zoom`, `bearing`, `pitch`. Defaults to + `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # zoom + # ---- + @property + def zoom(self): + """ + Sets the zoom level of the map (mapbox.zoom). + + The 'zoom' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zoom"] + + @zoom.setter + def zoom(self, val): + self["zoom"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + accesstoken + Sets the mapbox access token to be used for this mapbox + map. Alternatively, the mapbox access token can be set + in the configuration options under `mapboxAccessToken`. + Note that accessToken are only required when `style` + (e.g with values : basic, streets, outdoors, light, + dark, satellite, satellite-streets ) and/or a layout + layer references the Mapbox server. + bearing + Sets the bearing angle of the map in degrees counter- + clockwise from North (mapbox.bearing). + center + :class:`plotly.graph_objects.layout.mapbox.Center` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.mapbox.Domain` + instance or dict with compatible properties + layers + A tuple of + :class:`plotly.graph_objects.layout.mapbox.Layer` + instances or dicts with compatible properties + layerdefaults + When used in a template (as + layout.template.layout.mapbox.layerdefaults), sets the + default property values to use for elements of + layout.mapbox.layers + pitch + Sets the pitch angle of the map (in degrees, where 0 + means perpendicular to the surface of the map) + (mapbox.pitch). + style + Defines the map layers that are rendered by default + below the trace layers defined in `data`, which are + themselves by default rendered below the layers defined + in `layout.mapbox.layers`. These layers can be defined + either explicitly as a Mapbox Style object which can + contain multiple layer definitions that load data from + any public or private Tile Map Service (TMS or XYZ) or + Web Map Service (WMS) or implicitly by using one of the + built-in style objects which use WMSes which do not + require any access tokens, or by using a default Mapbox + style or custom Mapbox style URL, both of which require + a Mapbox access token Note that Mapbox access token + can be set in the `accesstoken` attribute or in the + `mapboxAccessToken` config option. Mapbox Style + objects are of the form described in the Mapbox GL JS + documentation available at + https://docs.mapbox.com/mapbox-gl-js/style-spec The + built-in plotly.js styles objects are: open-street-map, + white-bg, carto-positron, carto-darkmatter, stamen- + terrain, stamen-toner, stamen-watercolor The built-in + Mapbox styles are: basic, streets, outdoors, light, + dark, satellite, satellite-streets Mapbox style URLs + are of the form: + mapbox://mapbox.mapbox-- + uirevision + Controls persistence of user-driven changes in the + view: `center`, `zoom`, `bearing`, `pitch`. Defaults to + `layout.uirevision`. + zoom + Sets the zoom level of the map (mapbox.zoom). + """ + + def __init__( + self, + arg=None, + accesstoken=None, + bearing=None, + center=None, + domain=None, + layers=None, + layerdefaults=None, + pitch=None, + style=None, + uirevision=None, + zoom=None, + **kwargs + ): + """ + Construct a new Mapbox object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Mapbox` + accesstoken + Sets the mapbox access token to be used for this mapbox + map. Alternatively, the mapbox access token can be set + in the configuration options under `mapboxAccessToken`. + Note that accessToken are only required when `style` + (e.g with values : basic, streets, outdoors, light, + dark, satellite, satellite-streets ) and/or a layout + layer references the Mapbox server. + bearing + Sets the bearing angle of the map in degrees counter- + clockwise from North (mapbox.bearing). + center + :class:`plotly.graph_objects.layout.mapbox.Center` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.mapbox.Domain` + instance or dict with compatible properties + layers + A tuple of + :class:`plotly.graph_objects.layout.mapbox.Layer` + instances or dicts with compatible properties + layerdefaults + When used in a template (as + layout.template.layout.mapbox.layerdefaults), sets the + default property values to use for elements of + layout.mapbox.layers + pitch + Sets the pitch angle of the map (in degrees, where 0 + means perpendicular to the surface of the map) + (mapbox.pitch). + style + Defines the map layers that are rendered by default + below the trace layers defined in `data`, which are + themselves by default rendered below the layers defined + in `layout.mapbox.layers`. These layers can be defined + either explicitly as a Mapbox Style object which can + contain multiple layer definitions that load data from + any public or private Tile Map Service (TMS or XYZ) or + Web Map Service (WMS) or implicitly by using one of the + built-in style objects which use WMSes which do not + require any access tokens, or by using a default Mapbox + style or custom Mapbox style URL, both of which require + a Mapbox access token Note that Mapbox access token + can be set in the `accesstoken` attribute or in the + `mapboxAccessToken` config option. Mapbox Style + objects are of the form described in the Mapbox GL JS + documentation available at + https://docs.mapbox.com/mapbox-gl-js/style-spec The + built-in plotly.js styles objects are: open-street-map, + white-bg, carto-positron, carto-darkmatter, stamen- + terrain, stamen-toner, stamen-watercolor The built-in + Mapbox styles are: basic, streets, outdoors, light, + dark, satellite, satellite-streets Mapbox style URLs + are of the form: + mapbox://mapbox.mapbox-- + uirevision + Controls persistence of user-driven changes in the + view: `center`, `zoom`, `bearing`, `pitch`. Defaults to + `layout.uirevision`. + zoom + Sets the zoom level of the map (mapbox.zoom). + + Returns + ------- + Mapbox + """ + super(Mapbox, self).__init__("mapbox") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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 +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Mapbox`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("accesstoken", None) + _v = accesstoken if accesstoken is not None else _v + if _v is not None: + self["accesstoken"] = _v + _v = arg.pop("bearing", None) + _v = bearing if bearing is not None else _v + if _v is not None: + self["bearing"] = _v + _v = arg.pop("center", None) + _v = center if center is not None else _v + if _v is not None: + self["center"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("layers", None) + _v = layers if layers is not None else _v + if _v is not None: + self["layers"] = _v + _v = arg.pop("layerdefaults", None) + _v = layerdefaults if layerdefaults is not None else _v + if _v is not None: + self["layerdefaults"] = _v + _v = arg.pop("pitch", None) + _v = pitch if pitch is not None else _v + if _v is not None: + self["pitch"] = _v + _v = arg.pop("style", None) + _v = style if style is not None else _v + if _v is not None: + self["style"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("zoom", None) + _v = zoom if zoom is not None else _v + if _v is not None: + self["zoom"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_margin.py b/packages/python/plotly/plotly/graph_objs/layout/_margin.py new file mode 100644 index 00000000000..7746a6058fa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_margin.py @@ -0,0 +1,258 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Margin(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.margin" + _valid_props = {"autoexpand", "b", "l", "pad", "r", "t"} + + # autoexpand + # ---------- + @property + def autoexpand(self): + """ + Turns on/off margin expansion computations. Legends, colorbars, + updatemenus, sliders, axis rangeselector and rangeslider are + allowed to push the margins by defaults. + + The 'autoexpand' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autoexpand"] + + @autoexpand.setter + def autoexpand(self, val): + self["autoexpand"] = val + + # b + # - + @property + def b(self): + """ + Sets the bottom margin (in px). + + The 'b' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # l + # - + @property + def l(self): + """ + Sets the left margin (in px). + + The 'l' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["l"] + + @l.setter + def l(self, val): + self["l"] = val + + # pad + # --- + @property + def pad(self): + """ + Sets the amount of padding (in px) between the plotting area + and the axis lines + + The 'pad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # r + # - + @property + def r(self): + """ + Sets the right margin (in px). + + The 'r' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # t + # - + @property + def t(self): + """ + Sets the top margin (in px). + + The 't' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autoexpand + Turns on/off margin expansion computations. Legends, + colorbars, updatemenus, sliders, axis rangeselector and + rangeslider are allowed to push the margins by + defaults. + b + Sets the bottom margin (in px). + l + Sets the left margin (in px). + pad + Sets the amount of padding (in px) between the plotting + area and the axis lines + r + Sets the right margin (in px). + t + Sets the top margin (in px). + """ + + def __init__( + self, + arg=None, + autoexpand=None, + b=None, + l=None, + pad=None, + r=None, + t=None, + **kwargs + ): + """ + Construct a new Margin object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Margin` + autoexpand + Turns on/off margin expansion computations. Legends, + colorbars, updatemenus, sliders, axis rangeselector and + rangeslider are allowed to push the margins by + defaults. + b + Sets the bottom margin (in px). + l + Sets the left margin (in px). + pad + Sets the amount of padding (in px) between the plotting + area and the axis lines + r + Sets the right margin (in px). + t + Sets the top margin (in px). + + Returns + ------- + Margin + """ + super(Margin, self).__init__("margin") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Margin +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Margin`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autoexpand", None) + _v = autoexpand if autoexpand is not None else _v + if _v is not None: + self["autoexpand"] = _v + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("l", None) + _v = l if l is not None else _v + if _v is not None: + self["l"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_modebar.py b/packages/python/plotly/plotly/graph_objs/layout/_modebar.py new file mode 100644 index 00000000000..265e61b26df --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_modebar.py @@ -0,0 +1,348 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Modebar(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.modebar" + _valid_props = {"activecolor", "bgcolor", "color", "orientation", "uirevision"} + + # activecolor + # ----------- + @property + def activecolor(self): + """ + Sets the color of the active or hovered on icons in the + modebar. + + The 'activecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["activecolor"] + + @activecolor.setter + def activecolor(self, val): + self["activecolor"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the modebar. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the color of the icons in the modebar. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the modebar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes related to the + modebar, including `hovermode`, `dragmode`, and `showspikes` at + both the root level and inside subplots. Defaults to + `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + activecolor + Sets the color of the active or hovered on icons in the + modebar. + bgcolor + Sets the background color of the modebar. + color + Sets the color of the icons in the modebar. + orientation + Sets the orientation of the modebar. + uirevision + Controls persistence of user-driven changes related to + the modebar, including `hovermode`, `dragmode`, and + `showspikes` at both the root level and inside + subplots. Defaults to `layout.uirevision`. + """ + + def __init__( + self, + arg=None, + activecolor=None, + bgcolor=None, + color=None, + orientation=None, + uirevision=None, + **kwargs + ): + """ + Construct a new Modebar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Modebar` + activecolor + Sets the color of the active or hovered on icons in the + modebar. + bgcolor + Sets the background color of the modebar. + color + Sets the color of the icons in the modebar. + orientation + Sets the orientation of the modebar. + uirevision + Controls persistence of user-driven changes related to + the modebar, including `hovermode`, `dragmode`, and + `showspikes` at both the root level and inside + subplots. Defaults to `layout.uirevision`. + + Returns + ------- + Modebar + """ + super(Modebar, self).__init__("modebar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Modebar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Modebar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("activecolor", None) + _v = activecolor if activecolor is not None else _v + if _v is not None: + self["activecolor"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_polar.py b/packages/python/plotly/plotly/graph_objs/layout/_polar.py new file mode 100644 index 00000000000..eb1990f9257 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_polar.py @@ -0,0 +1,1032 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Polar(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.polar" + _valid_props = { + "angularaxis", + "bargap", + "barmode", + "bgcolor", + "domain", + "gridshape", + "hole", + "radialaxis", + "sector", + "uirevision", + } + + # angularaxis + # ----------- + @property + def angularaxis(self): + """ + The 'angularaxis' property is an instance of AngularAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.AngularAxis` + - A dict of string/value properties that will be passed + to the AngularAxis constructor + + Supported dict properties: + + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + direction + Sets the direction corresponding to positive + angles. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + period + Set the angular period. Has an effect only when + `angularaxis.type` is "category". + rotation + Sets that start position (in degrees) of the + angular axis By default, polar subplots with + `direction` set to "counterclockwise" get a + `rotation` of 0 which corresponds to due East + (like what mathematicians prefer). In turn, + polar with `direction` set to "clockwise" get a + rotation of 90 which corresponds to due North + (like on a compass), + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thetaunit + Sets the format unit of the formatted "theta" + values. Has an effect only when + `angularaxis.type` is "linear". + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + polar.angularaxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.polar.angularaxis.tickformatstopdefaults), + sets the default property values to use for + elements of + layout.polar.angularaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + type + Sets the angular axis type. If "linear", set + `thetaunit` to determine the unit in which axis + value are shown. If *category, use `period` to + set the number of integer coordinates around + polar axis. + uirevision + Controls persistence of user-driven changes in + axis `rotation`. Defaults to + `polar.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + + Returns + ------- + plotly.graph_objs.layout.polar.AngularAxis + """ + return self["angularaxis"] + + @angularaxis.setter + def angularaxis(self, val): + self["angularaxis"] = val + + # bargap + # ------ + @property + def bargap(self): + """ + Sets the gap between bars of adjacent location coordinates. + Values are unitless, they represent fractions of the minimum + difference in bar positions in the data. + + The 'bargap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["bargap"] + + @bargap.setter + def bargap(self, val): + self["bargap"] = val + + # barmode + # ------- + @property + def barmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "overlay", the bars are plotted over + one another, you might need to an "opacity" to see multiple + bars. + + The 'barmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['stack', 'overlay'] + + Returns + ------- + Any + """ + return self["barmode"] + + @barmode.setter + def barmode(self, val): + self["barmode"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Set the background color of the subplot + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this polar subplot + . + row + If there is a layout grid, use the domain for + this row in the grid for this polar subplot . + x + Sets the horizontal domain of this polar + subplot (in plot fraction). + y + Sets the vertical domain of this polar subplot + (in plot fraction). + + Returns + ------- + plotly.graph_objs.layout.polar.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # gridshape + # --------- + @property + def gridshape(self): + """ + Determines if the radial axis grid lines and angular axis line + are drawn as "circular" sectors or as "linear" (polygon) + sectors. Has an effect only when the angular axis has `type` + "category". Note that `radialaxis.angle` is snapped to the + angle of the closest vertex when `gridshape` is "circular" (so + that radial axis scale is the same as the data scale). + + The 'gridshape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['circular', 'linear'] + + Returns + ------- + Any + """ + return self["gridshape"] + + @gridshape.setter + def gridshape(self, val): + self["gridshape"] = val + + # hole + # ---- + @property + def hole(self): + """ + Sets the fraction of the radius to cut out of the polar + subplot. + + The 'hole' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["hole"] + + @hole.setter + def hole(self, val): + self["hole"] = val + + # radialaxis + # ---------- + @property + def radialaxis(self): + """ + The 'radialaxis' property is an instance of RadialAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.RadialAxis` + - A dict of string/value properties that will be passed + to the RadialAxis constructor + + Supported dict properties: + + angle + Sets the angle (in degrees) from which the + radial axis is drawn. Note that by default, + radial axis line on the theta=0 line + corresponds to a line pointing right (like what + mathematicians prefer). Defaults to the first + `polar.sector` angle. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", + the range is non-negative, regardless of the + input data. If "normal", the range is computed + in relation to the extrema of the input data + (same behavior as for cartesian axes). + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines on which side of radial axis line + the tick and tick labels appear. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + polar.radialaxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.polar.radialaxis.tickformatstopdefaults), + sets the default property values to use for + elements of + layout.polar.radialaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.polar.radia + laxis.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.polar.radialaxis.title.font instead. + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, `angle`, and `title` + if in `editable: true` configuration. Defaults + to `polar.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + + Returns + ------- + plotly.graph_objs.layout.polar.RadialAxis + """ + return self["radialaxis"] + + @radialaxis.setter + def radialaxis(self, val): + self["radialaxis"] = val + + # sector + # ------ + @property + def sector(self): + """ + Sets angular span of this polar subplot with two angles (in + degrees). Sector are assumed to be spanned in the + counterclockwise direction with 0 corresponding to rightmost + limit of the polar subplot. + + The 'sector' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'sector[0]' property is a number and may be specified as: + - An int or float + (1) The 'sector[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["sector"] + + @sector.setter + def sector(self, val): + self["sector"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis attributes, + if not overridden in the individual axes. Defaults to + `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + angularaxis + :class:`plotly.graph_objects.layout.polar.AngularAxis` + instance or dict with compatible properties + bargap + Sets the gap between bars of adjacent location + coordinates. Values are unitless, they represent + fractions of the minimum difference in bar positions in + the data. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "overlay", the bars + are plotted over one another, you might need to an + "opacity" to see multiple bars. + bgcolor + Set the background color of the subplot + domain + :class:`plotly.graph_objects.layout.polar.Domain` + instance or dict with compatible properties + gridshape + Determines if the radial axis grid lines and angular + axis line are drawn as "circular" sectors or as + "linear" (polygon) sectors. Has an effect only when the + angular axis has `type` "category". Note that + `radialaxis.angle` is snapped to the angle of the + closest vertex when `gridshape` is "circular" (so that + radial axis scale is the same as the data scale). + hole + Sets the fraction of the radius to cut out of the polar + subplot. + radialaxis + :class:`plotly.graph_objects.layout.polar.RadialAxis` + instance or dict with compatible properties + sector + Sets angular span of this polar subplot with two angles + (in degrees). Sector are assumed to be spanned in the + counterclockwise direction with 0 corresponding to + rightmost limit of the polar subplot. + uirevision + Controls persistence of user-driven changes in axis + attributes, if not overridden in the individual axes. + Defaults to `layout.uirevision`. + """ + + def __init__( + self, + arg=None, + angularaxis=None, + bargap=None, + barmode=None, + bgcolor=None, + domain=None, + gridshape=None, + hole=None, + radialaxis=None, + sector=None, + uirevision=None, + **kwargs + ): + """ + Construct a new Polar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Polar` + angularaxis + :class:`plotly.graph_objects.layout.polar.AngularAxis` + instance or dict with compatible properties + bargap + Sets the gap between bars of adjacent location + coordinates. Values are unitless, they represent + fractions of the minimum difference in bar positions in + the data. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "overlay", the bars + are plotted over one another, you might need to an + "opacity" to see multiple bars. + bgcolor + Set the background color of the subplot + domain + :class:`plotly.graph_objects.layout.polar.Domain` + instance or dict with compatible properties + gridshape + Determines if the radial axis grid lines and angular + axis line are drawn as "circular" sectors or as + "linear" (polygon) sectors. Has an effect only when the + angular axis has `type` "category". Note that + `radialaxis.angle` is snapped to the angle of the + closest vertex when `gridshape` is "circular" (so that + radial axis scale is the same as the data scale). + hole + Sets the fraction of the radius to cut out of the polar + subplot. + radialaxis + :class:`plotly.graph_objects.layout.polar.RadialAxis` + instance or dict with compatible properties + sector + Sets angular span of this polar subplot with two angles + (in degrees). Sector are assumed to be spanned in the + counterclockwise direction with 0 corresponding to + rightmost limit of the polar subplot. + uirevision + Controls persistence of user-driven changes in axis + attributes, if not overridden in the individual axes. + Defaults to `layout.uirevision`. + + Returns + ------- + Polar + """ + super(Polar, self).__init__("polar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Polar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Polar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("angularaxis", None) + _v = angularaxis if angularaxis is not None else _v + if _v is not None: + self["angularaxis"] = _v + _v = arg.pop("bargap", None) + _v = bargap if bargap is not None else _v + if _v is not None: + self["bargap"] = _v + _v = arg.pop("barmode", None) + _v = barmode if barmode is not None else _v + if _v is not None: + self["barmode"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("gridshape", None) + _v = gridshape if gridshape is not None else _v + if _v is not None: + self["gridshape"] = _v + _v = arg.pop("hole", None) + _v = hole if hole is not None else _v + if _v is not None: + self["hole"] = _v + _v = arg.pop("radialaxis", None) + _v = radialaxis if radialaxis is not None else _v + if _v is not None: + self["radialaxis"] = _v + _v = arg.pop("sector", None) + _v = sector if sector is not None else _v + if _v is not None: + self["sector"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_radialaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_radialaxis.py new file mode 100644 index 00000000000..4883ad99510 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_radialaxis.py @@ -0,0 +1,513 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class RadialAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.radialaxis" + _valid_props = { + "domain", + "endpadding", + "orientation", + "range", + "showline", + "showticklabels", + "tickcolor", + "ticklen", + "tickorientation", + "ticksuffix", + "visible", + } + + # domain + # ------ + @property + def domain(self): + """ + Polar chart subplots are not supported yet. This key has + currently no effect. + + The 'domain' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'domain[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'domain[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # endpadding + # ---------- + @property + def endpadding(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. + + The 'endpadding' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["endpadding"] + + @endpadding.setter + def endpadding(self, val): + self["endpadding"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the orientation (an angle with respect to the + origin) of the radial axis. + + The 'orientation' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # range + # ----- + @property + def range(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Defines the start and end point of this radial axis. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # showline + # -------- + @property + def showline(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Determines whether or not the line bounding this + radial axis will be shown on the figure. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Determines whether or not the radial axis ticks will + feature tick labels. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the color of the tick lines on this radial axis. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the length of the tick lines on this radial + axis. + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickorientation + # --------------- + @property + def tickorientation(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the orientation (from the paper perspective) of + the radial axis tick labels. + + The 'tickorientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['horizontal', 'vertical'] + + Returns + ------- + Any + """ + return self["tickorientation"] + + @tickorientation.setter + def tickorientation(self, val): + self["tickorientation"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the length of the tick lines on this radial + axis. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # visible + # ------- + @property + def visible(self): + """ + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Determines whether or not this axis will be visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + domain + Polar chart subplots are not supported yet. This key + has currently no effect. + endpadding + Legacy polar charts are deprecated! Please switch to + "polar" subplots. + orientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the orientation (an angle with + respect to the origin) of the radial axis. + range + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Defines the start and end point of + this radial axis. + showline + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the line + bounding this radial axis will be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the radial + axis ticks will feature tick labels. + tickcolor + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the color of the tick lines on + this radial axis. + ticklen + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this radial axis. + tickorientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the orientation (from the paper + perspective) of the radial axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this radial axis. + visible + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not this axis + will be visible. + """ + + def __init__( + self, + arg=None, + domain=None, + endpadding=None, + orientation=None, + range=None, + showline=None, + showticklabels=None, + tickcolor=None, + ticklen=None, + tickorientation=None, + ticksuffix=None, + visible=None, + **kwargs + ): + """ + Construct a new RadialAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.RadialAxis` + domain + Polar chart subplots are not supported yet. This key + has currently no effect. + endpadding + Legacy polar charts are deprecated! Please switch to + "polar" subplots. + orientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the orientation (an angle with + respect to the origin) of the radial axis. + range + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Defines the start and end point of + this radial axis. + showline + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the line + bounding this radial axis will be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not the radial + axis ticks will feature tick labels. + tickcolor + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the color of the tick lines on + this radial axis. + ticklen + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this radial axis. + tickorientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the orientation (from the paper + perspective) of the radial axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the length of the tick lines on + this radial axis. + visible + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Determines whether or not this axis + will be visible. + + Returns + ------- + RadialAxis + """ + super(RadialAxis, self).__init__("radialaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.RadialAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.RadialAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("endpadding", None) + _v = endpadding if endpadding is not None else _v + if _v is not None: + self["endpadding"] = _v + _v = arg.pop("orientation", None) + _v = orientation if orientation is not None else _v + if _v is not None: + self["orientation"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickorientation", None) + _v = tickorientation if tickorientation is not None else _v + if _v is not None: + self["tickorientation"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_scene.py b/packages/python/plotly/plotly/graph_objs/layout/_scene.py new file mode 100644 index 00000000000..3f34272c1c5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_scene.py @@ -0,0 +1,1674 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Scene(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.scene" + _valid_props = { + "annotationdefaults", + "annotations", + "aspectmode", + "aspectratio", + "bgcolor", + "camera", + "domain", + "dragmode", + "hovermode", + "uirevision", + "xaxis", + "yaxis", + "zaxis", + } + + # annotations + # ----------- + @property + def annotations(self): + """ + The 'annotations' property is a tuple of instances of + Annotation that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.scene.Annotation + - A list or tuple of dicts of string/value properties that + will be passed to the Annotation constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + arrowwidth + Sets the width (in px) of annotation arrow + line. + ax + Sets the x component of the arrow tail about + the arrow head (in pixels). + ay + Sets the y component of the arrow tail about + the arrow head (in pixels). + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the + annotation `text`. + borderpad + Sets the padding (in px) between the `text` and + the enclosing border. + borderwidth + Sets the width (in px) of the border enclosing + the annotation `text`. + captureevents + Determines whether the annotation text box + captures mouse move and click events, or allows + those events to pass through to data points in + the plot that may be behind the annotation. By + default `captureevents` is False unless + `hovertext` is provided. If you use the event + `plotly_clickannotation` without `hovertext` + you must explicitly enable `captureevents`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. + Taller text will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.scene.annot + ation.Hoverlabel` instance or dict with + compatible properties + hovertext + Sets text to appear when hovering over this + annotation. If omitted or blank, no hover label + will appear. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the annotation (text + + arrow). + showarrow + Determines whether or not the annotation is + drawn with an arrow. If True, `text` is placed + near the arrow's tail. If False, `text` lines + up with the `x` and `y` provided. + standoff + Sets a distance, in pixels, to move the end + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow + head, relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + startstandoff + Sets a distance, in pixels, to move the start + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. + Plotly uses a subset of HTML tags to do things + like newline (
), bold (), italics + (), hyperlinks (). + Tags , , are also + supported. + textangle + Sets the angle at which the `text` is drawn + with respect to the horizontal. + valign + Sets the vertical alignment of the `text` + within the box. Has an effect only if an + explicit height is set to override the text + height. + visible + Determines whether or not this annotation is + visible. + width + Sets an explicit width for the text box. null + (default) lets the text set the box width. + Wider text will be clipped. There is no + automatic wrapping; use
to start a new + line. + x + Sets the annotation's x position. + xanchor + Sets the text box's horizontal position anchor + This anchor binds the `x` position to the + "left", "center" or "right" of the annotation. + For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the + right-most portion of the annotation lines up + with the right-most edge of the plotting area. + If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + xshift + Shifts the position of the whole annotation and + arrow to the right (positive) or left + (negative) by this many pixels. + y + Sets the annotation's y position. + yanchor + Sets the text box's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the annotation. + For example, if `y` is set to 1, `yref` to + "paper" and `yanchor` to "top" then the top- + most portion of the annotation lines up with + the top-most edge of the plotting area. If + "auto", the anchor is equivalent to "middle" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + yshift + Shifts the position of the whole annotation and + arrow up (positive) or down (negative) by this + many pixels. + z + Sets the annotation's z position. + + Returns + ------- + tuple[plotly.graph_objs.layout.scene.Annotation] + """ + return self["annotations"] + + @annotations.setter + def annotations(self, val): + self["annotations"] = val + + # annotationdefaults + # ------------------ + @property + def annotationdefaults(self): + """ + When used in a template (as + layout.template.layout.scene.annotationdefaults), sets the + default property values to use for elements of + layout.scene.annotations + + The 'annotationdefaults' property is an instance of Annotation + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.Annotation` + - A dict of string/value properties that will be passed + to the Annotation constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.scene.Annotation + """ + return self["annotationdefaults"] + + @annotationdefaults.setter + def annotationdefaults(self, val): + self["annotationdefaults"] = val + + # aspectmode + # ---------- + @property + def aspectmode(self): + """ + If "cube", this scene's axes are drawn as a cube, regardless of + the axes' ranges. If "data", this scene's axes are drawn in + proportion with the axes' ranges. If "manual", this scene's + axes are drawn in proportion with the input of "aspectratio" + (the default behavior if "aspectratio" is provided). If "auto", + this scene's axes are drawn using the results of "data" except + when one axis is more than four times the size of the two + others, where in that case the results of "cube" are used. + + The 'aspectmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'cube', 'data', 'manual'] + + Returns + ------- + Any + """ + return self["aspectmode"] + + @aspectmode.setter + def aspectmode(self, val): + self["aspectmode"] = val + + # aspectratio + # ----------- + @property + def aspectratio(self): + """ + Sets this scene's axis aspectratio. + + The 'aspectratio' property is an instance of Aspectratio + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.Aspectratio` + - A dict of string/value properties that will be passed + to the Aspectratio constructor + + Supported dict properties: + + x + + y + + z + + Returns + ------- + plotly.graph_objs.layout.scene.Aspectratio + """ + return self["aspectratio"] + + @aspectratio.setter + def aspectratio(self, val): + self["aspectratio"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # camera + # ------ + @property + def camera(self): + """ + The 'camera' property is an instance of Camera + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.Camera` + - A dict of string/value properties that will be passed + to the Camera constructor + + Supported dict properties: + + center + Sets the (x,y,z) components of the 'center' + camera vector This vector determines the + translation (x,y,z) space about the center of + this scene. By default, there is no such + translation. + eye + Sets the (x,y,z) components of the 'eye' camera + vector. This vector determines the view point + about the origin of this scene. + projection + :class:`plotly.graph_objects.layout.scene.camer + a.Projection` instance or dict with compatible + properties + up + Sets the (x,y,z) components of the 'up' camera + vector. This vector determines the up direction + of this scene with respect to the page. The + default is *{x: 0, y: 0, z: 1}* which means + that the z axis points up. + + Returns + ------- + plotly.graph_objs.layout.scene.Camera + """ + return self["camera"] + + @camera.setter + def camera(self, val): + self["camera"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this scene subplot + . + row + If there is a layout grid, use the domain for + this row in the grid for this scene subplot . + x + Sets the horizontal domain of this scene + subplot (in plot fraction). + y + Sets the vertical domain of this scene subplot + (in plot fraction). + + Returns + ------- + plotly.graph_objs.layout.scene.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # dragmode + # -------- + @property + def dragmode(self): + """ + Determines the mode of drag interactions for this scene. + + The 'dragmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['orbit', 'turntable', 'zoom', 'pan', False] + + Returns + ------- + Any + """ + return self["dragmode"] + + @dragmode.setter + def dragmode(self, val): + self["dragmode"] = val + + # hovermode + # --------- + @property + def hovermode(self): + """ + Determines the mode of hover interactions for this scene. + + The 'hovermode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['closest', False] + + Returns + ------- + Any + """ + return self["hovermode"] + + @hovermode.setter + def hovermode(self, val): + self["hovermode"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in camera + attributes. Defaults to `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + The 'xaxis' property is an instance of XAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.XAxis` + - A dict of string/value properties that will be passed + to the XAxis constructor + + Supported dict properties: + + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a + background color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Sets whether or not spikes starting from data + points to this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall + boundaries are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + scene.xaxis.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.scene.xaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.scene.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.xaxis + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.scene.xaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + plotly.graph_objs.layout.scene.XAxis + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + The 'yaxis' property is an instance of YAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.YAxis` + - A dict of string/value properties that will be passed + to the YAxis constructor + + Supported dict properties: + + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a + background color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Sets whether or not spikes starting from data + points to this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall + boundaries are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + scene.yaxis.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.scene.yaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.scene.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.yaxis + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.scene.yaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + plotly.graph_objs.layout.scene.YAxis + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # zaxis + # ----- + @property + def zaxis(self): + """ + The 'zaxis' property is an instance of ZAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.ZAxis` + - A dict of string/value properties that will be passed + to the ZAxis constructor + + Supported dict properties: + + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a + background color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Sets whether or not spikes starting from data + points to this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall + boundaries are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + scene.zaxis.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.scene.zaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.scene.zaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.zaxis + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.scene.zaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + plotly.graph_objs.layout.scene.ZAxis + """ + return self["zaxis"] + + @zaxis.setter + def zaxis(self, val): + self["zaxis"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + annotations + A tuple of + :class:`plotly.graph_objects.layout.scene.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.scene.annotationdefaults), sets + the default property values to use for elements of + layout.scene.annotations + aspectmode + If "cube", this scene's axes are drawn as a cube, + regardless of the axes' ranges. If "data", this scene's + axes are drawn in proportion with the axes' ranges. If + "manual", this scene's axes are drawn in proportion + with the input of "aspectratio" (the default behavior + if "aspectratio" is provided). If "auto", this scene's + axes are drawn using the results of "data" except when + one axis is more than four times the size of the two + others, where in that case the results of "cube" are + used. + aspectratio + Sets this scene's axis aspectratio. + bgcolor + + camera + :class:`plotly.graph_objects.layout.scene.Camera` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.scene.Domain` + instance or dict with compatible properties + dragmode + Determines the mode of drag interactions for this + scene. + hovermode + Determines the mode of hover interactions for this + scene. + uirevision + Controls persistence of user-driven changes in camera + attributes. Defaults to `layout.uirevision`. + xaxis + :class:`plotly.graph_objects.layout.scene.XAxis` + instance or dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.scene.YAxis` + instance or dict with compatible properties + zaxis + :class:`plotly.graph_objects.layout.scene.ZAxis` + instance or dict with compatible properties + """ + + def __init__( + self, + arg=None, + annotations=None, + annotationdefaults=None, + aspectmode=None, + aspectratio=None, + bgcolor=None, + camera=None, + domain=None, + dragmode=None, + hovermode=None, + uirevision=None, + xaxis=None, + yaxis=None, + zaxis=None, + **kwargs + ): + """ + Construct a new Scene object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Scene` + annotations + A tuple of + :class:`plotly.graph_objects.layout.scene.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.scene.annotationdefaults), sets + the default property values to use for elements of + layout.scene.annotations + aspectmode + If "cube", this scene's axes are drawn as a cube, + regardless of the axes' ranges. If "data", this scene's + axes are drawn in proportion with the axes' ranges. If + "manual", this scene's axes are drawn in proportion + with the input of "aspectratio" (the default behavior + if "aspectratio" is provided). If "auto", this scene's + axes are drawn using the results of "data" except when + one axis is more than four times the size of the two + others, where in that case the results of "cube" are + used. + aspectratio + Sets this scene's axis aspectratio. + bgcolor + + camera + :class:`plotly.graph_objects.layout.scene.Camera` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.scene.Domain` + instance or dict with compatible properties + dragmode + Determines the mode of drag interactions for this + scene. + hovermode + Determines the mode of hover interactions for this + scene. + uirevision + Controls persistence of user-driven changes in camera + attributes. Defaults to `layout.uirevision`. + xaxis + :class:`plotly.graph_objects.layout.scene.XAxis` + instance or dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.scene.YAxis` + instance or dict with compatible properties + zaxis + :class:`plotly.graph_objects.layout.scene.ZAxis` + instance or dict with compatible properties + + Returns + ------- + Scene + """ + super(Scene, self).__init__("scene") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Scene +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Scene`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("annotations", None) + _v = annotations if annotations is not None else _v + if _v is not None: + self["annotations"] = _v + _v = arg.pop("annotationdefaults", None) + _v = annotationdefaults if annotationdefaults is not None else _v + if _v is not None: + self["annotationdefaults"] = _v + _v = arg.pop("aspectmode", None) + _v = aspectmode if aspectmode is not None else _v + if _v is not None: + self["aspectmode"] = _v + _v = arg.pop("aspectratio", None) + _v = aspectratio if aspectratio is not None else _v + if _v is not None: + self["aspectratio"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("camera", None) + _v = camera if camera is not None else _v + if _v is not None: + self["camera"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("dragmode", None) + _v = dragmode if dragmode is not None else _v + if _v is not None: + self["dragmode"] = _v + _v = arg.pop("hovermode", None) + _v = hovermode if hovermode is not None else _v + if _v is not None: + self["hovermode"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("xaxis", None) + _v = xaxis if xaxis is not None else _v + if _v is not None: + self["xaxis"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + _v = arg.pop("zaxis", None) + _v = zaxis if zaxis is not None else _v + if _v is not None: + self["zaxis"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_shape.py b/packages/python/plotly/plotly/graph_objs/layout/_shape.py new file mode 100644 index 00000000000..999aa2b0507 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_shape.py @@ -0,0 +1,963 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Shape(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.shape" + _valid_props = { + "fillcolor", + "layer", + "line", + "name", + "opacity", + "path", + "templateitemname", + "type", + "visible", + "x0", + "x1", + "xanchor", + "xref", + "xsizemode", + "y0", + "y1", + "yanchor", + "yref", + "ysizemode", + } + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the color filling the shape's interior. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # layer + # ----- + @property + def layer(self): + """ + Specifies whether shapes are drawn below or above traces. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['below', 'above'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.shape.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.layout.shape.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the shape. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # path + # ---- + @property + def path(self): + """ + For `type` "path" - a valid SVG path with the pixel values + replaced by data values in `xsizemode`/`ysizemode` being + "scaled" and taken unmodified as pixels relative to `xanchor` + and `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not relative. + So the allowed segments are: M, L, H, V, Q, C, T, S, and Z arcs + (A) are not allowed because radius rx and ry are relative. In + the future we could consider supporting relative commands, but + we would have to decide on how to handle date and log axes. + Note that even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. no + chained "polybezier" commands - specify the segment type for + each one. On category axes, values are numbers scaled to the + serial numbers of categories because using the categories + themselves there would be no way to describe fractional + positions On data axes: because space and T are both normal + components of path strings, we can't use either to separate + date from time parts. Therefore we'll use underscore for this + purpose: 2015-02-21_13:45:56.789 + + The 'path' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["path"] + + @path.setter + def path(self, val): + self["path"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # type + # ---- + @property + def type(self): + """ + Specifies the shape type to be drawn. If "line", a line is + drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect to the axes' + sizing mode. If "circle", a circle is drawn from + ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius (|(`x0`+`x1`)/2 - + `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with respect to the axes' sizing + mode. If "rect", a rectangle is drawn linking (`x0`,`y0`), + (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect + to the axes' sizing mode. If "path", draw a custom SVG path + using `path`. with respect to the axes' sizing mode. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['circle', 'rect', 'path', 'line'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this shape is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x0 + # -- + @property + def x0(self): + """ + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # x1 + # -- + @property + def x1(self): + """ + Sets the shape's end x position. See `type` and `xsizemode` for + more info. + + The 'x1' property accepts values of any type + + Returns + ------- + Any + """ + return self["x1"] + + @x1.setter + def x1(self, val): + self["x1"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Only relevant in conjunction with `xsizemode` set to "pixel". + Specifies the anchor point on the x axis to which `x0`, `x1` + and x coordinates within `path` are relative to. E.g. useful to + attach a pixel sized shape to a certain data value. No effect + when `xsizemode` not set to "pixel". + + The 'xanchor' property accepts values of any type + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xref + # ---- + @property + def xref(self): + """ + Sets the shape's x coordinate axis. If set to an x axis id + (e.g. "x" or "x2"), the `x` position refers to an x coordinate. + If set to "paper", the `x` position refers to the distance from + the left side of the plotting area in normalized coordinates + where 0 (1) corresponds to the left (right) side. If the axis + `type` is "log", then you must take the log of your desired + range. If the axis `type` is "date", then you must convert the + date to unix time in milliseconds. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['paper'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + # xsizemode + # --------- + @property + def xsizemode(self): + """ + Sets the shapes's sizing mode along the x axis. If set to + "scaled", `x0`, `x1` and x coordinates within `path` refer to + data values on the x axis or a fraction of the plot area's + width (`xref` set to "paper"). If set to "pixel", `xanchor` + specifies the x position in terms of data or plot fraction but + `x0`, `x1` and x coordinates within `path` are pixels relative + to `xanchor`. This way, the shape can have a fixed width while + maintaining a position relative to data or plot fraction. + + The 'xsizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['scaled', 'pixel'] + + Returns + ------- + Any + """ + return self["xsizemode"] + + @xsizemode.setter + def xsizemode(self, val): + self["xsizemode"] = val + + # y0 + # -- + @property + def y0(self): + """ + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # y1 + # -- + @property + def y1(self): + """ + Sets the shape's end y position. See `type` and `ysizemode` for + more info. + + The 'y1' property accepts values of any type + + Returns + ------- + Any + """ + return self["y1"] + + @y1.setter + def y1(self, val): + self["y1"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Only relevant in conjunction with `ysizemode` set to "pixel". + Specifies the anchor point on the y axis to which `y0`, `y1` + and y coordinates within `path` are relative to. E.g. useful to + attach a pixel sized shape to a certain data value. No effect + when `ysizemode` not set to "pixel". + + The 'yanchor' property accepts values of any type + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # yref + # ---- + @property + def yref(self): + """ + Sets the annotation's y coordinate axis. If set to an y axis id + (e.g. "y" or "y2"), the `y` position refers to an y coordinate + If set to "paper", the `y` position refers to the distance from + the bottom of the plotting area in normalized coordinates where + 0 (1) corresponds to the bottom (top). + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['paper'] + - A string that matches one of the following regular expressions: + ['^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + # ysizemode + # --------- + @property + def ysizemode(self): + """ + Sets the shapes's sizing mode along the y axis. If set to + "scaled", `y0`, `y1` and y coordinates within `path` refer to + data values on the y axis or a fraction of the plot area's + height (`yref` set to "paper"). If set to "pixel", `yanchor` + specifies the y position in terms of data or plot fraction but + `y0`, `y1` and y coordinates within `path` are pixels relative + to `yanchor`. This way, the shape can have a fixed height while + maintaining a position relative to data or plot fraction. + + The 'ysizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['scaled', 'pixel'] + + Returns + ------- + Any + """ + return self["ysizemode"] + + @ysizemode.setter + def ysizemode(self, val): + self["ysizemode"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or above + traces. + line + :class:`plotly.graph_objects.layout.shape.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the pixel + values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and taken + unmodified as pixels relative to `xanchor` and + `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not + relative. So the allowed segments are: M, L, H, V, Q, + C, T, S, and Z arcs (A) are not allowed because radius + rx and ry are relative. In the future we could consider + supporting relative commands, but we would have to + decide on how to handle date and log axes. Note that + even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. + no chained "polybezier" commands - specify the segment + type for each one. On category axes, values are numbers + scaled to the serial numbers of categories because + using the categories themselves there would be no way + to describe fractional positions On data axes: because + space and T are both normal components of path strings, + we can't use either to separate date from time parts. + Therefore we'll use underscore for this purpose: + 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If "line", a line + is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect + to the axes' sizing mode. If "circle", a circle is + drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with + respect to the axes' sizing mode. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to + the axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' sizing + mode. + visible + Determines whether or not this shape is visible. + x0 + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` set to + "pixel". Specifies the anchor point on the x axis to + which `x0`, `x1` and x coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `xsizemode` not + set to "pixel". + xref + Sets the shape's x coordinate axis. If set to an x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + coordinate. If set to "paper", the `x` position refers + to the distance from the left side of the plotting area + in normalized coordinates where 0 (1) corresponds to + the left (right) side. If the axis `type` is "log", + then you must take the log of your desired range. If + the axis `type` is "date", then you must convert the + date to unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. If set + to "scaled", `x0`, `x1` and x coordinates within `path` + refer to data values on the x axis or a fraction of the + plot area's width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in terms of + data or plot fraction but `x0`, `x1` and x coordinates + within `path` are pixels relative to `xanchor`. This + way, the shape can have a fixed width while maintaining + a position relative to data or plot fraction. + y0 + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` set to + "pixel". Specifies the anchor point on the y axis to + which `y0`, `y1` and y coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `ysizemode` not + set to "pixel". + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. If set + to "scaled", `y0`, `y1` and y coordinates within `path` + refer to data values on the y axis or a fraction of the + plot area's height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in terms of + data or plot fraction but `y0`, `y1` and y coordinates + within `path` are pixels relative to `yanchor`. This + way, the shape can have a fixed height while + maintaining a position relative to data or plot + fraction. + """ + + def __init__( + self, + arg=None, + fillcolor=None, + layer=None, + line=None, + name=None, + opacity=None, + path=None, + templateitemname=None, + type=None, + visible=None, + x0=None, + x1=None, + xanchor=None, + xref=None, + xsizemode=None, + y0=None, + y1=None, + yanchor=None, + yref=None, + ysizemode=None, + **kwargs + ): + """ + Construct a new Shape object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Shape` + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or above + traces. + line + :class:`plotly.graph_objects.layout.shape.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the pixel + values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and taken + unmodified as pixels relative to `xanchor` and + `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not + relative. So the allowed segments are: M, L, H, V, Q, + C, T, S, and Z arcs (A) are not allowed because radius + rx and ry are relative. In the future we could consider + supporting relative commands, but we would have to + decide on how to handle date and log axes. Note that + even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. + no chained "polybezier" commands - specify the segment + type for each one. On category axes, values are numbers + scaled to the serial numbers of categories because + using the categories themselves there would be no way + to describe fractional positions On data axes: because + space and T are both normal components of path strings, + we can't use either to separate date from time parts. + Therefore we'll use underscore for this purpose: + 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If "line", a line + is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect + to the axes' sizing mode. If "circle", a circle is + drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with + respect to the axes' sizing mode. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to + the axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' sizing + mode. + visible + Determines whether or not this shape is visible. + x0 + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` set to + "pixel". Specifies the anchor point on the x axis to + which `x0`, `x1` and x coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `xsizemode` not + set to "pixel". + xref + Sets the shape's x coordinate axis. If set to an x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + coordinate. If set to "paper", the `x` position refers + to the distance from the left side of the plotting area + in normalized coordinates where 0 (1) corresponds to + the left (right) side. If the axis `type` is "log", + then you must take the log of your desired range. If + the axis `type` is "date", then you must convert the + date to unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. If set + to "scaled", `x0`, `x1` and x coordinates within `path` + refer to data values on the x axis or a fraction of the + plot area's width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in terms of + data or plot fraction but `x0`, `x1` and x coordinates + within `path` are pixels relative to `xanchor`. This + way, the shape can have a fixed width while maintaining + a position relative to data or plot fraction. + y0 + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` set to + "pixel". Specifies the anchor point on the y axis to + which `y0`, `y1` and y coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `ysizemode` not + set to "pixel". + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. If set + to "scaled", `y0`, `y1` and y coordinates within `path` + refer to data values on the y axis or a fraction of the + plot area's height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in terms of + data or plot fraction but `y0`, `y1` and y coordinates + within `path` are pixels relative to `yanchor`. This + way, the shape can have a fixed height while + maintaining a position relative to data or plot + fraction. + + Returns + ------- + Shape + """ + super(Shape, self).__init__("shapes") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Shape +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Shape`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("path", None) + _v = path if path is not None else _v + if _v is not None: + self["path"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x0", None) + _v = x0 if x0 is not None else _v + if _v is not None: + self["x0"] = _v + _v = arg.pop("x1", None) + _v = x1 if x1 is not None else _v + if _v is not None: + self["x1"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xref", None) + _v = xref if xref is not None else _v + if _v is not None: + self["xref"] = _v + _v = arg.pop("xsizemode", None) + _v = xsizemode if xsizemode is not None else _v + if _v is not None: + self["xsizemode"] = _v + _v = arg.pop("y0", None) + _v = y0 if y0 is not None else _v + if _v is not None: + self["y0"] = _v + _v = arg.pop("y1", None) + _v = y1 if y1 is not None else _v + if _v is not None: + self["y1"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("yref", None) + _v = yref if yref is not None else _v + if _v is not None: + self["yref"] = _v + _v = arg.pop("ysizemode", None) + _v = ysizemode if ysizemode is not None else _v + if _v is not None: + self["ysizemode"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_slider.py b/packages/python/plotly/plotly/graph_objs/layout/_slider.py new file mode 100644 index 00000000000..43cf3fb4369 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_slider.py @@ -0,0 +1,1184 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Slider(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.slider" + _valid_props = { + "active", + "activebgcolor", + "bgcolor", + "bordercolor", + "borderwidth", + "currentvalue", + "font", + "len", + "lenmode", + "minorticklen", + "name", + "pad", + "stepdefaults", + "steps", + "templateitemname", + "tickcolor", + "ticklen", + "tickwidth", + "transition", + "visible", + "x", + "xanchor", + "y", + "yanchor", + } + + # active + # ------ + @property + def active(self): + """ + Determines which button (by index starting from 0) is + considered active. + + The 'active' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["active"] + + @active.setter + def active(self, val): + self["active"] = val + + # activebgcolor + # ------------- + @property + def activebgcolor(self): + """ + Sets the background color of the slider grip while dragging. + + The 'activebgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["activebgcolor"] + + @activebgcolor.setter + def activebgcolor(self, val): + self["activebgcolor"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the slider. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the slider. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the slider. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # currentvalue + # ------------ + @property + def currentvalue(self): + """ + The 'currentvalue' property is an instance of Currentvalue + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.slider.Currentvalue` + - A dict of string/value properties that will be passed + to the Currentvalue constructor + + Supported dict properties: + + font + Sets the font of the current value label text. + offset + The amount of space, in pixels, between the + current value label and the slider. + prefix + When currentvalue.visible is true, this sets + the prefix of the label. + suffix + When currentvalue.visible is true, this sets + the suffix of the label. + visible + Shows the currently-selected value above the + slider. + xanchor + The alignment of the value readout relative to + the length of the slider. + + Returns + ------- + plotly.graph_objs.layout.slider.Currentvalue + """ + return self["currentvalue"] + + @currentvalue.setter + def currentvalue(self, val): + self["currentvalue"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font of the slider step labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.slider.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.slider.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the slider This measure excludes the padding + of both ends. That is, the slider's length is this length minus + the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this slider length is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # minorticklen + # ------------ + @property + def minorticklen(self): + """ + Sets the length in pixels of minor step tick marks + + The 'minorticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minorticklen"] + + @minorticklen.setter + def minorticklen(self, val): + self["minorticklen"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # pad + # --- + @property + def pad(self): + """ + Set the padding of the slider component along each side. + + The 'pad' property is an instance of Pad + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.slider.Pad` + - A dict of string/value properties that will be passed + to the Pad constructor + + Supported dict properties: + + b + The amount of padding (in px) along the bottom + of the component. + l + The amount of padding (in px) on the left side + of the component. + r + The amount of padding (in px) on the right side + of the component. + t + The amount of padding (in px) along the top of + the component. + + Returns + ------- + plotly.graph_objs.layout.slider.Pad + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # steps + # ----- + @property + def steps(self): + """ + The 'steps' property is a tuple of instances of + Step that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.slider.Step + - A list or tuple of dicts of string/value properties that + will be passed to the Step constructor + + Supported dict properties: + + args + Sets the arguments values to be passed to the + Plotly method set in `method` on slide. + execute + When true, the API method is executed. When + false, all other behaviors are the same and + command execution is skipped. This may be + useful when hooking into, for example, the + `plotly_sliderchange` method and executing the + API command manually without losing the benefit + of the slider automatically binding to the + state of the plot through the specification of + `method` and `args`. + label + Sets the text label to appear on the slider + method + Sets the Plotly method to be called when the + slider value is changed. If the `skip` method + is used, the API slider will function as normal + but will perform no API calls and will not bind + automatically to state updates. This may be + used to create a component interface and attach + to slider events manually via JavaScript. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + Sets the value of the slider step, used to + refer to the step programatically. Defaults to + the slider label if not provided. + visible + Determines whether or not this step is included + in the slider. + + Returns + ------- + tuple[plotly.graph_objs.layout.slider.Step] + """ + return self["steps"] + + @steps.setter + def steps(self, val): + self["steps"] = val + + # stepdefaults + # ------------ + @property + def stepdefaults(self): + """ + When used in a template (as + layout.template.layout.slider.stepdefaults), sets the default + property values to use for elements of layout.slider.steps + + The 'stepdefaults' property is an instance of Step + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.slider.Step` + - A dict of string/value properties that will be passed + to the Step constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.slider.Step + """ + return self["stepdefaults"] + + @stepdefaults.setter + def stepdefaults(self, val): + self["stepdefaults"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the color of the border enclosing the slider. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the length in pixels of step tick marks + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # transition + # ---------- + @property + def transition(self): + """ + The 'transition' property is an instance of Transition + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.slider.Transition` + - A dict of string/value properties that will be passed + to the Transition constructor + + Supported dict properties: + + duration + Sets the duration of the slider transition + easing + Sets the easing function of the slider + transition + + Returns + ------- + plotly.graph_objs.layout.slider.Transition + """ + return self["transition"] + + @transition.setter + def transition(self, val): + self["transition"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not the slider is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position (in normalized coordinates) of the slider. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the slider's horizontal position anchor. This anchor binds + the `x` position to the "left", "center" or "right" of the + range selector. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position (in normalized coordinates) of the slider. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the slider's vertical position anchor This anchor binds + the `y` position to the "top", "middle" or "bottom" of the + range selector. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + active + Determines which button (by index starting from 0) is + considered active. + activebgcolor + Sets the background color of the slider grip while + dragging. + bgcolor + Sets the background color of the slider. + bordercolor + Sets the color of the border enclosing the slider. + borderwidth + Sets the width (in px) of the border enclosing the + slider. + currentvalue + :class:`plotly.graph_objects.layout.slider.Currentvalue + ` instance or dict with compatible properties + font + Sets the font of the slider step labels. + len + Sets the length of the slider This measure excludes the + padding of both ends. That is, the slider's length is + this length minus the padding on both ends. + lenmode + Determines whether this slider length is set in units + of plot "fraction" or in *pixels. Use `len` to set the + value. + minorticklen + Sets the length in pixels of minor step tick marks + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pad + Set the padding of the slider component along each + side. + steps + A tuple of + :class:`plotly.graph_objects.layout.slider.Step` + instances or dicts with compatible properties + stepdefaults + When used in a template (as + layout.template.layout.slider.stepdefaults), sets the + default property values to use for elements of + layout.slider.steps + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + tickcolor + Sets the color of the border enclosing the slider. + ticklen + Sets the length in pixels of step tick marks + tickwidth + Sets the tick width (in px). + transition + :class:`plotly.graph_objects.layout.slider.Transition` + instance or dict with compatible properties + visible + Determines whether or not the slider is visible. + x + Sets the x position (in normalized coordinates) of the + slider. + xanchor + Sets the slider's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the range selector. + y + Sets the y position (in normalized coordinates) of the + slider. + yanchor + Sets the slider's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or + "bottom" of the range selector. + """ + + def __init__( + self, + arg=None, + active=None, + activebgcolor=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + currentvalue=None, + font=None, + len=None, + lenmode=None, + minorticklen=None, + name=None, + pad=None, + steps=None, + stepdefaults=None, + templateitemname=None, + tickcolor=None, + ticklen=None, + tickwidth=None, + transition=None, + visible=None, + x=None, + xanchor=None, + y=None, + yanchor=None, + **kwargs + ): + """ + Construct a new Slider object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Slider` + active + Determines which button (by index starting from 0) is + considered active. + activebgcolor + Sets the background color of the slider grip while + dragging. + bgcolor + Sets the background color of the slider. + bordercolor + Sets the color of the border enclosing the slider. + borderwidth + Sets the width (in px) of the border enclosing the + slider. + currentvalue + :class:`plotly.graph_objects.layout.slider.Currentvalue + ` instance or dict with compatible properties + font + Sets the font of the slider step labels. + len + Sets the length of the slider This measure excludes the + padding of both ends. That is, the slider's length is + this length minus the padding on both ends. + lenmode + Determines whether this slider length is set in units + of plot "fraction" or in *pixels. Use `len` to set the + value. + minorticklen + Sets the length in pixels of minor step tick marks + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pad + Set the padding of the slider component along each + side. + steps + A tuple of + :class:`plotly.graph_objects.layout.slider.Step` + instances or dicts with compatible properties + stepdefaults + When used in a template (as + layout.template.layout.slider.stepdefaults), sets the + default property values to use for elements of + layout.slider.steps + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + tickcolor + Sets the color of the border enclosing the slider. + ticklen + Sets the length in pixels of step tick marks + tickwidth + Sets the tick width (in px). + transition + :class:`plotly.graph_objects.layout.slider.Transition` + instance or dict with compatible properties + visible + Determines whether or not the slider is visible. + x + Sets the x position (in normalized coordinates) of the + slider. + xanchor + Sets the slider's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the range selector. + y + Sets the y position (in normalized coordinates) of the + slider. + yanchor + Sets the slider's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or + "bottom" of the range selector. + + Returns + ------- + Slider + """ + super(Slider, self).__init__("sliders") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Slider +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Slider`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("active", None) + _v = active if active is not None else _v + if _v is not None: + self["active"] = _v + _v = arg.pop("activebgcolor", None) + _v = activebgcolor if activebgcolor is not None else _v + if _v is not None: + self["activebgcolor"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("currentvalue", None) + _v = currentvalue if currentvalue is not None else _v + if _v is not None: + self["currentvalue"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("minorticklen", None) + _v = minorticklen if minorticklen is not None else _v + if _v is not None: + self["minorticklen"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("steps", None) + _v = steps if steps is not None else _v + if _v is not None: + self["steps"] = _v + _v = arg.pop("stepdefaults", None) + _v = stepdefaults if stepdefaults is not None else _v + if _v is not None: + self["stepdefaults"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("transition", None) + _v = transition if transition is not None else _v + if _v is not None: + self["transition"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_template.py b/packages/python/plotly/plotly/graph_objs/layout/_template.py new file mode 100644 index 00000000000..af7c0e8b669 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_template.py @@ -0,0 +1,330 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Template(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.template" + _valid_props = {"data", "layout"} + + # data + # ---- + @property + def data(self): + """ + The 'data' property is an instance of Data + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.template.Data` + - A dict of string/value properties that will be passed + to the Data constructor + + Supported dict properties: + + area + A tuple of :class:`plotly.graph_objects.Area` + instances or dicts with compatible properties + barpolar + A tuple of + :class:`plotly.graph_objects.Barpolar` + instances or dicts with compatible properties + bar + A tuple of :class:`plotly.graph_objects.Bar` + instances or dicts with compatible properties + box + A tuple of :class:`plotly.graph_objects.Box` + instances or dicts with compatible properties + candlestick + A tuple of + :class:`plotly.graph_objects.Candlestick` + instances or dicts with compatible properties + carpet + A tuple of :class:`plotly.graph_objects.Carpet` + instances or dicts with compatible properties + choroplethmapbox + A tuple of + :class:`plotly.graph_objects.Choroplethmapbox` + instances or dicts with compatible properties + choropleth + A tuple of + :class:`plotly.graph_objects.Choropleth` + instances or dicts with compatible properties + cone + A tuple of :class:`plotly.graph_objects.Cone` + instances or dicts with compatible properties + contourcarpet + A tuple of + :class:`plotly.graph_objects.Contourcarpet` + instances or dicts with compatible properties + contour + A tuple of + :class:`plotly.graph_objects.Contour` instances + or dicts with compatible properties + densitymapbox + A tuple of + :class:`plotly.graph_objects.Densitymapbox` + instances or dicts with compatible properties + funnelarea + A tuple of + :class:`plotly.graph_objects.Funnelarea` + instances or dicts with compatible properties + funnel + A tuple of :class:`plotly.graph_objects.Funnel` + instances or dicts with compatible properties + heatmapgl + A tuple of + :class:`plotly.graph_objects.Heatmapgl` + instances or dicts with compatible properties + heatmap + A tuple of + :class:`plotly.graph_objects.Heatmap` instances + or dicts with compatible properties + histogram2dcontour + A tuple of :class:`plotly.graph_objects.Histogr + am2dContour` instances or dicts with compatible + properties + histogram2d + A tuple of + :class:`plotly.graph_objects.Histogram2d` + instances or dicts with compatible properties + histogram + A tuple of + :class:`plotly.graph_objects.Histogram` + instances or dicts with compatible properties + image + A tuple of :class:`plotly.graph_objects.Image` + instances or dicts with compatible properties + indicator + A tuple of + :class:`plotly.graph_objects.Indicator` + instances or dicts with compatible properties + isosurface + A tuple of + :class:`plotly.graph_objects.Isosurface` + instances or dicts with compatible properties + mesh3d + A tuple of :class:`plotly.graph_objects.Mesh3d` + instances or dicts with compatible properties + ohlc + A tuple of :class:`plotly.graph_objects.Ohlc` + instances or dicts with compatible properties + parcats + A tuple of + :class:`plotly.graph_objects.Parcats` instances + or dicts with compatible properties + parcoords + A tuple of + :class:`plotly.graph_objects.Parcoords` + instances or dicts with compatible properties + pie + A tuple of :class:`plotly.graph_objects.Pie` + instances or dicts with compatible properties + pointcloud + A tuple of + :class:`plotly.graph_objects.Pointcloud` + instances or dicts with compatible properties + sankey + A tuple of :class:`plotly.graph_objects.Sankey` + instances or dicts with compatible properties + scatter3d + A tuple of + :class:`plotly.graph_objects.Scatter3d` + instances or dicts with compatible properties + scattercarpet + A tuple of + :class:`plotly.graph_objects.Scattercarpet` + instances or dicts with compatible properties + scattergeo + A tuple of + :class:`plotly.graph_objects.Scattergeo` + instances or dicts with compatible properties + scattergl + A tuple of + :class:`plotly.graph_objects.Scattergl` + instances or dicts with compatible properties + scattermapbox + A tuple of + :class:`plotly.graph_objects.Scattermapbox` + instances or dicts with compatible properties + scatterpolargl + A tuple of + :class:`plotly.graph_objects.Scatterpolargl` + instances or dicts with compatible properties + scatterpolar + A tuple of + :class:`plotly.graph_objects.Scatterpolar` + instances or dicts with compatible properties + scatter + A tuple of + :class:`plotly.graph_objects.Scatter` instances + or dicts with compatible properties + scatterternary + A tuple of + :class:`plotly.graph_objects.Scatterternary` + instances or dicts with compatible properties + splom + A tuple of :class:`plotly.graph_objects.Splom` + instances or dicts with compatible properties + streamtube + A tuple of + :class:`plotly.graph_objects.Streamtube` + instances or dicts with compatible properties + sunburst + A tuple of + :class:`plotly.graph_objects.Sunburst` + instances or dicts with compatible properties + surface + A tuple of + :class:`plotly.graph_objects.Surface` instances + or dicts with compatible properties + table + A tuple of :class:`plotly.graph_objects.Table` + instances or dicts with compatible properties + treemap + A tuple of + :class:`plotly.graph_objects.Treemap` instances + or dicts with compatible properties + violin + A tuple of :class:`plotly.graph_objects.Violin` + instances or dicts with compatible properties + volume + A tuple of :class:`plotly.graph_objects.Volume` + instances or dicts with compatible properties + waterfall + A tuple of + :class:`plotly.graph_objects.Waterfall` + instances or dicts with compatible properties + + Returns + ------- + plotly.graph_objs.layout.template.Data + """ + return self["data"] + + @data.setter + def data(self, val): + self["data"] = val + + # layout + # ------ + @property + def layout(self): + """ + The 'layout' property is an instance of Layout + that may be specified as: + - An instance of :class:`plotly.graph_objs.Layout` + - A dict of string/value properties that will be passed + to the Layout constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.template.Layout + """ + return self["layout"] + + @layout.setter + def layout(self, val): + self["layout"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + data + :class:`plotly.graph_objects.layout.template.Data` + instance or dict with compatible properties + layout + :class:`plotly.graph_objects.Layout` instance or dict + with compatible properties + """ + + def __init__(self, arg=None, data=None, layout=None, **kwargs): + """ + Construct a new Template object + + Default attributes to be applied to the plot. This should be a + dict with format: `{'layout': layoutTemplate, 'data': + {trace_type: [traceTemplate, ...], ...}}` where + `layoutTemplate` is a dict matching the structure of + `figure.layout` and `traceTemplate` is a dict matching the + structure of the trace with type `trace_type` (e.g. 'scatter'). + Alternatively, this may be specified as an instance of + plotly.graph_objs.layout.Template. 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 this can be used to add 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`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Template` + data + :class:`plotly.graph_objects.layout.template.Data` + instance or dict with compatible properties + layout + :class:`plotly.graph_objects.Layout` instance or dict + with compatible properties + + Returns + ------- + Template + """ + super(Template, self).__init__("template") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Template +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Template`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("data", None) + _v = data if data is not None else _v + if _v is not None: + self["data"] = _v + _v = arg.pop("layout", None) + _v = layout if layout is not None else _v + if _v is not None: + self["layout"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_ternary.py b/packages/python/plotly/plotly/graph_objs/layout/_ternary.py new file mode 100644 index 00000000000..65f62adf904 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_ternary.py @@ -0,0 +1,979 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Ternary(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.ternary" + _valid_props = {"aaxis", "baxis", "bgcolor", "caxis", "domain", "sum", "uirevision"} + + # aaxis + # ----- + @property + def aaxis(self): + """ + The 'aaxis' property is an instance of Aaxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.Aaxis` + - A dict of string/value properties that will be passed + to the Aaxis constructor + + Supported dict properties: + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The + maximum is determined by the sum minus the + minimum values of the other two axes. The full + view corresponds to all the minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + ternary.aaxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.ternary.aaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.ternary.aaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.aax + is.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.ternary.aaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in + axis `min`, and `title` if in `editable: true` + configuration. Defaults to + `ternary.uirevision`. + + Returns + ------- + plotly.graph_objs.layout.ternary.Aaxis + """ + return self["aaxis"] + + @aaxis.setter + def aaxis(self, val): + self["aaxis"] = val + + # baxis + # ----- + @property + def baxis(self): + """ + The 'baxis' property is an instance of Baxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.Baxis` + - A dict of string/value properties that will be passed + to the Baxis constructor + + Supported dict properties: + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The + maximum is determined by the sum minus the + minimum values of the other two axes. The full + view corresponds to all the minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + ternary.baxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.ternary.baxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.ternary.baxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.bax + is.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.ternary.baxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in + axis `min`, and `title` if in `editable: true` + configuration. Defaults to + `ternary.uirevision`. + + Returns + ------- + plotly.graph_objs.layout.ternary.Baxis + """ + return self["baxis"] + + @baxis.setter + def baxis(self, val): + self["baxis"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Set the background color of the subplot + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # caxis + # ----- + @property + def caxis(self): + """ + The 'caxis' property is an instance of Caxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.Caxis` + - A dict of string/value properties that will be passed + to the Caxis constructor + + Supported dict properties: + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The + maximum is determined by the sum minus the + minimum values of the other two axes. The full + view corresponds to all the minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + ternary.caxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.ternary.caxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.ternary.caxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.cax + is.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.ternary.caxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in + axis `min`, and `title` if in `editable: true` + configuration. Defaults to + `ternary.uirevision`. + + Returns + ------- + plotly.graph_objs.layout.ternary.Caxis + """ + return self["caxis"] + + @caxis.setter + def caxis(self, val): + self["caxis"] = val + + # domain + # ------ + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this ternary + subplot . + row + If there is a layout grid, use the domain for + this row in the grid for this ternary subplot . + x + Sets the horizontal domain of this ternary + subplot (in plot fraction). + y + Sets the vertical domain of this ternary + subplot (in plot fraction). + + Returns + ------- + plotly.graph_objs.layout.ternary.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # sum + # --- + @property + def sum(self): + """ + The number each triplet should sum to, and the maximum range of + each axis + + The 'sum' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sum"] + + @sum.setter + def sum(self, val): + self["sum"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `min` and + `title`, if not overridden in the individual axes. Defaults to + `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + aaxis + :class:`plotly.graph_objects.layout.ternary.Aaxis` + instance or dict with compatible properties + baxis + :class:`plotly.graph_objects.layout.ternary.Baxis` + instance or dict with compatible properties + bgcolor + Set the background color of the subplot + caxis + :class:`plotly.graph_objects.layout.ternary.Caxis` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.ternary.Domain` + instance or dict with compatible properties + sum + The number each triplet should sum to, and the maximum + range of each axis + uirevision + Controls persistence of user-driven changes in axis + `min` and `title`, if not overridden in the individual + axes. Defaults to `layout.uirevision`. + """ + + def __init__( + self, + arg=None, + aaxis=None, + baxis=None, + bgcolor=None, + caxis=None, + domain=None, + sum=None, + uirevision=None, + **kwargs + ): + """ + Construct a new Ternary object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Ternary` + aaxis + :class:`plotly.graph_objects.layout.ternary.Aaxis` + instance or dict with compatible properties + baxis + :class:`plotly.graph_objects.layout.ternary.Baxis` + instance or dict with compatible properties + bgcolor + Set the background color of the subplot + caxis + :class:`plotly.graph_objects.layout.ternary.Caxis` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.ternary.Domain` + instance or dict with compatible properties + sum + The number each triplet should sum to, and the maximum + range of each axis + uirevision + Controls persistence of user-driven changes in axis + `min` and `title`, if not overridden in the individual + axes. Defaults to `layout.uirevision`. + + Returns + ------- + Ternary + """ + super(Ternary, self).__init__("ternary") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Ternary +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Ternary`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("aaxis", None) + _v = aaxis if aaxis is not None else _v + if _v is not None: + self["aaxis"] = _v + _v = arg.pop("baxis", None) + _v = baxis if baxis is not None else _v + if _v is not None: + self["baxis"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("caxis", None) + _v = caxis if caxis is not None else _v + if _v is not None: + self["caxis"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("sum", None) + _v = sum if sum is not None else _v + if _v is not None: + self["sum"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_title.py b/packages/python/plotly/plotly/graph_objs/layout/_title.py new file mode 100644 index 00000000000..fcccc763afc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_title.py @@ -0,0 +1,477 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.title" + _valid_props = { + "font", + "pad", + "text", + "x", + "xanchor", + "xref", + "y", + "yanchor", + "yref", + } + + # font + # ---- + @property + def font(self): + """ + Sets the title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # pad + # --- + @property + def pad(self): + """ + Sets the padding of the title. Each padding value only applies + when the corresponding `xanchor`/`yanchor` value is set + accordingly. E.g. for left padding to take effect, `xanchor` + must be set to "left". The same rule applies if + `xanchor`/`yanchor` is determined automatically. Padding is + muted if the respective anchor value is "middle*/*center". + + The 'pad' property is an instance of Pad + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.title.Pad` + - A dict of string/value properties that will be passed + to the Pad constructor + + Supported dict properties: + + b + The amount of padding (in px) along the bottom + of the component. + l + The amount of padding (in px) on the left side + of the component. + r + The amount of padding (in px) on the right side + of the component. + t + The amount of padding (in px) along the top of + the component. + + Returns + ------- + plotly.graph_objs.layout.title.Pad + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the plot's title. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # x + # - + @property + def x(self): + """ + Sets the x position with respect to `xref` in normalized + coordinates from 0 (left) to 1 (right). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the title's horizontal alignment with respect to its x + position. "left" means that the title starts at x, "right" + means that the title ends at x and "center" means that the + title's center is at x. "auto" divides `xref` by three and + calculates the `xanchor` value automatically based on the value + of `x`. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xref + # ---- + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position with respect to `yref` in normalized + coordinates from 0 (bottom) to 1 (top). "auto" places the + baseline of the title onto the vertical center of the top + margin. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the title's vertical alignment with respect to its y + position. "top" means that the title's cap line is at y, + "bottom" means that the title's baseline is at y and "middle" + means that the title's midline is at y. "auto" divides `yref` + by three and calculates the `yanchor` value automatically based + on the value of `y`. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # yref + # ---- + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets the title font. Note that the title's font used to + be customized by the now deprecated `titlefont` + attribute. + pad + Sets the padding of the title. Each padding value only + applies when the corresponding `xanchor`/`yanchor` + value is set accordingly. E.g. for left padding to take + effect, `xanchor` must be set to "left". The same rule + applies if `xanchor`/`yanchor` is determined + automatically. Padding is muted if the respective + anchor value is "middle*/*center". + text + Sets the plot's title. Note that before the existence + of `title.text`, the title's contents used to be + defined as the `title` attribute itself. This behavior + has been deprecated. + x + Sets the x position with respect to `xref` in + normalized coordinates from 0 (left) to 1 (right). + xanchor + Sets the title's horizontal alignment with respect to + its x position. "left" means that the title starts at + x, "right" means that the title ends at x and "center" + means that the title's center is at x. "auto" divides + `xref` by three and calculates the `xanchor` value + automatically based on the value of `x`. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` in + normalized coordinates from 0 (bottom) to 1 (top). + "auto" places the baseline of the title onto the + vertical center of the top margin. + yanchor + Sets the title's vertical alignment with respect to its + y position. "top" means that the title's cap line is at + y, "bottom" means that the title's baseline is at y and + "middle" means that the title's midline is at y. "auto" + divides `yref` by three and calculates the `yanchor` + value automatically based on the value of `y`. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + font=None, + pad=None, + text=None, + x=None, + xanchor=None, + xref=None, + y=None, + yanchor=None, + yref=None, + **kwargs + ): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.Title` + font + Sets the title font. Note that the title's font used to + be customized by the now deprecated `titlefont` + attribute. + pad + Sets the padding of the title. Each padding value only + applies when the corresponding `xanchor`/`yanchor` + value is set accordingly. E.g. for left padding to take + effect, `xanchor` must be set to "left". The same rule + applies if `xanchor`/`yanchor` is determined + automatically. Padding is muted if the respective + anchor value is "middle*/*center". + text + Sets the plot's title. Note that before the existence + of `title.text`, the title's contents used to be + defined as the `title` attribute itself. This behavior + has been deprecated. + x + Sets the x position with respect to `xref` in + normalized coordinates from 0 (left) to 1 (right). + xanchor + Sets the title's horizontal alignment with respect to + its x position. "left" means that the title starts at + x, "right" means that the title ends at x and "center" + means that the title's center is at x. "auto" divides + `xref` by three and calculates the `xanchor` value + automatically based on the value of `x`. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` in + normalized coordinates from 0 (bottom) to 1 (top). + "auto" places the baseline of the title onto the + vertical center of the top margin. + yanchor + Sets the title's vertical alignment with respect to its + y position. "top" means that the title's cap line is at + y, "bottom" means that the title's baseline is at y and + "middle" means that the title's midline is at y. "auto" + divides `yref` by three and calculates the `yanchor` + value automatically based on the value of `y`. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xref", None) + _v = xref if xref is not None else _v + if _v is not None: + self["xref"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("yref", None) + _v = yref if yref is not None else _v + if _v is not None: + self["yref"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_transition.py b/packages/python/plotly/plotly/graph_objs/layout/_transition.py new file mode 100644 index 00000000000..07b6f8695ea --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_transition.py @@ -0,0 +1,175 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Transition(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.transition" + _valid_props = {"duration", "easing", "ordering"} + + # duration + # -------- + @property + def duration(self): + """ + The duration of the transition, in milliseconds. If equal to + zero, updates are synchronous. + + The 'duration' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["duration"] + + @duration.setter + def duration(self, val): + self["duration"] = val + + # easing + # ------ + @property + def easing(self): + """ + The easing function used for the transition + + The 'easing' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'quad', 'cubic', 'sin', 'exp', 'circle', + 'elastic', 'back', 'bounce', 'linear-in', 'quad-in', + 'cubic-in', 'sin-in', 'exp-in', 'circle-in', 'elastic-in', + 'back-in', 'bounce-in', 'linear-out', 'quad-out', + 'cubic-out', 'sin-out', 'exp-out', 'circle-out', + 'elastic-out', 'back-out', 'bounce-out', 'linear-in-out', + 'quad-in-out', 'cubic-in-out', 'sin-in-out', 'exp-in-out', + 'circle-in-out', 'elastic-in-out', 'back-in-out', + 'bounce-in-out'] + + Returns + ------- + Any + """ + return self["easing"] + + @easing.setter + def easing(self, val): + self["easing"] = val + + # ordering + # -------- + @property + def ordering(self): + """ + Determines whether the figure's layout or traces smoothly + transitions during updates that make both traces and layout + change. + + The 'ordering' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['layout first', 'traces first'] + + Returns + ------- + Any + """ + return self["ordering"] + + @ordering.setter + def ordering(self, val): + self["ordering"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + duration + The duration of the transition, in milliseconds. If + equal to zero, updates are synchronous. + easing + The easing function used for the transition + ordering + Determines whether the figure's layout or traces + smoothly transitions during updates that make both + traces and layout change. + """ + + def __init__(self, arg=None, duration=None, easing=None, ordering=None, **kwargs): + """ + Construct a new Transition object + + Sets transition options used during Plotly.react updates. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Transition` + duration + The duration of the transition, in milliseconds. If + equal to zero, updates are synchronous. + easing + The easing function used for the transition + ordering + Determines whether the figure's layout or traces + smoothly transitions during updates that make both + traces and layout change. + + Returns + ------- + Transition + """ + super(Transition, self).__init__("transition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Transition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Transition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("duration", None) + _v = duration if duration is not None else _v + if _v is not None: + self["duration"] = _v + _v = arg.pop("easing", None) + _v = easing if easing is not None else _v + if _v is not None: + self["easing"] = _v + _v = arg.pop("ordering", None) + _v = ordering if ordering is not None else _v + if _v is not None: + self["ordering"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_uniformtext.py b/packages/python/plotly/plotly/graph_objs/layout/_uniformtext.py new file mode 100644 index 00000000000..64f020e5130 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_uniformtext.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Uniformtext(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.uniformtext" + _valid_props = {"minsize", "mode"} + + # minsize + # ------- + @property + def minsize(self): + """ + Sets the minimum text size between traces of the same type. + + The 'minsize' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minsize"] + + @minsize.setter + def minsize(self, val): + self["minsize"] = val + + # mode + # ---- + @property + def mode(self): + """ + Determines how the font size for various text elements are + uniformed between each trace type. If the computed text sizes + were smaller than the minimum size defined by + `uniformtext.minsize` using "hide" option hides the text; and + using "show" option shows the text without further downscaling. + Please note that if the size defined by `minsize` is greater + than the font size defined by trace, then the `minsize` is + used. + + The 'mode' property is an enumeration that may be specified as: + - One of the following enumeration values: + [False, 'hide', 'show'] + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + minsize + Sets the minimum text size between traces of the same + type. + mode + Determines how the font size for various text elements + are uniformed between each trace type. If the computed + text sizes were smaller than the minimum size defined + by `uniformtext.minsize` using "hide" option hides the + text; and using "show" option shows the text without + further downscaling. Please note that if the size + defined by `minsize` is greater than the font size + defined by trace, then the `minsize` is used. + """ + + def __init__(self, arg=None, minsize=None, mode=None, **kwargs): + """ + Construct a new Uniformtext object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Uniformtext` + minsize + Sets the minimum text size between traces of the same + type. + mode + Determines how the font size for various text elements + are uniformed between each trace type. If the computed + text sizes were smaller than the minimum size defined + by `uniformtext.minsize` using "hide" option hides the + text; and using "show" option shows the text without + further downscaling. Please note that if the size + defined by `minsize` is greater than the font size + defined by trace, then the `minsize` is used. + + Returns + ------- + Uniformtext + """ + super(Uniformtext, self).__init__("uniformtext") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Uniformtext +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Uniformtext`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("minsize", None) + _v = minsize if minsize is not None else _v + if _v is not None: + self["minsize"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_updatemenu.py b/packages/python/plotly/plotly/graph_objs/layout/_updatemenu.py new file mode 100644 index 00000000000..44771902a4c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_updatemenu.py @@ -0,0 +1,904 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Updatemenu(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.updatemenu" + _valid_props = { + "active", + "bgcolor", + "bordercolor", + "borderwidth", + "buttondefaults", + "buttons", + "direction", + "font", + "name", + "pad", + "showactive", + "templateitemname", + "type", + "visible", + "x", + "xanchor", + "y", + "yanchor", + } + + # active + # ------ + @property + def active(self): + """ + Determines which button (by index starting from 0) is + considered active. + + The 'active' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + + Returns + ------- + int + """ + return self["active"] + + @active.setter + def active(self, val): + self["active"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the update menu buttons. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the update menu. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the update menu. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # buttons + # ------- + @property + def buttons(self): + """ + The 'buttons' property is a tuple of instances of + Button that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.updatemenu.Button + - A list or tuple of dicts of string/value properties that + will be passed to the Button constructor + + Supported dict properties: + + args + Sets the arguments values to be passed to the + Plotly method set in `method` on click. + args2 + Sets a 2nd set of `args`, these arguments + values are passed to the Plotly method set in + `method` when clicking this button while in the + active state. Use this to create toggle + buttons. + execute + When true, the API method is executed. When + false, all other behaviors are the same and + command execution is skipped. This may be + useful when hooking into, for example, the + `plotly_buttonclicked` method and executing the + API command manually without losing the benefit + of the updatemenu automatically binding to the + state of the plot through the specification of + `method` and `args`. + label + Sets the text label to appear on the button. + method + Sets the Plotly method to be called on click. + If the `skip` method is used, the API + updatemenu will function as normal but will + perform no API calls and will not bind + automatically to state updates. This may be + used to create a component interface and attach + to updatemenu events manually via JavaScript. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this button is + visible. + + Returns + ------- + tuple[plotly.graph_objs.layout.updatemenu.Button] + """ + return self["buttons"] + + @buttons.setter + def buttons(self, val): + self["buttons"] = val + + # buttondefaults + # -------------- + @property + def buttondefaults(self): + """ + When used in a template (as + layout.template.layout.updatemenu.buttondefaults), sets the + default property values to use for elements of + layout.updatemenu.buttons + + The 'buttondefaults' property is an instance of Button + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.updatemenu.Button` + - A dict of string/value properties that will be passed + to the Button constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.updatemenu.Button + """ + return self["buttondefaults"] + + @buttondefaults.setter + def buttondefaults(self, val): + self["buttondefaults"] = val + + # direction + # --------- + @property + def direction(self): + """ + Determines the direction in which the buttons are laid out, + whether in a dropdown menu or a row/column of buttons. For + `left` and `up`, the buttons will still appear in left-to-right + or top-to-bottom order respectively. + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'up', 'down'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font of the update menu button text. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.updatemenu.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.updatemenu.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # pad + # --- + @property + def pad(self): + """ + Sets the padding around the buttons or dropdown menu. + + The 'pad' property is an instance of Pad + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.updatemenu.Pad` + - A dict of string/value properties that will be passed + to the Pad constructor + + Supported dict properties: + + b + The amount of padding (in px) along the bottom + of the component. + l + The amount of padding (in px) on the left side + of the component. + r + The amount of padding (in px) on the right side + of the component. + t + The amount of padding (in px) along the top of + the component. + + Returns + ------- + plotly.graph_objs.layout.updatemenu.Pad + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # showactive + # ---------- + @property + def showactive(self): + """ + Highlights active dropdown item or active button if true. + + The 'showactive' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showactive"] + + @showactive.setter + def showactive(self, val): + self["showactive"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # type + # ---- + @property + def type(self): + """ + Determines whether the buttons are accessible via a dropdown + menu or whether the buttons are stacked horizontally or + vertically + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['dropdown', 'buttons'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not the update menu is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position (in normalized coordinates) of the update + menu. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the update menu's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the range selector. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position (in normalized coordinates) of the update + menu. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the update menu's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the range selector. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + active + Determines which button (by index starting from 0) is + considered active. + bgcolor + Sets the background color of the update menu buttons. + bordercolor + Sets the color of the border enclosing the update menu. + borderwidth + Sets the width (in px) of the border enclosing the + update menu. + buttons + A tuple of + :class:`plotly.graph_objects.layout.updatemenu.Button` + instances or dicts with compatible properties + buttondefaults + When used in a template (as + layout.template.layout.updatemenu.buttondefaults), sets + the default property values to use for elements of + layout.updatemenu.buttons + direction + Determines the direction in which the buttons are laid + out, whether in a dropdown menu or a row/column of + buttons. For `left` and `up`, the buttons will still + appear in left-to-right or top-to-bottom order + respectively. + font + Sets the font of the update menu button text. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pad + Sets the padding around the buttons or dropdown menu. + showactive + Highlights active dropdown item or active button if + true. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Determines whether the buttons are accessible via a + dropdown menu or whether the buttons are stacked + horizontally or vertically + visible + Determines whether or not the update menu is visible. + x + Sets the x position (in normalized coordinates) of the + update menu. + xanchor + Sets the update menu's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the range selector. + y + Sets the y position (in normalized coordinates) of the + update menu. + yanchor + Sets the update menu's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the range selector. + """ + + def __init__( + self, + arg=None, + active=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + buttons=None, + buttondefaults=None, + direction=None, + font=None, + name=None, + pad=None, + showactive=None, + templateitemname=None, + type=None, + visible=None, + x=None, + xanchor=None, + y=None, + yanchor=None, + **kwargs + ): + """ + Construct a new Updatemenu object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.Updatemenu` + active + Determines which button (by index starting from 0) is + considered active. + bgcolor + Sets the background color of the update menu buttons. + bordercolor + Sets the color of the border enclosing the update menu. + borderwidth + Sets the width (in px) of the border enclosing the + update menu. + buttons + A tuple of + :class:`plotly.graph_objects.layout.updatemenu.Button` + instances or dicts with compatible properties + buttondefaults + When used in a template (as + layout.template.layout.updatemenu.buttondefaults), sets + the default property values to use for elements of + layout.updatemenu.buttons + direction + Determines the direction in which the buttons are laid + out, whether in a dropdown menu or a row/column of + buttons. For `left` and `up`, the buttons will still + appear in left-to-right or top-to-bottom order + respectively. + font + Sets the font of the update menu button text. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pad + Sets the padding around the buttons or dropdown menu. + showactive + Highlights active dropdown item or active button if + true. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Determines whether the buttons are accessible via a + dropdown menu or whether the buttons are stacked + horizontally or vertically + visible + Determines whether or not the update menu is visible. + x + Sets the x position (in normalized coordinates) of the + update menu. + xanchor + Sets the update menu's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the range selector. + y + Sets the y position (in normalized coordinates) of the + update menu. + yanchor + Sets the update menu's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the range selector. + + Returns + ------- + Updatemenu + """ + super(Updatemenu, self).__init__("updatemenus") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Updatemenu +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.Updatemenu`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("active", None) + _v = active if active is not None else _v + if _v is not None: + self["active"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("buttons", None) + _v = buttons if buttons is not None else _v + if _v is not None: + self["buttons"] = _v + _v = arg.pop("buttondefaults", None) + _v = buttondefaults if buttondefaults is not None else _v + if _v is not None: + self["buttondefaults"] = _v + _v = arg.pop("direction", None) + _v = direction if direction is not None else _v + if _v is not None: + self["direction"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("showactive", None) + _v = showactive if showactive is not None else _v + if _v is not None: + self["showactive"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py new file mode 100644 index 00000000000..ca6660589d5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py @@ -0,0 +1,3613 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class XAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.xaxis" + _valid_props = { + "anchor", + "automargin", + "autorange", + "calendar", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "constrain", + "constraintoward", + "dividercolor", + "dividerwidth", + "domain", + "dtick", + "exponentformat", + "fixedrange", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "matches", + "mirror", + "nticks", + "overlaying", + "position", + "range", + "rangebreakdefaults", + "rangebreaks", + "rangemode", + "rangeselector", + "rangeslider", + "scaleanchor", + "scaleratio", + "separatethousands", + "showdividers", + "showexponent", + "showgrid", + "showline", + "showspikes", + "showticklabels", + "showtickprefix", + "showticksuffix", + "side", + "spikecolor", + "spikedash", + "spikemode", + "spikesnap", + "spikethickness", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "tickson", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "type", + "uirevision", + "visible", + "zeroline", + "zerolinecolor", + "zerolinewidth", + } + + # anchor + # ------ + @property + def anchor(self): + """ + If set to an opposite-letter axis id (e.g. `x2`, `y`), this + axis is bound to the corresponding opposite-letter axis. If set + to "free", this axis' position is determined by `position`. + + The 'anchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['free'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["anchor"] + + @anchor.setter + def anchor(self, val): + self["anchor"] = val + + # automargin + # ---------- + @property + def automargin(self): + """ + Determines whether long tick labels automatically grow the + figure margins. + + The 'automargin' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["automargin"] + + @automargin.setter + def automargin(self, val): + self["automargin"] = val + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the calendar system to use for `range` and `tick0` if this + is a date axis. This does not set the calendar for interpreting + data on this axis, that's specified in the trace or via the + global `layout.calendar` + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # constrain + # --------- + @property + def constrain(self): + """ + If this axis needs to be compressed (either due to its own + `scaleanchor` and `scaleratio` or those of the other axis), + determines how that happens: by increasing the "range" + (default), or by decreasing the "domain". + + The 'constrain' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['range', 'domain'] + + Returns + ------- + Any + """ + return self["constrain"] + + @constrain.setter + def constrain(self, val): + self["constrain"] = val + + # constraintoward + # --------------- + @property + def constraintoward(self): + """ + If this axis needs to be compressed (either due to its own + `scaleanchor` and `scaleratio` or those of the other axis), + determines which direction we push the originally specified + plot area. Options are "left", "center" (default), and "right" + for x axes, and "top", "middle" (default), and "bottom" for y + axes. + + The 'constraintoward' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["constraintoward"] + + @constraintoward.setter + def constraintoward(self, val): + self["constraintoward"] = val + + # dividercolor + # ------------ + @property + def dividercolor(self): + """ + Sets the color of the dividers Only has an effect on + "multicategory" axes. + + The 'dividercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["dividercolor"] + + @dividercolor.setter + def dividercolor(self, val): + self["dividercolor"] = val + + # dividerwidth + # ------------ + @property + def dividerwidth(self): + """ + Sets the width (in px) of the dividers Only has an effect on + "multicategory" axes. + + The 'dividerwidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dividerwidth"] + + @dividerwidth.setter + def dividerwidth(self, val): + self["dividerwidth"] = val + + # domain + # ------ + @property + def domain(self): + """ + Sets the domain of this axis (in plot fraction). + + The 'domain' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'domain[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'domain[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # fixedrange + # ---------- + @property + def fixedrange(self): + """ + Determines whether or not this axis is zoom-able. If true, then + zoom is disabled. + + The 'fixedrange' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["fixedrange"] + + @fixedrange.setter + def fixedrange(self, val): + self["fixedrange"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # matches + # ------- + @property + def matches(self): + """ + If set to another axis id (e.g. `x2`, `y`), the range of this + axis will match the range of the corresponding axis in data- + coordinates space. Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. Note that + setting axes simultaneously in both a `scaleanchor` and a + `matches` constraint is currently forbidden. Moreover, note + that matching axes must have the same `type`. + + The 'matches' property is an enumeration that may be specified as: + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["matches"] + + @matches.setter + def matches(self, val): + self["matches"] = val + + # mirror + # ------ + @property + def mirror(self): + """ + Determines if the axis lines or/and ticks are mirrored to the + opposite side of the plotting area. If True, the axis lines are + mirrored. If "ticks", the axis lines and ticks are mirrored. If + False, mirroring is disable. If "all", axis lines are mirrored + on all shared-axes subplots. If "allticks", axis lines and + ticks are mirrored on all shared-axes subplots. + + The 'mirror' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'ticks', False, 'all', 'allticks'] + + Returns + ------- + Any + """ + return self["mirror"] + + @mirror.setter + def mirror(self, val): + self["mirror"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # overlaying + # ---------- + @property + def overlaying(self): + """ + If set a same-letter axis id, this axis is overlaid on top of + the corresponding same-letter axis, with traces and axes + visible for both axes. If False, this axis does not overlay any + same-letter axes. In this case, for axes with overlapping + domains only the highest-numbered axis will be visible. + + The 'overlaying' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['free'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["overlaying"] + + @overlaying.setter + def overlaying(self, val): + self["overlaying"] = val + + # position + # -------- + @property + def position(self): + """ + Sets the position of this axis in the plotting space (in + normalized coordinates). Only has an effect if `anchor` is set + to "free". + + The 'position' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["position"] + + @position.setter + def position(self, val): + self["position"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangebreaks + # ----------- + @property + def rangebreaks(self): + """ + The 'rangebreaks' property is a tuple of instances of + Rangebreak that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.xaxis.Rangebreak + - A list or tuple of dicts of string/value properties that + will be passed to the Rangebreak constructor + + Supported dict properties: + + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The + default is one day in milliseconds. + enabled + Determines whether this axis rangebreak is + enabled or disabled. Please note that + `rangebreaks` only work for "date" axis type. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pattern + Determines a pattern on the time line that + generates breaks. If *day of week* - days of + the week in English e.g. 'Sunday' or `sun` + (matching is case-insensitive and considers + only the first three characters), as well as + Sunday-based integers between 0 and 6. If + "hour" - hour (24-hour clock) as decimal + numbers between 0 and 24. for more info. + Examples: - { pattern: 'day of week', bounds: + [6, 1] } or simply { bounds: ['sat', 'mon'] } + breaks from Saturday to Monday (i.e. skips the + weekends). - { pattern: 'hour', bounds: [17, 8] + } breaks from 5pm to 8am (i.e. skips non-work + hours). + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use + `dvalue` to set the size of the values along + the axis. + + Returns + ------- + tuple[plotly.graph_objs.layout.xaxis.Rangebreak] + """ + return self["rangebreaks"] + + @rangebreaks.setter + def rangebreaks(self, val): + self["rangebreaks"] = val + + # rangebreakdefaults + # ------------------ + @property + def rangebreakdefaults(self): + """ + When used in a template (as + layout.template.layout.xaxis.rangebreakdefaults), sets the + default property values to use for elements of + layout.xaxis.rangebreaks + + The 'rangebreakdefaults' property is an instance of Rangebreak + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak` + - A dict of string/value properties that will be passed + to the Rangebreak constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.xaxis.Rangebreak + """ + return self["rangebreakdefaults"] + + @rangebreakdefaults.setter + def rangebreakdefaults(self, val): + self["rangebreakdefaults"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. Applies only to + linear axes. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # rangeselector + # ------------- + @property + def rangeselector(self): + """ + The 'rangeselector' property is an instance of Rangeselector + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector` + - A dict of string/value properties that will be passed + to the Rangeselector constructor + + Supported dict properties: + + activecolor + Sets the background color of the active range + selector button. + bgcolor + Sets the background color of the range selector + buttons. + bordercolor + Sets the color of the border enclosing the + range selector. + borderwidth + Sets the width (in px) of the border enclosing + the range selector. + buttons + Sets the specifications for each buttons. By + default, a range selector comes with no + buttons. + buttondefaults + When used in a template (as layout.template.lay + out.xaxis.rangeselector.buttondefaults), sets + the default property values to use for elements + of layout.xaxis.rangeselector.buttons + font + Sets the font of the range selector button + text. + visible + Determines whether or not this range selector + is visible. Note that range selectors are only + available for x axes of `type` set to or auto- + typed to "date". + x + Sets the x position (in normalized coordinates) + of the range selector. + xanchor + Sets the range selector's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the range selector. + yanchor + Sets the range selector's vertical position + anchor This anchor binds the `y` position to + the "top", "middle" or "bottom" of the range + selector. + + Returns + ------- + plotly.graph_objs.layout.xaxis.Rangeselector + """ + return self["rangeselector"] + + @rangeselector.setter + def rangeselector(self, val): + self["rangeselector"] = val + + # rangeslider + # ----------- + @property + def rangeslider(self): + """ + The 'rangeslider' property is an instance of Rangeslider + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.Rangeslider` + - A dict of string/value properties that will be passed + to the Rangeslider constructor + + Supported dict properties: + + autorange + Determines whether or not the range slider + range is computed in relation to the input + data. If `range` is provided, then `autorange` + is set to False. + bgcolor + Sets the background color of the range slider. + bordercolor + Sets the border color of the range slider. + borderwidth + Sets the border width of the range slider. + range + Sets the range of the range slider. If not set, + defaults to the full xaxis range. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + thickness + The height of the range slider as a fraction of + the total plot area height. + visible + Determines whether or not the range slider will + be visible. If visible, perpendicular axes will + be set to `fixedrange` + yaxis + :class:`plotly.graph_objects.layout.xaxis.range + slider.YAxis` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.layout.xaxis.Rangeslider + """ + return self["rangeslider"] + + @rangeslider.setter + def rangeslider(self, val): + self["rangeslider"] = val + + # scaleanchor + # ----------- + @property + def scaleanchor(self): + """ + If set to another axis id (e.g. `x2`, `y`), the range of this + axis changes together with the range of the corresponding axis + such that the scale of pixels per unit is in a constant ratio. + Both axes are still zoomable, but when you zoom one, the other + will zoom the same amount, keeping a fixed midpoint. + `constrain` and `constraintoward` determine how we enforce the + constraint. You can chain these, ie `yaxis: {scaleanchor: *x*}, + xaxis2: {scaleanchor: *y*}` but you can only link axes of the + same `type`. The linked axis can have the opposite letter (to + constrain the aspect ratio) or the same letter (to match scales + across subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant and the last + constraint encountered will be ignored to avoid possible + inconsistent constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and a `matches` + constraint is currently forbidden. + + The 'scaleanchor' property is an enumeration that may be specified as: + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["scaleanchor"] + + @scaleanchor.setter + def scaleanchor(self, val): + self["scaleanchor"] = val + + # scaleratio + # ---------- + @property + def scaleratio(self): + """ + If this axis is linked to another by `scaleanchor`, this + determines the pixel to unit scale ratio. For example, if this + value is 10, then every unit on this axis spans 10 times the + number of pixels as a unit on the linked axis. Use this for + example to create an elevation profile where the vertical scale + is exaggerated a fixed amount with respect to the horizontal. + + The 'scaleratio' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["scaleratio"] + + @scaleratio.setter + def scaleratio(self, val): + self["scaleratio"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showdividers + # ------------ + @property + def showdividers(self): + """ + Determines whether or not a dividers are drawn between the + category levels of this axis. Only has an effect on + "multicategory" axes. + + The 'showdividers' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showdividers"] + + @showdividers.setter + def showdividers(self, val): + self["showdividers"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showspikes + # ---------- + @property + def showspikes(self): + """ + Determines whether or not spikes (aka droplines) are drawn for + this axis. Note: This only takes affect when hovermode = + closest + + The 'showspikes' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showspikes"] + + @showspikes.setter + def showspikes(self, val): + self["showspikes"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # side + # ---- + @property + def side(self): + """ + Determines whether a x (y) axis is positioned at the "bottom" + ("left") or "top" ("right") of the plotting area. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom', 'left', 'right'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # spikecolor + # ---------- + @property + def spikecolor(self): + """ + Sets the spike color. If undefined, will use the series color + + The 'spikecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["spikecolor"] + + @spikecolor.setter + def spikecolor(self, val): + self["spikecolor"] = val + + # spikedash + # --------- + @property + def spikedash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'spikedash' property is a string and must be specified as: + - One of the following strings: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["spikedash"] + + @spikedash.setter + def spikedash(self, val): + self["spikedash"] = val + + # spikemode + # --------- + @property + def spikemode(self): + """ + Determines the drawing mode for the spike line If "toaxis", the + line is drawn from the data point to the axis the series is + plotted on. If "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If "marker", then a marker + dot is drawn on the axis the series is plotted on + + The 'spikemode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['toaxis', 'across', 'marker'] joined with '+' characters + (e.g. 'toaxis+across') + + Returns + ------- + Any + """ + return self["spikemode"] + + @spikemode.setter + def spikemode(self, val): + self["spikemode"] = val + + # spikesnap + # --------- + @property + def spikesnap(self): + """ + Determines whether spikelines are stuck to the cursor or to the + closest datapoints. + + The 'spikesnap' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['data', 'cursor', 'hovered data'] + + Returns + ------- + Any + """ + return self["spikesnap"] + + @spikesnap.setter + def spikesnap(self, val): + self["spikesnap"] = val + + # spikethickness + # -------------- + @property + def spikethickness(self): + """ + Sets the width (in px) of the zero line. + + The 'spikethickness' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["spikethickness"] + + @spikethickness.setter + def spikethickness(self, val): + self["spikethickness"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.xaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.xaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.xaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.xaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.xaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.xaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # tickson + # ------- + @property + def tickson(self): + """ + Determines where ticks and grid lines are drawn with respect to + their corresponding tick labels. Only has an effect for axes of + `type` "category" or "multicategory". When set to "boundaries", + ticks and grid lines are drawn half a category to the + left/bottom of labels. + + The 'tickson' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['labels', 'boundaries'] + + Returns + ------- + Any + """ + return self["tickson"] + + @tickson.setter + def tickson(self, val): + self["tickson"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + standoff + Sets the standoff distance (in px) between the + axis labels and the title text The default + value is a function of the axis tick labels, + the title `font.size` and the axis `linewidth`. + Note that the axis title position is always + constrained within the margins, so the actual + standoff distance is always less than the set + or default value. By setting `standoff` and + turning on `automargin`, plotly.js will push + the margins to fit the axis title at given + standoff distance. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.xaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.xaxis.title.font instead. Sets + this axis' title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'log', 'date', 'category', + 'multicategory'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `range`, + `autorange`, and `title` if in `editable: true` configuration. + Defaults to `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # zeroline + # -------- + @property + def zeroline(self): + """ + Determines whether or not a line is drawn at along the 0 value + of this axis. If True, the zero line is drawn on top of the + grid lines. + + The 'zeroline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zeroline"] + + @zeroline.setter + def zeroline(self, val): + self["zeroline"] = val + + # zerolinecolor + # ------------- + @property + def zerolinecolor(self): + """ + Sets the line color of the zero line. + + The 'zerolinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["zerolinecolor"] + + @zerolinecolor.setter + def zerolinecolor(self, val): + self["zerolinecolor"] = val + + # zerolinewidth + # ------------- + @property + def zerolinewidth(self): + """ + Sets the width (in px) of the zero line. + + The 'zerolinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zerolinewidth"] + + @zerolinewidth.setter + def zerolinewidth(self, val): + self["zerolinewidth"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + anchor + If set to an opposite-letter axis id (e.g. `x2`, `y`), + this axis is bound to the corresponding opposite-letter + axis. If set to "free", this axis' position is + determined by `position`. + automargin + Determines whether long tick labels automatically grow + the figure margins. + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + constrain + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines how that happens: by increasing + the "range" (default), or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines which direction we push the + originally specified plot area. Options are "left", + "center" (default), and "right" for x axes, and "top", + "middle" (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an effect on + "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has an + effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot fraction). + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the range + of this axis will match the range of the corresponding + axis in data-coordinates space. Moreover, matching axes + share auto-range values, category lists and histogram + auto-bins. Note that setting axes simultaneously in + both a `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that matching axes + must have the same `type`. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + overlaying + If set a same-letter axis id, this axis is overlaid on + top of the corresponding same-letter axis, with traces + and axes visible for both axes. If False, this axis + does not overlay any same-letter axes. In this case, + for axes with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting space + (in normalized coordinates). Only has an effect if + `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangebreaks + A tuple of + :class:`plotly.graph_objects.layout.xaxis.Rangebreak` + instances or dicts with compatible properties + rangebreakdefaults + When used in a template (as + layout.template.layout.xaxis.rangebreakdefaults), sets + the default property values to use for elements of + layout.xaxis.rangebreaks + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + rangeselector + :class:`plotly.graph_objects.layout.xaxis.Rangeselector + ` instance or dict with compatible properties + rangeslider + :class:`plotly.graph_objects.layout.xaxis.Rangeslider` + instance or dict with compatible properties + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the range + of this axis changes together with the range of the + corresponding axis such that the scale of pixels per + unit is in a constant ratio. Both axes are still + zoomable, but when you zoom one, the other will zoom + the same amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce the + constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you + can only link axes of the same `type`. The linked axis + can have the opposite letter (to constrain the aspect + ratio) or the same letter (to match scales across + subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant and the + last constraint encountered will be ignored to avoid + possible inconsistent constraints via `scaleratio`. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is currently + forbidden. + scaleratio + If this axis is linked to another by `scaleanchor`, + this determines the pixel to unit scale ratio. For + example, if this value is 10, then every unit on this + axis spans 10 times the number of pixels as a unit on + the linked axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn between + the category levels of this axis. Only has an effect on + "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Determines whether or not spikes (aka droplines) are + drawn for this axis. Note: This only takes affect when + hovermode = closest + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned at the + "bottom" ("left") or "top" ("right") of the plotting + area. + spikecolor + Sets the spike color. If undefined, will use the series + color + spikedash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line If + "toaxis", the line is drawn from the data point to the + axis the series is plotted on. If "across", the line + is drawn across the entire plot area, and supercedes + "toaxis". If "marker", then a marker dot is drawn on + the axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the cursor + or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.xaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as + layout.template.layout.xaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn with + respect to their corresponding tick labels. Only has an + effect for axes of `type` "category" or + "multicategory". When set to "boundaries", ticks and + grid lines are drawn half a category to the left/bottom + of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.xaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.xaxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + uirevision + Controls persistence of user-driven changes in axis + `range`, `autorange`, and `title` if in `editable: + true` configuration. Defaults to `layout.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + anchor=None, + automargin=None, + autorange=None, + calendar=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + constrain=None, + constraintoward=None, + dividercolor=None, + dividerwidth=None, + domain=None, + dtick=None, + exponentformat=None, + fixedrange=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + matches=None, + mirror=None, + nticks=None, + overlaying=None, + position=None, + range=None, + rangebreaks=None, + rangebreakdefaults=None, + rangemode=None, + rangeselector=None, + rangeslider=None, + scaleanchor=None, + scaleratio=None, + separatethousands=None, + showdividers=None, + showexponent=None, + showgrid=None, + showline=None, + showspikes=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + side=None, + spikecolor=None, + spikedash=None, + spikemode=None, + spikesnap=None, + spikethickness=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + tickson=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + type=None, + uirevision=None, + visible=None, + zeroline=None, + zerolinecolor=None, + zerolinewidth=None, + **kwargs + ): + """ + Construct a new XAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.XAxis` + anchor + If set to an opposite-letter axis id (e.g. `x2`, `y`), + this axis is bound to the corresponding opposite-letter + axis. If set to "free", this axis' position is + determined by `position`. + automargin + Determines whether long tick labels automatically grow + the figure margins. + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + constrain + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines how that happens: by increasing + the "range" (default), or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines which direction we push the + originally specified plot area. Options are "left", + "center" (default), and "right" for x axes, and "top", + "middle" (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an effect on + "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has an + effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot fraction). + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the range + of this axis will match the range of the corresponding + axis in data-coordinates space. Moreover, matching axes + share auto-range values, category lists and histogram + auto-bins. Note that setting axes simultaneously in + both a `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that matching axes + must have the same `type`. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + overlaying + If set a same-letter axis id, this axis is overlaid on + top of the corresponding same-letter axis, with traces + and axes visible for both axes. If False, this axis + does not overlay any same-letter axes. In this case, + for axes with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting space + (in normalized coordinates). Only has an effect if + `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangebreaks + A tuple of + :class:`plotly.graph_objects.layout.xaxis.Rangebreak` + instances or dicts with compatible properties + rangebreakdefaults + When used in a template (as + layout.template.layout.xaxis.rangebreakdefaults), sets + the default property values to use for elements of + layout.xaxis.rangebreaks + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + rangeselector + :class:`plotly.graph_objects.layout.xaxis.Rangeselector + ` instance or dict with compatible properties + rangeslider + :class:`plotly.graph_objects.layout.xaxis.Rangeslider` + instance or dict with compatible properties + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the range + of this axis changes together with the range of the + corresponding axis such that the scale of pixels per + unit is in a constant ratio. Both axes are still + zoomable, but when you zoom one, the other will zoom + the same amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce the + constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you + can only link axes of the same `type`. The linked axis + can have the opposite letter (to constrain the aspect + ratio) or the same letter (to match scales across + subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant and the + last constraint encountered will be ignored to avoid + possible inconsistent constraints via `scaleratio`. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is currently + forbidden. + scaleratio + If this axis is linked to another by `scaleanchor`, + this determines the pixel to unit scale ratio. For + example, if this value is 10, then every unit on this + axis spans 10 times the number of pixels as a unit on + the linked axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn between + the category levels of this axis. Only has an effect on + "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Determines whether or not spikes (aka droplines) are + drawn for this axis. Note: This only takes affect when + hovermode = closest + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned at the + "bottom" ("left") or "top" ("right") of the plotting + area. + spikecolor + Sets the spike color. If undefined, will use the series + color + spikedash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line If + "toaxis", the line is drawn from the data point to the + axis the series is plotted on. If "across", the line + is drawn across the entire plot area, and supercedes + "toaxis". If "marker", then a marker dot is drawn on + the axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the cursor + or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.xaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as + layout.template.layout.xaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn with + respect to their corresponding tick labels. Only has an + effect for axes of `type` "category" or + "multicategory". When set to "boundaries", ticks and + grid lines are drawn half a category to the left/bottom + of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.xaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.xaxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + uirevision + Controls persistence of user-driven changes in axis + `range`, `autorange`, and `title` if in `editable: + true` configuration. Defaults to `layout.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + XAxis + """ + super(XAxis, self).__init__("xaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.XAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.XAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("anchor", None) + _v = anchor if anchor is not None else _v + if _v is not None: + self["anchor"] = _v + _v = arg.pop("automargin", None) + _v = automargin if automargin is not None else _v + if _v is not None: + self["automargin"] = _v + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("constrain", None) + _v = constrain if constrain is not None else _v + if _v is not None: + self["constrain"] = _v + _v = arg.pop("constraintoward", None) + _v = constraintoward if constraintoward is not None else _v + if _v is not None: + self["constraintoward"] = _v + _v = arg.pop("dividercolor", None) + _v = dividercolor if dividercolor is not None else _v + if _v is not None: + self["dividercolor"] = _v + _v = arg.pop("dividerwidth", None) + _v = dividerwidth if dividerwidth is not None else _v + if _v is not None: + self["dividerwidth"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("fixedrange", None) + _v = fixedrange if fixedrange is not None else _v + if _v is not None: + self["fixedrange"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("matches", None) + _v = matches if matches is not None else _v + if _v is not None: + self["matches"] = _v + _v = arg.pop("mirror", None) + _v = mirror if mirror is not None else _v + if _v is not None: + self["mirror"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("overlaying", None) + _v = overlaying if overlaying is not None else _v + if _v is not None: + self["overlaying"] = _v + _v = arg.pop("position", None) + _v = position if position is not None else _v + if _v is not None: + self["position"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangebreaks", None) + _v = rangebreaks if rangebreaks is not None else _v + if _v is not None: + self["rangebreaks"] = _v + _v = arg.pop("rangebreakdefaults", None) + _v = rangebreakdefaults if rangebreakdefaults is not None else _v + if _v is not None: + self["rangebreakdefaults"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("rangeselector", None) + _v = rangeselector if rangeselector is not None else _v + if _v is not None: + self["rangeselector"] = _v + _v = arg.pop("rangeslider", None) + _v = rangeslider if rangeslider is not None else _v + if _v is not None: + self["rangeslider"] = _v + _v = arg.pop("scaleanchor", None) + _v = scaleanchor if scaleanchor is not None else _v + if _v is not None: + self["scaleanchor"] = _v + _v = arg.pop("scaleratio", None) + _v = scaleratio if scaleratio is not None else _v + if _v is not None: + self["scaleratio"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showdividers", None) + _v = showdividers if showdividers is not None else _v + if _v is not None: + self["showdividers"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showspikes", None) + _v = showspikes if showspikes is not None else _v + if _v is not None: + self["showspikes"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("spikecolor", None) + _v = spikecolor if spikecolor is not None else _v + if _v is not None: + self["spikecolor"] = _v + _v = arg.pop("spikedash", None) + _v = spikedash if spikedash is not None else _v + if _v is not None: + self["spikedash"] = _v + _v = arg.pop("spikemode", None) + _v = spikemode if spikemode is not None else _v + if _v is not None: + self["spikemode"] = _v + _v = arg.pop("spikesnap", None) + _v = spikesnap if spikesnap is not None else _v + if _v is not None: + self["spikesnap"] = _v + _v = arg.pop("spikethickness", None) + _v = spikethickness if spikethickness is not None else _v + if _v is not None: + self["spikethickness"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("tickson", None) + _v = tickson if tickson is not None else _v + if _v is not None: + self["tickson"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("zeroline", None) + _v = zeroline if zeroline is not None else _v + if _v is not None: + self["zeroline"] = _v + _v = arg.pop("zerolinecolor", None) + _v = zerolinecolor if zerolinecolor is not None else _v + if _v is not None: + self["zerolinecolor"] = _v + _v = arg.pop("zerolinewidth", None) + _v = zerolinewidth if zerolinewidth is not None else _v + if _v is not None: + self["zerolinewidth"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py new file mode 100644 index 00000000000..f35f379f6cb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py @@ -0,0 +1,3462 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class YAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout" + _path_str = "layout.yaxis" + _valid_props = { + "anchor", + "automargin", + "autorange", + "calendar", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "constrain", + "constraintoward", + "dividercolor", + "dividerwidth", + "domain", + "dtick", + "exponentformat", + "fixedrange", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "matches", + "mirror", + "nticks", + "overlaying", + "position", + "range", + "rangebreakdefaults", + "rangebreaks", + "rangemode", + "scaleanchor", + "scaleratio", + "separatethousands", + "showdividers", + "showexponent", + "showgrid", + "showline", + "showspikes", + "showticklabels", + "showtickprefix", + "showticksuffix", + "side", + "spikecolor", + "spikedash", + "spikemode", + "spikesnap", + "spikethickness", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "tickson", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "type", + "uirevision", + "visible", + "zeroline", + "zerolinecolor", + "zerolinewidth", + } + + # anchor + # ------ + @property + def anchor(self): + """ + If set to an opposite-letter axis id (e.g. `x2`, `y`), this + axis is bound to the corresponding opposite-letter axis. If set + to "free", this axis' position is determined by `position`. + + The 'anchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['free'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["anchor"] + + @anchor.setter + def anchor(self, val): + self["anchor"] = val + + # automargin + # ---------- + @property + def automargin(self): + """ + Determines whether long tick labels automatically grow the + figure margins. + + The 'automargin' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["automargin"] + + @automargin.setter + def automargin(self, val): + self["automargin"] = val + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the calendar system to use for `range` and `tick0` if this + is a date axis. This does not set the calendar for interpreting + data on this axis, that's specified in the trace or via the + global `layout.calendar` + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # constrain + # --------- + @property + def constrain(self): + """ + If this axis needs to be compressed (either due to its own + `scaleanchor` and `scaleratio` or those of the other axis), + determines how that happens: by increasing the "range" + (default), or by decreasing the "domain". + + The 'constrain' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['range', 'domain'] + + Returns + ------- + Any + """ + return self["constrain"] + + @constrain.setter + def constrain(self, val): + self["constrain"] = val + + # constraintoward + # --------------- + @property + def constraintoward(self): + """ + If this axis needs to be compressed (either due to its own + `scaleanchor` and `scaleratio` or those of the other axis), + determines which direction we push the originally specified + plot area. Options are "left", "center" (default), and "right" + for x axes, and "top", "middle" (default), and "bottom" for y + axes. + + The 'constraintoward' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["constraintoward"] + + @constraintoward.setter + def constraintoward(self, val): + self["constraintoward"] = val + + # dividercolor + # ------------ + @property + def dividercolor(self): + """ + Sets the color of the dividers Only has an effect on + "multicategory" axes. + + The 'dividercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["dividercolor"] + + @dividercolor.setter + def dividercolor(self, val): + self["dividercolor"] = val + + # dividerwidth + # ------------ + @property + def dividerwidth(self): + """ + Sets the width (in px) of the dividers Only has an effect on + "multicategory" axes. + + The 'dividerwidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dividerwidth"] + + @dividerwidth.setter + def dividerwidth(self, val): + self["dividerwidth"] = val + + # domain + # ------ + @property + def domain(self): + """ + Sets the domain of this axis (in plot fraction). + + The 'domain' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'domain[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'domain[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # fixedrange + # ---------- + @property + def fixedrange(self): + """ + Determines whether or not this axis is zoom-able. If true, then + zoom is disabled. + + The 'fixedrange' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["fixedrange"] + + @fixedrange.setter + def fixedrange(self, val): + self["fixedrange"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # matches + # ------- + @property + def matches(self): + """ + If set to another axis id (e.g. `x2`, `y`), the range of this + axis will match the range of the corresponding axis in data- + coordinates space. Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. Note that + setting axes simultaneously in both a `scaleanchor` and a + `matches` constraint is currently forbidden. Moreover, note + that matching axes must have the same `type`. + + The 'matches' property is an enumeration that may be specified as: + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["matches"] + + @matches.setter + def matches(self, val): + self["matches"] = val + + # mirror + # ------ + @property + def mirror(self): + """ + Determines if the axis lines or/and ticks are mirrored to the + opposite side of the plotting area. If True, the axis lines are + mirrored. If "ticks", the axis lines and ticks are mirrored. If + False, mirroring is disable. If "all", axis lines are mirrored + on all shared-axes subplots. If "allticks", axis lines and + ticks are mirrored on all shared-axes subplots. + + The 'mirror' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'ticks', False, 'all', 'allticks'] + + Returns + ------- + Any + """ + return self["mirror"] + + @mirror.setter + def mirror(self, val): + self["mirror"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # overlaying + # ---------- + @property + def overlaying(self): + """ + If set a same-letter axis id, this axis is overlaid on top of + the corresponding same-letter axis, with traces and axes + visible for both axes. If False, this axis does not overlay any + same-letter axes. In this case, for axes with overlapping + domains only the highest-numbered axis will be visible. + + The 'overlaying' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['free'] + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["overlaying"] + + @overlaying.setter + def overlaying(self, val): + self["overlaying"] = val + + # position + # -------- + @property + def position(self): + """ + Sets the position of this axis in the plotting space (in + normalized coordinates). Only has an effect if `anchor` is set + to "free". + + The 'position' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["position"] + + @position.setter + def position(self, val): + self["position"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangebreaks + # ----------- + @property + def rangebreaks(self): + """ + The 'rangebreaks' property is a tuple of instances of + Rangebreak that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.yaxis.Rangebreak + - A list or tuple of dicts of string/value properties that + will be passed to the Rangebreak constructor + + Supported dict properties: + + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The + default is one day in milliseconds. + enabled + Determines whether this axis rangebreak is + enabled or disabled. Please note that + `rangebreaks` only work for "date" axis type. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pattern + Determines a pattern on the time line that + generates breaks. If *day of week* - days of + the week in English e.g. 'Sunday' or `sun` + (matching is case-insensitive and considers + only the first three characters), as well as + Sunday-based integers between 0 and 6. If + "hour" - hour (24-hour clock) as decimal + numbers between 0 and 24. for more info. + Examples: - { pattern: 'day of week', bounds: + [6, 1] } or simply { bounds: ['sat', 'mon'] } + breaks from Saturday to Monday (i.e. skips the + weekends). - { pattern: 'hour', bounds: [17, 8] + } breaks from 5pm to 8am (i.e. skips non-work + hours). + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use + `dvalue` to set the size of the values along + the axis. + + Returns + ------- + tuple[plotly.graph_objs.layout.yaxis.Rangebreak] + """ + return self["rangebreaks"] + + @rangebreaks.setter + def rangebreaks(self, val): + self["rangebreaks"] = val + + # rangebreakdefaults + # ------------------ + @property + def rangebreakdefaults(self): + """ + When used in a template (as + layout.template.layout.yaxis.rangebreakdefaults), sets the + default property values to use for elements of + layout.yaxis.rangebreaks + + The 'rangebreakdefaults' property is an instance of Rangebreak + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.yaxis.Rangebreak` + - A dict of string/value properties that will be passed + to the Rangebreak constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.yaxis.Rangebreak + """ + return self["rangebreakdefaults"] + + @rangebreakdefaults.setter + def rangebreakdefaults(self, val): + self["rangebreakdefaults"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. Applies only to + linear axes. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # scaleanchor + # ----------- + @property + def scaleanchor(self): + """ + If set to another axis id (e.g. `x2`, `y`), the range of this + axis changes together with the range of the corresponding axis + such that the scale of pixels per unit is in a constant ratio. + Both axes are still zoomable, but when you zoom one, the other + will zoom the same amount, keeping a fixed midpoint. + `constrain` and `constraintoward` determine how we enforce the + constraint. You can chain these, ie `yaxis: {scaleanchor: *x*}, + xaxis2: {scaleanchor: *y*}` but you can only link axes of the + same `type`. The linked axis can have the opposite letter (to + constrain the aspect ratio) or the same letter (to match scales + across subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant and the last + constraint encountered will be ignored to avoid possible + inconsistent constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and a `matches` + constraint is currently forbidden. + + The 'scaleanchor' property is an enumeration that may be specified as: + - A string that matches one of the following regular expressions: + ['^x([2-9]|[1-9][0-9]+)?$', '^y([2-9]|[1-9][0-9]+)?$'] + + Returns + ------- + Any + """ + return self["scaleanchor"] + + @scaleanchor.setter + def scaleanchor(self, val): + self["scaleanchor"] = val + + # scaleratio + # ---------- + @property + def scaleratio(self): + """ + If this axis is linked to another by `scaleanchor`, this + determines the pixel to unit scale ratio. For example, if this + value is 10, then every unit on this axis spans 10 times the + number of pixels as a unit on the linked axis. Use this for + example to create an elevation profile where the vertical scale + is exaggerated a fixed amount with respect to the horizontal. + + The 'scaleratio' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["scaleratio"] + + @scaleratio.setter + def scaleratio(self, val): + self["scaleratio"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showdividers + # ------------ + @property + def showdividers(self): + """ + Determines whether or not a dividers are drawn between the + category levels of this axis. Only has an effect on + "multicategory" axes. + + The 'showdividers' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showdividers"] + + @showdividers.setter + def showdividers(self, val): + self["showdividers"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showspikes + # ---------- + @property + def showspikes(self): + """ + Determines whether or not spikes (aka droplines) are drawn for + this axis. Note: This only takes affect when hovermode = + closest + + The 'showspikes' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showspikes"] + + @showspikes.setter + def showspikes(self, val): + self["showspikes"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # side + # ---- + @property + def side(self): + """ + Determines whether a x (y) axis is positioned at the "bottom" + ("left") or "top" ("right") of the plotting area. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom', 'left', 'right'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # spikecolor + # ---------- + @property + def spikecolor(self): + """ + Sets the spike color. If undefined, will use the series color + + The 'spikecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["spikecolor"] + + @spikecolor.setter + def spikecolor(self, val): + self["spikecolor"] = val + + # spikedash + # --------- + @property + def spikedash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'spikedash' property is a string and must be specified as: + - One of the following strings: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["spikedash"] + + @spikedash.setter + def spikedash(self, val): + self["spikedash"] = val + + # spikemode + # --------- + @property + def spikemode(self): + """ + Determines the drawing mode for the spike line If "toaxis", the + line is drawn from the data point to the axis the series is + plotted on. If "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If "marker", then a marker + dot is drawn on the axis the series is plotted on + + The 'spikemode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['toaxis', 'across', 'marker'] joined with '+' characters + (e.g. 'toaxis+across') + + Returns + ------- + Any + """ + return self["spikemode"] + + @spikemode.setter + def spikemode(self, val): + self["spikemode"] = val + + # spikesnap + # --------- + @property + def spikesnap(self): + """ + Determines whether spikelines are stuck to the cursor or to the + closest datapoints. + + The 'spikesnap' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['data', 'cursor', 'hovered data'] + + Returns + ------- + Any + """ + return self["spikesnap"] + + @spikesnap.setter + def spikesnap(self, val): + self["spikesnap"] = val + + # spikethickness + # -------------- + @property + def spikethickness(self): + """ + Sets the width (in px) of the zero line. + + The 'spikethickness' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["spikethickness"] + + @spikethickness.setter + def spikethickness(self, val): + self["spikethickness"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.yaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.yaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.yaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.yaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.yaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.yaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.yaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.yaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # tickson + # ------- + @property + def tickson(self): + """ + Determines where ticks and grid lines are drawn with respect to + their corresponding tick labels. Only has an effect for axes of + `type` "category" or "multicategory". When set to "boundaries", + ticks and grid lines are drawn half a category to the + left/bottom of labels. + + The 'tickson' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['labels', 'boundaries'] + + Returns + ------- + Any + """ + return self["tickson"] + + @tickson.setter + def tickson(self, val): + self["tickson"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.yaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + standoff + Sets the standoff distance (in px) between the + axis labels and the title text The default + value is a function of the axis tick labels, + the title `font.size` and the axis `linewidth`. + Note that the axis title position is always + constrained within the margins, so the actual + standoff distance is always less than the set + or default value. By setting `standoff` and + turning on `automargin`, plotly.js will push + the margins to fit the axis title at given + standoff distance. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.yaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.yaxis.title.font instead. Sets + this axis' title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.yaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'log', 'date', 'category', + 'multicategory'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `range`, + `autorange`, and `title` if in `editable: true` configuration. + Defaults to `layout.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # zeroline + # -------- + @property + def zeroline(self): + """ + Determines whether or not a line is drawn at along the 0 value + of this axis. If True, the zero line is drawn on top of the + grid lines. + + The 'zeroline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zeroline"] + + @zeroline.setter + def zeroline(self, val): + self["zeroline"] = val + + # zerolinecolor + # ------------- + @property + def zerolinecolor(self): + """ + Sets the line color of the zero line. + + The 'zerolinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["zerolinecolor"] + + @zerolinecolor.setter + def zerolinecolor(self, val): + self["zerolinecolor"] = val + + # zerolinewidth + # ------------- + @property + def zerolinewidth(self): + """ + Sets the width (in px) of the zero line. + + The 'zerolinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zerolinewidth"] + + @zerolinewidth.setter + def zerolinewidth(self, val): + self["zerolinewidth"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + anchor + If set to an opposite-letter axis id (e.g. `x2`, `y`), + this axis is bound to the corresponding opposite-letter + axis. If set to "free", this axis' position is + determined by `position`. + automargin + Determines whether long tick labels automatically grow + the figure margins. + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + constrain + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines how that happens: by increasing + the "range" (default), or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines which direction we push the + originally specified plot area. Options are "left", + "center" (default), and "right" for x axes, and "top", + "middle" (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an effect on + "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has an + effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot fraction). + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the range + of this axis will match the range of the corresponding + axis in data-coordinates space. Moreover, matching axes + share auto-range values, category lists and histogram + auto-bins. Note that setting axes simultaneously in + both a `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that matching axes + must have the same `type`. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + overlaying + If set a same-letter axis id, this axis is overlaid on + top of the corresponding same-letter axis, with traces + and axes visible for both axes. If False, this axis + does not overlay any same-letter axes. In this case, + for axes with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting space + (in normalized coordinates). Only has an effect if + `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangebreaks + A tuple of + :class:`plotly.graph_objects.layout.yaxis.Rangebreak` + instances or dicts with compatible properties + rangebreakdefaults + When used in a template (as + layout.template.layout.yaxis.rangebreakdefaults), sets + the default property values to use for elements of + layout.yaxis.rangebreaks + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the range + of this axis changes together with the range of the + corresponding axis such that the scale of pixels per + unit is in a constant ratio. Both axes are still + zoomable, but when you zoom one, the other will zoom + the same amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce the + constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you + can only link axes of the same `type`. The linked axis + can have the opposite letter (to constrain the aspect + ratio) or the same letter (to match scales across + subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant and the + last constraint encountered will be ignored to avoid + possible inconsistent constraints via `scaleratio`. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is currently + forbidden. + scaleratio + If this axis is linked to another by `scaleanchor`, + this determines the pixel to unit scale ratio. For + example, if this value is 10, then every unit on this + axis spans 10 times the number of pixels as a unit on + the linked axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn between + the category levels of this axis. Only has an effect on + "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Determines whether or not spikes (aka droplines) are + drawn for this axis. Note: This only takes affect when + hovermode = closest + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned at the + "bottom" ("left") or "top" ("right") of the plotting + area. + spikecolor + Sets the spike color. If undefined, will use the series + color + spikedash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line If + "toaxis", the line is drawn from the data point to the + axis the series is plotted on. If "across", the line + is drawn across the entire plot area, and supercedes + "toaxis". If "marker", then a marker dot is drawn on + the axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the cursor + or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.yaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as + layout.template.layout.yaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn with + respect to their corresponding tick labels. Only has an + effect for axes of `type` "category" or + "multicategory". When set to "boundaries", ticks and + grid lines are drawn half a category to the left/bottom + of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.yaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.yaxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + uirevision + Controls persistence of user-driven changes in axis + `range`, `autorange`, and `title` if in `editable: + true` configuration. Defaults to `layout.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + anchor=None, + automargin=None, + autorange=None, + calendar=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + constrain=None, + constraintoward=None, + dividercolor=None, + dividerwidth=None, + domain=None, + dtick=None, + exponentformat=None, + fixedrange=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + matches=None, + mirror=None, + nticks=None, + overlaying=None, + position=None, + range=None, + rangebreaks=None, + rangebreakdefaults=None, + rangemode=None, + scaleanchor=None, + scaleratio=None, + separatethousands=None, + showdividers=None, + showexponent=None, + showgrid=None, + showline=None, + showspikes=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + side=None, + spikecolor=None, + spikedash=None, + spikemode=None, + spikesnap=None, + spikethickness=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + tickson=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + type=None, + uirevision=None, + visible=None, + zeroline=None, + zerolinecolor=None, + zerolinewidth=None, + **kwargs + ): + """ + Construct a new YAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.YAxis` + anchor + If set to an opposite-letter axis id (e.g. `x2`, `y`), + this axis is bound to the corresponding opposite-letter + axis. If set to "free", this axis' position is + determined by `position`. + automargin + Determines whether long tick labels automatically grow + the figure margins. + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + constrain + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines how that happens: by increasing + the "range" (default), or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due to its + own `scaleanchor` and `scaleratio` or those of the + other axis), determines which direction we push the + originally specified plot area. Options are "left", + "center" (default), and "right" for x axes, and "top", + "middle" (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an effect on + "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has an + effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot fraction). + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the range + of this axis will match the range of the corresponding + axis in data-coordinates space. Moreover, matching axes + share auto-range values, category lists and histogram + auto-bins. Note that setting axes simultaneously in + both a `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that matching axes + must have the same `type`. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + overlaying + If set a same-letter axis id, this axis is overlaid on + top of the corresponding same-letter axis, with traces + and axes visible for both axes. If False, this axis + does not overlay any same-letter axes. In this case, + for axes with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting space + (in normalized coordinates). Only has an effect if + `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangebreaks + A tuple of + :class:`plotly.graph_objects.layout.yaxis.Rangebreak` + instances or dicts with compatible properties + rangebreakdefaults + When used in a template (as + layout.template.layout.yaxis.rangebreakdefaults), sets + the default property values to use for elements of + layout.yaxis.rangebreaks + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the range + of this axis changes together with the range of the + corresponding axis such that the scale of pixels per + unit is in a constant ratio. Both axes are still + zoomable, but when you zoom one, the other will zoom + the same amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce the + constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you + can only link axes of the same `type`. The linked axis + can have the opposite letter (to constrain the aspect + ratio) or the same letter (to match scales across + subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant and the + last constraint encountered will be ignored to avoid + possible inconsistent constraints via `scaleratio`. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is currently + forbidden. + scaleratio + If this axis is linked to another by `scaleanchor`, + this determines the pixel to unit scale ratio. For + example, if this value is 10, then every unit on this + axis spans 10 times the number of pixels as a unit on + the linked axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn between + the category levels of this axis. Only has an effect on + "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Determines whether or not spikes (aka droplines) are + drawn for this axis. Note: This only takes affect when + hovermode = closest + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned at the + "bottom" ("left") or "top" ("right") of the plotting + area. + spikecolor + Sets the spike color. If undefined, will use the series + color + spikedash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line If + "toaxis", the line is drawn from the data point to the + axis the series is plotted on. If "across", the line + is drawn across the entire plot area, and supercedes + "toaxis". If "marker", then a marker dot is drawn on + the axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the cursor + or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.yaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as + layout.template.layout.yaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn with + respect to their corresponding tick labels. Only has an + effect for axes of `type` "category" or + "multicategory". When set to "boundaries", ticks and + grid lines are drawn half a category to the left/bottom + of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.yaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.yaxis.title.font instead. + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + uirevision + Controls persistence of user-driven changes in axis + `range`, `autorange`, and `title` if in `editable: + true` configuration. Defaults to `layout.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + YAxis + """ + super(YAxis, self).__init__("yaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.YAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.YAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("anchor", None) + _v = anchor if anchor is not None else _v + if _v is not None: + self["anchor"] = _v + _v = arg.pop("automargin", None) + _v = automargin if automargin is not None else _v + if _v is not None: + self["automargin"] = _v + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("constrain", None) + _v = constrain if constrain is not None else _v + if _v is not None: + self["constrain"] = _v + _v = arg.pop("constraintoward", None) + _v = constraintoward if constraintoward is not None else _v + if _v is not None: + self["constraintoward"] = _v + _v = arg.pop("dividercolor", None) + _v = dividercolor if dividercolor is not None else _v + if _v is not None: + self["dividercolor"] = _v + _v = arg.pop("dividerwidth", None) + _v = dividerwidth if dividerwidth is not None else _v + if _v is not None: + self["dividerwidth"] = _v + _v = arg.pop("domain", None) + _v = domain if domain is not None else _v + if _v is not None: + self["domain"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("fixedrange", None) + _v = fixedrange if fixedrange is not None else _v + if _v is not None: + self["fixedrange"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("matches", None) + _v = matches if matches is not None else _v + if _v is not None: + self["matches"] = _v + _v = arg.pop("mirror", None) + _v = mirror if mirror is not None else _v + if _v is not None: + self["mirror"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("overlaying", None) + _v = overlaying if overlaying is not None else _v + if _v is not None: + self["overlaying"] = _v + _v = arg.pop("position", None) + _v = position if position is not None else _v + if _v is not None: + self["position"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangebreaks", None) + _v = rangebreaks if rangebreaks is not None else _v + if _v is not None: + self["rangebreaks"] = _v + _v = arg.pop("rangebreakdefaults", None) + _v = rangebreakdefaults if rangebreakdefaults is not None else _v + if _v is not None: + self["rangebreakdefaults"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("scaleanchor", None) + _v = scaleanchor if scaleanchor is not None else _v + if _v is not None: + self["scaleanchor"] = _v + _v = arg.pop("scaleratio", None) + _v = scaleratio if scaleratio is not None else _v + if _v is not None: + self["scaleratio"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showdividers", None) + _v = showdividers if showdividers is not None else _v + if _v is not None: + self["showdividers"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showspikes", None) + _v = showspikes if showspikes is not None else _v + if _v is not None: + self["showspikes"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("spikecolor", None) + _v = spikecolor if spikecolor is not None else _v + if _v is not None: + self["spikecolor"] = _v + _v = arg.pop("spikedash", None) + _v = spikedash if spikedash is not None else _v + if _v is not None: + self["spikedash"] = _v + _v = arg.pop("spikemode", None) + _v = spikemode if spikemode is not None else _v + if _v is not None: + self["spikemode"] = _v + _v = arg.pop("spikesnap", None) + _v = spikesnap if spikesnap is not None else _v + if _v is not None: + self["spikesnap"] = _v + _v = arg.pop("spikethickness", None) + _v = spikethickness if spikethickness is not None else _v + if _v is not None: + self["spikethickness"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("tickson", None) + _v = tickson if tickson is not None else _v + if _v is not None: + self["tickson"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("zeroline", None) + _v = zeroline if zeroline is not None else _v + if _v is not None: + self["zeroline"] = _v + _v = arg.pop("zerolinecolor", None) + _v = zerolinecolor if zerolinecolor is not None else _v + if _v is not None: + self["zerolinecolor"] = _v + _v = arg.pop("zerolinewidth", None) + _v = zerolinewidth if zerolinewidth is not None else _v + if _v is not None: + self["zerolinewidth"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py index 2b4a3356eca..c0bc5e9b5fa 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py @@ -1,508 +1,12 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseLayoutHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover label. By default uses - the annotation's `bgcolor` made opaque, or white if it was - transparent. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover label. By default uses - either dark grey or white, for maximum contrast with - `hoverlabel.bgcolor`. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the hover label text font. By default uses the global - hover font and size, with color from `hoverlabel.bordercolor`. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.annotation.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.annotation" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the background color of the hover label. By - default uses the annotation's `bgcolor` made opaque, or - white if it was transparent. - bordercolor - Sets the border color of the hover label. By default - uses either dark grey or white, for maximum contrast - with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses the - global hover font and size, with color from - `hoverlabel.bordercolor`. - """ - - def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.annotation.Hoverlabel` - bgcolor - Sets the background color of the hover label. By - default uses the annotation's `bgcolor` made opaque, or - white if it was transparent. - bordercolor - Sets the border color of the hover label. By default - uses either dark grey or white, for maximum contrast - with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses the - global hover font and size, with color from - `hoverlabel.bordercolor`. - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.annotation.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.annotation import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.annotation" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the annotation text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.annotation.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.annotation.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.annotation.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.annotation import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font", "Hoverlabel", "hoverlabel"] - -from plotly.graph_objs.layout.annotation import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._hoverlabel import Hoverlabel + from ._font import Font + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._hoverlabel.Hoverlabel", "._font.Font"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/_font.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/_font.py new file mode 100644 index 00000000000..f74565b49e6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.annotation" + _path_str = "layout.annotation.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the annotation text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.annotation.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.annotation.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.annotation.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/_hoverlabel.py new file mode 100644 index 00000000000..e9c1e41a40b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/_hoverlabel.py @@ -0,0 +1,275 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.annotation" + _path_str = "layout.annotation.hoverlabel" + _valid_props = {"bgcolor", "bordercolor", "font"} + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover label. By default uses + the annotation's `bgcolor` made opaque, or white if it was + transparent. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover label. By default uses + either dark grey or white, for maximum contrast with + `hoverlabel.bgcolor`. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the hover label text font. By default uses the global + hover font and size, with color from `hoverlabel.bordercolor`. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.annotation.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the background color of the hover label. By + default uses the annotation's `bgcolor` made opaque, or + white if it was transparent. + bordercolor + Sets the border color of the hover label. By default + uses either dark grey or white, for maximum contrast + with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses the + global hover font and size, with color from + `hoverlabel.bordercolor`. + """ + + def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.annotation.Hoverlabel` + bgcolor + Sets the background color of the hover label. By + default uses the annotation's `bgcolor` made opaque, or + white if it was transparent. + bordercolor + Sets the border color of the hover label. By default + uses either dark grey or white, for maximum contrast + with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses the + global hover font and size, with color from + `hoverlabel.bordercolor`. + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.annotation.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py index 4b2323f3822..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.annotation.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the hover label text font. By default uses the global - hover font and size, with color from `hoverlabel.bordercolor`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.annotat - ion.hoverlabel.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.annotation.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.annotation.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/_font.py new file mode 100644 index 00000000000..bd179ab7a2d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.annotation.hoverlabel" + _path_str = "layout.annotation.hoverlabel.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the hover label text font. By default uses the global + hover font and size, with color from `hoverlabel.bordercolor`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.annotat + ion.hoverlabel.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.annotation.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py index 502cd8a3ab9..48d0fee5e0d 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py @@ -1,1872 +1,11 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import -class ColorBar(_BaseLayoutHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.coloraxis.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.layout.coloraxis.co - lorbar.tickformatstopdefaults), sets the default property - values to use for elements of - layout.coloraxis.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.layout.coloraxis.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.coloraxis.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use layout.coloraxis.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.coloraxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.coloraxi - s.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.colo - raxis.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - layout.coloraxis.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.coloraxis.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - layout.coloraxis.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - layout.coloraxis.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.coloraxis.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.coloraxi - s.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.colo - raxis.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - layout.coloraxis.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.coloraxis.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - layout.coloraxis.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - layout.coloraxis.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.coloraxis.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.coloraxis.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.coloraxis import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "colorbar"] - -from plotly.graph_objs.layout.coloraxis import colorbar + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py new file mode 100644 index 00000000000..9d83593ffe3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py @@ -0,0 +1,1943 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class ColorBar(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.coloraxis" + _path_str = "layout.coloraxis.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.coloraxis.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.layout.coloraxis.co + lorbar.tickformatstopdefaults), sets the default property + values to use for elements of + layout.coloraxis.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.layout.coloraxis.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.coloraxis.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use layout.coloraxis.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.coloraxi + s.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.colo + raxis.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + layout.coloraxis.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.coloraxis.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + layout.coloraxis.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + layout.coloraxis.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.coloraxis.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.coloraxi + s.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.colo + raxis.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + layout.coloraxis.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.coloraxis.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + layout.coloraxis.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + layout.coloraxis.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.coloraxis.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.coloraxis.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py index 1235bfbd18d..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.coloraxis.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.coloraxis.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.colorax - is.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.coloraxis.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.coloraxis.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.coloraxis.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.colorax - is.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.coloraxis.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.coloraxis.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.coloraxis.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.colorax - is.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.coloraxis.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.coloraxis.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.coloraxis.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py new file mode 100644 index 00000000000..f393deefb7e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.coloraxis.colorbar" + _path_str = "layout.coloraxis.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.colorax + is.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.coloraxis.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..029460acceb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.coloraxis.colorbar" + _path_str = "layout.coloraxis.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.colorax + is.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.coloraxis.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_title.py new file mode 100644 index 00000000000..8dbdf0aebd7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.coloraxis.colorbar" + _path_str = "layout.coloraxis.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.coloraxis.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.colorax + is.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.coloraxis.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py index 63efc223ac2..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.coloraxis.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.colorax - is.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.coloraxis.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.coloraxis.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py new file mode 100644 index 00000000000..bf0df1eb6ec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.coloraxis.colorbar.title" + _path_str = "layout.coloraxis.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.colorax + is.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.coloraxis.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py index 7faff27c96d..f27358f372e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py @@ -1,1197 +1,23 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Projection(_BaseLayoutHierarchyType): - - # parallels - # --------- - @property - def parallels(self): - """ - For conic projection types only. Sets the parallels (tangent, - secant) where the cone intersects the sphere. - - The 'parallels' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'parallels[0]' property is a number and may be specified as: - - An int or float - (1) The 'parallels[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["parallels"] - - @parallels.setter - def parallels(self, val): - self["parallels"] = val - - # rotation - # -------- - @property - def rotation(self): - """ - The 'rotation' property is an instance of Rotation - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation` - - A dict of string/value properties that will be passed - to the Rotation constructor - - Supported dict properties: - - lat - Rotates the map along meridians (in degrees - North). - lon - Rotates the map along parallels (in degrees - East). Defaults to the center of the - `lonaxis.range` values. - roll - Roll the map (in degrees) For example, a roll - of 180 makes the map appear upside down. - - Returns - ------- - plotly.graph_objs.layout.geo.projection.Rotation - """ - return self["rotation"] - - @rotation.setter - def rotation(self, val): - self["rotation"] = val - - # scale - # ----- - @property - def scale(self): - """ - Zooms in or out on the map view. A scale of 1 corresponds to - the largest zoom level that fits the map's lon and lat ranges. - - The 'scale' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["scale"] - - @scale.setter - def scale(self, val): - self["scale"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the projection type. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['equirectangular', 'mercator', 'orthographic', 'natural - earth', 'kavrayskiy7', 'miller', 'robinson', 'eckert4', - 'azimuthal equal area', 'azimuthal equidistant', 'conic - equal area', 'conic conformal', 'conic equidistant', - 'gnomonic', 'stereographic', 'mollweide', 'hammer', - 'transverse mercator', 'albers usa', 'winkel tripel', - 'aitoff', 'sinusoidal'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.geo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - parallels - For conic projection types only. Sets the parallels - (tangent, secant) where the cone intersects the sphere. - rotation - :class:`plotly.graph_objects.layout.geo.projection.Rota - tion` instance or dict with compatible properties - scale - Zooms in or out on the map view. A scale of 1 - corresponds to the largest zoom level that fits the - map's lon and lat ranges. - type - Sets the projection type. - """ - - def __init__( - self, arg=None, parallels=None, rotation=None, scale=None, type=None, **kwargs - ): - """ - Construct a new Projection object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.geo.Projection` - parallels - For conic projection types only. Sets the parallels - (tangent, secant) where the cone intersects the sphere. - rotation - :class:`plotly.graph_objects.layout.geo.projection.Rota - tion` instance or dict with compatible properties - scale - Zooms in or out on the map view. A scale of 1 - corresponds to the largest zoom level that fits the - map's lon and lat ranges. - type - Sets the projection type. - - Returns - ------- - Projection - """ - super(Projection, self).__init__("projection") - - # Validate arg - # ------------ - 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.geo.Projection -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.geo.Projection`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.geo import projection as v_projection - - # Initialize validators - # --------------------- - self._validators["parallels"] = v_projection.ParallelsValidator() - self._validators["rotation"] = v_projection.RotationValidator() - self._validators["scale"] = v_projection.ScaleValidator() - self._validators["type"] = v_projection.TypeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("parallels", None) - self["parallels"] = parallels if parallels is not None else _v - _v = arg.pop("rotation", None) - self["rotation"] = rotation if rotation is not None else _v - _v = arg.pop("scale", None) - self["scale"] = scale if scale is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Lonaxis(_BaseLayoutHierarchyType): - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the graticule's longitude/latitude tick step. - - The 'dtick' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the graticule's stroke color. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the graticule's stroke width (in px). - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis (in degrees), sets the map's - clipped coordinates. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Sets whether or not graticule are shown on the map. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the graticule's starting tick longitude/latitude. - - The 'tick0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.geo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtick - Sets the graticule's longitude/latitude tick step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets the - map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the map. - tick0 - Sets the graticule's starting tick longitude/latitude. - """ - - def __init__( - self, - arg=None, - dtick=None, - gridcolor=None, - gridwidth=None, - range=None, - showgrid=None, - tick0=None, - **kwargs - ): - """ - Construct a new Lonaxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.geo.Lonaxis` - dtick - Sets the graticule's longitude/latitude tick step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets the - map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the map. - tick0 - Sets the graticule's starting tick longitude/latitude. - - Returns - ------- - Lonaxis - """ - super(Lonaxis, self).__init__("lonaxis") - - # Validate arg - # ------------ - 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.geo.Lonaxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.geo import lonaxis as v_lonaxis - - # Initialize validators - # --------------------- - self._validators["dtick"] = v_lonaxis.DtickValidator() - self._validators["gridcolor"] = v_lonaxis.GridcolorValidator() - self._validators["gridwidth"] = v_lonaxis.GridwidthValidator() - self._validators["range"] = v_lonaxis.RangeValidator() - self._validators["showgrid"] = v_lonaxis.ShowgridValidator() - self._validators["tick0"] = v_lonaxis.Tick0Validator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Lataxis(_BaseLayoutHierarchyType): - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the graticule's longitude/latitude tick step. - - The 'dtick' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the graticule's stroke color. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the graticule's stroke width (in px). - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis (in degrees), sets the map's - clipped coordinates. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Sets whether or not graticule are shown on the map. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the graticule's starting tick longitude/latitude. - - The 'tick0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.geo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtick - Sets the graticule's longitude/latitude tick step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets the - map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the map. - tick0 - Sets the graticule's starting tick longitude/latitude. - """ - - def __init__( - self, - arg=None, - dtick=None, - gridcolor=None, - gridwidth=None, - range=None, - showgrid=None, - tick0=None, - **kwargs - ): - """ - Construct a new Lataxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.geo.Lataxis` - dtick - Sets the graticule's longitude/latitude tick step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets the - map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the map. - tick0 - Sets the graticule's starting tick longitude/latitude. - - Returns - ------- - Lataxis - """ - super(Lataxis, self).__init__("lataxis") - - # Validate arg - # ------------ - 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.geo.Lataxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.geo.Lataxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.geo import lataxis as v_lataxis - - # Initialize validators - # --------------------- - self._validators["dtick"] = v_lataxis.DtickValidator() - self._validators["gridcolor"] = v_lataxis.GridcolorValidator() - self._validators["gridwidth"] = v_lataxis.GridwidthValidator() - self._validators["range"] = v_lataxis.RangeValidator() - self._validators["showgrid"] = v_lataxis.ShowgridValidator() - self._validators["tick0"] = v_lataxis.Tick0Validator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Domain(_BaseLayoutHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this geo subplot . Note that geo subplots are - constrained by domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y domain, but not - both. - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this geo subplot . Note that geo subplots are - constrained by domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y domain, but not - both. - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this geo subplot (in plot - fraction). Note that geo subplots are constrained by domain. In - general, when `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this geo subplot (in plot - fraction). Note that geo subplots are constrained by domain. In - general, when `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.geo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this geo subplot . Note that geo - subplots are constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit either - its x or y domain, but not both. - row - If there is a layout grid, use the domain for this row - in the grid for this geo subplot . Note that geo - subplots are constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit either - its x or y domain, but not both. - x - Sets the horizontal domain of this geo subplot (in plot - fraction). Note that geo subplots are constrained by - domain. In general, when `projection.scale` is set to - 1. a map will fit either its x or y domain, but not - both. - y - Sets the vertical domain of this geo subplot (in plot - fraction). Note that geo subplots are constrained by - domain. In general, when `projection.scale` is set to - 1. a map will fit either its x or y domain, but not - both. - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.geo.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this geo subplot . Note that geo - subplots are constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit either - its x or y domain, but not both. - row - If there is a layout grid, use the domain for this row - in the grid for this geo subplot . Note that geo - subplots are constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit either - its x or y domain, but not both. - x - Sets the horizontal domain of this geo subplot (in plot - fraction). Note that geo subplots are constrained by - domain. In general, when `projection.scale` is set to - 1. a map will fit either its x or y domain, but not - both. - y - Sets the vertical domain of this geo subplot (in plot - fraction). Note that geo subplots are constrained by - domain. In general, when `projection.scale` is set to - 1. a map will fit either its x or y domain, but not - both. - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.geo.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.geo.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.geo import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Center(_BaseLayoutHierarchyType): - - # lat - # --- - @property - def lat(self): - """ - Sets the latitude of the map's center. For all projection - types, the map's latitude center lies at the middle of the - latitude range by default. - - The 'lat' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude of the map's center. By default, the map's - longitude center lies at the middle of the longitude range for - scoped projection and above `projection.rotation.lon` - otherwise. - - The 'lon' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.geo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - lat - Sets the latitude of the map's center. For all - projection types, the map's latitude center lies at the - middle of the latitude range by default. - lon - Sets the longitude of the map's center. By default, the - map's longitude center lies at the middle of the - longitude range for scoped projection and above - `projection.rotation.lon` otherwise. - """ - - def __init__(self, arg=None, lat=None, lon=None, **kwargs): - """ - Construct a new Center object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.geo.Center` - lat - Sets the latitude of the map's center. For all - projection types, the map's latitude center lies at the - middle of the latitude range by default. - lon - Sets the longitude of the map's center. By default, the - map's longitude center lies at the middle of the - longitude range for scoped projection and above - `projection.rotation.lon` otherwise. - - Returns - ------- - Center - """ - super(Center, self).__init__("center") - - # Validate arg - # ------------ - 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.geo.Center -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.geo.Center`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.geo import center as v_center - - # Initialize validators - # --------------------- - self._validators["lat"] = v_center.LatValidator() - self._validators["lon"] = v_center.LonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Center", "Domain", "Lataxis", "Lonaxis", "Projection", "projection"] - -from plotly.graph_objs.layout.geo import projection +import sys + +if sys.version_info < (3, 7): + from ._projection import Projection + from ._lonaxis import Lonaxis + from ._lataxis import Lataxis + from ._domain import Domain + from ._center import Center + from . import projection +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".projection"], + [ + "._projection.Projection", + "._lonaxis.Lonaxis", + "._lataxis.Lataxis", + "._domain.Domain", + "._center.Center", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_center.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_center.py new file mode 100644 index 00000000000..e8215713716 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_center.py @@ -0,0 +1,141 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Center(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.geo" + _path_str = "layout.geo.center" + _valid_props = {"lat", "lon"} + + # lat + # --- + @property + def lat(self): + """ + Sets the latitude of the map's center. For all projection + types, the map's latitude center lies at the middle of the + latitude range by default. + + The 'lat' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # lon + # --- + @property + def lon(self): + """ + Sets the longitude of the map's center. By default, the map's + longitude center lies at the middle of the longitude range for + scoped projection and above `projection.rotation.lon` + otherwise. + + The 'lon' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + lat + Sets the latitude of the map's center. For all + projection types, the map's latitude center lies at the + middle of the latitude range by default. + lon + Sets the longitude of the map's center. By default, the + map's longitude center lies at the middle of the + longitude range for scoped projection and above + `projection.rotation.lon` otherwise. + """ + + def __init__(self, arg=None, lat=None, lon=None, **kwargs): + """ + Construct a new Center object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.geo.Center` + lat + Sets the latitude of the map's center. For all + projection types, the map's latitude center lies at the + middle of the latitude range by default. + lon + Sets the longitude of the map's center. By default, the + map's longitude center lies at the middle of the + longitude range for scoped projection and above + `projection.rotation.lon` otherwise. + + Returns + ------- + Center + """ + super(Center, self).__init__("center") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.geo.Center +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.geo.Center`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("lat", None) + _v = lat if lat is not None else _v + if _v is not None: + self["lat"] = _v + _v = arg.pop("lon", None) + _v = lon if lon is not None else _v + if _v is not None: + self["lon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_domain.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_domain.py new file mode 100644 index 00000000000..7a1e3a33585 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_domain.py @@ -0,0 +1,240 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Domain(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.geo" + _path_str = "layout.geo.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this geo subplot . Note that geo subplots are + constrained by domain. In general, when `projection.scale` is + set to 1. a map will fit either its x or y domain, but not + both. + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this geo subplot . Note that geo subplots are + constrained by domain. In general, when `projection.scale` is + set to 1. a map will fit either its x or y domain, but not + both. + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this geo subplot (in plot + fraction). Note that geo subplots are constrained by domain. In + general, when `projection.scale` is set to 1. a map will fit + either its x or y domain, but not both. + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this geo subplot (in plot + fraction). Note that geo subplots are constrained by domain. In + general, when `projection.scale` is set to 1. a map will fit + either its x or y domain, but not both. + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this geo subplot . Note that geo + subplots are constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit either + its x or y domain, but not both. + row + If there is a layout grid, use the domain for this row + in the grid for this geo subplot . Note that geo + subplots are constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit either + its x or y domain, but not both. + x + Sets the horizontal domain of this geo subplot (in plot + fraction). Note that geo subplots are constrained by + domain. In general, when `projection.scale` is set to + 1. a map will fit either its x or y domain, but not + both. + y + Sets the vertical domain of this geo subplot (in plot + fraction). Note that geo subplots are constrained by + domain. In general, when `projection.scale` is set to + 1. a map will fit either its x or y domain, but not + both. + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.geo.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this geo subplot . Note that geo + subplots are constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit either + its x or y domain, but not both. + row + If there is a layout grid, use the domain for this row + in the grid for this geo subplot . Note that geo + subplots are constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit either + its x or y domain, but not both. + x + Sets the horizontal domain of this geo subplot (in plot + fraction). Note that geo subplots are constrained by + domain. In general, when `projection.scale` is set to + 1. a map will fit either its x or y domain, but not + both. + y + Sets the vertical domain of this geo subplot (in plot + fraction). Note that geo subplots are constrained by + domain. In general, when `projection.scale` is set to + 1. a map will fit either its x or y domain, but not + both. + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.geo.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.geo.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py new file mode 100644 index 00000000000..716d5c35f51 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py @@ -0,0 +1,295 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Lataxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.geo" + _path_str = "layout.geo.lataxis" + _valid_props = {"dtick", "gridcolor", "gridwidth", "range", "showgrid", "tick0"} + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the graticule's longitude/latitude tick step. + + The 'dtick' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the graticule's stroke color. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the graticule's stroke width (in px). + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis (in degrees), sets the map's + clipped coordinates. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Sets whether or not graticule are shown on the map. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the graticule's starting tick longitude/latitude. + + The 'tick0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtick + Sets the graticule's longitude/latitude tick step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets the + map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the map. + tick0 + Sets the graticule's starting tick longitude/latitude. + """ + + def __init__( + self, + arg=None, + dtick=None, + gridcolor=None, + gridwidth=None, + range=None, + showgrid=None, + tick0=None, + **kwargs + ): + """ + Construct a new Lataxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.geo.Lataxis` + dtick + Sets the graticule's longitude/latitude tick step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets the + map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the map. + tick0 + Sets the graticule's starting tick longitude/latitude. + + Returns + ------- + Lataxis + """ + super(Lataxis, self).__init__("lataxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.geo.Lataxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.geo.Lataxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py new file mode 100644 index 00000000000..4db45d059b3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py @@ -0,0 +1,295 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Lonaxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.geo" + _path_str = "layout.geo.lonaxis" + _valid_props = {"dtick", "gridcolor", "gridwidth", "range", "showgrid", "tick0"} + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the graticule's longitude/latitude tick step. + + The 'dtick' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the graticule's stroke color. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the graticule's stroke width (in px). + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis (in degrees), sets the map's + clipped coordinates. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Sets whether or not graticule are shown on the map. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the graticule's starting tick longitude/latitude. + + The 'tick0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtick + Sets the graticule's longitude/latitude tick step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets the + map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the map. + tick0 + Sets the graticule's starting tick longitude/latitude. + """ + + def __init__( + self, + arg=None, + dtick=None, + gridcolor=None, + gridwidth=None, + range=None, + showgrid=None, + tick0=None, + **kwargs + ): + """ + Construct a new Lonaxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.geo.Lonaxis` + dtick + Sets the graticule's longitude/latitude tick step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets the + map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the map. + tick0 + Sets the graticule's starting tick longitude/latitude. + + Returns + ------- + Lonaxis + """ + super(Lonaxis, self).__init__("lonaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.geo.Lonaxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_projection.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_projection.py new file mode 100644 index 00000000000..2908444cad1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_projection.py @@ -0,0 +1,220 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Projection(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.geo" + _path_str = "layout.geo.projection" + _valid_props = {"parallels", "rotation", "scale", "type"} + + # parallels + # --------- + @property + def parallels(self): + """ + For conic projection types only. Sets the parallels (tangent, + secant) where the cone intersects the sphere. + + The 'parallels' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'parallels[0]' property is a number and may be specified as: + - An int or float + (1) The 'parallels[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["parallels"] + + @parallels.setter + def parallels(self, val): + self["parallels"] = val + + # rotation + # -------- + @property + def rotation(self): + """ + The 'rotation' property is an instance of Rotation + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation` + - A dict of string/value properties that will be passed + to the Rotation constructor + + Supported dict properties: + + lat + Rotates the map along meridians (in degrees + North). + lon + Rotates the map along parallels (in degrees + East). Defaults to the center of the + `lonaxis.range` values. + roll + Roll the map (in degrees) For example, a roll + of 180 makes the map appear upside down. + + Returns + ------- + plotly.graph_objs.layout.geo.projection.Rotation + """ + return self["rotation"] + + @rotation.setter + def rotation(self, val): + self["rotation"] = val + + # scale + # ----- + @property + def scale(self): + """ + Zooms in or out on the map view. A scale of 1 corresponds to + the largest zoom level that fits the map's lon and lat ranges. + + The 'scale' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["scale"] + + @scale.setter + def scale(self, val): + self["scale"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the projection type. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['equirectangular', 'mercator', 'orthographic', 'natural + earth', 'kavrayskiy7', 'miller', 'robinson', 'eckert4', + 'azimuthal equal area', 'azimuthal equidistant', 'conic + equal area', 'conic conformal', 'conic equidistant', + 'gnomonic', 'stereographic', 'mollweide', 'hammer', + 'transverse mercator', 'albers usa', 'winkel tripel', + 'aitoff', 'sinusoidal'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + parallels + For conic projection types only. Sets the parallels + (tangent, secant) where the cone intersects the sphere. + rotation + :class:`plotly.graph_objects.layout.geo.projection.Rota + tion` instance or dict with compatible properties + scale + Zooms in or out on the map view. A scale of 1 + corresponds to the largest zoom level that fits the + map's lon and lat ranges. + type + Sets the projection type. + """ + + def __init__( + self, arg=None, parallels=None, rotation=None, scale=None, type=None, **kwargs + ): + """ + Construct a new Projection object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.geo.Projection` + parallels + For conic projection types only. Sets the parallels + (tangent, secant) where the cone intersects the sphere. + rotation + :class:`plotly.graph_objects.layout.geo.projection.Rota + tion` instance or dict with compatible properties + scale + Zooms in or out on the map view. A scale of 1 + corresponds to the largest zoom level that fits the + map's lon and lat ranges. + type + Sets the projection type. + + Returns + ------- + Projection + """ + super(Projection, self).__init__("projection") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.geo.Projection +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.geo.Projection`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("parallels", None) + _v = parallels if parallels is not None else _v + if _v is not None: + self["parallels"] = _v + _v = arg.pop("rotation", None) + _v = rotation if rotation is not None else _v + if _v is not None: + self["rotation"] = _v + _v = arg.pop("scale", None) + _v = scale if scale is not None else _v + if _v is not None: + self["scale"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py index 7a3eb20528f..1b0cdfe4d60 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py @@ -1,163 +1,10 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._rotation import Rotation +else: + from _plotly_utils.importers import relative_import -class Rotation(_BaseLayoutHierarchyType): - - # lat - # --- - @property - def lat(self): - """ - Rotates the map along meridians (in degrees North). - - The 'lat' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # lon - # --- - @property - def lon(self): - """ - Rotates the map along parallels (in degrees East). Defaults to - the center of the `lonaxis.range` values. - - The 'lon' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # roll - # ---- - @property - def roll(self): - """ - Roll the map (in degrees) For example, a roll of 180 makes the - map appear upside down. - - The 'roll' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["roll"] - - @roll.setter - def roll(self, val): - self["roll"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.geo.projection" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - lat - Rotates the map along meridians (in degrees North). - lon - Rotates the map along parallels (in degrees East). - Defaults to the center of the `lonaxis.range` values. - roll - Roll the map (in degrees) For example, a roll of 180 - makes the map appear upside down. - """ - - def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs): - """ - Construct a new Rotation object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.geo.pro - jection.Rotation` - lat - Rotates the map along meridians (in degrees North). - lon - Rotates the map along parallels (in degrees East). - Defaults to the center of the `lonaxis.range` values. - roll - Roll the map (in degrees) For example, a roll of 180 - makes the map appear upside down. - - Returns - ------- - Rotation - """ - super(Rotation, self).__init__("rotation") - - # Validate arg - # ------------ - 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.geo.projection.Rotation -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.geo.projection import rotation as v_rotation - - # Initialize validators - # --------------------- - self._validators["lat"] = v_rotation.LatValidator() - self._validators["lon"] = v_rotation.LonValidator() - self._validators["roll"] = v_rotation.RollValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("roll", None) - self["roll"] = roll if roll is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Rotation"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._rotation.Rotation"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/projection/_rotation.py b/packages/python/plotly/plotly/graph_objs/layout/geo/projection/_rotation.py new file mode 100644 index 00000000000..73eda062ab6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/projection/_rotation.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Rotation(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.geo.projection" + _path_str = "layout.geo.projection.rotation" + _valid_props = {"lat", "lon", "roll"} + + # lat + # --- + @property + def lat(self): + """ + Rotates the map along meridians (in degrees North). + + The 'lat' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # lon + # --- + @property + def lon(self): + """ + Rotates the map along parallels (in degrees East). Defaults to + the center of the `lonaxis.range` values. + + The 'lon' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # roll + # ---- + @property + def roll(self): + """ + Roll the map (in degrees) For example, a roll of 180 makes the + map appear upside down. + + The 'roll' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["roll"] + + @roll.setter + def roll(self, val): + self["roll"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + lat + Rotates the map along meridians (in degrees North). + lon + Rotates the map along parallels (in degrees East). + Defaults to the center of the `lonaxis.range` values. + roll + Roll the map (in degrees) For example, a roll of 180 + makes the map appear upside down. + """ + + def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs): + """ + Construct a new Rotation object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.geo.pro + jection.Rotation` + lat + Rotates the map along meridians (in degrees North). + lon + Rotates the map along parallels (in degrees East). + Defaults to the center of the `lonaxis.range` values. + roll + Roll the map (in degrees) For example, a roll of 180 + makes the map appear upside down. + + Returns + ------- + Rotation + """ + super(Rotation, self).__init__("rotation") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.geo.projection.Rotation +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("lat", None) + _v = lat if lat is not None else _v + if _v is not None: + self["lat"] = _v + _v = arg.pop("lon", None) + _v = lon if lon is not None else _v + if _v is not None: + self["lon"] = _v + _v = arg.pop("roll", None) + _v = roll if roll is not None else _v + if _v is not None: + self["roll"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py index f4569255f74..72758f2c3d7 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py @@ -1,152 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._domain import Domain +else: + from _plotly_utils.importers import relative_import -class Domain(_BaseLayoutHierarchyType): - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this grid subplot (in plot - fraction). The first and last cells end exactly at the domain - edges, with no grout around the edges. - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this grid subplot (in plot - fraction). The first and last cells end exactly at the domain - edges, with no grout around the edges. - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.grid" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Sets the horizontal domain of this grid subplot (in - plot fraction). The first and last cells end exactly at - the domain edges, with no grout around the edges. - y - Sets the vertical domain of this grid subplot (in plot - fraction). The first and last cells end exactly at the - domain edges, with no grout around the edges. - """ - - def __init__(self, arg=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.grid.Domain` - x - Sets the horizontal domain of this grid subplot (in - plot fraction). The first and last cells end exactly at - the domain edges, with no grout around the edges. - y - Sets the vertical domain of this grid subplot (in plot - fraction). The first and last cells end exactly at the - domain edges, with no grout around the edges. - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.grid.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.grid.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.grid import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Domain"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._domain.Domain"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/grid/_domain.py b/packages/python/plotly/plotly/graph_objs/layout/grid/_domain.py new file mode 100644 index 00000000000..cb854619d9b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/grid/_domain.py @@ -0,0 +1,148 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Domain(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.grid" + _path_str = "layout.grid.domain" + _valid_props = {"x", "y"} + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this grid subplot (in plot + fraction). The first and last cells end exactly at the domain + edges, with no grout around the edges. + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this grid subplot (in plot + fraction). The first and last cells end exactly at the domain + edges, with no grout around the edges. + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Sets the horizontal domain of this grid subplot (in + plot fraction). The first and last cells end exactly at + the domain edges, with no grout around the edges. + y + Sets the vertical domain of this grid subplot (in plot + fraction). The first and last cells end exactly at the + domain edges, with no grout around the edges. + """ + + def __init__(self, arg=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.grid.Domain` + x + Sets the horizontal domain of this grid subplot (in + plot fraction). The first and last cells end exactly at + the domain edges, with no grout around the edges. + y + Sets the vertical domain of this grid subplot (in plot + fraction). The first and last cells end exactly at the + domain edges, with no grout around the edges. + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.grid.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.grid.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py index b2ed030c6dd..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the default hover label font used by all traces on the - graph. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.hoverlabel.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/_font.py new file mode 100644 index 00000000000..54148c4e413 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.hoverlabel" + _path_str = "layout.hoverlabel.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the default hover label font used by all traces on the + graph. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.hoverlabel.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py index e79959de0b2..4639b4f1cb3 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py @@ -1,427 +1,12 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this legend's title font. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.legend.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.legend.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of legend's title with respect to the - legend items. Defaulted to "top" with `orientation` is "h". - Defaulted to "left" with `orientation` is "v". The *top left* - options could be used to expand legend area in both x and y - sides. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'left', 'top left'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the legend. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.legend" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this legend's title font. - side - Determines the location of legend's title with respect - to the legend items. Defaulted to "top" with - `orientation` is "h". Defaulted to "left" with - `orientation` is "v". The *top left* options could be - used to expand legend area in both x and y sides. - text - Sets the title of the legend. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.legend.Title` - font - Sets this legend's title font. - side - Determines the location of legend's title with respect - to the legend items. Defaulted to "top" with - `orientation` is "h". Defaulted to "left" with - `orientation` is "v". The *top left* options could be - used to expand legend area in both x and y sides. - text - Sets the title of the legend. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.legend.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.legend.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.legend import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.legend" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the font used to text the legend items. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.legend.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.legend.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.legend.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.legend import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font", "Title", "title"] - -from plotly.graph_objs.layout.legend import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._font import Font + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".title"], ["._title.Title", "._font.Font"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/legend/_font.py b/packages/python/plotly/plotly/graph_objs/layout/legend/_font.py new file mode 100644 index 00000000000..54661142ccd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/legend/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.legend" + _path_str = "layout.legend.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the font used to text the legend items. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.legend.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.legend.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.legend.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/legend/_title.py b/packages/python/plotly/plotly/graph_objs/layout/legend/_title.py new file mode 100644 index 00000000000..a7d0ca64d20 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/legend/_title.py @@ -0,0 +1,194 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.legend" + _path_str = "layout.legend.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this legend's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.legend.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.legend.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of legend's title with respect to the + legend items. Defaulted to "top" with `orientation` is "h". + Defaulted to "left" with `orientation` is "v". The *top left* + options could be used to expand legend area in both x and y + sides. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'left', 'top left'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the legend. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend's title font. + side + Determines the location of legend's title with respect + to the legend items. Defaulted to "top" with + `orientation` is "h". Defaulted to "left" with + `orientation` is "v". The *top left* options could be + used to expand legend area in both x and y sides. + text + Sets the title of the legend. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.legend.Title` + font + Sets this legend's title font. + side + Determines the location of legend's title with respect + to the legend items. Defaulted to "top" with + `orientation` is "h". Defaulted to "left" with + `orientation` is "v". The *top left* options could be + used to expand legend area in both x and y sides. + text + Sets the title of the legend. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.legend.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.legend.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/legend/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/legend/title/__init__.py index bd0ee3864d9..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/legend/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/legend/title/__init__.py @@ -1,229 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.legend.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this legend's title font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.legend.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.legend.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.legend.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.legend.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/legend/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/legend/title/_font.py new file mode 100644 index 00000000000..7cd410a48ac --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/legend/title/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.legend.title" + _path_str = "layout.legend.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this legend's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.legend.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.legend.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.legend.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py index af515836e99..3762b6f0b7b 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py @@ -1,1210 +1,13 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Layer(_BaseLayoutHierarchyType): - - # below - # ----- - @property - def below(self): - """ - Determines if the layer will be inserted before the layer with - the specified ID. If omitted or set to '', the layer will be - inserted above every existing layer. - - The 'below' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["below"] - - @below.setter - def below(self, val): - self["below"] = val - - # circle - # ------ - @property - def circle(self): - """ - The 'circle' property is an instance of Circle - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle` - - A dict of string/value properties that will be passed - to the Circle constructor - - Supported dict properties: - - radius - Sets the circle radius - (mapbox.layer.paint.circle-radius). Has an - effect only when `type` is set to "circle". - - Returns - ------- - plotly.graph_objs.layout.mapbox.layer.Circle - """ - return self["circle"] - - @circle.setter - def circle(self, val): - self["circle"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the primary layer color. If `type` is "circle", color - corresponds to the circle color (mapbox.layer.paint.circle- - color) If `type` is "line", color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is "fill", color - corresponds to the fill color (mapbox.layer.paint.fill-color) - If `type` is "symbol", color corresponds to the icon color - (mapbox.layer.paint.icon-color) - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coordinates - # ----------- - @property - def coordinates(self): - """ - Sets the coordinates array contains [longitude, latitude] pairs - for the image corners listed in clockwise order: top left, top - right, bottom right, bottom left. Only has an effect for - "image" `sourcetype`. - - The 'coordinates' property accepts values of any type - - Returns - ------- - Any - """ - return self["coordinates"] - - @coordinates.setter - def coordinates(self, val): - self["coordinates"] = val - - # fill - # ---- - @property - def fill(self): - """ - The 'fill' property is an instance of Fill - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill` - - A dict of string/value properties that will be passed - to the Fill constructor - - Supported dict properties: - - outlinecolor - Sets the fill outline color - (mapbox.layer.paint.fill-outline-color). Has an - effect only when `type` is set to "fill". - - Returns - ------- - plotly.graph_objs.layout.mapbox.layer.Fill - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - 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 - ------- - plotly.graph_objs.layout.mapbox.layer.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # maxzoom - # ------- - @property - def maxzoom(self): - """ - Sets the maximum zoom level (mapbox.layer.maxzoom). At zoom - levels equal to or greater than the maxzoom, the layer will be - hidden. - - The 'maxzoom' property is a number and may be specified as: - - An int or float in the interval [0, 24] - - Returns - ------- - int|float - """ - return self["maxzoom"] - - @maxzoom.setter - def maxzoom(self, val): - self["maxzoom"] = val - - # minzoom - # ------- - @property - def minzoom(self): - """ - Sets the minimum zoom level (mapbox.layer.minzoom). At zoom - levels less than the minzoom, the layer will be hidden. - - The 'minzoom' property is a number and may be specified as: - - An int or float in the interval [0, 24] - - Returns - ------- - int|float - """ - return self["minzoom"] - - @minzoom.setter - def minzoom(self, val): - self["minzoom"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the layer. If `type` is "circle", opacity - corresponds to the circle opacity (mapbox.layer.paint.circle- - opacity) If `type` is "line", opacity corresponds to the line - opacity (mapbox.layer.paint.line-opacity) If `type` is "fill", - opacity corresponds to the fill opacity - (mapbox.layer.paint.fill-opacity) If `type` is "symbol", - opacity corresponds to the icon/text opacity - (mapbox.layer.paint.text-opacity) - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # source - # ------ - @property - def source(self): - """ - Sets the source data for this layer (mapbox.layer.source). When - `sourcetype` is set to "geojson", `source` can be a URL to a - GeoJSON or a GeoJSON object. When `sourcetype` is set to - "vector" or "raster", `source` can be a URL or an array of tile - URLs. When `sourcetype` is set to "image", `source` can be a - URL to an image. - - The 'source' property accepts values of any type - - Returns - ------- - Any - """ - return self["source"] - - @source.setter - def source(self, val): - self["source"] = val - - # sourceattribution - # ----------------- - @property - def sourceattribution(self): - """ - Sets the attribution for this source. - - The 'sourceattribution' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["sourceattribution"] - - @sourceattribution.setter - def sourceattribution(self, val): - self["sourceattribution"] = val - - # sourcelayer - # ----------- - @property - def sourcelayer(self): - """ - Specifies the layer to use from a vector tile source - (mapbox.layer.source-layer). Required for "vector" source type - that supports multiple layers. - - The 'sourcelayer' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["sourcelayer"] - - @sourcelayer.setter - def sourcelayer(self, val): - self["sourcelayer"] = val - - # sourcetype - # ---------- - @property - def sourcetype(self): - """ - Sets the source type for this layer, that is the type of the - layer data. - - The 'sourcetype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['geojson', 'vector', 'raster', 'image'] - - Returns - ------- - Any - """ - return self["sourcetype"] - - @sourcetype.setter - def sourcetype(self, val): - self["sourcetype"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - The 'symbol' property is an instance of Symbol - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol` - - A dict of string/value properties that will be passed - to the Symbol constructor - - Supported dict properties: - - 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 - ------- - plotly.graph_objs.layout.mapbox.layer.Symbol - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the layer type, that is the how the layer data set in - `source` will be rendered With `sourcetype` set to "geojson", - the following values are allowed: "circle", "line", "fill" and - "symbol". but note that "line" and "fill" are not compatible - with Point GeoJSON geometries. With `sourcetype` set to - "vector", the following values are allowed: "circle", "line", - "fill" and "symbol". With `sourcetype` set to "raster" or - `*image*`, only the "raster" value is allowed. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['circle', 'line', 'fill', 'symbol', 'raster'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether this layer is displayed - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - below - Determines if the layer will be inserted before the - layer with the specified ID. If omitted or set to '', - the layer will be inserted above every existing layer. - circle - :class:`plotly.graph_objects.layout.mapbox.layer.Circle - ` instance or dict with compatible properties - color - Sets the primary layer color. If `type` is "circle", - color corresponds to the circle color - (mapbox.layer.paint.circle-color) If `type` is "line", - color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is "fill", - color corresponds to the fill color - (mapbox.layer.paint.fill-color) If `type` is "symbol", - color corresponds to the icon color - (mapbox.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom right, - bottom left. Only has an effect for "image" - `sourcetype`. - fill - :class:`plotly.graph_objects.layout.mapbox.layer.Fill` - instance or dict with compatible properties - line - :class:`plotly.graph_objects.layout.mapbox.layer.Line` - instance or dict with compatible properties - maxzoom - Sets the maximum zoom level (mapbox.layer.maxzoom). At - zoom levels equal to or greater than the maxzoom, the - layer will be hidden. - minzoom - Sets the minimum zoom level (mapbox.layer.minzoom). At - zoom levels less than the minzoom, the layer will be - hidden. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the layer. If `type` is "circle", - opacity corresponds to the circle opacity - (mapbox.layer.paint.circle-opacity) If `type` is - "line", opacity corresponds to the line opacity - (mapbox.layer.paint.line-opacity) If `type` is "fill", - opacity corresponds to the fill opacity - (mapbox.layer.paint.fill-opacity) If `type` is - "symbol", opacity corresponds to the icon/text opacity - (mapbox.layer.paint.text-opacity) - source - Sets the source data for this layer - (mapbox.layer.source). When `sourcetype` is set to - "geojson", `source` can be a URL to a GeoJSON or a - GeoJSON object. When `sourcetype` is set to "vector" or - "raster", `source` can be a URL or an array of tile - URLs. When `sourcetype` is set to "image", `source` can - be a URL to an image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile source - (mapbox.layer.source-layer). Required for "vector" - source type that supports multiple layers. - sourcetype - Sets the source type for this layer, that is the type - of the layer data. - symbol - :class:`plotly.graph_objects.layout.mapbox.layer.Symbol - ` instance or dict with compatible properties - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer data set - in `source` will be rendered With `sourcetype` set to - "geojson", the following values are allowed: "circle", - "line", "fill" and "symbol". but note that "line" and - "fill" are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", the - following values are allowed: "circle", "line", "fill" - and "symbol". With `sourcetype` set to "raster" or - `*image*`, only the "raster" value is allowed. - visible - Determines whether this layer is displayed - """ - - def __init__( - self, - arg=None, - below=None, - circle=None, - color=None, - coordinates=None, - fill=None, - line=None, - maxzoom=None, - minzoom=None, - name=None, - opacity=None, - source=None, - sourceattribution=None, - sourcelayer=None, - sourcetype=None, - symbol=None, - templateitemname=None, - type=None, - visible=None, - **kwargs - ): - """ - Construct a new Layer object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.mapbox.Layer` - below - Determines if the layer will be inserted before the - layer with the specified ID. If omitted or set to '', - the layer will be inserted above every existing layer. - circle - :class:`plotly.graph_objects.layout.mapbox.layer.Circle - ` instance or dict with compatible properties - color - Sets the primary layer color. If `type` is "circle", - color corresponds to the circle color - (mapbox.layer.paint.circle-color) If `type` is "line", - color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is "fill", - color corresponds to the fill color - (mapbox.layer.paint.fill-color) If `type` is "symbol", - color corresponds to the icon color - (mapbox.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom right, - bottom left. Only has an effect for "image" - `sourcetype`. - fill - :class:`plotly.graph_objects.layout.mapbox.layer.Fill` - instance or dict with compatible properties - line - :class:`plotly.graph_objects.layout.mapbox.layer.Line` - instance or dict with compatible properties - maxzoom - Sets the maximum zoom level (mapbox.layer.maxzoom). At - zoom levels equal to or greater than the maxzoom, the - layer will be hidden. - minzoom - Sets the minimum zoom level (mapbox.layer.minzoom). At - zoom levels less than the minzoom, the layer will be - hidden. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the layer. If `type` is "circle", - opacity corresponds to the circle opacity - (mapbox.layer.paint.circle-opacity) If `type` is - "line", opacity corresponds to the line opacity - (mapbox.layer.paint.line-opacity) If `type` is "fill", - opacity corresponds to the fill opacity - (mapbox.layer.paint.fill-opacity) If `type` is - "symbol", opacity corresponds to the icon/text opacity - (mapbox.layer.paint.text-opacity) - source - Sets the source data for this layer - (mapbox.layer.source). When `sourcetype` is set to - "geojson", `source` can be a URL to a GeoJSON or a - GeoJSON object. When `sourcetype` is set to "vector" or - "raster", `source` can be a URL or an array of tile - URLs. When `sourcetype` is set to "image", `source` can - be a URL to an image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile source - (mapbox.layer.source-layer). Required for "vector" - source type that supports multiple layers. - sourcetype - Sets the source type for this layer, that is the type - of the layer data. - symbol - :class:`plotly.graph_objects.layout.mapbox.layer.Symbol - ` instance or dict with compatible properties - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer data set - in `source` will be rendered With `sourcetype` set to - "geojson", the following values are allowed: "circle", - "line", "fill" and "symbol". but note that "line" and - "fill" are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", the - following values are allowed: "circle", "line", "fill" - and "symbol". With `sourcetype` set to "raster" or - `*image*`, only the "raster" value is allowed. - visible - Determines whether this layer is displayed - - Returns - ------- - Layer - """ - super(Layer, self).__init__("layers") - - # Validate arg - # ------------ - 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 -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.mapbox.Layer`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox import layer as v_layer - - # Initialize validators - # --------------------- - self._validators["below"] = v_layer.BelowValidator() - self._validators["circle"] = v_layer.CircleValidator() - self._validators["color"] = v_layer.ColorValidator() - self._validators["coordinates"] = v_layer.CoordinatesValidator() - self._validators["fill"] = v_layer.FillValidator() - self._validators["line"] = v_layer.LineValidator() - self._validators["maxzoom"] = v_layer.MaxzoomValidator() - self._validators["minzoom"] = v_layer.MinzoomValidator() - self._validators["name"] = v_layer.NameValidator() - self._validators["opacity"] = v_layer.OpacityValidator() - self._validators["source"] = v_layer.SourceValidator() - self._validators["sourceattribution"] = v_layer.SourceattributionValidator() - self._validators["sourcelayer"] = v_layer.SourcelayerValidator() - self._validators["sourcetype"] = v_layer.SourcetypeValidator() - self._validators["symbol"] = v_layer.SymbolValidator() - self._validators["templateitemname"] = v_layer.TemplateitemnameValidator() - self._validators["type"] = v_layer.TypeValidator() - self._validators["visible"] = v_layer.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v - _v = arg.pop("circle", None) - self["circle"] = circle if circle is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coordinates", None) - self["coordinates"] = coordinates if coordinates is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("maxzoom", None) - self["maxzoom"] = maxzoom if maxzoom is not None else _v - _v = arg.pop("minzoom", None) - self["minzoom"] = minzoom if minzoom is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("source", None) - self["source"] = source if source is not None else _v - _v = arg.pop("sourceattribution", None) - self["sourceattribution"] = ( - sourceattribution if sourceattribution is not None else _v - ) - _v = arg.pop("sourcelayer", None) - self["sourcelayer"] = sourcelayer if sourcelayer is not None else _v - _v = arg.pop("sourcetype", None) - self["sourcetype"] = sourcetype if sourcetype is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Domain(_BaseLayoutHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this mapbox subplot . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this mapbox subplot . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this mapbox subplot (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this mapbox subplot (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this mapbox subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this mapbox subplot . - x - Sets the horizontal domain of this mapbox subplot (in - plot fraction). - y - Sets the vertical domain of this mapbox subplot (in - plot fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.mapbox.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this mapbox subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this mapbox subplot . - x - Sets the horizontal domain of this mapbox subplot (in - plot fraction). - y - Sets the vertical domain of this mapbox subplot (in - plot fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.mapbox.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Center(_BaseLayoutHierarchyType): - - # lat - # --- - @property - def lat(self): - """ - Sets the latitude of the center of the map (in degrees North). - - The 'lat' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude of the center of the map (in degrees East). - - The 'lon' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - lat - Sets the latitude of the center of the map (in degrees - North). - lon - Sets the longitude of the center of the map (in degrees - East). - """ - - def __init__(self, arg=None, lat=None, lon=None, **kwargs): - """ - Construct a new Center object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.mapbox.Center` - lat - Sets the latitude of the center of the map (in degrees - North). - lon - Sets the longitude of the center of the map (in degrees - East). - - Returns - ------- - Center - """ - super(Center, self).__init__("center") - - # Validate arg - # ------------ - 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.Center -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.mapbox.Center`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox import center as v_center - - # Initialize validators - # --------------------- - self._validators["lat"] = v_center.LatValidator() - self._validators["lon"] = v_center.LonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Center", "Domain", "Layer", "Layer", "layer"] - -from plotly.graph_objs.layout.mapbox import layer +import sys + +if sys.version_info < (3, 7): + from ._layer import Layer + from ._domain import Domain + from ._center import Center + from . import layer +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".layer"], ["._layer.Layer", "._domain.Domain", "._center.Center"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/_center.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/_center.py new file mode 100644 index 00000000000..084e695990d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/_center.py @@ -0,0 +1,130 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Center(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox" + _path_str = "layout.mapbox.center" + _valid_props = {"lat", "lon"} + + # lat + # --- + @property + def lat(self): + """ + Sets the latitude of the center of the map (in degrees North). + + The 'lat' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # lon + # --- + @property + def lon(self): + """ + Sets the longitude of the center of the map (in degrees East). + + The 'lon' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + lat + Sets the latitude of the center of the map (in degrees + North). + lon + Sets the longitude of the center of the map (in degrees + East). + """ + + def __init__(self, arg=None, lat=None, lon=None, **kwargs): + """ + Construct a new Center object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.mapbox.Center` + lat + Sets the latitude of the center of the map (in degrees + North). + lon + Sets the longitude of the center of the map (in degrees + East). + + Returns + ------- + Center + """ + super(Center, self).__init__("center") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Center +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.mapbox.Center`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("lat", None) + _v = lat if lat is not None else _v + if _v is not None: + self["lat"] = _v + _v = arg.pop("lon", None) + _v = lon if lon is not None else _v + if _v is not None: + self["lon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/_domain.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/_domain.py new file mode 100644 index 00000000000..17b367b8c62 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Domain(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox" + _path_str = "layout.mapbox.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this mapbox subplot . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this mapbox subplot . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this mapbox subplot (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this mapbox subplot (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this mapbox subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this mapbox subplot . + x + Sets the horizontal domain of this mapbox subplot (in + plot fraction). + y + Sets the vertical domain of this mapbox subplot (in + plot fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.mapbox.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this mapbox subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this mapbox subplot . + x + Sets the horizontal domain of this mapbox subplot (in + plot fraction). + y + Sets the vertical domain of this mapbox subplot (in + plot fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.mapbox.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/_layer.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/_layer.py new file mode 100644 index 00000000000..4045848ebbe --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/_layer.py @@ -0,0 +1,895 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Layer(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox" + _path_str = "layout.mapbox.layer" + _valid_props = { + "below", + "circle", + "color", + "coordinates", + "fill", + "line", + "maxzoom", + "minzoom", + "name", + "opacity", + "source", + "sourceattribution", + "sourcelayer", + "sourcetype", + "symbol", + "templateitemname", + "type", + "visible", + } + + # below + # ----- + @property + def below(self): + """ + Determines if the layer will be inserted before the layer with + the specified ID. If omitted or set to '', the layer will be + inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + # circle + # ------ + @property + def circle(self): + """ + The 'circle' property is an instance of Circle + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle` + - A dict of string/value properties that will be passed + to the Circle constructor + + Supported dict properties: + + radius + Sets the circle radius + (mapbox.layer.paint.circle-radius). Has an + effect only when `type` is set to "circle". + + Returns + ------- + plotly.graph_objs.layout.mapbox.layer.Circle + """ + return self["circle"] + + @circle.setter + def circle(self, val): + self["circle"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the primary layer color. If `type` is "circle", color + corresponds to the circle color (mapbox.layer.paint.circle- + color) If `type` is "line", color corresponds to the line color + (mapbox.layer.paint.line-color) If `type` is "fill", color + corresponds to the fill color (mapbox.layer.paint.fill-color) + If `type` is "symbol", color corresponds to the icon color + (mapbox.layer.paint.icon-color) + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coordinates + # ----------- + @property + def coordinates(self): + """ + Sets the coordinates array contains [longitude, latitude] pairs + for the image corners listed in clockwise order: top left, top + right, bottom right, bottom left. Only has an effect for + "image" `sourcetype`. + + The 'coordinates' property accepts values of any type + + Returns + ------- + Any + """ + return self["coordinates"] + + @coordinates.setter + def coordinates(self, val): + self["coordinates"] = val + + # fill + # ---- + @property + def fill(self): + """ + The 'fill' property is an instance of Fill + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill` + - A dict of string/value properties that will be passed + to the Fill constructor + + Supported dict properties: + + outlinecolor + Sets the fill outline color + (mapbox.layer.paint.fill-outline-color). Has an + effect only when `type` is set to "fill". + + Returns + ------- + plotly.graph_objs.layout.mapbox.layer.Fill + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + 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 + ------- + plotly.graph_objs.layout.mapbox.layer.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # maxzoom + # ------- + @property + def maxzoom(self): + """ + Sets the maximum zoom level (mapbox.layer.maxzoom). At zoom + levels equal to or greater than the maxzoom, the layer will be + hidden. + + The 'maxzoom' property is a number and may be specified as: + - An int or float in the interval [0, 24] + + Returns + ------- + int|float + """ + return self["maxzoom"] + + @maxzoom.setter + def maxzoom(self, val): + self["maxzoom"] = val + + # minzoom + # ------- + @property + def minzoom(self): + """ + Sets the minimum zoom level (mapbox.layer.minzoom). At zoom + levels less than the minzoom, the layer will be hidden. + + The 'minzoom' property is a number and may be specified as: + - An int or float in the interval [0, 24] + + Returns + ------- + int|float + """ + return self["minzoom"] + + @minzoom.setter + def minzoom(self, val): + self["minzoom"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the layer. If `type` is "circle", opacity + corresponds to the circle opacity (mapbox.layer.paint.circle- + opacity) If `type` is "line", opacity corresponds to the line + opacity (mapbox.layer.paint.line-opacity) If `type` is "fill", + opacity corresponds to the fill opacity + (mapbox.layer.paint.fill-opacity) If `type` is "symbol", + opacity corresponds to the icon/text opacity + (mapbox.layer.paint.text-opacity) + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # source + # ------ + @property + def source(self): + """ + Sets the source data for this layer (mapbox.layer.source). When + `sourcetype` is set to "geojson", `source` can be a URL to a + GeoJSON or a GeoJSON object. When `sourcetype` is set to + "vector" or "raster", `source` can be a URL or an array of tile + URLs. When `sourcetype` is set to "image", `source` can be a + URL to an image. + + The 'source' property accepts values of any type + + Returns + ------- + Any + """ + return self["source"] + + @source.setter + def source(self, val): + self["source"] = val + + # sourceattribution + # ----------------- + @property + def sourceattribution(self): + """ + Sets the attribution for this source. + + The 'sourceattribution' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["sourceattribution"] + + @sourceattribution.setter + def sourceattribution(self, val): + self["sourceattribution"] = val + + # sourcelayer + # ----------- + @property + def sourcelayer(self): + """ + Specifies the layer to use from a vector tile source + (mapbox.layer.source-layer). Required for "vector" source type + that supports multiple layers. + + The 'sourcelayer' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["sourcelayer"] + + @sourcelayer.setter + def sourcelayer(self, val): + self["sourcelayer"] = val + + # sourcetype + # ---------- + @property + def sourcetype(self): + """ + Sets the source type for this layer, that is the type of the + layer data. + + The 'sourcetype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['geojson', 'vector', 'raster', 'image'] + + Returns + ------- + Any + """ + return self["sourcetype"] + + @sourcetype.setter + def sourcetype(self, val): + self["sourcetype"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + The 'symbol' property is an instance of Symbol + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol` + - A dict of string/value properties that will be passed + to the Symbol constructor + + Supported dict properties: + + 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 + ------- + plotly.graph_objs.layout.mapbox.layer.Symbol + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the layer type, that is the how the layer data set in + `source` will be rendered With `sourcetype` set to "geojson", + the following values are allowed: "circle", "line", "fill" and + "symbol". but note that "line" and "fill" are not compatible + with Point GeoJSON geometries. With `sourcetype` set to + "vector", the following values are allowed: "circle", "line", + "fill" and "symbol". With `sourcetype` set to "raster" or + `*image*`, only the "raster" value is allowed. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['circle', 'line', 'fill', 'symbol', 'raster'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether this layer is displayed + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + below + Determines if the layer will be inserted before the + layer with the specified ID. If omitted or set to '', + the layer will be inserted above every existing layer. + circle + :class:`plotly.graph_objects.layout.mapbox.layer.Circle + ` instance or dict with compatible properties + color + Sets the primary layer color. If `type` is "circle", + color corresponds to the circle color + (mapbox.layer.paint.circle-color) If `type` is "line", + color corresponds to the line color + (mapbox.layer.paint.line-color) If `type` is "fill", + color corresponds to the fill color + (mapbox.layer.paint.fill-color) If `type` is "symbol", + color corresponds to the icon color + (mapbox.layer.paint.icon-color) + coordinates + Sets the coordinates array contains [longitude, + latitude] pairs for the image corners listed in + clockwise order: top left, top right, bottom right, + bottom left. Only has an effect for "image" + `sourcetype`. + fill + :class:`plotly.graph_objects.layout.mapbox.layer.Fill` + instance or dict with compatible properties + line + :class:`plotly.graph_objects.layout.mapbox.layer.Line` + instance or dict with compatible properties + maxzoom + Sets the maximum zoom level (mapbox.layer.maxzoom). At + zoom levels equal to or greater than the maxzoom, the + layer will be hidden. + minzoom + Sets the minimum zoom level (mapbox.layer.minzoom). At + zoom levels less than the minzoom, the layer will be + hidden. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the layer. If `type` is "circle", + opacity corresponds to the circle opacity + (mapbox.layer.paint.circle-opacity) If `type` is + "line", opacity corresponds to the line opacity + (mapbox.layer.paint.line-opacity) If `type` is "fill", + opacity corresponds to the fill opacity + (mapbox.layer.paint.fill-opacity) If `type` is + "symbol", opacity corresponds to the icon/text opacity + (mapbox.layer.paint.text-opacity) + source + Sets the source data for this layer + (mapbox.layer.source). When `sourcetype` is set to + "geojson", `source` can be a URL to a GeoJSON or a + GeoJSON object. When `sourcetype` is set to "vector" or + "raster", `source` can be a URL or an array of tile + URLs. When `sourcetype` is set to "image", `source` can + be a URL to an image. + sourceattribution + Sets the attribution for this source. + sourcelayer + Specifies the layer to use from a vector tile source + (mapbox.layer.source-layer). Required for "vector" + source type that supports multiple layers. + sourcetype + Sets the source type for this layer, that is the type + of the layer data. + symbol + :class:`plotly.graph_objects.layout.mapbox.layer.Symbol + ` instance or dict with compatible properties + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Sets the layer type, that is the how the layer data set + in `source` will be rendered With `sourcetype` set to + "geojson", the following values are allowed: "circle", + "line", "fill" and "symbol". but note that "line" and + "fill" are not compatible with Point GeoJSON + geometries. With `sourcetype` set to "vector", the + following values are allowed: "circle", "line", "fill" + and "symbol". With `sourcetype` set to "raster" or + `*image*`, only the "raster" value is allowed. + visible + Determines whether this layer is displayed + """ + + def __init__( + self, + arg=None, + below=None, + circle=None, + color=None, + coordinates=None, + fill=None, + line=None, + maxzoom=None, + minzoom=None, + name=None, + opacity=None, + source=None, + sourceattribution=None, + sourcelayer=None, + sourcetype=None, + symbol=None, + templateitemname=None, + type=None, + visible=None, + **kwargs + ): + """ + Construct a new Layer object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.mapbox.Layer` + below + Determines if the layer will be inserted before the + layer with the specified ID. If omitted or set to '', + the layer will be inserted above every existing layer. + circle + :class:`plotly.graph_objects.layout.mapbox.layer.Circle + ` instance or dict with compatible properties + color + Sets the primary layer color. If `type` is "circle", + color corresponds to the circle color + (mapbox.layer.paint.circle-color) If `type` is "line", + color corresponds to the line color + (mapbox.layer.paint.line-color) If `type` is "fill", + color corresponds to the fill color + (mapbox.layer.paint.fill-color) If `type` is "symbol", + color corresponds to the icon color + (mapbox.layer.paint.icon-color) + coordinates + Sets the coordinates array contains [longitude, + latitude] pairs for the image corners listed in + clockwise order: top left, top right, bottom right, + bottom left. Only has an effect for "image" + `sourcetype`. + fill + :class:`plotly.graph_objects.layout.mapbox.layer.Fill` + instance or dict with compatible properties + line + :class:`plotly.graph_objects.layout.mapbox.layer.Line` + instance or dict with compatible properties + maxzoom + Sets the maximum zoom level (mapbox.layer.maxzoom). At + zoom levels equal to or greater than the maxzoom, the + layer will be hidden. + minzoom + Sets the minimum zoom level (mapbox.layer.minzoom). At + zoom levels less than the minzoom, the layer will be + hidden. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the layer. If `type` is "circle", + opacity corresponds to the circle opacity + (mapbox.layer.paint.circle-opacity) If `type` is + "line", opacity corresponds to the line opacity + (mapbox.layer.paint.line-opacity) If `type` is "fill", + opacity corresponds to the fill opacity + (mapbox.layer.paint.fill-opacity) If `type` is + "symbol", opacity corresponds to the icon/text opacity + (mapbox.layer.paint.text-opacity) + source + Sets the source data for this layer + (mapbox.layer.source). When `sourcetype` is set to + "geojson", `source` can be a URL to a GeoJSON or a + GeoJSON object. When `sourcetype` is set to "vector" or + "raster", `source` can be a URL or an array of tile + URLs. When `sourcetype` is set to "image", `source` can + be a URL to an image. + sourceattribution + Sets the attribution for this source. + sourcelayer + Specifies the layer to use from a vector tile source + (mapbox.layer.source-layer). Required for "vector" + source type that supports multiple layers. + sourcetype + Sets the source type for this layer, that is the type + of the layer data. + symbol + :class:`plotly.graph_objects.layout.mapbox.layer.Symbol + ` instance or dict with compatible properties + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Sets the layer type, that is the how the layer data set + in `source` will be rendered With `sourcetype` set to + "geojson", the following values are allowed: "circle", + "line", "fill" and "symbol". but note that "line" and + "fill" are not compatible with Point GeoJSON + geometries. With `sourcetype` set to "vector", the + following values are allowed: "circle", "line", "fill" + and "symbol". With `sourcetype` set to "raster" or + `*image*`, only the "raster" value is allowed. + visible + Determines whether this layer is displayed + + Returns + ------- + Layer + """ + super(Layer, self).__init__("layers") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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 +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.mapbox.Layer`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("below", None) + _v = below if below is not None else _v + if _v is not None: + self["below"] = _v + _v = arg.pop("circle", None) + _v = circle if circle is not None else _v + if _v is not None: + self["circle"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coordinates", None) + _v = coordinates if coordinates is not None else _v + if _v is not None: + self["coordinates"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("maxzoom", None) + _v = maxzoom if maxzoom is not None else _v + if _v is not None: + self["maxzoom"] = _v + _v = arg.pop("minzoom", None) + _v = minzoom if minzoom is not None else _v + if _v is not None: + self["minzoom"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("source", None) + _v = source if source is not None else _v + if _v is not None: + self["source"] = _v + _v = arg.pop("sourceattribution", None) + _v = sourceattribution if sourceattribution is not None else _v + if _v is not None: + self["sourceattribution"] = _v + _v = arg.pop("sourcelayer", None) + _v = sourcelayer if sourcelayer is not None else _v + if _v is not None: + self["sourcelayer"] = _v + _v = arg.pop("sourcetype", None) + _v = sourcetype if sourcetype is not None else _v + if _v is not None: + self["sourcetype"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py index 9354b29e9fc..4886b627b0c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py @@ -1,735 +1,16 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Symbol(_BaseLayoutHierarchyType): - - # icon - # ---- - @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 - - # iconsize - # -------- - @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 - - # placement - # --------- - @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 - - # text - # ---- - @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 - - # textfont - # -------- - @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 - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.mapbox.layer.symbol.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox.layer" - - # Self properties description - # --------------------------- - @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(Symbol, self).__init__("symbol") - - # Validate arg - # ------------ - 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`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox.layer import symbol as v_symbol - - # Initialize validators - # --------------------- - self._validators["icon"] = v_symbol.IconValidator() - self._validators["iconsize"] = v_symbol.IconsizeValidator() - self._validators["placement"] = v_symbol.PlacementValidator() - self._validators["text"] = v_symbol.TextValidator() - self._validators["textfont"] = v_symbol.TextfontValidator() - self._validators["textposition"] = v_symbol.TextpositionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("icon", None) - self["icon"] = icon if icon is not None else _v - _v = arg.pop("iconsize", None) - self["iconsize"] = iconsize if iconsize is not None else _v - _v = arg.pop("placement", None) - self["placement"] = placement if placement is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Line(_BaseLayoutHierarchyType): - - # dash - # ---- - @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 - - # dashsrc - # ------- - @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 - - # width - # ----- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox.layer" - - # Self properties description - # --------------------------- - @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(Line, self).__init__("line") - - # Validate arg - # ------------ - 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`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox.layer import line as v_line - - # Initialize validators - # --------------------- - self._validators["dash"] = v_line.DashValidator() - self._validators["dashsrc"] = v_line.DashsrcValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("dashsrc", None) - self["dashsrc"] = dashsrc if dashsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Fill(_BaseLayoutHierarchyType): - - # 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox.layer" - - # Self properties description - # --------------------------- - @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(Fill, self).__init__("fill") - - # Validate arg - # ------------ - 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`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox.layer import fill as v_fill - - # Initialize validators - # --------------------- - self._validators["outlinecolor"] = v_fill.OutlinecolorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Circle(_BaseLayoutHierarchyType): - - # 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox.layer" - - # Self properties description - # --------------------------- - @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(Circle, self).__init__("circle") - - # Validate arg - # ------------ - 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`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox.layer import circle as v_circle - - # Initialize validators - # --------------------- - self._validators["radius"] = v_circle.RadiusValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("radius", None) - self["radius"] = radius if radius is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Circle", "Fill", "Line", "Symbol", "symbol"] - -from plotly.graph_objs.layout.mapbox.layer import symbol +import sys + +if sys.version_info < (3, 7): + from ._symbol import Symbol + from ._line import Line + from ._fill import Fill + from ._circle import Circle + from . import symbol +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".symbol"], + ["._symbol.Symbol", "._line.Line", "._fill.Fill", "._circle.Circle"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_circle.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_circle.py new file mode 100644 index 00000000000..54bdb894d93 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_circle.py @@ -0,0 +1,103 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Circle(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox.layer" + _path_str = "layout.mapbox.layer.circle" + _valid_props = {"radius"} + + # 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 + + # Self properties description + # --------------------------- + @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(Circle, self).__init__("circle") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("radius", None) + _v = radius if radius is not None else _v + if _v is not None: + self["radius"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_fill.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_fill.py new file mode 100644 index 00000000000..78e8fa55fe7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_fill.py @@ -0,0 +1,142 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Fill(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox.layer" + _path_str = "layout.mapbox.layer.fill" + _valid_props = {"outlinecolor"} + + # 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # Self properties description + # --------------------------- + @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(Fill, self).__init__("fill") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_line.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_line.py new file mode 100644 index 00000000000..4ff186a4427 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_line.py @@ -0,0 +1,164 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Line(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox.layer" + _path_str = "layout.mapbox.layer.line" + _valid_props = {"dash", "dashsrc", "width"} + + # dash + # ---- + @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 + + # dashsrc + # ------- + @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 + + # width + # ----- + @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 + + # Self properties description + # --------------------------- + @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(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("dashsrc", None) + _v = dashsrc if dashsrc is not None else _v + if _v is not None: + self["dashsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_symbol.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_symbol.py new file mode 100644 index 00000000000..20f6e7acc38 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/_symbol.py @@ -0,0 +1,314 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Symbol(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox.layer" + _path_str = "layout.mapbox.layer.symbol" + _valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"} + + # icon + # ---- + @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 + + # iconsize + # -------- + @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 + + # placement + # --------- + @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 + + # text + # ---- + @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 + + # textfont + # -------- + @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 + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.mapbox.layer.symbol.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @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 + + # Self properties description + # --------------------------- + @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(Symbol, self).__init__("symbol") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("icon", None) + _v = icon if icon is not None else _v + if _v is not None: + self["icon"] = _v + _v = arg.pop("iconsize", None) + _v = iconsize if iconsize is not None else _v + if _v is not None: + self["iconsize"] = _v + _v = arg.pop("placement", None) + _v = placement if placement is not None else _v + if _v is not None: + self["placement"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("textposition", None) + _v = textposition if textposition is not None else _v + if _v is not None: + self["textposition"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py index 584e92547bb..9b414c35677 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py @@ -1,231 +1,10 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.mapbox.layer.symbol" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=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 will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.mapbox.layer.symbol import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["size"] = v_textfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py new file mode 100644 index 00000000000..8a0a781147f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py @@ -0,0 +1,228 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Textfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.mapbox.layer.symbol" + _path_str = "layout.mapbox.layer.symbol.textfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=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 will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py index 652f40e7b39..7f5c350ca61 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py @@ -1,4307 +1,16 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class RadialAxis(_BaseLayoutHierarchyType): - - # angle - # ----- - @property - def angle(self): - """ - Sets the angle (in degrees) from which the radial axis is - drawn. Note that by default, radial axis line on the theta=0 - line corresponds to a line pointing right (like what - mathematicians prefer). Defaults to the first `polar.sector` - angle. - - The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["angle"] - - @angle.setter - def angle(self, val): - self["angle"] = val - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the calendar system to use for `range` and `tick0` if this - is a date axis. This does not set the calendar for interpreting - data on this axis, that's specified in the trace or via the - global `layout.calendar` - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If *tozero*`, the range extends to 0, regardless of the input - data If "nonnegative", the range is non-negative, regardless of - the input data. If "normal", the range is computed in relation - to the extrema of the input data (same behavior as for - cartesian axes). - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['tozero', 'nonnegative', 'normal'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # side - # ---- - @property - def side(self): - """ - Determines on which side of radial axis line the tick and tick - labels appear. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['clockwise', 'counterclockwise'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.polar.radialaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.polar.radialaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.polar.radialaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.layout.polar.radial - axis.tickformatstopdefaults), sets the default property values - to use for elements of layout.polar.radialaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.polar.radialaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.polar.radialaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.polar.radialaxis.title.font - instead. Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'log', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `range`, - `autorange`, `angle`, and `title` if in `editable: true` - configuration. Defaults to `polar.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - angle - Sets the angle (in degrees) from which the radial axis - is drawn. Note that by default, radial axis line on the - theta=0 line corresponds to a line pointing right (like - what mathematicians prefer). Defaults to the first - `polar.sector` angle. - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If *tozero*`, the range extends to 0, regardless of the - input data If "nonnegative", the range is non-negative, - regardless of the input data. If "normal", the range is - computed in relation to the extrema of the input data - (same behavior as for cartesian axes). - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of radial axis line the tick - and tick labels appear. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.polar.ra - dialaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.pola - r.radialaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.polar.radialaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.polar.radialaxis.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - layout.polar.radialaxis.title.font instead. Sets this - axis' title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - uirevision - Controls persistence of user-driven changes in axis - `range`, `autorange`, `angle`, and `title` if in - `editable: true` configuration. Defaults to - `polar.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - angle=None, - autorange=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - type=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new RadialAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.polar.RadialAxis` - angle - Sets the angle (in degrees) from which the radial axis - is drawn. Note that by default, radial axis line on the - theta=0 line corresponds to a line pointing right (like - what mathematicians prefer). Defaults to the first - `polar.sector` angle. - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If *tozero*`, the range extends to 0, regardless of the - input data If "nonnegative", the range is non-negative, - regardless of the input data. If "normal", the range is - computed in relation to the extrema of the input data - (same behavior as for cartesian axes). - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of radial axis line the tick - and tick labels appear. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.polar.ra - dialaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.pola - r.radialaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.polar.radialaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.polar.radialaxis.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - layout.polar.radialaxis.title.font instead. Sets this - axis' title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - uirevision - Controls persistence of user-driven changes in axis - `range`, `autorange`, `angle`, and `title` if in - `editable: true` configuration. Defaults to - `polar.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - - Returns - ------- - RadialAxis - """ - super(RadialAxis, self).__init__("radialaxis") - - # Validate arg - # ------------ - 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.polar.RadialAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar import radialaxis as v_radialaxis - - # Initialize validators - # --------------------- - self._validators["angle"] = v_radialaxis.AngleValidator() - self._validators["autorange"] = v_radialaxis.AutorangeValidator() - self._validators["calendar"] = v_radialaxis.CalendarValidator() - self._validators["categoryarray"] = v_radialaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_radialaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_radialaxis.CategoryorderValidator() - self._validators["color"] = v_radialaxis.ColorValidator() - self._validators["dtick"] = v_radialaxis.DtickValidator() - self._validators["exponentformat"] = v_radialaxis.ExponentformatValidator() - self._validators["gridcolor"] = v_radialaxis.GridcolorValidator() - self._validators["gridwidth"] = v_radialaxis.GridwidthValidator() - self._validators["hoverformat"] = v_radialaxis.HoverformatValidator() - self._validators["layer"] = v_radialaxis.LayerValidator() - self._validators["linecolor"] = v_radialaxis.LinecolorValidator() - self._validators["linewidth"] = v_radialaxis.LinewidthValidator() - self._validators["nticks"] = v_radialaxis.NticksValidator() - self._validators["range"] = v_radialaxis.RangeValidator() - self._validators["rangemode"] = v_radialaxis.RangemodeValidator() - self._validators[ - "separatethousands" - ] = v_radialaxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_radialaxis.ShowexponentValidator() - self._validators["showgrid"] = v_radialaxis.ShowgridValidator() - self._validators["showline"] = v_radialaxis.ShowlineValidator() - self._validators["showticklabels"] = v_radialaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_radialaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_radialaxis.ShowticksuffixValidator() - self._validators["side"] = v_radialaxis.SideValidator() - self._validators["tick0"] = v_radialaxis.Tick0Validator() - self._validators["tickangle"] = v_radialaxis.TickangleValidator() - self._validators["tickcolor"] = v_radialaxis.TickcolorValidator() - self._validators["tickfont"] = v_radialaxis.TickfontValidator() - self._validators["tickformat"] = v_radialaxis.TickformatValidator() - self._validators["tickformatstops"] = v_radialaxis.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_radialaxis.TickformatstopValidator() - self._validators["ticklen"] = v_radialaxis.TicklenValidator() - self._validators["tickmode"] = v_radialaxis.TickmodeValidator() - self._validators["tickprefix"] = v_radialaxis.TickprefixValidator() - self._validators["ticks"] = v_radialaxis.TicksValidator() - self._validators["ticksuffix"] = v_radialaxis.TicksuffixValidator() - self._validators["ticktext"] = v_radialaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_radialaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_radialaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_radialaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_radialaxis.TickwidthValidator() - self._validators["title"] = v_radialaxis.TitleValidator() - self._validators["type"] = v_radialaxis.TypeValidator() - self._validators["uirevision"] = v_radialaxis.UirevisionValidator() - self._validators["visible"] = v_radialaxis.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - self["angle"] = angle if angle is not None else _v - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Domain(_BaseLayoutHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this polar subplot . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this polar subplot . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this polar subplot (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this polar subplot (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this polar subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this polar subplot . - x - Sets the horizontal domain of this polar subplot (in - plot fraction). - y - Sets the vertical domain of this polar subplot (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.polar.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this polar subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this polar subplot . - x - Sets the horizontal domain of this polar subplot (in - plot fraction). - y - Sets the vertical domain of this polar subplot (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.polar.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class AngularAxis(_BaseLayoutHierarchyType): - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # direction - # --------- - @property - def direction(self): - """ - Sets the direction corresponding to positive angles. - - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['counterclockwise', 'clockwise'] - - Returns - ------- - Any - """ - return self["direction"] - - @direction.setter - def direction(self, val): - self["direction"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # period - # ------ - @property - def period(self): - """ - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - - The 'period' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["period"] - - @period.setter - def period(self, val): - self["period"] = val - - # rotation - # -------- - @property - def rotation(self): - """ - Sets that start position (in degrees) of the angular axis By - default, polar subplots with `direction` set to - "counterclockwise" get a `rotation` of 0 which corresponds to - due East (like what mathematicians prefer). In turn, polar with - `direction` set to "clockwise" get a rotation of 90 which - corresponds to due North (like on a compass), - - The 'rotation' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["rotation"] - - @rotation.setter - def rotation(self, val): - self["rotation"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the format unit of the formatted "theta" values. Has an - effect only when `angularaxis.type` is "linear". - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees'] - - Returns - ------- - Any - """ - return self["thetaunit"] - - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.polar.angularaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.polar.angularaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.polar.angularaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.layout.polar.angula - raxis.tickformatstopdefaults), sets the default property values - to use for elements of layout.polar.angularaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.polar.angularaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the angular axis type. If "linear", set `thetaunit` to - determine the unit in which axis value are shown. If *category, - use `period` to set the number of integer coordinates around - polar axis. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `rotation`. - Defaults to `polar.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - direction - Sets the direction corresponding to positive angles. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - period - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - rotation - Sets that start position (in degrees) of the angular - axis By default, polar subplots with `direction` set to - "counterclockwise" get a `rotation` of 0 which - corresponds to due East (like what mathematicians - prefer). In turn, polar with `direction` set to - "clockwise" get a rotation of 90 which corresponds to - due North (like on a compass), - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thetaunit - Sets the format unit of the formatted "theta" values. - Has an effect only when `angularaxis.type` is "linear". - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.polar.an - gularaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.pola - r.angularaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.polar.angularaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - type - Sets the angular axis type. If "linear", set - `thetaunit` to determine the unit in which axis value - are shown. If *category, use `period` to set the number - of integer coordinates around polar axis. - uirevision - Controls persistence of user-driven changes in axis - `rotation`. Defaults to `polar.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - """ - - def __init__( - self, - arg=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - direction=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - nticks=None, - period=None, - rotation=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thetaunit=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - type=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new AngularAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.polar.AngularAxis` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - direction - Sets the direction corresponding to positive angles. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - period - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - rotation - Sets that start position (in degrees) of the angular - axis By default, polar subplots with `direction` set to - "counterclockwise" get a `rotation` of 0 which - corresponds to due East (like what mathematicians - prefer). In turn, polar with `direction` set to - "clockwise" get a rotation of 90 which corresponds to - due North (like on a compass), - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thetaunit - Sets the format unit of the formatted "theta" values. - Has an effect only when `angularaxis.type` is "linear". - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.polar.an - gularaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.pola - r.angularaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.polar.angularaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - type - Sets the angular axis type. If "linear", set - `thetaunit` to determine the unit in which axis value - are shown. If *category, use `period` to set the number - of integer coordinates around polar axis. - uirevision - Controls persistence of user-driven changes in axis - `rotation`. Defaults to `polar.uirevision`. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - - Returns - ------- - AngularAxis - """ - super(AngularAxis, self).__init__("angularaxis") - - # Validate arg - # ------------ - 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.polar.AngularAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.AngularAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar import angularaxis as v_angularaxis - - # Initialize validators - # --------------------- - self._validators["categoryarray"] = v_angularaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_angularaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_angularaxis.CategoryorderValidator() - self._validators["color"] = v_angularaxis.ColorValidator() - self._validators["direction"] = v_angularaxis.DirectionValidator() - self._validators["dtick"] = v_angularaxis.DtickValidator() - self._validators["exponentformat"] = v_angularaxis.ExponentformatValidator() - self._validators["gridcolor"] = v_angularaxis.GridcolorValidator() - self._validators["gridwidth"] = v_angularaxis.GridwidthValidator() - self._validators["hoverformat"] = v_angularaxis.HoverformatValidator() - self._validators["layer"] = v_angularaxis.LayerValidator() - self._validators["linecolor"] = v_angularaxis.LinecolorValidator() - self._validators["linewidth"] = v_angularaxis.LinewidthValidator() - self._validators["nticks"] = v_angularaxis.NticksValidator() - self._validators["period"] = v_angularaxis.PeriodValidator() - self._validators["rotation"] = v_angularaxis.RotationValidator() - self._validators[ - "separatethousands" - ] = v_angularaxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_angularaxis.ShowexponentValidator() - self._validators["showgrid"] = v_angularaxis.ShowgridValidator() - self._validators["showline"] = v_angularaxis.ShowlineValidator() - self._validators["showticklabels"] = v_angularaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_angularaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_angularaxis.ShowticksuffixValidator() - self._validators["thetaunit"] = v_angularaxis.ThetaunitValidator() - self._validators["tick0"] = v_angularaxis.Tick0Validator() - self._validators["tickangle"] = v_angularaxis.TickangleValidator() - self._validators["tickcolor"] = v_angularaxis.TickcolorValidator() - self._validators["tickfont"] = v_angularaxis.TickfontValidator() - self._validators["tickformat"] = v_angularaxis.TickformatValidator() - self._validators["tickformatstops"] = v_angularaxis.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_angularaxis.TickformatstopValidator() - self._validators["ticklen"] = v_angularaxis.TicklenValidator() - self._validators["tickmode"] = v_angularaxis.TickmodeValidator() - self._validators["tickprefix"] = v_angularaxis.TickprefixValidator() - self._validators["ticks"] = v_angularaxis.TicksValidator() - self._validators["ticksuffix"] = v_angularaxis.TicksuffixValidator() - self._validators["ticktext"] = v_angularaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_angularaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_angularaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_angularaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_angularaxis.TickwidthValidator() - self._validators["type"] = v_angularaxis.TypeValidator() - self._validators["uirevision"] = v_angularaxis.UirevisionValidator() - self._validators["visible"] = v_angularaxis.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("period", None) - self["period"] = period if period is not None else _v - _v = arg.pop("rotation", None) - self["rotation"] = rotation if rotation is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["AngularAxis", "Domain", "RadialAxis", "angularaxis", "radialaxis"] - -from plotly.graph_objs.layout.polar import radialaxis -from plotly.graph_objs.layout.polar import angularaxis +import sys + +if sys.version_info < (3, 7): + from ._radialaxis import RadialAxis + from ._domain import Domain + from ._angularaxis import AngularAxis + from . import radialaxis + from . import angularaxis +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".radialaxis", ".angularaxis"], + ["._radialaxis.RadialAxis", "._domain.Domain", "._angularaxis.AngularAxis"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py new file mode 100644 index 00000000000..47d8c9c119a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py @@ -0,0 +1,2011 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class AngularAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar" + _path_str = "layout.polar.angularaxis" + _valid_props = { + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "direction", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "nticks", + "period", + "rotation", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thetaunit", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "type", + "uirevision", + "visible", + } + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # direction + # --------- + @property + def direction(self): + """ + Sets the direction corresponding to positive angles. + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['counterclockwise', 'clockwise'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # period + # ------ + @property + def period(self): + """ + Set the angular period. Has an effect only when + `angularaxis.type` is "category". + + The 'period' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["period"] + + @period.setter + def period(self, val): + self["period"] = val + + # rotation + # -------- + @property + def rotation(self): + """ + Sets that start position (in degrees) of the angular axis By + default, polar subplots with `direction` set to + "counterclockwise" get a `rotation` of 0 which corresponds to + due East (like what mathematicians prefer). In turn, polar with + `direction` set to "clockwise" get a rotation of 90 which + corresponds to due North (like on a compass), + + The 'rotation' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["rotation"] + + @rotation.setter + def rotation(self, val): + self["rotation"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thetaunit + # --------- + @property + def thetaunit(self): + """ + Sets the format unit of the formatted "theta" values. Has an + effect only when `angularaxis.type` is "linear". + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.polar.angularaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.polar.angularaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.polar.angularaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.layout.polar.angula + raxis.tickformatstopdefaults), sets the default property values + to use for elements of layout.polar.angularaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.polar.angularaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the angular axis type. If "linear", set `thetaunit` to + determine the unit in which axis value are shown. If *category, + use `period` to set the number of integer coordinates around + polar axis. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `rotation`. + Defaults to `polar.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + direction + Sets the direction corresponding to positive angles. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + period + Set the angular period. Has an effect only when + `angularaxis.type` is "category". + rotation + Sets that start position (in degrees) of the angular + axis By default, polar subplots with `direction` set to + "counterclockwise" get a `rotation` of 0 which + corresponds to due East (like what mathematicians + prefer). In turn, polar with `direction` set to + "clockwise" get a rotation of 90 which corresponds to + due North (like on a compass), + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thetaunit + Sets the format unit of the formatted "theta" values. + Has an effect only when `angularaxis.type` is "linear". + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.polar.an + gularaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.pola + r.angularaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.polar.angularaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + type + Sets the angular axis type. If "linear", set + `thetaunit` to determine the unit in which axis value + are shown. If *category, use `period` to set the number + of integer coordinates around polar axis. + uirevision + Controls persistence of user-driven changes in axis + `rotation`. Defaults to `polar.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + """ + + def __init__( + self, + arg=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + direction=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + nticks=None, + period=None, + rotation=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thetaunit=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + type=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new AngularAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.polar.AngularAxis` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + direction + Sets the direction corresponding to positive angles. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + period + Set the angular period. Has an effect only when + `angularaxis.type` is "category". + rotation + Sets that start position (in degrees) of the angular + axis By default, polar subplots with `direction` set to + "counterclockwise" get a `rotation` of 0 which + corresponds to due East (like what mathematicians + prefer). In turn, polar with `direction` set to + "clockwise" get a rotation of 90 which corresponds to + due North (like on a compass), + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thetaunit + Sets the format unit of the formatted "theta" values. + Has an effect only when `angularaxis.type` is "linear". + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.polar.an + gularaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.pola + r.angularaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.polar.angularaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + type + Sets the angular axis type. If "linear", set + `thetaunit` to determine the unit in which axis value + are shown. If *category, use `period` to set the number + of integer coordinates around polar axis. + uirevision + Controls persistence of user-driven changes in axis + `rotation`. Defaults to `polar.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + + Returns + ------- + AngularAxis + """ + super(AngularAxis, self).__init__("angularaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.AngularAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.AngularAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("direction", None) + _v = direction if direction is not None else _v + if _v is not None: + self["direction"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("period", None) + _v = period if period is not None else _v + if _v is not None: + self["period"] = _v + _v = arg.pop("rotation", None) + _v = rotation if rotation is not None else _v + if _v is not None: + self["rotation"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thetaunit", None) + _v = thetaunit if thetaunit is not None else _v + if _v is not None: + self["thetaunit"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_domain.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_domain.py new file mode 100644 index 00000000000..fbb66cbfc97 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Domain(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar" + _path_str = "layout.polar.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this polar subplot . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this polar subplot . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this polar subplot (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this polar subplot (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this polar subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this polar subplot . + x + Sets the horizontal domain of this polar subplot (in + plot fraction). + y + Sets the vertical domain of this polar subplot (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.polar.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this polar subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this polar subplot . + x + Sets the horizontal domain of this polar subplot (in + plot fraction). + y + Sets the vertical domain of this polar subplot (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py new file mode 100644 index 00000000000..2ca496004ef --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py @@ -0,0 +1,2240 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class RadialAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar" + _path_str = "layout.polar.radialaxis" + _valid_props = { + "angle", + "autorange", + "calendar", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "nticks", + "range", + "rangemode", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "side", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "type", + "uirevision", + "visible", + } + + # angle + # ----- + @property + def angle(self): + """ + Sets the angle (in degrees) from which the radial axis is + drawn. Note that by default, radial axis line on the theta=0 + line corresponds to a line pointing right (like what + mathematicians prefer). Defaults to the first `polar.sector` + angle. + + The 'angle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["angle"] + + @angle.setter + def angle(self, val): + self["angle"] = val + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the calendar system to use for `range` and `tick0` if this + is a date axis. This does not set the calendar for interpreting + data on this axis, that's specified in the trace or via the + global `layout.calendar` + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If *tozero*`, the range extends to 0, regardless of the input + data If "nonnegative", the range is non-negative, regardless of + the input data. If "normal", the range is computed in relation + to the extrema of the input data (same behavior as for + cartesian axes). + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['tozero', 'nonnegative', 'normal'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # side + # ---- + @property + def side(self): + """ + Determines on which side of radial axis line the tick and tick + labels appear. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['clockwise', 'counterclockwise'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.polar.radialaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.polar.radialaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.polar.radialaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.layout.polar.radial + axis.tickformatstopdefaults), sets the default property values + to use for elements of layout.polar.radialaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.polar.radialaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.polar.radialaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.polar.radialaxis.title.font + instead. Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'log', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `range`, + `autorange`, `angle`, and `title` if in `editable: true` + configuration. Defaults to `polar.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + angle + Sets the angle (in degrees) from which the radial axis + is drawn. Note that by default, radial axis line on the + theta=0 line corresponds to a line pointing right (like + what mathematicians prefer). Defaults to the first + `polar.sector` angle. + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If *tozero*`, the range extends to 0, regardless of the + input data If "nonnegative", the range is non-negative, + regardless of the input data. If "normal", the range is + computed in relation to the extrema of the input data + (same behavior as for cartesian axes). + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines on which side of radial axis line the tick + and tick labels appear. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.polar.ra + dialaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.pola + r.radialaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.polar.radialaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.polar.radialaxis.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + layout.polar.radialaxis.title.font instead. Sets this + axis' title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + uirevision + Controls persistence of user-driven changes in axis + `range`, `autorange`, `angle`, and `title` if in + `editable: true` configuration. Defaults to + `polar.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + angle=None, + autorange=None, + calendar=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + side=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + type=None, + uirevision=None, + visible=None, + **kwargs + ): + """ + Construct a new RadialAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.polar.RadialAxis` + angle + Sets the angle (in degrees) from which the radial axis + is drawn. Note that by default, radial axis line on the + theta=0 line corresponds to a line pointing right (like + what mathematicians prefer). Defaults to the first + `polar.sector` angle. + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If *tozero*`, the range extends to 0, regardless of the + input data If "nonnegative", the range is non-negative, + regardless of the input data. If "normal", the range is + computed in relation to the extrema of the input data + (same behavior as for cartesian axes). + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines on which side of radial axis line the tick + and tick labels appear. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.polar.ra + dialaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.pola + r.radialaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.polar.radialaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.polar.radialaxis.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + layout.polar.radialaxis.title.font instead. Sets this + axis' title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + uirevision + Controls persistence of user-driven changes in axis + `range`, `autorange`, `angle`, and `title` if in + `editable: true` configuration. Defaults to + `polar.uirevision`. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + + Returns + ------- + RadialAxis + """ + super(RadialAxis, self).__init__("radialaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.RadialAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("angle", None) + _v = angle if angle is not None else _v + if _v is not None: + self["angle"] = _v + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py index f1e9efab937..f1d16bcb76a 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py @@ -1,517 +1,11 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont +else: + from _plotly_utils.importers import relative_import -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar.angularaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.polar.a - ngularaxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.polar.angularaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar.angularaxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar.angularaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.polar.a - ngularaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.polar.angularaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar.angularaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._tickformatstop.Tickformatstop", "._tickfont.Tickfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py new file mode 100644 index 00000000000..f9ce15109db --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar.angularaxis" + _path_str = "layout.polar.angularaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.polar.a + ngularaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.angularaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py new file mode 100644 index 00000000000..4ea62f99455 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar.angularaxis" + _path_str = "layout.polar.angularaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.polar.a + ngularaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.angularaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py index fadbdec3d05..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.polar.radialaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar.radialaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.polar.r - adialaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.polar.radialaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar.radialaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar.radialaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.polar.r - adialaxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.polar.radialaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar.radialaxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar.radialaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.polar.r - adialaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.polar.radialaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar.radialaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.polar.radialaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py new file mode 100644 index 00000000000..5e24046bf87 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar.radialaxis" + _path_str = "layout.polar.radialaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.polar.r + adialaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.radialaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py new file mode 100644 index 00000000000..b3b891a8ac1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar.radialaxis" + _path_str = "layout.polar.radialaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.polar.r + adialaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.radialaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_title.py new file mode 100644 index 00000000000..806b50408a7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar.radialaxis" + _path_str = "layout.polar.radialaxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.polar.radialaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.polar.r + adialaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.radialaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py index 0bd7465eaea..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.polar.radialaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.polar.r - adialaxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.polar.radialaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.polar.radialaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/_font.py new file mode 100644 index 00000000000..997a0dd2fa1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.polar.radialaxis.title" + _path_str = "layout.polar.radialaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.polar.r + adialaxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.polar.radialaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py index d5f15b33926..c0d9c20ef28 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py @@ -1,9527 +1,31 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class ZAxis(_BaseLayoutHierarchyType): - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # backgroundcolor - # --------------- - @property - def backgroundcolor(self): - """ - Sets the background color of this axis' wall. - - The 'backgroundcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["backgroundcolor"] - - @backgroundcolor.setter - def backgroundcolor(self, val): - self["backgroundcolor"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the calendar system to use for `range` and `tick0` if this - is a date axis. This does not set the calendar for interpreting - data on this axis, that's specified in the trace or via the - global `layout.calendar` - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # mirror - # ------ - @property - def mirror(self): - """ - Determines if the axis lines or/and ticks are mirrored to the - opposite side of the plotting area. If True, the axis lines are - mirrored. If "ticks", the axis lines and ticks are mirrored. If - False, mirroring is disable. If "all", axis lines are mirrored - on all shared-axes subplots. If "allticks", axis lines and - ticks are mirrored on all shared-axes subplots. - - The 'mirror' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'ticks', False, 'all', 'allticks'] - - Returns - ------- - Any - """ - return self["mirror"] - - @mirror.setter - def mirror(self, val): - self["mirror"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. Applies only to - linear axes. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showaxeslabels - # -------------- - @property - def showaxeslabels(self): - """ - Sets whether or not this axis is labeled - - The 'showaxeslabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showaxeslabels"] - - @showaxeslabels.setter - def showaxeslabels(self, val): - self["showaxeslabels"] = val - - # showbackground - # -------------- - @property - def showbackground(self): - """ - Sets whether or not this axis' wall has a background color. - - The 'showbackground' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showbackground"] - - @showbackground.setter - def showbackground(self, val): - self["showbackground"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showspikes - # ---------- - @property - def showspikes(self): - """ - Sets whether or not spikes starting from data points to this - axis' wall are shown on hover. - - The 'showspikes' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showspikes"] - - @showspikes.setter - def showspikes(self, val): - self["showspikes"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # spikecolor - # ---------- - @property - def spikecolor(self): - """ - Sets the color of the spikes. - - The 'spikecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["spikecolor"] - - @spikecolor.setter - def spikecolor(self, val): - self["spikecolor"] = val - - # spikesides - # ---------- - @property - def spikesides(self): - """ - Sets whether or not spikes extending from the projection data - points to this axis' wall boundaries are shown on hover. - - The 'spikesides' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["spikesides"] - - @spikesides.setter - def spikesides(self, val): - self["spikesides"] = val - - # spikethickness - # -------------- - @property - def spikethickness(self): - """ - Sets the thickness (in px) of the spikes. - - The 'spikethickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["spikethickness"] - - @spikethickness.setter - def spikethickness(self, val): - self["spikethickness"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.zaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.scene.zaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.scene.zaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.scene.zaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.scene.zaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.scene.zaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.scene.zaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.scene.zaxis.title.font instead. - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'log', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # zeroline - # -------- - @property - def zeroline(self): - """ - Determines whether or not a line is drawn at along the 0 value - of this axis. If True, the zero line is drawn on top of the - grid lines. - - The 'zeroline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zeroline"] - - @zeroline.setter - def zeroline(self, val): - self["zeroline"] = val - - # zerolinecolor - # ------------- - @property - def zerolinecolor(self): - """ - Sets the line color of the zero line. - - The 'zerolinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["zerolinecolor"] - - @zerolinecolor.setter - def zerolinecolor(self, val): - self["zerolinecolor"] = val - - # zerolinewidth - # ------------- - @property - def zerolinewidth(self): - """ - Sets the width (in px) of the zero line. - - The 'zerolinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zerolinewidth"] - - @zerolinewidth.setter - def zerolinewidth(self, val): - self["zerolinewidth"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a background - color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Sets whether or not spikes starting from data points to - this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall boundaries - are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.scene.za - xis.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.layout.scen - e.zaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.scene.zaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.zaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.scene.zaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - autorange=None, - backgroundcolor=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - linecolor=None, - linewidth=None, - mirror=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showaxeslabels=None, - showbackground=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - spikecolor=None, - spikesides=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - type=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, - **kwargs - ): - """ - Construct a new ZAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.ZAxis` - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a background - color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Sets whether or not spikes starting from data points to - this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall boundaries - are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.scene.za - xis.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.layout.scen - e.zaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.scene.zaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.zaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.scene.zaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - ZAxis - """ - super(ZAxis, self).__init__("zaxis") - - # Validate arg - # ------------ - 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.scene.ZAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.ZAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import zaxis as v_zaxis - - # Initialize validators - # --------------------- - self._validators["autorange"] = v_zaxis.AutorangeValidator() - self._validators["backgroundcolor"] = v_zaxis.BackgroundcolorValidator() - self._validators["calendar"] = v_zaxis.CalendarValidator() - self._validators["categoryarray"] = v_zaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_zaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_zaxis.CategoryorderValidator() - self._validators["color"] = v_zaxis.ColorValidator() - self._validators["dtick"] = v_zaxis.DtickValidator() - self._validators["exponentformat"] = v_zaxis.ExponentformatValidator() - self._validators["gridcolor"] = v_zaxis.GridcolorValidator() - self._validators["gridwidth"] = v_zaxis.GridwidthValidator() - self._validators["hoverformat"] = v_zaxis.HoverformatValidator() - self._validators["linecolor"] = v_zaxis.LinecolorValidator() - self._validators["linewidth"] = v_zaxis.LinewidthValidator() - self._validators["mirror"] = v_zaxis.MirrorValidator() - self._validators["nticks"] = v_zaxis.NticksValidator() - self._validators["range"] = v_zaxis.RangeValidator() - self._validators["rangemode"] = v_zaxis.RangemodeValidator() - self._validators["separatethousands"] = v_zaxis.SeparatethousandsValidator() - self._validators["showaxeslabels"] = v_zaxis.ShowaxeslabelsValidator() - self._validators["showbackground"] = v_zaxis.ShowbackgroundValidator() - self._validators["showexponent"] = v_zaxis.ShowexponentValidator() - self._validators["showgrid"] = v_zaxis.ShowgridValidator() - self._validators["showline"] = v_zaxis.ShowlineValidator() - self._validators["showspikes"] = v_zaxis.ShowspikesValidator() - self._validators["showticklabels"] = v_zaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_zaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_zaxis.ShowticksuffixValidator() - self._validators["spikecolor"] = v_zaxis.SpikecolorValidator() - self._validators["spikesides"] = v_zaxis.SpikesidesValidator() - self._validators["spikethickness"] = v_zaxis.SpikethicknessValidator() - self._validators["tick0"] = v_zaxis.Tick0Validator() - self._validators["tickangle"] = v_zaxis.TickangleValidator() - self._validators["tickcolor"] = v_zaxis.TickcolorValidator() - self._validators["tickfont"] = v_zaxis.TickfontValidator() - self._validators["tickformat"] = v_zaxis.TickformatValidator() - self._validators["tickformatstops"] = v_zaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_zaxis.TickformatstopValidator() - self._validators["ticklen"] = v_zaxis.TicklenValidator() - self._validators["tickmode"] = v_zaxis.TickmodeValidator() - self._validators["tickprefix"] = v_zaxis.TickprefixValidator() - self._validators["ticks"] = v_zaxis.TicksValidator() - self._validators["ticksuffix"] = v_zaxis.TicksuffixValidator() - self._validators["ticktext"] = v_zaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_zaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_zaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_zaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_zaxis.TickwidthValidator() - self._validators["title"] = v_zaxis.TitleValidator() - self._validators["type"] = v_zaxis.TypeValidator() - self._validators["visible"] = v_zaxis.VisibleValidator() - self._validators["zeroline"] = v_zaxis.ZerolineValidator() - self._validators["zerolinecolor"] = v_zaxis.ZerolinecolorValidator() - self._validators["zerolinewidth"] = v_zaxis.ZerolinewidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("backgroundcolor", None) - self["backgroundcolor"] = backgroundcolor if backgroundcolor is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("mirror", None) - self["mirror"] = mirror if mirror is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showaxeslabels", None) - self["showaxeslabels"] = showaxeslabels if showaxeslabels is not None else _v - _v = arg.pop("showbackground", None) - self["showbackground"] = showbackground if showbackground is not None else _v - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showspikes", None) - self["showspikes"] = showspikes if showspikes is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("spikecolor", None) - self["spikecolor"] = spikecolor if spikecolor is not None else _v - _v = arg.pop("spikesides", None) - self["spikesides"] = spikesides if spikesides is not None else _v - _v = arg.pop("spikethickness", None) - self["spikethickness"] = spikethickness if spikethickness is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("zeroline", None) - self["zeroline"] = zeroline if zeroline is not None else _v - _v = arg.pop("zerolinecolor", None) - self["zerolinecolor"] = zerolinecolor if zerolinecolor is not None else _v - _v = arg.pop("zerolinewidth", None) - self["zerolinewidth"] = zerolinewidth if zerolinewidth is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class YAxis(_BaseLayoutHierarchyType): - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # backgroundcolor - # --------------- - @property - def backgroundcolor(self): - """ - Sets the background color of this axis' wall. - - The 'backgroundcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["backgroundcolor"] - - @backgroundcolor.setter - def backgroundcolor(self, val): - self["backgroundcolor"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the calendar system to use for `range` and `tick0` if this - is a date axis. This does not set the calendar for interpreting - data on this axis, that's specified in the trace or via the - global `layout.calendar` - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # mirror - # ------ - @property - def mirror(self): - """ - Determines if the axis lines or/and ticks are mirrored to the - opposite side of the plotting area. If True, the axis lines are - mirrored. If "ticks", the axis lines and ticks are mirrored. If - False, mirroring is disable. If "all", axis lines are mirrored - on all shared-axes subplots. If "allticks", axis lines and - ticks are mirrored on all shared-axes subplots. - - The 'mirror' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'ticks', False, 'all', 'allticks'] - - Returns - ------- - Any - """ - return self["mirror"] - - @mirror.setter - def mirror(self, val): - self["mirror"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. Applies only to - linear axes. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showaxeslabels - # -------------- - @property - def showaxeslabels(self): - """ - Sets whether or not this axis is labeled - - The 'showaxeslabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showaxeslabels"] - - @showaxeslabels.setter - def showaxeslabels(self, val): - self["showaxeslabels"] = val - - # showbackground - # -------------- - @property - def showbackground(self): - """ - Sets whether or not this axis' wall has a background color. - - The 'showbackground' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showbackground"] - - @showbackground.setter - def showbackground(self, val): - self["showbackground"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showspikes - # ---------- - @property - def showspikes(self): - """ - Sets whether or not spikes starting from data points to this - axis' wall are shown on hover. - - The 'showspikes' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showspikes"] - - @showspikes.setter - def showspikes(self, val): - self["showspikes"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # spikecolor - # ---------- - @property - def spikecolor(self): - """ - Sets the color of the spikes. - - The 'spikecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["spikecolor"] - - @spikecolor.setter - def spikecolor(self, val): - self["spikecolor"] = val - - # spikesides - # ---------- - @property - def spikesides(self): - """ - Sets whether or not spikes extending from the projection data - points to this axis' wall boundaries are shown on hover. - - The 'spikesides' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["spikesides"] - - @spikesides.setter - def spikesides(self, val): - self["spikesides"] = val - - # spikethickness - # -------------- - @property - def spikethickness(self): - """ - Sets the thickness (in px) of the spikes. - - The 'spikethickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["spikethickness"] - - @spikethickness.setter - def spikethickness(self, val): - self["spikethickness"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.yaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.scene.yaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.scene.yaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.scene.yaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.scene.yaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.scene.yaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.scene.yaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.scene.yaxis.title.font instead. - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'log', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # zeroline - # -------- - @property - def zeroline(self): - """ - Determines whether or not a line is drawn at along the 0 value - of this axis. If True, the zero line is drawn on top of the - grid lines. - - The 'zeroline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zeroline"] - - @zeroline.setter - def zeroline(self, val): - self["zeroline"] = val - - # zerolinecolor - # ------------- - @property - def zerolinecolor(self): - """ - Sets the line color of the zero line. - - The 'zerolinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["zerolinecolor"] - - @zerolinecolor.setter - def zerolinecolor(self, val): - self["zerolinecolor"] = val - - # zerolinewidth - # ------------- - @property - def zerolinewidth(self): - """ - Sets the width (in px) of the zero line. - - The 'zerolinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zerolinewidth"] - - @zerolinewidth.setter - def zerolinewidth(self, val): - self["zerolinewidth"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a background - color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Sets whether or not spikes starting from data points to - this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall boundaries - are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.scene.ya - xis.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.layout.scen - e.yaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.scene.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.yaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.scene.yaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - autorange=None, - backgroundcolor=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - linecolor=None, - linewidth=None, - mirror=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showaxeslabels=None, - showbackground=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - spikecolor=None, - spikesides=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - type=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, - **kwargs - ): - """ - Construct a new YAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.YAxis` - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a background - color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Sets whether or not spikes starting from data points to - this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall boundaries - are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.scene.ya - xis.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.layout.scen - e.yaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.scene.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.yaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.scene.yaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - YAxis - """ - super(YAxis, self).__init__("yaxis") - - # Validate arg - # ------------ - 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.scene.YAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.YAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import yaxis as v_yaxis - - # Initialize validators - # --------------------- - self._validators["autorange"] = v_yaxis.AutorangeValidator() - self._validators["backgroundcolor"] = v_yaxis.BackgroundcolorValidator() - self._validators["calendar"] = v_yaxis.CalendarValidator() - self._validators["categoryarray"] = v_yaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_yaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_yaxis.CategoryorderValidator() - self._validators["color"] = v_yaxis.ColorValidator() - self._validators["dtick"] = v_yaxis.DtickValidator() - self._validators["exponentformat"] = v_yaxis.ExponentformatValidator() - self._validators["gridcolor"] = v_yaxis.GridcolorValidator() - self._validators["gridwidth"] = v_yaxis.GridwidthValidator() - self._validators["hoverformat"] = v_yaxis.HoverformatValidator() - self._validators["linecolor"] = v_yaxis.LinecolorValidator() - self._validators["linewidth"] = v_yaxis.LinewidthValidator() - self._validators["mirror"] = v_yaxis.MirrorValidator() - self._validators["nticks"] = v_yaxis.NticksValidator() - self._validators["range"] = v_yaxis.RangeValidator() - self._validators["rangemode"] = v_yaxis.RangemodeValidator() - self._validators["separatethousands"] = v_yaxis.SeparatethousandsValidator() - self._validators["showaxeslabels"] = v_yaxis.ShowaxeslabelsValidator() - self._validators["showbackground"] = v_yaxis.ShowbackgroundValidator() - self._validators["showexponent"] = v_yaxis.ShowexponentValidator() - self._validators["showgrid"] = v_yaxis.ShowgridValidator() - self._validators["showline"] = v_yaxis.ShowlineValidator() - self._validators["showspikes"] = v_yaxis.ShowspikesValidator() - self._validators["showticklabels"] = v_yaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_yaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_yaxis.ShowticksuffixValidator() - self._validators["spikecolor"] = v_yaxis.SpikecolorValidator() - self._validators["spikesides"] = v_yaxis.SpikesidesValidator() - self._validators["spikethickness"] = v_yaxis.SpikethicknessValidator() - self._validators["tick0"] = v_yaxis.Tick0Validator() - self._validators["tickangle"] = v_yaxis.TickangleValidator() - self._validators["tickcolor"] = v_yaxis.TickcolorValidator() - self._validators["tickfont"] = v_yaxis.TickfontValidator() - self._validators["tickformat"] = v_yaxis.TickformatValidator() - self._validators["tickformatstops"] = v_yaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_yaxis.TickformatstopValidator() - self._validators["ticklen"] = v_yaxis.TicklenValidator() - self._validators["tickmode"] = v_yaxis.TickmodeValidator() - self._validators["tickprefix"] = v_yaxis.TickprefixValidator() - self._validators["ticks"] = v_yaxis.TicksValidator() - self._validators["ticksuffix"] = v_yaxis.TicksuffixValidator() - self._validators["ticktext"] = v_yaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_yaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_yaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_yaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_yaxis.TickwidthValidator() - self._validators["title"] = v_yaxis.TitleValidator() - self._validators["type"] = v_yaxis.TypeValidator() - self._validators["visible"] = v_yaxis.VisibleValidator() - self._validators["zeroline"] = v_yaxis.ZerolineValidator() - self._validators["zerolinecolor"] = v_yaxis.ZerolinecolorValidator() - self._validators["zerolinewidth"] = v_yaxis.ZerolinewidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("backgroundcolor", None) - self["backgroundcolor"] = backgroundcolor if backgroundcolor is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("mirror", None) - self["mirror"] = mirror if mirror is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showaxeslabels", None) - self["showaxeslabels"] = showaxeslabels if showaxeslabels is not None else _v - _v = arg.pop("showbackground", None) - self["showbackground"] = showbackground if showbackground is not None else _v - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showspikes", None) - self["showspikes"] = showspikes if showspikes is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("spikecolor", None) - self["spikecolor"] = spikecolor if spikecolor is not None else _v - _v = arg.pop("spikesides", None) - self["spikesides"] = spikesides if spikesides is not None else _v - _v = arg.pop("spikethickness", None) - self["spikethickness"] = spikethickness if spikethickness is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("zeroline", None) - self["zeroline"] = zeroline if zeroline is not None else _v - _v = arg.pop("zerolinecolor", None) - self["zerolinecolor"] = zerolinecolor if zerolinecolor is not None else _v - _v = arg.pop("zerolinewidth", None) - self["zerolinewidth"] = zerolinewidth if zerolinewidth is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class XAxis(_BaseLayoutHierarchyType): - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range of this axis is computed in - relation to the input data. See `rangemode` for more info. If - `range` is provided, then `autorange` is set to False. - - The 'autorange' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # backgroundcolor - # --------------- - @property - def backgroundcolor(self): - """ - Sets the background color of this axis' wall. - - The 'backgroundcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["backgroundcolor"] - - @backgroundcolor.setter - def backgroundcolor(self, val): - self["backgroundcolor"] = val - - # calendar - # -------- - @property - def calendar(self): - """ - Sets the calendar system to use for `range` and `tick0` if this - is a date axis. This does not set the calendar for interpreting - data on this axis, that's specified in the trace or via the - global `layout.calendar` - - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["calendar"] - - @calendar.setter - def calendar(self, val): - self["calendar"] = val - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories on this axis appear. Only - has an effect if `categoryorder` is set to "array". Used with - `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the case of categorical - variables. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. Set `categoryorder` to *total ascending* or - *total descending* if order should be determined by the - numerical order of the values. Similarly, the order can be - determined by the min, max, sum, mean or median of all the - values. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array', 'total ascending', 'total descending', 'min - ascending', 'min descending', 'max ascending', 'max - descending', 'sum ascending', 'sum descending', 'mean - ascending', 'mean descending', 'median ascending', 'median - descending'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # mirror - # ------ - @property - def mirror(self): - """ - Determines if the axis lines or/and ticks are mirrored to the - opposite side of the plotting area. If True, the axis lines are - mirrored. If "ticks", the axis lines and ticks are mirrored. If - False, mirroring is disable. If "all", axis lines are mirrored - on all shared-axes subplots. If "allticks", axis lines and - ticks are mirrored on all shared-axes subplots. - - The 'mirror' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'ticks', False, 'all', 'allticks'] - - Returns - ------- - Any - """ - return self["mirror"] - - @mirror.setter - def mirror(self, val): - self["mirror"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis. If the axis `type` is "log", then - you must take the log of your desired range (e.g. to set the - range from 1 to 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, like date data, - though Date objects and unix milliseconds will be accepted and - converted to strings. If the axis `type` is "category", it - should be numbers, using the scale where each category is - assigned a serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", the range is - non-negative, regardless of the input data. Applies only to - linear axes. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['normal', 'tozero', 'nonnegative'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showaxeslabels - # -------------- - @property - def showaxeslabels(self): - """ - Sets whether or not this axis is labeled - - The 'showaxeslabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showaxeslabels"] - - @showaxeslabels.setter - def showaxeslabels(self, val): - self["showaxeslabels"] = val - - # showbackground - # -------------- - @property - def showbackground(self): - """ - Sets whether or not this axis' wall has a background color. - - The 'showbackground' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showbackground"] - - @showbackground.setter - def showbackground(self, val): - self["showbackground"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showspikes - # ---------- - @property - def showspikes(self): - """ - Sets whether or not spikes starting from data points to this - axis' wall are shown on hover. - - The 'showspikes' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showspikes"] - - @showspikes.setter - def showspikes(self, val): - self["showspikes"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # spikecolor - # ---------- - @property - def spikecolor(self): - """ - Sets the color of the spikes. - - The 'spikecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["spikecolor"] - - @spikecolor.setter - def spikecolor(self, val): - self["spikecolor"] = val - - # spikesides - # ---------- - @property - def spikesides(self): - """ - Sets whether or not spikes extending from the projection data - points to this axis' wall boundaries are shown on hover. - - The 'spikesides' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["spikesides"] - - @spikesides.setter - def spikesides(self, val): - self["spikesides"] = val - - # spikethickness - # -------------- - @property - def spikethickness(self): - """ - Sets the thickness (in px) of the spikes. - - The 'spikethickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["spikethickness"] - - @spikethickness.setter - def spikethickness(self, val): - self["spikethickness"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.xaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.scene.xaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.scene.xaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.scene.xaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.scene.xaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.scene.xaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.scene.xaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.scene.xaxis.title.font instead. - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type. By default, plotly attempts to determined - the axis type by looking into the data of the traces that - referenced the axis in question. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['-', 'linear', 'log', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # visible - # ------- - @property - def visible(self): - """ - A single toggle to hide the axis while preserving interaction - like dragging. Default is true when a cheater plot is present - on the axis, otherwise false - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # zeroline - # -------- - @property - def zeroline(self): - """ - Determines whether or not a line is drawn at along the 0 value - of this axis. If True, the zero line is drawn on top of the - grid lines. - - The 'zeroline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zeroline"] - - @zeroline.setter - def zeroline(self, val): - self["zeroline"] = val - - # zerolinecolor - # ------------- - @property - def zerolinecolor(self): - """ - Sets the line color of the zero line. - - The 'zerolinecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["zerolinecolor"] - - @zerolinecolor.setter - def zerolinecolor(self, val): - self["zerolinecolor"] = val - - # zerolinewidth - # ------------- - @property - def zerolinewidth(self): - """ - Sets the width (in px) of the zero line. - - The 'zerolinewidth' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zerolinewidth"] - - @zerolinewidth.setter - def zerolinewidth(self, val): - self["zerolinewidth"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a background - color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Sets whether or not spikes starting from data points to - this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall boundaries - are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.scene.xa - xis.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.layout.scen - e.xaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.scene.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.xaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.scene.xaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - autorange=None, - backgroundcolor=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - linecolor=None, - linewidth=None, - mirror=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showaxeslabels=None, - showbackground=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - spikecolor=None, - spikesides=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - type=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, - **kwargs - ): - """ - Construct a new XAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.XAxis` - autorange - Determines whether or not the range of this axis is - computed in relation to the input data. See `rangemode` - for more info. If `range` is provided, then `autorange` - is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and `tick0` - if this is a date axis. This does not set the calendar - for interpreting data on this axis, that's specified in - the trace or via the global `layout.calendar` - categoryarray - Sets the order in which categories on this axis appear. - Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses "trace", - which specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. Set `categoryorder` - to *total ascending* or *total descending* if order - should be determined by the numerical order of the - values. Similarly, the order can be determined by the - min, max, sum, mean or median of all the values. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are mirrored - to the opposite side of the plotting area. If True, the - axis lines are mirrored. If "ticks", the axis lines and - ticks are mirrored. If False, mirroring is disable. If - "all", axis lines are mirrored on all shared-axes - subplots. If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - range - Sets the range of this axis. If the axis `type` is - "log", then you must take the log of your desired range - (e.g. to set the range from 1 to 100, set the range - from 0 to 2). If the axis `type` is "date", it should - be date strings, like date data, though Date objects - and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order it - appears. - rangemode - If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range - extends to 0, regardless of the input data If - "nonnegative", the range is non-negative, regardless of - the input data. Applies only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a background - color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showspikes - Sets whether or not spikes starting from data points to - this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall boundaries - are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.scene.xa - xis.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.layout.scen - e.xaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.scene.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.xaxis.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.scene.xaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts to - determined the axis type by looking into the data of - the traces that referenced the axis in question. - visible - A single toggle to hide the axis while preserving - interaction like dragging. Default is true when a - cheater plot is present on the axis, otherwise false - zeroline - Determines whether or not a line is drawn at along the - 0 value of this axis. If True, the zero line is drawn - on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - - Returns - ------- - XAxis - """ - super(XAxis, self).__init__("xaxis") - - # Validate arg - # ------------ - 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.scene.XAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.XAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import xaxis as v_xaxis - - # Initialize validators - # --------------------- - self._validators["autorange"] = v_xaxis.AutorangeValidator() - self._validators["backgroundcolor"] = v_xaxis.BackgroundcolorValidator() - self._validators["calendar"] = v_xaxis.CalendarValidator() - self._validators["categoryarray"] = v_xaxis.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_xaxis.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_xaxis.CategoryorderValidator() - self._validators["color"] = v_xaxis.ColorValidator() - self._validators["dtick"] = v_xaxis.DtickValidator() - self._validators["exponentformat"] = v_xaxis.ExponentformatValidator() - self._validators["gridcolor"] = v_xaxis.GridcolorValidator() - self._validators["gridwidth"] = v_xaxis.GridwidthValidator() - self._validators["hoverformat"] = v_xaxis.HoverformatValidator() - self._validators["linecolor"] = v_xaxis.LinecolorValidator() - self._validators["linewidth"] = v_xaxis.LinewidthValidator() - self._validators["mirror"] = v_xaxis.MirrorValidator() - self._validators["nticks"] = v_xaxis.NticksValidator() - self._validators["range"] = v_xaxis.RangeValidator() - self._validators["rangemode"] = v_xaxis.RangemodeValidator() - self._validators["separatethousands"] = v_xaxis.SeparatethousandsValidator() - self._validators["showaxeslabels"] = v_xaxis.ShowaxeslabelsValidator() - self._validators["showbackground"] = v_xaxis.ShowbackgroundValidator() - self._validators["showexponent"] = v_xaxis.ShowexponentValidator() - self._validators["showgrid"] = v_xaxis.ShowgridValidator() - self._validators["showline"] = v_xaxis.ShowlineValidator() - self._validators["showspikes"] = v_xaxis.ShowspikesValidator() - self._validators["showticklabels"] = v_xaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_xaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_xaxis.ShowticksuffixValidator() - self._validators["spikecolor"] = v_xaxis.SpikecolorValidator() - self._validators["spikesides"] = v_xaxis.SpikesidesValidator() - self._validators["spikethickness"] = v_xaxis.SpikethicknessValidator() - self._validators["tick0"] = v_xaxis.Tick0Validator() - self._validators["tickangle"] = v_xaxis.TickangleValidator() - self._validators["tickcolor"] = v_xaxis.TickcolorValidator() - self._validators["tickfont"] = v_xaxis.TickfontValidator() - self._validators["tickformat"] = v_xaxis.TickformatValidator() - self._validators["tickformatstops"] = v_xaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_xaxis.TickformatstopValidator() - self._validators["ticklen"] = v_xaxis.TicklenValidator() - self._validators["tickmode"] = v_xaxis.TickmodeValidator() - self._validators["tickprefix"] = v_xaxis.TickprefixValidator() - self._validators["ticks"] = v_xaxis.TicksValidator() - self._validators["ticksuffix"] = v_xaxis.TicksuffixValidator() - self._validators["ticktext"] = v_xaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_xaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_xaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_xaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_xaxis.TickwidthValidator() - self._validators["title"] = v_xaxis.TitleValidator() - self._validators["type"] = v_xaxis.TypeValidator() - self._validators["visible"] = v_xaxis.VisibleValidator() - self._validators["zeroline"] = v_xaxis.ZerolineValidator() - self._validators["zerolinecolor"] = v_xaxis.ZerolinecolorValidator() - self._validators["zerolinewidth"] = v_xaxis.ZerolinewidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("backgroundcolor", None) - self["backgroundcolor"] = backgroundcolor if backgroundcolor is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("mirror", None) - self["mirror"] = mirror if mirror is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showaxeslabels", None) - self["showaxeslabels"] = showaxeslabels if showaxeslabels is not None else _v - _v = arg.pop("showbackground", None) - self["showbackground"] = showbackground if showbackground is not None else _v - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showspikes", None) - self["showspikes"] = showspikes if showspikes is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("spikecolor", None) - self["spikecolor"] = spikecolor if spikecolor is not None else _v - _v = arg.pop("spikesides", None) - self["spikesides"] = spikesides if spikesides is not None else _v - _v = arg.pop("spikethickness", None) - self["spikethickness"] = spikethickness if spikethickness is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("zeroline", None) - self["zeroline"] = zeroline if zeroline is not None else _v - _v = arg.pop("zerolinecolor", None) - self["zerolinecolor"] = zerolinecolor if zerolinecolor is not None else _v - _v = arg.pop("zerolinewidth", None) - self["zerolinewidth"] = zerolinewidth if zerolinewidth is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Domain(_BaseLayoutHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this scene subplot . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this scene subplot . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this scene subplot (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this scene subplot (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this scene subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this scene subplot . - x - Sets the horizontal domain of this scene subplot (in - plot fraction). - y - Sets the vertical domain of this scene subplot (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this scene subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this scene subplot . - x - Sets the horizontal domain of this scene subplot (in - plot fraction). - y - Sets the vertical domain of this scene subplot (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.scene.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Camera(_BaseLayoutHierarchyType): - - # center - # ------ - @property - def center(self): - """ - Sets the (x,y,z) components of the 'center' camera vector This - vector determines the translation (x,y,z) space about the - center of this scene. By default, there is no such translation. - - The 'center' property is an instance of Center - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.camera.Center` - - A dict of string/value properties that will be passed - to the Center constructor - - Supported dict properties: - - x - - y - - z - - Returns - ------- - plotly.graph_objs.layout.scene.camera.Center - """ - return self["center"] - - @center.setter - def center(self, val): - self["center"] = val - - # eye - # --- - @property - def eye(self): - """ - Sets the (x,y,z) components of the 'eye' camera vector. This - vector determines the view point about the origin of this - scene. - - The 'eye' property is an instance of Eye - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.camera.Eye` - - A dict of string/value properties that will be passed - to the Eye constructor - - Supported dict properties: - - x - - y - - z - - Returns - ------- - plotly.graph_objs.layout.scene.camera.Eye - """ - return self["eye"] - - @eye.setter - def eye(self, val): - self["eye"] = val - - # projection - # ---------- - @property - def projection(self): - """ - The 'projection' property is an instance of Projection - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.camera.Projection` - - A dict of string/value properties that will be passed - to the Projection constructor - - Supported dict properties: - - type - Sets the projection type. The projection type - could be either "perspective" or - "orthographic". The default is "perspective". - - Returns - ------- - plotly.graph_objs.layout.scene.camera.Projection - """ - return self["projection"] - - @projection.setter - def projection(self, val): - self["projection"] = val - - # up - # -- - @property - def up(self): - """ - Sets the (x,y,z) components of the 'up' camera vector. This - vector determines the up direction of this scene with respect - to the page. The default is *{x: 0, y: 0, z: 1}* which means - that the z axis points up. - - The 'up' property is an instance of Up - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.camera.Up` - - A dict of string/value properties that will be passed - to the Up constructor - - Supported dict properties: - - x - - y - - z - - Returns - ------- - plotly.graph_objs.layout.scene.camera.Up - """ - return self["up"] - - @up.setter - def up(self, val): - self["up"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - center - Sets the (x,y,z) components of the 'center' camera - vector This vector determines the translation (x,y,z) - space about the center of this scene. By default, there - is no such translation. - eye - Sets the (x,y,z) components of the 'eye' camera vector. - This vector determines the view point about the origin - of this scene. - projection - :class:`plotly.graph_objects.layout.scene.camera.Projec - tion` instance or dict with compatible properties - up - Sets the (x,y,z) components of the 'up' camera vector. - This vector determines the up direction of this scene - with respect to the page. The default is *{x: 0, y: 0, - z: 1}* which means that the z axis points up. - """ - - def __init__( - self, arg=None, center=None, eye=None, projection=None, up=None, **kwargs - ): - """ - Construct a new Camera object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.Camera` - center - Sets the (x,y,z) components of the 'center' camera - vector This vector determines the translation (x,y,z) - space about the center of this scene. By default, there - is no such translation. - eye - Sets the (x,y,z) components of the 'eye' camera vector. - This vector determines the view point about the origin - of this scene. - projection - :class:`plotly.graph_objects.layout.scene.camera.Projec - tion` instance or dict with compatible properties - up - Sets the (x,y,z) components of the 'up' camera vector. - This vector determines the up direction of this scene - with respect to the page. The default is *{x: 0, y: 0, - z: 1}* which means that the z axis points up. - - Returns - ------- - Camera - """ - super(Camera, self).__init__("camera") - - # Validate arg - # ------------ - 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.scene.Camera -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.Camera`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import camera as v_camera - - # Initialize validators - # --------------------- - self._validators["center"] = v_camera.CenterValidator() - self._validators["eye"] = v_camera.EyeValidator() - self._validators["projection"] = v_camera.ProjectionValidator() - self._validators["up"] = v_camera.UpValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("center", None) - self["center"] = center if center is not None else _v - _v = arg.pop("eye", None) - self["eye"] = eye if eye is not None else _v - _v = arg.pop("projection", None) - self["projection"] = projection if projection is not None else _v - _v = arg.pop("up", None) - self["up"] = up if up is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Aspectratio(_BaseLayoutHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - - y - - z - - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Aspectratio object - - Sets this scene's axis aspectratio. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.Aspectratio` - x - - y - - z - - - Returns - ------- - Aspectratio - """ - super(Aspectratio, self).__init__("aspectratio") - - # Validate arg - # ------------ - 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.scene.Aspectratio -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.Aspectratio`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import aspectratio as v_aspectratio - - # Initialize validators - # --------------------- - self._validators["x"] = v_aspectratio.XValidator() - self._validators["y"] = v_aspectratio.YValidator() - self._validators["z"] = v_aspectratio.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Annotation(_BaseLayoutHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the `text` within the box. Has - an effect only if `text` spans two or more lines (i.e. `text` - contains one or more
HTML tags) or if an explicit width is - set to override the text width. - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # arrowcolor - # ---------- - @property - def arrowcolor(self): - """ - Sets the color of the annotation arrow. - - The 'arrowcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["arrowcolor"] - - @arrowcolor.setter - def arrowcolor(self, val): - self["arrowcolor"] = val - - # arrowhead - # --------- - @property - def arrowhead(self): - """ - Sets the end annotation arrow head style. - - The 'arrowhead' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 8] - - Returns - ------- - int - """ - return self["arrowhead"] - - @arrowhead.setter - def arrowhead(self, val): - self["arrowhead"] = val - - # arrowside - # --------- - @property - def arrowside(self): - """ - Sets the annotation arrow head position. - - The 'arrowside' property is a flaglist and may be specified - as a string containing: - - Any combination of ['end', 'start'] joined with '+' characters - (e.g. 'end+start') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["arrowside"] - - @arrowside.setter - def arrowside(self, val): - self["arrowside"] = val - - # arrowsize - # --------- - @property - def arrowsize(self): - """ - Sets the size of the end annotation arrow head, relative to - `arrowwidth`. A value of 1 (default) gives a head about 3x as - wide as the line. - - The 'arrowsize' property is a number and may be specified as: - - An int or float in the interval [0.3, inf] - - Returns - ------- - int|float - """ - return self["arrowsize"] - - @arrowsize.setter - def arrowsize(self, val): - self["arrowsize"] = val - - # arrowwidth - # ---------- - @property - def arrowwidth(self): - """ - Sets the width (in px) of annotation arrow line. - - The 'arrowwidth' property is a number and may be specified as: - - An int or float in the interval [0.1, inf] - - Returns - ------- - int|float - """ - return self["arrowwidth"] - - @arrowwidth.setter - def arrowwidth(self, val): - self["arrowwidth"] = val - - # ax - # -- - @property - def ax(self): - """ - Sets the x component of the arrow tail about the arrow head (in - pixels). - - The 'ax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["ax"] - - @ax.setter - def ax(self, val): - self["ax"] = val - - # ay - # -- - @property - def ay(self): - """ - Sets the y component of the arrow tail about the arrow head (in - pixels). - - The 'ay' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["ay"] - - @ay.setter - def ay(self, val): - self["ay"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the annotation. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the annotation `text`. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderpad - # --------- - @property - def borderpad(self): - """ - Sets the padding (in px) between the `text` and the enclosing - border. - - The 'borderpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderpad"] - - @borderpad.setter - def borderpad(self, val): - self["borderpad"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the annotation - `text`. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # captureevents - # ------------- - @property - def captureevents(self): - """ - Determines whether the annotation text box captures mouse move - and click events, or allows those events to pass through to - data points in the plot that may be behind the annotation. By - default `captureevents` is False unless `hovertext` is - provided. If you use the event `plotly_clickannotation` without - `hovertext` you must explicitly enable `captureevents`. - - The 'captureevents' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["captureevents"] - - @captureevents.setter - def captureevents(self, val): - self["captureevents"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the annotation text font. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.annotation.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.annotation.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # height - # ------ - @property - def height(self): - """ - Sets an explicit height for the text box. null (default) lets - the text set the box height. Taller text will be clipped. - - The 'height' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - Returns - ------- - int|float - """ - return self["height"] - - @height.setter - def height(self, val): - self["height"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.annotation.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. - - Returns - ------- - plotly.graph_objs.layout.scene.annotation.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets text to appear when hovering over this annotation. If - omitted or blank, no hover label will appear. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the annotation (text + arrow). - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # showarrow - # --------- - @property - def showarrow(self): - """ - Determines whether or not the annotation is drawn with an - arrow. If True, `text` is placed near the arrow's tail. If - False, `text` lines up with the `x` and `y` provided. - - The 'showarrow' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showarrow"] - - @showarrow.setter - def showarrow(self, val): - self["showarrow"] = val - - # standoff - # -------- - @property - def standoff(self): - """ - Sets a distance, in pixels, to move the end arrowhead away from - the position it is pointing at, for example to point at the - edge of a marker independent of zoom. Note that this shortens - the arrow from the `ax` / `ay` vector, in contrast to `xshift` - / `yshift` which moves everything by this amount. - - The 'standoff' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["standoff"] - - @standoff.setter - def standoff(self, val): - self["standoff"] = val - - # startarrowhead - # -------------- - @property - def startarrowhead(self): - """ - Sets the start annotation arrow head style. - - The 'startarrowhead' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 8] - - Returns - ------- - int - """ - return self["startarrowhead"] - - @startarrowhead.setter - def startarrowhead(self, val): - self["startarrowhead"] = val - - # startarrowsize - # -------------- - @property - def startarrowsize(self): - """ - Sets the size of the start annotation arrow head, relative to - `arrowwidth`. A value of 1 (default) gives a head about 3x as - wide as the line. - - The 'startarrowsize' property is a number and may be specified as: - - An int or float in the interval [0.3, inf] - - Returns - ------- - int|float - """ - return self["startarrowsize"] - - @startarrowsize.setter - def startarrowsize(self, val): - self["startarrowsize"] = val - - # startstandoff - # ------------- - @property - def startstandoff(self): - """ - Sets a distance, in pixels, to move the start arrowhead away - from the position it is pointing at, for example to point at - the edge of a marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, in contrast to - `xshift` / `yshift` which moves everything by this amount. - - The 'startstandoff' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["startstandoff"] - - @startstandoff.setter - def startstandoff(self, val): - self["startstandoff"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text associated with this annotation. Plotly uses a - subset of HTML tags to do things like newline (
), bold - (), italics (), hyperlinks (). - Tags , , are also supported. - - 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 - - # textangle - # --------- - @property - def textangle(self): - """ - Sets the angle at which the `text` is drawn with respect to the - horizontal. - - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["textangle"] - - @textangle.setter - def textangle(self, val): - self["textangle"] = val - - # valign - # ------ - @property - def valign(self): - """ - Sets the vertical alignment of the `text` within the box. Has - an effect only if an explicit height is set to override the - text height. - - The 'valign' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["valign"] - - @valign.setter - def valign(self, val): - self["valign"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this annotation is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets an explicit width for the text box. null (default) lets - the text set the box width. Wider text will be clipped. There - is no automatic wrapping; use
to start a new line. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # x - # - - @property - def x(self): - """ - Sets the annotation's x position. - - The 'x' property accepts values of any type - - Returns - ------- - Any - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the text box's horizontal position anchor This anchor - binds the `x` position to the "left", "center" or "right" of - the annotation. For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the right-most portion of - the annotation lines up with the right-most edge of the - plotting area. If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is an arrow, - whereas for paper-referenced with no arrow, the anchor picked - corresponds to the closest side. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xshift - # ------ - @property - def xshift(self): - """ - Shifts the position of the whole annotation and arrow to the - right (positive) or left (negative) by this many pixels. - - The 'xshift' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["xshift"] - - @xshift.setter - def xshift(self, val): - self["xshift"] = val - - # y - # - - @property - def y(self): - """ - Sets the annotation's y position. - - The 'y' property accepts values of any type - - Returns - ------- - Any - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the text box's vertical position anchor This anchor binds - the `y` position to the "top", "middle" or "bottom" of the - annotation. For example, if `y` is set to 1, `yref` to "paper" - and `yanchor` to "top" then the top-most portion of the - annotation lines up with the top-most edge of the plotting - area. If "auto", the anchor is equivalent to "middle" for data- - referenced annotations or if there is an arrow, whereas for - paper-referenced with no arrow, the anchor picked corresponds - to the closest side. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # yshift - # ------ - @property - def yshift(self): - """ - Shifts the position of the whole annotation and arrow up - (positive) or down (negative) by this many pixels. - - The 'yshift' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["yshift"] - - @yshift.setter - def yshift(self, val): - self["yshift"] = val - - # z - # - - @property - def z(self): - """ - Sets the annotation's z position. - - The 'z' property accepts values of any type - - Returns - ------- - Any - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - arrowwidth - Sets the width (in px) of annotation arrow line. - ax - Sets the x component of the arrow tail about the arrow - head (in pixels). - ay - Sets the y component of the arrow tail about the arrow - head (in pixels). - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the annotation - `text`. - borderpad - Sets the padding (in px) between the `text` and the - enclosing border. - borderwidth - Sets the width (in px) of the border enclosing the - annotation `text`. - captureevents - Determines whether the annotation text box captures - mouse move and click events, or allows those events to - pass through to data points in the plot that may be - behind the annotation. By default `captureevents` is - False unless `hovertext` is provided. If you use the - event `plotly_clickannotation` without `hovertext` you - must explicitly enable `captureevents`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. Taller text - will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.scene.annotation.Ho - verlabel` instance or dict with compatible properties - hovertext - Sets text to appear when hovering over this annotation. - If omitted or blank, no hover label will appear. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the annotation (text + arrow). - showarrow - Determines whether or not the annotation is drawn with - an arrow. If True, `text` is placed near the arrow's - tail. If False, `text` lines up with the `x` and `y` - provided. - standoff - Sets a distance, in pixels, to move the end arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - startstandoff - Sets a distance, in pixels, to move the start arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. Plotly - uses a subset of HTML tags to do things like newline - (
), bold (), italics (), hyperlinks - (). Tags , , - are also supported. - textangle - Sets the angle at which the `text` is drawn with - respect to the horizontal. - valign - Sets the vertical alignment of the `text` within the - box. Has an effect only if an explicit height is set to - override the text height. - visible - Determines whether or not this annotation is visible. - width - Sets an explicit width for the text box. null (default) - lets the text set the box width. Wider text will be - clipped. There is no automatic wrapping; use
to - start a new line. - x - Sets the annotation's x position. - xanchor - Sets the text box's horizontal position anchor This - anchor binds the `x` position to the "left", "center" - or "right" of the annotation. For example, if `x` is - set to 1, `xref` to "paper" and `xanchor` to "right" - then the right-most portion of the annotation lines up - with the right-most edge of the plotting area. If - "auto", the anchor is equivalent to "center" for data- - referenced annotations or if there is an arrow, whereas - for paper-referenced with no arrow, the anchor picked - corresponds to the closest side. - xshift - Shifts the position of the whole annotation and arrow - to the right (positive) or left (negative) by this many - pixels. - y - Sets the annotation's y position. - yanchor - Sets the text box's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the annotation. For example, if `y` is set - to 1, `yref` to "paper" and `yanchor` to "top" then the - top-most portion of the annotation lines up with the - top-most edge of the plotting area. If "auto", the - anchor is equivalent to "middle" for data-referenced - annotations or if there is an arrow, whereas for paper- - referenced with no arrow, the anchor picked corresponds - to the closest side. - yshift - Shifts the position of the whole annotation and arrow - up (positive) or down (negative) by this many pixels. - z - Sets the annotation's z position. - """ - - def __init__( - self, - arg=None, - align=None, - arrowcolor=None, - arrowhead=None, - arrowside=None, - arrowsize=None, - arrowwidth=None, - ax=None, - ay=None, - bgcolor=None, - bordercolor=None, - borderpad=None, - borderwidth=None, - captureevents=None, - font=None, - height=None, - hoverlabel=None, - hovertext=None, - name=None, - opacity=None, - showarrow=None, - standoff=None, - startarrowhead=None, - startarrowsize=None, - startstandoff=None, - templateitemname=None, - text=None, - textangle=None, - valign=None, - visible=None, - width=None, - x=None, - xanchor=None, - xshift=None, - y=None, - yanchor=None, - yshift=None, - z=None, - **kwargs - ): - """ - Construct a new Annotation object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.Annotation` - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - arrowwidth - Sets the width (in px) of annotation arrow line. - ax - Sets the x component of the arrow tail about the arrow - head (in pixels). - ay - Sets the y component of the arrow tail about the arrow - head (in pixels). - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the annotation - `text`. - borderpad - Sets the padding (in px) between the `text` and the - enclosing border. - borderwidth - Sets the width (in px) of the border enclosing the - annotation `text`. - captureevents - Determines whether the annotation text box captures - mouse move and click events, or allows those events to - pass through to data points in the plot that may be - behind the annotation. By default `captureevents` is - False unless `hovertext` is provided. If you use the - event `plotly_clickannotation` without `hovertext` you - must explicitly enable `captureevents`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. Taller text - will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.scene.annotation.Ho - verlabel` instance or dict with compatible properties - hovertext - Sets text to appear when hovering over this annotation. - If omitted or blank, no hover label will appear. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - opacity - Sets the opacity of the annotation (text + arrow). - showarrow - Determines whether or not the annotation is drawn with - an arrow. If True, `text` is placed near the arrow's - tail. If False, `text` lines up with the `x` and `y` - provided. - standoff - Sets a distance, in pixels, to move the end arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow head, - relative to `arrowwidth`. A value of 1 (default) gives - a head about 3x as wide as the line. - startstandoff - Sets a distance, in pixels, to move the start arrowhead - away from the position it is pointing at, for example - to point at the edge of a marker independent of zoom. - Note that this shortens the arrow from the `ax` / `ay` - vector, in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. Plotly - uses a subset of HTML tags to do things like newline - (
), bold (), italics (), hyperlinks - (). Tags , , - are also supported. - textangle - Sets the angle at which the `text` is drawn with - respect to the horizontal. - valign - Sets the vertical alignment of the `text` within the - box. Has an effect only if an explicit height is set to - override the text height. - visible - Determines whether or not this annotation is visible. - width - Sets an explicit width for the text box. null (default) - lets the text set the box width. Wider text will be - clipped. There is no automatic wrapping; use
to - start a new line. - x - Sets the annotation's x position. - xanchor - Sets the text box's horizontal position anchor This - anchor binds the `x` position to the "left", "center" - or "right" of the annotation. For example, if `x` is - set to 1, `xref` to "paper" and `xanchor` to "right" - then the right-most portion of the annotation lines up - with the right-most edge of the plotting area. If - "auto", the anchor is equivalent to "center" for data- - referenced annotations or if there is an arrow, whereas - for paper-referenced with no arrow, the anchor picked - corresponds to the closest side. - xshift - Shifts the position of the whole annotation and arrow - to the right (positive) or left (negative) by this many - pixels. - y - Sets the annotation's y position. - yanchor - Sets the text box's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the annotation. For example, if `y` is set - to 1, `yref` to "paper" and `yanchor` to "top" then the - top-most portion of the annotation lines up with the - top-most edge of the plotting area. If "auto", the - anchor is equivalent to "middle" for data-referenced - annotations or if there is an arrow, whereas for paper- - referenced with no arrow, the anchor picked corresponds - to the closest side. - yshift - Shifts the position of the whole annotation and arrow - up (positive) or down (negative) by this many pixels. - z - Sets the annotation's z position. - - Returns - ------- - Annotation - """ - super(Annotation, self).__init__("annotations") - - # Validate arg - # ------------ - 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.scene.Annotation -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.Annotation`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene import annotation as v_annotation - - # Initialize validators - # --------------------- - self._validators["align"] = v_annotation.AlignValidator() - self._validators["arrowcolor"] = v_annotation.ArrowcolorValidator() - self._validators["arrowhead"] = v_annotation.ArrowheadValidator() - self._validators["arrowside"] = v_annotation.ArrowsideValidator() - self._validators["arrowsize"] = v_annotation.ArrowsizeValidator() - self._validators["arrowwidth"] = v_annotation.ArrowwidthValidator() - self._validators["ax"] = v_annotation.AxValidator() - self._validators["ay"] = v_annotation.AyValidator() - self._validators["bgcolor"] = v_annotation.BgcolorValidator() - self._validators["bordercolor"] = v_annotation.BordercolorValidator() - self._validators["borderpad"] = v_annotation.BorderpadValidator() - self._validators["borderwidth"] = v_annotation.BorderwidthValidator() - self._validators["captureevents"] = v_annotation.CaptureeventsValidator() - self._validators["font"] = v_annotation.FontValidator() - self._validators["height"] = v_annotation.HeightValidator() - self._validators["hoverlabel"] = v_annotation.HoverlabelValidator() - self._validators["hovertext"] = v_annotation.HovertextValidator() - self._validators["name"] = v_annotation.NameValidator() - self._validators["opacity"] = v_annotation.OpacityValidator() - self._validators["showarrow"] = v_annotation.ShowarrowValidator() - self._validators["standoff"] = v_annotation.StandoffValidator() - self._validators["startarrowhead"] = v_annotation.StartarrowheadValidator() - self._validators["startarrowsize"] = v_annotation.StartarrowsizeValidator() - self._validators["startstandoff"] = v_annotation.StartstandoffValidator() - self._validators["templateitemname"] = v_annotation.TemplateitemnameValidator() - self._validators["text"] = v_annotation.TextValidator() - self._validators["textangle"] = v_annotation.TextangleValidator() - self._validators["valign"] = v_annotation.ValignValidator() - self._validators["visible"] = v_annotation.VisibleValidator() - self._validators["width"] = v_annotation.WidthValidator() - self._validators["x"] = v_annotation.XValidator() - self._validators["xanchor"] = v_annotation.XanchorValidator() - self._validators["xshift"] = v_annotation.XshiftValidator() - self._validators["y"] = v_annotation.YValidator() - self._validators["yanchor"] = v_annotation.YanchorValidator() - self._validators["yshift"] = v_annotation.YshiftValidator() - self._validators["z"] = v_annotation.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("arrowcolor", None) - self["arrowcolor"] = arrowcolor if arrowcolor is not None else _v - _v = arg.pop("arrowhead", None) - self["arrowhead"] = arrowhead if arrowhead is not None else _v - _v = arg.pop("arrowside", None) - self["arrowside"] = arrowside if arrowside is not None else _v - _v = arg.pop("arrowsize", None) - self["arrowsize"] = arrowsize if arrowsize is not None else _v - _v = arg.pop("arrowwidth", None) - self["arrowwidth"] = arrowwidth if arrowwidth is not None else _v - _v = arg.pop("ax", None) - self["ax"] = ax if ax is not None else _v - _v = arg.pop("ay", None) - self["ay"] = ay if ay is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderpad", None) - self["borderpad"] = borderpad if borderpad is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("captureevents", None) - self["captureevents"] = captureevents if captureevents is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("height", None) - self["height"] = height if height is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("showarrow", None) - self["showarrow"] = showarrow if showarrow is not None else _v - _v = arg.pop("standoff", None) - self["standoff"] = standoff if standoff is not None else _v - _v = arg.pop("startarrowhead", None) - self["startarrowhead"] = startarrowhead if startarrowhead is not None else _v - _v = arg.pop("startarrowsize", None) - self["startarrowsize"] = startarrowsize if startarrowsize is not None else _v - _v = arg.pop("startstandoff", None) - self["startstandoff"] = startstandoff if startstandoff is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("valign", None) - self["valign"] = valign if valign is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xshift", None) - self["xshift"] = xshift if xshift is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("yshift", None) - self["yshift"] = yshift if yshift is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Annotation", - "Annotation", - "Aspectratio", - "Camera", - "Domain", - "XAxis", - "YAxis", - "ZAxis", - "annotation", - "camera", - "xaxis", - "yaxis", - "zaxis", -] - -from plotly.graph_objs.layout.scene import zaxis -from plotly.graph_objs.layout.scene import yaxis -from plotly.graph_objs.layout.scene import xaxis -from plotly.graph_objs.layout.scene import camera -from plotly.graph_objs.layout.scene import annotation +import sys + +if sys.version_info < (3, 7): + from ._zaxis import ZAxis + from ._yaxis import YAxis + from ._xaxis import XAxis + from ._domain import Domain + from ._camera import Camera + from ._aspectratio import Aspectratio + from ._annotation import Annotation + from . import zaxis + from . import yaxis + from . import xaxis + from . import camera + from . import annotation +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".zaxis", ".yaxis", ".xaxis", ".camera", ".annotation"], + [ + "._zaxis.ZAxis", + "._yaxis.YAxis", + "._xaxis.XAxis", + "._domain.Domain", + "._camera.Camera", + "._aspectratio.Aspectratio", + "._annotation.Annotation", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py new file mode 100644 index 00000000000..41642756268 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py @@ -0,0 +1,1587 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Annotation(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.annotation" + _valid_props = { + "align", + "arrowcolor", + "arrowhead", + "arrowside", + "arrowsize", + "arrowwidth", + "ax", + "ay", + "bgcolor", + "bordercolor", + "borderpad", + "borderwidth", + "captureevents", + "font", + "height", + "hoverlabel", + "hovertext", + "name", + "opacity", + "showarrow", + "standoff", + "startarrowhead", + "startarrowsize", + "startstandoff", + "templateitemname", + "text", + "textangle", + "valign", + "visible", + "width", + "x", + "xanchor", + "xshift", + "y", + "yanchor", + "yshift", + "z", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the `text` within the box. Has + an effect only if `text` spans two or more lines (i.e. `text` + contains one or more
HTML tags) or if an explicit width is + set to override the text width. + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # arrowcolor + # ---------- + @property + def arrowcolor(self): + """ + Sets the color of the annotation arrow. + + The 'arrowcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["arrowcolor"] + + @arrowcolor.setter + def arrowcolor(self, val): + self["arrowcolor"] = val + + # arrowhead + # --------- + @property + def arrowhead(self): + """ + Sets the end annotation arrow head style. + + The 'arrowhead' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 8] + + Returns + ------- + int + """ + return self["arrowhead"] + + @arrowhead.setter + def arrowhead(self, val): + self["arrowhead"] = val + + # arrowside + # --------- + @property + def arrowside(self): + """ + Sets the annotation arrow head position. + + The 'arrowside' property is a flaglist and may be specified + as a string containing: + - Any combination of ['end', 'start'] joined with '+' characters + (e.g. 'end+start') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["arrowside"] + + @arrowside.setter + def arrowside(self, val): + self["arrowside"] = val + + # arrowsize + # --------- + @property + def arrowsize(self): + """ + Sets the size of the end annotation arrow head, relative to + `arrowwidth`. A value of 1 (default) gives a head about 3x as + wide as the line. + + The 'arrowsize' property is a number and may be specified as: + - An int or float in the interval [0.3, inf] + + Returns + ------- + int|float + """ + return self["arrowsize"] + + @arrowsize.setter + def arrowsize(self, val): + self["arrowsize"] = val + + # arrowwidth + # ---------- + @property + def arrowwidth(self): + """ + Sets the width (in px) of annotation arrow line. + + The 'arrowwidth' property is a number and may be specified as: + - An int or float in the interval [0.1, inf] + + Returns + ------- + int|float + """ + return self["arrowwidth"] + + @arrowwidth.setter + def arrowwidth(self, val): + self["arrowwidth"] = val + + # ax + # -- + @property + def ax(self): + """ + Sets the x component of the arrow tail about the arrow head (in + pixels). + + The 'ax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["ax"] + + @ax.setter + def ax(self, val): + self["ax"] = val + + # ay + # -- + @property + def ay(self): + """ + Sets the y component of the arrow tail about the arrow head (in + pixels). + + The 'ay' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["ay"] + + @ay.setter + def ay(self, val): + self["ay"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the annotation. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the annotation `text`. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderpad + # --------- + @property + def borderpad(self): + """ + Sets the padding (in px) between the `text` and the enclosing + border. + + The 'borderpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderpad"] + + @borderpad.setter + def borderpad(self, val): + self["borderpad"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the annotation + `text`. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # captureevents + # ------------- + @property + def captureevents(self): + """ + Determines whether the annotation text box captures mouse move + and click events, or allows those events to pass through to + data points in the plot that may be behind the annotation. By + default `captureevents` is False unless `hovertext` is + provided. If you use the event `plotly_clickannotation` without + `hovertext` you must explicitly enable `captureevents`. + + The 'captureevents' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["captureevents"] + + @captureevents.setter + def captureevents(self, val): + self["captureevents"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the annotation text font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.annotation.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.annotation.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # height + # ------ + @property + def height(self): + """ + Sets an explicit height for the text box. null (default) lets + the text set the box height. Taller text will be clipped. + + The 'height' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["height"] + + @height.setter + def height(self, val): + self["height"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.annotation.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + bgcolor + Sets the background color of the hover label. + By default uses the annotation's `bgcolor` made + opaque, or white if it was transparent. + bordercolor + Sets the border color of the hover label. By + default uses either dark grey or white, for + maximum contrast with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses + the global hover font and size, with color from + `hoverlabel.bordercolor`. + + Returns + ------- + plotly.graph_objs.layout.scene.annotation.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets text to appear when hovering over this annotation. If + omitted or blank, no hover label will appear. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the annotation (text + arrow). + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # showarrow + # --------- + @property + def showarrow(self): + """ + Determines whether or not the annotation is drawn with an + arrow. If True, `text` is placed near the arrow's tail. If + False, `text` lines up with the `x` and `y` provided. + + The 'showarrow' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + # standoff + # -------- + @property + def standoff(self): + """ + Sets a distance, in pixels, to move the end arrowhead away from + the position it is pointing at, for example to point at the + edge of a marker independent of zoom. Note that this shortens + the arrow from the `ax` / `ay` vector, in contrast to `xshift` + / `yshift` which moves everything by this amount. + + The 'standoff' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["standoff"] + + @standoff.setter + def standoff(self, val): + self["standoff"] = val + + # startarrowhead + # -------------- + @property + def startarrowhead(self): + """ + Sets the start annotation arrow head style. + + The 'startarrowhead' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 8] + + Returns + ------- + int + """ + return self["startarrowhead"] + + @startarrowhead.setter + def startarrowhead(self, val): + self["startarrowhead"] = val + + # startarrowsize + # -------------- + @property + def startarrowsize(self): + """ + Sets the size of the start annotation arrow head, relative to + `arrowwidth`. A value of 1 (default) gives a head about 3x as + wide as the line. + + The 'startarrowsize' property is a number and may be specified as: + - An int or float in the interval [0.3, inf] + + Returns + ------- + int|float + """ + return self["startarrowsize"] + + @startarrowsize.setter + def startarrowsize(self, val): + self["startarrowsize"] = val + + # startstandoff + # ------------- + @property + def startstandoff(self): + """ + Sets a distance, in pixels, to move the start arrowhead away + from the position it is pointing at, for example to point at + the edge of a marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, in contrast to + `xshift` / `yshift` which moves everything by this amount. + + The 'startstandoff' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["startstandoff"] + + @startstandoff.setter + def startstandoff(self, val): + self["startstandoff"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text associated with this annotation. Plotly uses a + subset of HTML tags to do things like newline (
), bold + (), italics (), hyperlinks (). + Tags , , are also supported. + + 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 + + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle at which the `text` is drawn with respect to the + horizontal. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # valign + # ------ + @property + def valign(self): + """ + Sets the vertical alignment of the `text` within the box. Has + an effect only if an explicit height is set to override the + text height. + + The 'valign' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["valign"] + + @valign.setter + def valign(self, val): + self["valign"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this annotation is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets an explicit width for the text box. null (default) lets + the text set the box width. Wider text will be clipped. There + is no automatic wrapping; use
to start a new line. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # x + # - + @property + def x(self): + """ + Sets the annotation's x position. + + The 'x' property accepts values of any type + + Returns + ------- + Any + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the text box's horizontal position anchor This anchor + binds the `x` position to the "left", "center" or "right" of + the annotation. For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the right-most portion of + the annotation lines up with the right-most edge of the + plotting area. If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is an arrow, + whereas for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xshift + # ------ + @property + def xshift(self): + """ + Shifts the position of the whole annotation and arrow to the + right (positive) or left (negative) by this many pixels. + + The 'xshift' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["xshift"] + + @xshift.setter + def xshift(self, val): + self["xshift"] = val + + # y + # - + @property + def y(self): + """ + Sets the annotation's y position. + + The 'y' property accepts values of any type + + Returns + ------- + Any + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the text box's vertical position anchor This anchor binds + the `y` position to the "top", "middle" or "bottom" of the + annotation. For example, if `y` is set to 1, `yref` to "paper" + and `yanchor` to "top" then the top-most portion of the + annotation lines up with the top-most edge of the plotting + area. If "auto", the anchor is equivalent to "middle" for data- + referenced annotations or if there is an arrow, whereas for + paper-referenced with no arrow, the anchor picked corresponds + to the closest side. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # yshift + # ------ + @property + def yshift(self): + """ + Shifts the position of the whole annotation and arrow up + (positive) or down (negative) by this many pixels. + + The 'yshift' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["yshift"] + + @yshift.setter + def yshift(self, val): + self["yshift"] = val + + # z + # - + @property + def z(self): + """ + Sets the annotation's z position. + + The 'z' property accepts values of any type + + Returns + ------- + Any + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head (in pixels). + ay + Sets the y component of the arrow tail about the arrow + head (in pixels). + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.scene.annotation.Ho + verlabel` instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (
), bold (), italics (), hyperlinks + (). Tags , , + are also supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + z + Sets the annotation's z position. + """ + + def __init__( + self, + arg=None, + align=None, + arrowcolor=None, + arrowhead=None, + arrowside=None, + arrowsize=None, + arrowwidth=None, + ax=None, + ay=None, + bgcolor=None, + bordercolor=None, + borderpad=None, + borderwidth=None, + captureevents=None, + font=None, + height=None, + hoverlabel=None, + hovertext=None, + name=None, + opacity=None, + showarrow=None, + standoff=None, + startarrowhead=None, + startarrowsize=None, + startstandoff=None, + templateitemname=None, + text=None, + textangle=None, + valign=None, + visible=None, + width=None, + x=None, + xanchor=None, + xshift=None, + y=None, + yanchor=None, + yshift=None, + z=None, + **kwargs + ): + """ + Construct a new Annotation object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.Annotation` + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head (in pixels). + ay + Sets the y component of the arrow tail about the arrow + head (in pixels). + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.scene.annotation.Ho + verlabel` instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (
), bold (), italics (), hyperlinks + (). Tags , , + are also supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + z + Sets the annotation's z position. + + Returns + ------- + Annotation + """ + super(Annotation, self).__init__("annotations") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.Annotation +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.Annotation`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("arrowcolor", None) + _v = arrowcolor if arrowcolor is not None else _v + if _v is not None: + self["arrowcolor"] = _v + _v = arg.pop("arrowhead", None) + _v = arrowhead if arrowhead is not None else _v + if _v is not None: + self["arrowhead"] = _v + _v = arg.pop("arrowside", None) + _v = arrowside if arrowside is not None else _v + if _v is not None: + self["arrowside"] = _v + _v = arg.pop("arrowsize", None) + _v = arrowsize if arrowsize is not None else _v + if _v is not None: + self["arrowsize"] = _v + _v = arg.pop("arrowwidth", None) + _v = arrowwidth if arrowwidth is not None else _v + if _v is not None: + self["arrowwidth"] = _v + _v = arg.pop("ax", None) + _v = ax if ax is not None else _v + if _v is not None: + self["ax"] = _v + _v = arg.pop("ay", None) + _v = ay if ay is not None else _v + if _v is not None: + self["ay"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderpad", None) + _v = borderpad if borderpad is not None else _v + if _v is not None: + self["borderpad"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("captureevents", None) + _v = captureevents if captureevents is not None else _v + if _v is not None: + self["captureevents"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("height", None) + _v = height if height is not None else _v + if _v is not None: + self["height"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertext", None) + _v = hovertext if hovertext is not None else _v + if _v is not None: + self["hovertext"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("showarrow", None) + _v = showarrow if showarrow is not None else _v + if _v is not None: + self["showarrow"] = _v + _v = arg.pop("standoff", None) + _v = standoff if standoff is not None else _v + if _v is not None: + self["standoff"] = _v + _v = arg.pop("startarrowhead", None) + _v = startarrowhead if startarrowhead is not None else _v + if _v is not None: + self["startarrowhead"] = _v + _v = arg.pop("startarrowsize", None) + _v = startarrowsize if startarrowsize is not None else _v + if _v is not None: + self["startarrowsize"] = _v + _v = arg.pop("startstandoff", None) + _v = startstandoff if startstandoff is not None else _v + if _v is not None: + self["startstandoff"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + _v = arg.pop("textangle", None) + _v = textangle if textangle is not None else _v + if _v is not None: + self["textangle"] = _v + _v = arg.pop("valign", None) + _v = valign if valign is not None else _v + if _v is not None: + self["valign"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xshift", None) + _v = xshift if xshift is not None else _v + if _v is not None: + self["xshift"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("yshift", None) + _v = yshift if yshift is not None else _v + if _v is not None: + self["yshift"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_aspectratio.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_aspectratio.py new file mode 100644 index 00000000000..a99ca0632e9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_aspectratio.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Aspectratio(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.aspectratio" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + + y + + z + + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Aspectratio object + + Sets this scene's axis aspectratio. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.Aspectratio` + x + + y + + z + + + Returns + ------- + Aspectratio + """ + super(Aspectratio, self).__init__("aspectratio") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.Aspectratio +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.Aspectratio`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_camera.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_camera.py new file mode 100644 index 00000000000..0f73e8aae28 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_camera.py @@ -0,0 +1,250 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Camera(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.camera" + _valid_props = {"center", "eye", "projection", "up"} + + # center + # ------ + @property + def center(self): + """ + Sets the (x,y,z) components of the 'center' camera vector This + vector determines the translation (x,y,z) space about the + center of this scene. By default, there is no such translation. + + The 'center' property is an instance of Center + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.camera.Center` + - A dict of string/value properties that will be passed + to the Center constructor + + Supported dict properties: + + x + + y + + z + + Returns + ------- + plotly.graph_objs.layout.scene.camera.Center + """ + return self["center"] + + @center.setter + def center(self, val): + self["center"] = val + + # eye + # --- + @property + def eye(self): + """ + Sets the (x,y,z) components of the 'eye' camera vector. This + vector determines the view point about the origin of this + scene. + + The 'eye' property is an instance of Eye + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.camera.Eye` + - A dict of string/value properties that will be passed + to the Eye constructor + + Supported dict properties: + + x + + y + + z + + Returns + ------- + plotly.graph_objs.layout.scene.camera.Eye + """ + return self["eye"] + + @eye.setter + def eye(self, val): + self["eye"] = val + + # projection + # ---------- + @property + def projection(self): + """ + The 'projection' property is an instance of Projection + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.camera.Projection` + - A dict of string/value properties that will be passed + to the Projection constructor + + Supported dict properties: + + type + Sets the projection type. The projection type + could be either "perspective" or + "orthographic". The default is "perspective". + + Returns + ------- + plotly.graph_objs.layout.scene.camera.Projection + """ + return self["projection"] + + @projection.setter + def projection(self, val): + self["projection"] = val + + # up + # -- + @property + def up(self): + """ + Sets the (x,y,z) components of the 'up' camera vector. This + vector determines the up direction of this scene with respect + to the page. The default is *{x: 0, y: 0, z: 1}* which means + that the z axis points up. + + The 'up' property is an instance of Up + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.camera.Up` + - A dict of string/value properties that will be passed + to the Up constructor + + Supported dict properties: + + x + + y + + z + + Returns + ------- + plotly.graph_objs.layout.scene.camera.Up + """ + return self["up"] + + @up.setter + def up(self, val): + self["up"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + center + Sets the (x,y,z) components of the 'center' camera + vector This vector determines the translation (x,y,z) + space about the center of this scene. By default, there + is no such translation. + eye + Sets the (x,y,z) components of the 'eye' camera vector. + This vector determines the view point about the origin + of this scene. + projection + :class:`plotly.graph_objects.layout.scene.camera.Projec + tion` instance or dict with compatible properties + up + Sets the (x,y,z) components of the 'up' camera vector. + This vector determines the up direction of this scene + with respect to the page. The default is *{x: 0, y: 0, + z: 1}* which means that the z axis points up. + """ + + def __init__( + self, arg=None, center=None, eye=None, projection=None, up=None, **kwargs + ): + """ + Construct a new Camera object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.Camera` + center + Sets the (x,y,z) components of the 'center' camera + vector This vector determines the translation (x,y,z) + space about the center of this scene. By default, there + is no such translation. + eye + Sets the (x,y,z) components of the 'eye' camera vector. + This vector determines the view point about the origin + of this scene. + projection + :class:`plotly.graph_objects.layout.scene.camera.Projec + tion` instance or dict with compatible properties + up + Sets the (x,y,z) components of the 'up' camera vector. + This vector determines the up direction of this scene + with respect to the page. The default is *{x: 0, y: 0, + z: 1}* which means that the z axis points up. + + Returns + ------- + Camera + """ + super(Camera, self).__init__("camera") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.Camera +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.Camera`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("center", None) + _v = center if center is not None else _v + if _v is not None: + self["center"] = _v + _v = arg.pop("eye", None) + _v = eye if eye is not None else _v + if _v is not None: + self["eye"] = _v + _v = arg.pop("projection", None) + _v = projection if projection is not None else _v + if _v is not None: + self["projection"] = _v + _v = arg.pop("up", None) + _v = up if up is not None else _v + if _v is not None: + self["up"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_domain.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_domain.py new file mode 100644 index 00000000000..c7ed0392f96 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Domain(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this scene subplot . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this scene subplot . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this scene subplot (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this scene subplot (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this scene subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this scene subplot . + x + Sets the horizontal domain of this scene subplot (in + plot fraction). + y + Sets the vertical domain of this scene subplot (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this scene subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this scene subplot . + x + Sets the horizontal domain of this scene subplot (in + plot fraction). + y + Sets the vertical domain of this scene subplot (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py new file mode 100644 index 00000000000..3d4b277950a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py @@ -0,0 +1,2558 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class XAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.xaxis" + _valid_props = { + "autorange", + "backgroundcolor", + "calendar", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "linecolor", + "linewidth", + "mirror", + "nticks", + "range", + "rangemode", + "separatethousands", + "showaxeslabels", + "showbackground", + "showexponent", + "showgrid", + "showline", + "showspikes", + "showticklabels", + "showtickprefix", + "showticksuffix", + "spikecolor", + "spikesides", + "spikethickness", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "type", + "visible", + "zeroline", + "zerolinecolor", + "zerolinewidth", + } + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # backgroundcolor + # --------------- + @property + def backgroundcolor(self): + """ + Sets the background color of this axis' wall. + + The 'backgroundcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["backgroundcolor"] + + @backgroundcolor.setter + def backgroundcolor(self, val): + self["backgroundcolor"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the calendar system to use for `range` and `tick0` if this + is a date axis. This does not set the calendar for interpreting + data on this axis, that's specified in the trace or via the + global `layout.calendar` + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # mirror + # ------ + @property + def mirror(self): + """ + Determines if the axis lines or/and ticks are mirrored to the + opposite side of the plotting area. If True, the axis lines are + mirrored. If "ticks", the axis lines and ticks are mirrored. If + False, mirroring is disable. If "all", axis lines are mirrored + on all shared-axes subplots. If "allticks", axis lines and + ticks are mirrored on all shared-axes subplots. + + The 'mirror' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'ticks', False, 'all', 'allticks'] + + Returns + ------- + Any + """ + return self["mirror"] + + @mirror.setter + def mirror(self, val): + self["mirror"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. Applies only to + linear axes. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showaxeslabels + # -------------- + @property + def showaxeslabels(self): + """ + Sets whether or not this axis is labeled + + The 'showaxeslabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showaxeslabels"] + + @showaxeslabels.setter + def showaxeslabels(self, val): + self["showaxeslabels"] = val + + # showbackground + # -------------- + @property + def showbackground(self): + """ + Sets whether or not this axis' wall has a background color. + + The 'showbackground' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showbackground"] + + @showbackground.setter + def showbackground(self, val): + self["showbackground"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showspikes + # ---------- + @property + def showspikes(self): + """ + Sets whether or not spikes starting from data points to this + axis' wall are shown on hover. + + The 'showspikes' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showspikes"] + + @showspikes.setter + def showspikes(self, val): + self["showspikes"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # spikecolor + # ---------- + @property + def spikecolor(self): + """ + Sets the color of the spikes. + + The 'spikecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["spikecolor"] + + @spikecolor.setter + def spikecolor(self, val): + self["spikecolor"] = val + + # spikesides + # ---------- + @property + def spikesides(self): + """ + Sets whether or not spikes extending from the projection data + points to this axis' wall boundaries are shown on hover. + + The 'spikesides' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["spikesides"] + + @spikesides.setter + def spikesides(self, val): + self["spikesides"] = val + + # spikethickness + # -------------- + @property + def spikethickness(self): + """ + Sets the thickness (in px) of the spikes. + + The 'spikethickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["spikethickness"] + + @spikethickness.setter + def spikethickness(self, val): + self["spikethickness"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.xaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.scene.xaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.scene.xaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.scene.xaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.scene.xaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.scene.xaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.scene.xaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.scene.xaxis.title.font instead. + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'log', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # zeroline + # -------- + @property + def zeroline(self): + """ + Determines whether or not a line is drawn at along the 0 value + of this axis. If True, the zero line is drawn on top of the + grid lines. + + The 'zeroline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zeroline"] + + @zeroline.setter + def zeroline(self, val): + self["zeroline"] = val + + # zerolinecolor + # ------------- + @property + def zerolinecolor(self): + """ + Sets the line color of the zero line. + + The 'zerolinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["zerolinecolor"] + + @zerolinecolor.setter + def zerolinecolor(self, val): + self["zerolinecolor"] = val + + # zerolinewidth + # ------------- + @property + def zerolinewidth(self): + """ + Sets the width (in px) of the zero line. + + The 'zerolinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zerolinewidth"] + + @zerolinewidth.setter + def zerolinewidth(self, val): + self["zerolinewidth"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a background + color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Sets whether or not spikes starting from data points to + this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall boundaries + are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.scene.xa + xis.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.layout.scen + e.xaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.scene.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.xaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.scene.xaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + autorange=None, + backgroundcolor=None, + calendar=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + linecolor=None, + linewidth=None, + mirror=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showaxeslabels=None, + showbackground=None, + showexponent=None, + showgrid=None, + showline=None, + showspikes=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + spikecolor=None, + spikesides=None, + spikethickness=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + type=None, + visible=None, + zeroline=None, + zerolinecolor=None, + zerolinewidth=None, + **kwargs + ): + """ + Construct a new XAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.XAxis` + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a background + color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Sets whether or not spikes starting from data points to + this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall boundaries + are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.scene.xa + xis.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.layout.scen + e.xaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.scene.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.xaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.scene.xaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + XAxis + """ + super(XAxis, self).__init__("xaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.XAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.XAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("backgroundcolor", None) + _v = backgroundcolor if backgroundcolor is not None else _v + if _v is not None: + self["backgroundcolor"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("mirror", None) + _v = mirror if mirror is not None else _v + if _v is not None: + self["mirror"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showaxeslabels", None) + _v = showaxeslabels if showaxeslabels is not None else _v + if _v is not None: + self["showaxeslabels"] = _v + _v = arg.pop("showbackground", None) + _v = showbackground if showbackground is not None else _v + if _v is not None: + self["showbackground"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showspikes", None) + _v = showspikes if showspikes is not None else _v + if _v is not None: + self["showspikes"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("spikecolor", None) + _v = spikecolor if spikecolor is not None else _v + if _v is not None: + self["spikecolor"] = _v + _v = arg.pop("spikesides", None) + _v = spikesides if spikesides is not None else _v + if _v is not None: + self["spikesides"] = _v + _v = arg.pop("spikethickness", None) + _v = spikethickness if spikethickness is not None else _v + if _v is not None: + self["spikethickness"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("zeroline", None) + _v = zeroline if zeroline is not None else _v + if _v is not None: + self["zeroline"] = _v + _v = arg.pop("zerolinecolor", None) + _v = zerolinecolor if zerolinecolor is not None else _v + if _v is not None: + self["zerolinecolor"] = _v + _v = arg.pop("zerolinewidth", None) + _v = zerolinewidth if zerolinewidth is not None else _v + if _v is not None: + self["zerolinewidth"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py new file mode 100644 index 00000000000..1b065c50a97 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py @@ -0,0 +1,2558 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class YAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.yaxis" + _valid_props = { + "autorange", + "backgroundcolor", + "calendar", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "linecolor", + "linewidth", + "mirror", + "nticks", + "range", + "rangemode", + "separatethousands", + "showaxeslabels", + "showbackground", + "showexponent", + "showgrid", + "showline", + "showspikes", + "showticklabels", + "showtickprefix", + "showticksuffix", + "spikecolor", + "spikesides", + "spikethickness", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "type", + "visible", + "zeroline", + "zerolinecolor", + "zerolinewidth", + } + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # backgroundcolor + # --------------- + @property + def backgroundcolor(self): + """ + Sets the background color of this axis' wall. + + The 'backgroundcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["backgroundcolor"] + + @backgroundcolor.setter + def backgroundcolor(self, val): + self["backgroundcolor"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the calendar system to use for `range` and `tick0` if this + is a date axis. This does not set the calendar for interpreting + data on this axis, that's specified in the trace or via the + global `layout.calendar` + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # mirror + # ------ + @property + def mirror(self): + """ + Determines if the axis lines or/and ticks are mirrored to the + opposite side of the plotting area. If True, the axis lines are + mirrored. If "ticks", the axis lines and ticks are mirrored. If + False, mirroring is disable. If "all", axis lines are mirrored + on all shared-axes subplots. If "allticks", axis lines and + ticks are mirrored on all shared-axes subplots. + + The 'mirror' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'ticks', False, 'all', 'allticks'] + + Returns + ------- + Any + """ + return self["mirror"] + + @mirror.setter + def mirror(self, val): + self["mirror"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. Applies only to + linear axes. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showaxeslabels + # -------------- + @property + def showaxeslabels(self): + """ + Sets whether or not this axis is labeled + + The 'showaxeslabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showaxeslabels"] + + @showaxeslabels.setter + def showaxeslabels(self, val): + self["showaxeslabels"] = val + + # showbackground + # -------------- + @property + def showbackground(self): + """ + Sets whether or not this axis' wall has a background color. + + The 'showbackground' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showbackground"] + + @showbackground.setter + def showbackground(self, val): + self["showbackground"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showspikes + # ---------- + @property + def showspikes(self): + """ + Sets whether or not spikes starting from data points to this + axis' wall are shown on hover. + + The 'showspikes' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showspikes"] + + @showspikes.setter + def showspikes(self, val): + self["showspikes"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # spikecolor + # ---------- + @property + def spikecolor(self): + """ + Sets the color of the spikes. + + The 'spikecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["spikecolor"] + + @spikecolor.setter + def spikecolor(self, val): + self["spikecolor"] = val + + # spikesides + # ---------- + @property + def spikesides(self): + """ + Sets whether or not spikes extending from the projection data + points to this axis' wall boundaries are shown on hover. + + The 'spikesides' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["spikesides"] + + @spikesides.setter + def spikesides(self, val): + self["spikesides"] = val + + # spikethickness + # -------------- + @property + def spikethickness(self): + """ + Sets the thickness (in px) of the spikes. + + The 'spikethickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["spikethickness"] + + @spikethickness.setter + def spikethickness(self, val): + self["spikethickness"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.yaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.scene.yaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.scene.yaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.scene.yaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.scene.yaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.scene.yaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.scene.yaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.scene.yaxis.title.font instead. + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'log', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # zeroline + # -------- + @property + def zeroline(self): + """ + Determines whether or not a line is drawn at along the 0 value + of this axis. If True, the zero line is drawn on top of the + grid lines. + + The 'zeroline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zeroline"] + + @zeroline.setter + def zeroline(self, val): + self["zeroline"] = val + + # zerolinecolor + # ------------- + @property + def zerolinecolor(self): + """ + Sets the line color of the zero line. + + The 'zerolinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["zerolinecolor"] + + @zerolinecolor.setter + def zerolinecolor(self, val): + self["zerolinecolor"] = val + + # zerolinewidth + # ------------- + @property + def zerolinewidth(self): + """ + Sets the width (in px) of the zero line. + + The 'zerolinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zerolinewidth"] + + @zerolinewidth.setter + def zerolinewidth(self, val): + self["zerolinewidth"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a background + color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Sets whether or not spikes starting from data points to + this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall boundaries + are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.scene.ya + xis.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.layout.scen + e.yaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.scene.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.yaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.scene.yaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + autorange=None, + backgroundcolor=None, + calendar=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + linecolor=None, + linewidth=None, + mirror=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showaxeslabels=None, + showbackground=None, + showexponent=None, + showgrid=None, + showline=None, + showspikes=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + spikecolor=None, + spikesides=None, + spikethickness=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + type=None, + visible=None, + zeroline=None, + zerolinecolor=None, + zerolinewidth=None, + **kwargs + ): + """ + Construct a new YAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.YAxis` + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a background + color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Sets whether or not spikes starting from data points to + this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall boundaries + are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.scene.ya + xis.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.layout.scen + e.yaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.scene.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.yaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.scene.yaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + YAxis + """ + super(YAxis, self).__init__("yaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.YAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.YAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("backgroundcolor", None) + _v = backgroundcolor if backgroundcolor is not None else _v + if _v is not None: + self["backgroundcolor"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("mirror", None) + _v = mirror if mirror is not None else _v + if _v is not None: + self["mirror"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showaxeslabels", None) + _v = showaxeslabels if showaxeslabels is not None else _v + if _v is not None: + self["showaxeslabels"] = _v + _v = arg.pop("showbackground", None) + _v = showbackground if showbackground is not None else _v + if _v is not None: + self["showbackground"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showspikes", None) + _v = showspikes if showspikes is not None else _v + if _v is not None: + self["showspikes"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("spikecolor", None) + _v = spikecolor if spikecolor is not None else _v + if _v is not None: + self["spikecolor"] = _v + _v = arg.pop("spikesides", None) + _v = spikesides if spikesides is not None else _v + if _v is not None: + self["spikesides"] = _v + _v = arg.pop("spikethickness", None) + _v = spikethickness if spikethickness is not None else _v + if _v is not None: + self["spikethickness"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("zeroline", None) + _v = zeroline if zeroline is not None else _v + if _v is not None: + self["zeroline"] = _v + _v = arg.pop("zerolinecolor", None) + _v = zerolinecolor if zerolinecolor is not None else _v + if _v is not None: + self["zerolinecolor"] = _v + _v = arg.pop("zerolinewidth", None) + _v = zerolinewidth if zerolinewidth is not None else _v + if _v is not None: + self["zerolinewidth"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py new file mode 100644 index 00000000000..5732279016e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py @@ -0,0 +1,2558 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class ZAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene" + _path_str = "layout.scene.zaxis" + _valid_props = { + "autorange", + "backgroundcolor", + "calendar", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "linecolor", + "linewidth", + "mirror", + "nticks", + "range", + "rangemode", + "separatethousands", + "showaxeslabels", + "showbackground", + "showexponent", + "showgrid", + "showline", + "showspikes", + "showticklabels", + "showtickprefix", + "showticksuffix", + "spikecolor", + "spikesides", + "spikethickness", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "type", + "visible", + "zeroline", + "zerolinecolor", + "zerolinewidth", + } + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # backgroundcolor + # --------------- + @property + def backgroundcolor(self): + """ + Sets the background color of this axis' wall. + + The 'backgroundcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["backgroundcolor"] + + @backgroundcolor.setter + def backgroundcolor(self, val): + self["backgroundcolor"] = val + + # calendar + # -------- + @property + def calendar(self): + """ + Sets the calendar system to use for `range` and `tick0` if this + is a date axis. This does not set the calendar for interpreting + data on this axis, that's specified in the trace or via the + global `layout.calendar` + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. Set `categoryorder` to *total ascending* or + *total descending* if order should be determined by the + numerical order of the values. Similarly, the order can be + determined by the min, max, sum, mean or median of all the + values. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array', 'total ascending', 'total descending', 'min + ascending', 'min descending', 'max ascending', 'max + descending', 'sum ascending', 'sum descending', 'mean + ascending', 'mean descending', 'median ascending', 'median + descending'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # mirror + # ------ + @property + def mirror(self): + """ + Determines if the axis lines or/and ticks are mirrored to the + opposite side of the plotting area. If True, the axis lines are + mirrored. If "ticks", the axis lines and ticks are mirrored. If + False, mirroring is disable. If "all", axis lines are mirrored + on all shared-axes subplots. If "allticks", axis lines and + ticks are mirrored on all shared-axes subplots. + + The 'mirror' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'ticks', False, 'all', 'allticks'] + + Returns + ------- + Any + """ + return self["mirror"] + + @mirror.setter + def mirror(self, val): + self["mirror"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. Applies only to + linear axes. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showaxeslabels + # -------------- + @property + def showaxeslabels(self): + """ + Sets whether or not this axis is labeled + + The 'showaxeslabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showaxeslabels"] + + @showaxeslabels.setter + def showaxeslabels(self, val): + self["showaxeslabels"] = val + + # showbackground + # -------------- + @property + def showbackground(self): + """ + Sets whether or not this axis' wall has a background color. + + The 'showbackground' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showbackground"] + + @showbackground.setter + def showbackground(self, val): + self["showbackground"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showspikes + # ---------- + @property + def showspikes(self): + """ + Sets whether or not spikes starting from data points to this + axis' wall are shown on hover. + + The 'showspikes' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showspikes"] + + @showspikes.setter + def showspikes(self, val): + self["showspikes"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # spikecolor + # ---------- + @property + def spikecolor(self): + """ + Sets the color of the spikes. + + The 'spikecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["spikecolor"] + + @spikecolor.setter + def spikecolor(self, val): + self["spikecolor"] = val + + # spikesides + # ---------- + @property + def spikesides(self): + """ + Sets whether or not spikes extending from the projection data + points to this axis' wall boundaries are shown on hover. + + The 'spikesides' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["spikesides"] + + @spikesides.setter + def spikesides(self, val): + self["spikesides"] = val + + # spikethickness + # -------------- + @property + def spikethickness(self): + """ + Sets the thickness (in px) of the spikes. + + The 'spikethickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["spikethickness"] + + @spikethickness.setter + def spikethickness(self, val): + self["spikethickness"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.zaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.scene.zaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.scene.zaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.scene.zaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.scene.zaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.scene.zaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.scene.zaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.scene.zaxis.title.font instead. + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'log', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # visible + # ------- + @property + def visible(self): + """ + A single toggle to hide the axis while preserving interaction + like dragging. Default is true when a cheater plot is present + on the axis, otherwise false + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # zeroline + # -------- + @property + def zeroline(self): + """ + Determines whether or not a line is drawn at along the 0 value + of this axis. If True, the zero line is drawn on top of the + grid lines. + + The 'zeroline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zeroline"] + + @zeroline.setter + def zeroline(self, val): + self["zeroline"] = val + + # zerolinecolor + # ------------- + @property + def zerolinecolor(self): + """ + Sets the line color of the zero line. + + The 'zerolinecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["zerolinecolor"] + + @zerolinecolor.setter + def zerolinecolor(self, val): + self["zerolinecolor"] = val + + # zerolinewidth + # ------------- + @property + def zerolinewidth(self): + """ + Sets the width (in px) of the zero line. + + The 'zerolinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zerolinewidth"] + + @zerolinewidth.setter + def zerolinewidth(self, val): + self["zerolinewidth"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a background + color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Sets whether or not spikes starting from data points to + this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall boundaries + are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.scene.za + xis.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.layout.scen + e.zaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.scene.zaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.zaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.scene.zaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + autorange=None, + backgroundcolor=None, + calendar=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + linecolor=None, + linewidth=None, + mirror=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showaxeslabels=None, + showbackground=None, + showexponent=None, + showgrid=None, + showline=None, + showspikes=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + spikecolor=None, + spikesides=None, + spikethickness=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + type=None, + visible=None, + zeroline=None, + zerolinecolor=None, + zerolinewidth=None, + **kwargs + ): + """ + Construct a new ZAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.ZAxis` + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and `tick0` + if this is a date axis. This does not set the calendar + for interpreting data on this axis, that's specified in + the trace or via the global `layout.calendar` + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. Set `categoryorder` + to *total ascending* or *total descending* if order + should be determined by the numerical order of the + values. Similarly, the order can be determined by the + min, max, sum, mean or median of all the values. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are mirrored + to the opposite side of the plotting area. If True, the + axis lines are mirrored. If "ticks", the axis lines and + ticks are mirrored. If False, mirroring is disable. If + "all", axis lines are mirrored on all shared-axes + subplots. If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If *tozero*`, the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. Applies only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a background + color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showspikes + Sets whether or not spikes starting from data points to + this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall boundaries + are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.scene.za + xis.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.layout.scen + e.zaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.scene.zaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.zaxis.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.scene.zaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + visible + A single toggle to hide the axis while preserving + interaction like dragging. Default is true when a + cheater plot is present on the axis, otherwise false + zeroline + Determines whether or not a line is drawn at along the + 0 value of this axis. If True, the zero line is drawn + on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. + + Returns + ------- + ZAxis + """ + super(ZAxis, self).__init__("zaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.ZAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.ZAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("backgroundcolor", None) + _v = backgroundcolor if backgroundcolor is not None else _v + if _v is not None: + self["backgroundcolor"] = _v + _v = arg.pop("calendar", None) + _v = calendar if calendar is not None else _v + if _v is not None: + self["calendar"] = _v + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("mirror", None) + _v = mirror if mirror is not None else _v + if _v is not None: + self["mirror"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showaxeslabels", None) + _v = showaxeslabels if showaxeslabels is not None else _v + if _v is not None: + self["showaxeslabels"] = _v + _v = arg.pop("showbackground", None) + _v = showbackground if showbackground is not None else _v + if _v is not None: + self["showbackground"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showspikes", None) + _v = showspikes if showspikes is not None else _v + if _v is not None: + self["showspikes"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("spikecolor", None) + _v = spikecolor if spikecolor is not None else _v + if _v is not None: + self["spikecolor"] = _v + _v = arg.pop("spikesides", None) + _v = spikesides if spikesides is not None else _v + if _v is not None: + self["spikesides"] = _v + _v = arg.pop("spikethickness", None) + _v = spikethickness if spikethickness is not None else _v + if _v is not None: + self["spikethickness"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("zeroline", None) + _v = zeroline if zeroline is not None else _v + if _v is not None: + self["zeroline"] = _v + _v = arg.pop("zerolinecolor", None) + _v = zerolinecolor if zerolinecolor is not None else _v + if _v is not None: + self["zerolinecolor"] = _v + _v = arg.pop("zerolinewidth", None) + _v = zerolinewidth if zerolinewidth is not None else _v + if _v is not None: + self["zerolinewidth"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py index c101263b933..c0bc5e9b5fa 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py @@ -1,508 +1,12 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseLayoutHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover label. By default uses - the annotation's `bgcolor` made opaque, or white if it was - transparent. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover label. By default uses - either dark grey or white, for maximum contrast with - `hoverlabel.bgcolor`. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the hover label text font. By default uses the global - hover font and size, with color from `hoverlabel.bordercolor`. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.annotation.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.annotation" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the background color of the hover label. By - default uses the annotation's `bgcolor` made opaque, or - white if it was transparent. - bordercolor - Sets the border color of the hover label. By default - uses either dark grey or white, for maximum contrast - with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses the - global hover font and size, with color from - `hoverlabel.bordercolor`. - """ - - def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.a - nnotation.Hoverlabel` - bgcolor - Sets the background color of the hover label. By - default uses the annotation's `bgcolor` made opaque, or - white if it was transparent. - bordercolor - Sets the border color of the hover label. By default - uses either dark grey or white, for maximum contrast - with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses the - global hover font and size, with color from - `hoverlabel.bordercolor`. - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scene.annotation.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.annotation.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.annotation import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.annotation" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the annotation text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.annotation.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scene.annotation.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.annotation.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.annotation import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font", "Hoverlabel", "hoverlabel"] - -from plotly.graph_objs.layout.scene.annotation import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._hoverlabel import Hoverlabel + from ._font import Font + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._hoverlabel.Hoverlabel", "._font.Font"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/_font.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/_font.py new file mode 100644 index 00000000000..6331ecd5609 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.annotation" + _path_str = "layout.scene.annotation.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the annotation text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.annotation.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.annotation.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.annotation.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py new file mode 100644 index 00000000000..92f1c6a04a4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py @@ -0,0 +1,275 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.annotation" + _path_str = "layout.scene.annotation.hoverlabel" + _valid_props = {"bgcolor", "bordercolor", "font"} + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover label. By default uses + the annotation's `bgcolor` made opaque, or white if it was + transparent. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover label. By default uses + either dark grey or white, for maximum contrast with + `hoverlabel.bgcolor`. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the hover label text font. By default uses the global + hover font and size, with color from `hoverlabel.bordercolor`. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.annotation.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the background color of the hover label. By + default uses the annotation's `bgcolor` made opaque, or + white if it was transparent. + bordercolor + Sets the border color of the hover label. By default + uses either dark grey or white, for maximum contrast + with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses the + global hover font and size, with color from + `hoverlabel.bordercolor`. + """ + + def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.a + nnotation.Hoverlabel` + bgcolor + Sets the background color of the hover label. By + default uses the annotation's `bgcolor` made opaque, or + white if it was transparent. + bordercolor + Sets the border color of the hover label. By default + uses either dark grey or white, for maximum contrast + with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses the + global hover font and size, with color from + `hoverlabel.bordercolor`. + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.annotation.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.annotation.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py index 28e260ad7c6..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.annotation.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the hover label text font. By default uses the global - hover font and size, with color from `hoverlabel.bordercolor`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.a - nnotation.hoverlabel.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scene.annotation.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.annotation.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py new file mode 100644 index 00000000000..94f03b0544d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.annotation.hoverlabel" + _path_str = "layout.scene.annotation.hoverlabel.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the hover label text font. By default uses the global + hover font and size, with color from `hoverlabel.bordercolor`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.a + nnotation.hoverlabel.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.annotation.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py index 0c7ed39d465..d0c86a70653 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py @@ -1,572 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Up(_BaseLayoutHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.camera" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - - y - - z - - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Up object - - Sets the (x,y,z) components of the 'up' camera vector. This - vector determines the up direction of this scene with respect - to the page. The default is *{x: 0, y: 0, z: 1}* which means - that the z axis points up. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.camera.Up` - x - - y - - z - - - Returns - ------- - Up - """ - super(Up, self).__init__("up") - - # Validate arg - # ------------ - 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.scene.camera.Up -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.camera.Up`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.camera import up as v_up - - # Initialize validators - # --------------------- - self._validators["x"] = v_up.XValidator() - self._validators["y"] = v_up.YValidator() - self._validators["z"] = v_up.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Projection(_BaseLayoutHierarchyType): - - # type - # ---- - @property - def type(self): - """ - Sets the projection type. The projection type could be either - "perspective" or "orthographic". The default is "perspective". - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['perspective', 'orthographic'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.camera" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - type - Sets the projection type. The projection type could be - either "perspective" or "orthographic". The default is - "perspective". - """ - - def __init__(self, arg=None, type=None, **kwargs): - """ - Construct a new Projection object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.c - amera.Projection` - type - Sets the projection type. The projection type could be - either "perspective" or "orthographic". The default is - "perspective". - - Returns - ------- - Projection - """ - super(Projection, self).__init__("projection") - - # Validate arg - # ------------ - 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.scene.camera.Projection -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.camera.Projection`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.camera import projection as v_projection - - # Initialize validators - # --------------------- - self._validators["type"] = v_projection.TypeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Eye(_BaseLayoutHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.camera" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - - y - - z - - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Eye object - - Sets the (x,y,z) components of the 'eye' camera vector. This - vector determines the view point about the origin of this - scene. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.camera.Eye` - x - - y - - z - - - Returns - ------- - Eye - """ - super(Eye, self).__init__("eye") - - # Validate arg - # ------------ - 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.scene.camera.Eye -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.camera.Eye`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.camera import eye as v_eye - - # Initialize validators - # --------------------- - self._validators["x"] = v_eye.XValidator() - self._validators["y"] = v_eye.YValidator() - self._validators["z"] = v_eye.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Center(_BaseLayoutHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.camera" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - - y - - z - - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Center object - - Sets the (x,y,z) components of the 'center' camera vector This - vector determines the translation (x,y,z) space about the - center of this scene. By default, there is no such translation. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.camera.Center` - x - - y - - z - - - Returns - ------- - Center - """ - super(Center, self).__init__("center") - - # Validate arg - # ------------ - 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.scene.camera.Center -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.camera.Center`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.camera import center as v_center - - # Initialize validators - # --------------------- - self._validators["x"] = v_center.XValidator() - self._validators["y"] = v_center.YValidator() - self._validators["z"] = v_center.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Center", "Eye", "Projection", "Up"] +import sys + +if sys.version_info < (3, 7): + from ._up import Up + from ._projection import Projection + from ._eye import Eye + from ._center import Center +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._up.Up", "._projection.Projection", "._eye.Eye", "._center.Center"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_center.py b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_center.py new file mode 100644 index 00000000000..8df5bdbe40c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_center.py @@ -0,0 +1,152 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Center(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.camera" + _path_str = "layout.scene.camera.center" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + + y + + z + + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Center object + + Sets the (x,y,z) components of the 'center' camera vector This + vector determines the translation (x,y,z) space about the + center of this scene. By default, there is no such translation. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.camera.Center` + x + + y + + z + + + Returns + ------- + Center + """ + super(Center, self).__init__("center") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.camera.Center +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.camera.Center`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_eye.py b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_eye.py new file mode 100644 index 00000000000..6d635bc5233 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_eye.py @@ -0,0 +1,152 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Eye(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.camera" + _path_str = "layout.scene.camera.eye" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + + y + + z + + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Eye object + + Sets the (x,y,z) components of the 'eye' camera vector. This + vector determines the view point about the origin of this + scene. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.camera.Eye` + x + + y + + z + + + Returns + ------- + Eye + """ + super(Eye, self).__init__("eye") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.camera.Eye +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.camera.Eye`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_projection.py b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_projection.py new file mode 100644 index 00000000000..c2c821cd351 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_projection.py @@ -0,0 +1,104 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Projection(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.camera" + _path_str = "layout.scene.camera.projection" + _valid_props = {"type"} + + # type + # ---- + @property + def type(self): + """ + Sets the projection type. The projection type could be either + "perspective" or "orthographic". The default is "perspective". + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['perspective', 'orthographic'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + type + Sets the projection type. The projection type could be + either "perspective" or "orthographic". The default is + "perspective". + """ + + def __init__(self, arg=None, type=None, **kwargs): + """ + Construct a new Projection object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.c + amera.Projection` + type + Sets the projection type. The projection type could be + either "perspective" or "orthographic". The default is + "perspective". + + Returns + ------- + Projection + """ + super(Projection, self).__init__("projection") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.camera.Projection +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.camera.Projection`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_up.py b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_up.py new file mode 100644 index 00000000000..964755d0cc4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/_up.py @@ -0,0 +1,153 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Up(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.camera" + _path_str = "layout.scene.camera.up" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + + y + + z + + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Up object + + Sets the (x,y,z) components of the 'up' camera vector. This + vector determines the up direction of this scene with respect + to the page. The default is *{x: 0, y: 0, z: 1}* which means + that the z axis points up. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.camera.Up` + x + + y + + z + + + Returns + ------- + Up + """ + super(Up, self).__init__("up") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.camera.Up +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.camera.Up`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py index d00346737cf..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.xaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.xaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scene.xaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.xaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.x - axis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scene.xaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.xaxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scene.xaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.xaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.scene.xaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_tickfont.py new file mode 100644 index 00000000000..a0a8796f916 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.xaxis" + _path_str = "layout.scene.xaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.xaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py new file mode 100644 index 00000000000..c8bbe483a02 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.xaxis" + _path_str = "layout.scene.xaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.x + axis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.xaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_title.py new file mode 100644 index 00000000000..79efc843f31 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.xaxis" + _path_str = "layout.scene.xaxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.xaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.xaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.xaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py index 985132ceb68..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.xaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.x - axis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scene.xaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.xaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/_font.py new file mode 100644 index 00000000000..7e64b6c86fc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.xaxis.title" + _path_str = "layout.scene.xaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.x + axis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.xaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py index c7f2db3acf7..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.yaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.yaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scene.yaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.yaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.y - axis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scene.yaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.yaxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scene.yaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.yaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.scene.yaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_tickfont.py new file mode 100644 index 00000000000..c950bfd4ae8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.yaxis" + _path_str = "layout.scene.yaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.yaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py new file mode 100644 index 00000000000..a63b5a7132d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.yaxis" + _path_str = "layout.scene.yaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.y + axis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.yaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_title.py new file mode 100644 index 00000000000..c2d1983cb00 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.yaxis" + _path_str = "layout.scene.yaxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.yaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.yaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.yaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py index cdfd86560c5..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.yaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.y - axis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scene.yaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.yaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/_font.py new file mode 100644 index 00000000000..193f66c3281 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.yaxis.title" + _path_str = "layout.scene.yaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.y + axis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.yaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py index e0f55717011..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.scene.zaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.zaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.zaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scene.zaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.zaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.zaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.z - axis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scene.zaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.zaxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.zaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scene.zaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.zaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.scene.zaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_tickfont.py new file mode 100644 index 00000000000..e6c557c1c1c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.zaxis" + _path_str = "layout.scene.zaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.zaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py new file mode 100644 index 00000000000..79ad03af2a4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.zaxis" + _path_str = "layout.scene.zaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.z + axis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.zaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_title.py new file mode 100644 index 00000000000..74c3afc8220 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.zaxis" + _path_str = "layout.scene.zaxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.scene.zaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.scene.zaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.zaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py index d1522830d00..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.scene.zaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.scene.z - axis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scene.zaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.scene.zaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/_font.py new file mode 100644 index 00000000000..148e05257d7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.scene.zaxis.title" + _path_str = "layout.scene.zaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.scene.z + axis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scene.zaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py index 9506e7a649c..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py @@ -1,208 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseLayoutHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is a string and must be specified as: - - One of the following strings: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.shape" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=None, dash=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.shape.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.shape.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.shape.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.shape import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py b/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py new file mode 100644 index 00000000000..33550712b7f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Line(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.shape" + _path_str = "layout.shape.line" + _valid_props = {"color", "dash", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is a string and must be specified as: + - One of the following strings: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=None, dash=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.shape.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.shape.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.shape.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py index b2f1460f196..485c13c2d5f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py @@ -1,1253 +1,23 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Transition(_BaseLayoutHierarchyType): - - # duration - # -------- - @property - def duration(self): - """ - Sets the duration of the slider transition - - The 'duration' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["duration"] - - @duration.setter - def duration(self, val): - self["duration"] = val - - # easing - # ------ - @property - def easing(self): - """ - Sets the easing function of the slider transition - - The 'easing' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'quad', 'cubic', 'sin', 'exp', 'circle', - 'elastic', 'back', 'bounce', 'linear-in', 'quad-in', - 'cubic-in', 'sin-in', 'exp-in', 'circle-in', 'elastic-in', - 'back-in', 'bounce-in', 'linear-out', 'quad-out', - 'cubic-out', 'sin-out', 'exp-out', 'circle-out', - 'elastic-out', 'back-out', 'bounce-out', 'linear-in-out', - 'quad-in-out', 'cubic-in-out', 'sin-in-out', 'exp-in-out', - 'circle-in-out', 'elastic-in-out', 'back-in-out', - 'bounce-in-out'] - - Returns - ------- - Any - """ - return self["easing"] - - @easing.setter - def easing(self, val): - self["easing"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.slider" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - duration - Sets the duration of the slider transition - easing - Sets the easing function of the slider transition - """ - - def __init__(self, arg=None, duration=None, easing=None, **kwargs): - """ - Construct a new Transition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.slider.Transition` - duration - Sets the duration of the slider transition - easing - Sets the easing function of the slider transition - - Returns - ------- - Transition - """ - super(Transition, self).__init__("transition") - - # Validate arg - # ------------ - 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.slider.Transition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.slider.Transition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.slider import transition as v_transition - - # Initialize validators - # --------------------- - self._validators["duration"] = v_transition.DurationValidator() - self._validators["easing"] = v_transition.EasingValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("duration", None) - self["duration"] = duration if duration is not None else _v - _v = arg.pop("easing", None) - self["easing"] = easing if easing is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Step(_BaseLayoutHierarchyType): - - # args - # ---- - @property - def args(self): - """ - Sets the arguments values to be passed to the Plotly method set - in `method` on slide. - - The 'args' property is an info array that may be specified as: - - * a list or tuple of up to 3 elements where: - (0) The 'args[0]' property accepts values of any type - (1) The 'args[1]' property accepts values of any type - (2) The 'args[2]' property accepts values of any type - - Returns - ------- - list - """ - return self["args"] - - @args.setter - def args(self, val): - self["args"] = val - - # execute - # ------- - @property - def execute(self): - """ - When true, the API method is executed. When false, all other - behaviors are the same and command execution is skipped. This - may be useful when hooking into, for example, the - `plotly_sliderchange` method and executing the API command - manually without losing the benefit of the slider automatically - binding to the state of the plot through the specification of - `method` and `args`. - - The 'execute' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["execute"] - - @execute.setter - def execute(self, val): - self["execute"] = val - - # label - # ----- - @property - def label(self): - """ - Sets the text label to appear on the slider - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # method - # ------ - @property - def method(self): - """ - Sets the Plotly method to be called when the slider value is - changed. If the `skip` method is used, the API slider will - function as normal but will perform no API calls and will not - bind automatically to state updates. This may be used to create - a component interface and attach to slider events manually via - JavaScript. - - The 'method' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['restyle', 'relayout', 'animate', 'update', 'skip'] - - Returns - ------- - Any - """ - return self["method"] - - @method.setter - def method(self, val): - self["method"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of the slider step, used to refer to the step - programatically. Defaults to the slider label if not provided. - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this step is included in the slider. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.slider" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - args - Sets the arguments values to be passed to the Plotly - method set in `method` on slide. - execute - When true, the API method is executed. When false, all - other behaviors are the same and command execution is - skipped. This may be useful when hooking into, for - example, the `plotly_sliderchange` method and executing - the API command manually without losing the benefit of - the slider automatically binding to the state of the - plot through the specification of `method` and `args`. - label - Sets the text label to appear on the slider - method - Sets the Plotly method to be called when the slider - value is changed. If the `skip` method is used, the API - slider will function as normal but will perform no API - calls and will not bind automatically to state updates. - This may be used to create a component interface and - attach to slider events manually via JavaScript. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - Sets the value of the slider step, used to refer to the - step programatically. Defaults to the slider label if - not provided. - visible - Determines whether or not this step is included in the - slider. - """ - - def __init__( - self, - arg=None, - args=None, - execute=None, - label=None, - method=None, - name=None, - templateitemname=None, - value=None, - visible=None, - **kwargs - ): - """ - Construct a new Step object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.slider.Step` - args - Sets the arguments values to be passed to the Plotly - method set in `method` on slide. - execute - When true, the API method is executed. When false, all - other behaviors are the same and command execution is - skipped. This may be useful when hooking into, for - example, the `plotly_sliderchange` method and executing - the API command manually without losing the benefit of - the slider automatically binding to the state of the - plot through the specification of `method` and `args`. - label - Sets the text label to appear on the slider - method - Sets the Plotly method to be called when the slider - value is changed. If the `skip` method is used, the API - slider will function as normal but will perform no API - calls and will not bind automatically to state updates. - This may be used to create a component interface and - attach to slider events manually via JavaScript. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - Sets the value of the slider step, used to refer to the - step programatically. Defaults to the slider label if - not provided. - visible - Determines whether or not this step is included in the - slider. - - Returns - ------- - Step - """ - super(Step, self).__init__("steps") - - # Validate arg - # ------------ - 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.slider.Step -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.slider.Step`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.slider import step as v_step - - # Initialize validators - # --------------------- - self._validators["args"] = v_step.ArgsValidator() - self._validators["execute"] = v_step.ExecuteValidator() - self._validators["label"] = v_step.LabelValidator() - self._validators["method"] = v_step.MethodValidator() - self._validators["name"] = v_step.NameValidator() - self._validators["templateitemname"] = v_step.TemplateitemnameValidator() - self._validators["value"] = v_step.ValueValidator() - self._validators["visible"] = v_step.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("args", None) - self["args"] = args if args is not None else _v - _v = arg.pop("execute", None) - self["execute"] = execute if execute is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("method", None) - self["method"] = method if method is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Pad(_BaseLayoutHierarchyType): - - # b - # - - @property - def b(self): - """ - The amount of padding (in px) along the bottom of the - component. - - The 'b' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # l - # - - @property - def l(self): - """ - The amount of padding (in px) on the left side of the - component. - - The 'l' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["l"] - - @l.setter - def l(self, val): - self["l"] = val - - # r - # - - @property - def r(self): - """ - The amount of padding (in px) on the right side of the - component. - - The 'r' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # t - # - - @property - def t(self): - """ - The amount of padding (in px) along the top of the component. - - The 't' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.slider" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - b - The amount of padding (in px) along the bottom of the - component. - l - The amount of padding (in px) on the left side of the - component. - r - The amount of padding (in px) on the right side of the - component. - t - The amount of padding (in px) along the top of the - component. - """ - - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): - """ - Construct a new Pad object - - Set the padding of the slider component along each side. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.slider.Pad` - b - The amount of padding (in px) along the bottom of the - component. - l - The amount of padding (in px) on the left side of the - component. - r - The amount of padding (in px) on the right side of the - component. - t - The amount of padding (in px) along the top of the - component. - - Returns - ------- - Pad - """ - super(Pad, self).__init__("pad") - - # Validate arg - # ------------ - 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.slider.Pad -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.slider.Pad`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.slider import pad as v_pad - - # Initialize validators - # --------------------- - self._validators["b"] = v_pad.BValidator() - self._validators["l"] = v_pad.LValidator() - self._validators["r"] = v_pad.RValidator() - self._validators["t"] = v_pad.TValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("l", None) - self["l"] = l if l is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.slider" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the font of the slider step labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.slider.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.slider.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.slider.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.slider import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Currentvalue(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets the font of the current value label text. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.slider.currentvalue.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.slider.currentvalue.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # offset - # ------ - @property - def offset(self): - """ - The amount of space, in pixels, between the current value label - and the slider. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # prefix - # ------ - @property - def prefix(self): - """ - When currentvalue.visible is true, this sets the prefix of the - label. - - The 'prefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["prefix"] - - @prefix.setter - def prefix(self, val): - self["prefix"] = val - - # suffix - # ------ - @property - def suffix(self): - """ - When currentvalue.visible is true, this sets the suffix of the - label. - - The 'suffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["suffix"] - - @suffix.setter - def suffix(self, val): - self["suffix"] = val - - # visible - # ------- - @property - def visible(self): - """ - Shows the currently-selected value above the slider. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - The alignment of the value readout relative to the length of - the slider. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.slider" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets the font of the current value label text. - offset - The amount of space, in pixels, between the current - value label and the slider. - prefix - When currentvalue.visible is true, this sets the prefix - of the label. - suffix - When currentvalue.visible is true, this sets the suffix - of the label. - visible - Shows the currently-selected value above the slider. - xanchor - The alignment of the value readout relative to the - length of the slider. - """ - - def __init__( - self, - arg=None, - font=None, - offset=None, - prefix=None, - suffix=None, - visible=None, - xanchor=None, - **kwargs - ): - """ - Construct a new Currentvalue object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.slider.Currentvalue` - font - Sets the font of the current value label text. - offset - The amount of space, in pixels, between the current - value label and the slider. - prefix - When currentvalue.visible is true, this sets the prefix - of the label. - suffix - When currentvalue.visible is true, this sets the suffix - of the label. - visible - Shows the currently-selected value above the slider. - xanchor - The alignment of the value readout relative to the - length of the slider. - - Returns - ------- - Currentvalue - """ - super(Currentvalue, self).__init__("currentvalue") - - # Validate arg - # ------------ - 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.slider.Currentvalue -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.slider.Currentvalue`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.slider import currentvalue as v_currentvalue - - # Initialize validators - # --------------------- - self._validators["font"] = v_currentvalue.FontValidator() - self._validators["offset"] = v_currentvalue.OffsetValidator() - self._validators["prefix"] = v_currentvalue.PrefixValidator() - self._validators["suffix"] = v_currentvalue.SuffixValidator() - self._validators["visible"] = v_currentvalue.VisibleValidator() - self._validators["xanchor"] = v_currentvalue.XanchorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("prefix", None) - self["prefix"] = prefix if prefix is not None else _v - _v = arg.pop("suffix", None) - self["suffix"] = suffix if suffix is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Currentvalue", "Font", "Pad", "Step", "Step", "Transition", "currentvalue"] - -from plotly.graph_objs.layout.slider import currentvalue +import sys + +if sys.version_info < (3, 7): + from ._transition import Transition + from ._step import Step + from ._pad import Pad + from ._font import Font + from ._currentvalue import Currentvalue + from . import currentvalue +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".currentvalue"], + [ + "._transition.Transition", + "._step.Step", + "._pad.Pad", + "._font.Font", + "._currentvalue.Currentvalue", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/_currentvalue.py b/packages/python/plotly/plotly/graph_objs/layout/slider/_currentvalue.py new file mode 100644 index 00000000000..1a888ffb63a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/_currentvalue.py @@ -0,0 +1,289 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Currentvalue(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.slider" + _path_str = "layout.slider.currentvalue" + _valid_props = {"font", "offset", "prefix", "suffix", "visible", "xanchor"} + + # font + # ---- + @property + def font(self): + """ + Sets the font of the current value label text. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.slider.currentvalue.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.slider.currentvalue.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # offset + # ------ + @property + def offset(self): + """ + The amount of space, in pixels, between the current value label + and the slider. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # prefix + # ------ + @property + def prefix(self): + """ + When currentvalue.visible is true, this sets the prefix of the + label. + + The 'prefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["prefix"] + + @prefix.setter + def prefix(self, val): + self["prefix"] = val + + # suffix + # ------ + @property + def suffix(self): + """ + When currentvalue.visible is true, this sets the suffix of the + label. + + The 'suffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["suffix"] + + @suffix.setter + def suffix(self, val): + self["suffix"] = val + + # visible + # ------- + @property + def visible(self): + """ + Shows the currently-selected value above the slider. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + The alignment of the value readout relative to the length of + the slider. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets the font of the current value label text. + offset + The amount of space, in pixels, between the current + value label and the slider. + prefix + When currentvalue.visible is true, this sets the prefix + of the label. + suffix + When currentvalue.visible is true, this sets the suffix + of the label. + visible + Shows the currently-selected value above the slider. + xanchor + The alignment of the value readout relative to the + length of the slider. + """ + + def __init__( + self, + arg=None, + font=None, + offset=None, + prefix=None, + suffix=None, + visible=None, + xanchor=None, + **kwargs + ): + """ + Construct a new Currentvalue object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.slider.Currentvalue` + font + Sets the font of the current value label text. + offset + The amount of space, in pixels, between the current + value label and the slider. + prefix + When currentvalue.visible is true, this sets the prefix + of the label. + suffix + When currentvalue.visible is true, this sets the suffix + of the label. + visible + Shows the currently-selected value above the slider. + xanchor + The alignment of the value readout relative to the + length of the slider. + + Returns + ------- + Currentvalue + """ + super(Currentvalue, self).__init__("currentvalue") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.slider.Currentvalue +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.slider.Currentvalue`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("offset", None) + _v = offset if offset is not None else _v + if _v is not None: + self["offset"] = _v + _v = arg.pop("prefix", None) + _v = prefix if prefix is not None else _v + if _v is not None: + self["prefix"] = _v + _v = arg.pop("suffix", None) + _v = suffix if suffix is not None else _v + if _v is not None: + self["suffix"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/_font.py b/packages/python/plotly/plotly/graph_objs/layout/slider/_font.py new file mode 100644 index 00000000000..2c9f7c5ff4b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.slider" + _path_str = "layout.slider.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the font of the slider step labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.slider.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.slider.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.slider.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/_pad.py b/packages/python/plotly/plotly/graph_objs/layout/slider/_pad.py new file mode 100644 index 00000000000..1f40294cbe7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/_pad.py @@ -0,0 +1,195 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Pad(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.slider" + _path_str = "layout.slider.pad" + _valid_props = {"b", "l", "r", "t"} + + # b + # - + @property + def b(self): + """ + The amount of padding (in px) along the bottom of the + component. + + The 'b' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # l + # - + @property + def l(self): + """ + The amount of padding (in px) on the left side of the + component. + + The 'l' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["l"] + + @l.setter + def l(self, val): + self["l"] = val + + # r + # - + @property + def r(self): + """ + The amount of padding (in px) on the right side of the + component. + + The 'r' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # t + # - + @property + def t(self): + """ + The amount of padding (in px) along the top of the component. + + The 't' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + b + The amount of padding (in px) along the bottom of the + component. + l + The amount of padding (in px) on the left side of the + component. + r + The amount of padding (in px) on the right side of the + component. + t + The amount of padding (in px) along the top of the + component. + """ + + def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + """ + Construct a new Pad object + + Set the padding of the slider component along each side. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.slider.Pad` + b + The amount of padding (in px) along the bottom of the + component. + l + The amount of padding (in px) on the left side of the + component. + r + The amount of padding (in px) on the right side of the + component. + t + The amount of padding (in px) along the top of the + component. + + Returns + ------- + Pad + """ + super(Pad, self).__init__("pad") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.slider.Pad +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.slider.Pad`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("l", None) + _v = l if l is not None else _v + if _v is not None: + self["l"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/_step.py b/packages/python/plotly/plotly/graph_objs/layout/slider/_step.py new file mode 100644 index 00000000000..d63f7f7f54f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/_step.py @@ -0,0 +1,410 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Step(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.slider" + _path_str = "layout.slider.step" + _valid_props = { + "args", + "execute", + "label", + "method", + "name", + "templateitemname", + "value", + "visible", + } + + # args + # ---- + @property + def args(self): + """ + Sets the arguments values to be passed to the Plotly method set + in `method` on slide. + + The 'args' property is an info array that may be specified as: + + * a list or tuple of up to 3 elements where: + (0) The 'args[0]' property accepts values of any type + (1) The 'args[1]' property accepts values of any type + (2) The 'args[2]' property accepts values of any type + + Returns + ------- + list + """ + return self["args"] + + @args.setter + def args(self, val): + self["args"] = val + + # execute + # ------- + @property + def execute(self): + """ + When true, the API method is executed. When false, all other + behaviors are the same and command execution is skipped. This + may be useful when hooking into, for example, the + `plotly_sliderchange` method and executing the API command + manually without losing the benefit of the slider automatically + binding to the state of the plot through the specification of + `method` and `args`. + + The 'execute' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["execute"] + + @execute.setter + def execute(self, val): + self["execute"] = val + + # label + # ----- + @property + def label(self): + """ + Sets the text label to appear on the slider + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # method + # ------ + @property + def method(self): + """ + Sets the Plotly method to be called when the slider value is + changed. If the `skip` method is used, the API slider will + function as normal but will perform no API calls and will not + bind automatically to state updates. This may be used to create + a component interface and attach to slider events manually via + JavaScript. + + The 'method' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['restyle', 'relayout', 'animate', 'update', 'skip'] + + Returns + ------- + Any + """ + return self["method"] + + @method.setter + def method(self, val): + self["method"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of the slider step, used to refer to the step + programatically. Defaults to the slider label if not provided. + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this step is included in the slider. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + args + Sets the arguments values to be passed to the Plotly + method set in `method` on slide. + execute + When true, the API method is executed. When false, all + other behaviors are the same and command execution is + skipped. This may be useful when hooking into, for + example, the `plotly_sliderchange` method and executing + the API command manually without losing the benefit of + the slider automatically binding to the state of the + plot through the specification of `method` and `args`. + label + Sets the text label to appear on the slider + method + Sets the Plotly method to be called when the slider + value is changed. If the `skip` method is used, the API + slider will function as normal but will perform no API + calls and will not bind automatically to state updates. + This may be used to create a component interface and + attach to slider events manually via JavaScript. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + Sets the value of the slider step, used to refer to the + step programatically. Defaults to the slider label if + not provided. + visible + Determines whether or not this step is included in the + slider. + """ + + def __init__( + self, + arg=None, + args=None, + execute=None, + label=None, + method=None, + name=None, + templateitemname=None, + value=None, + visible=None, + **kwargs + ): + """ + Construct a new Step object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.slider.Step` + args + Sets the arguments values to be passed to the Plotly + method set in `method` on slide. + execute + When true, the API method is executed. When false, all + other behaviors are the same and command execution is + skipped. This may be useful when hooking into, for + example, the `plotly_sliderchange` method and executing + the API command manually without losing the benefit of + the slider automatically binding to the state of the + plot through the specification of `method` and `args`. + label + Sets the text label to appear on the slider + method + Sets the Plotly method to be called when the slider + value is changed. If the `skip` method is used, the API + slider will function as normal but will perform no API + calls and will not bind automatically to state updates. + This may be used to create a component interface and + attach to slider events manually via JavaScript. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + Sets the value of the slider step, used to refer to the + step programatically. Defaults to the slider label if + not provided. + visible + Determines whether or not this step is included in the + slider. + + Returns + ------- + Step + """ + super(Step, self).__init__("steps") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.slider.Step +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.slider.Step`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("args", None) + _v = args if args is not None else _v + if _v is not None: + self["args"] = _v + _v = arg.pop("execute", None) + _v = execute if execute is not None else _v + if _v is not None: + self["execute"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("method", None) + _v = method if method is not None else _v + if _v is not None: + self["method"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/_transition.py b/packages/python/plotly/plotly/graph_objs/layout/slider/_transition.py new file mode 100644 index 00000000000..a735e2c6aec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/_transition.py @@ -0,0 +1,135 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Transition(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.slider" + _path_str = "layout.slider.transition" + _valid_props = {"duration", "easing"} + + # duration + # -------- + @property + def duration(self): + """ + Sets the duration of the slider transition + + The 'duration' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["duration"] + + @duration.setter + def duration(self, val): + self["duration"] = val + + # easing + # ------ + @property + def easing(self): + """ + Sets the easing function of the slider transition + + The 'easing' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'quad', 'cubic', 'sin', 'exp', 'circle', + 'elastic', 'back', 'bounce', 'linear-in', 'quad-in', + 'cubic-in', 'sin-in', 'exp-in', 'circle-in', 'elastic-in', + 'back-in', 'bounce-in', 'linear-out', 'quad-out', + 'cubic-out', 'sin-out', 'exp-out', 'circle-out', + 'elastic-out', 'back-out', 'bounce-out', 'linear-in-out', + 'quad-in-out', 'cubic-in-out', 'sin-in-out', 'exp-in-out', + 'circle-in-out', 'elastic-in-out', 'back-in-out', + 'bounce-in-out'] + + Returns + ------- + Any + """ + return self["easing"] + + @easing.setter + def easing(self, val): + self["easing"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + duration + Sets the duration of the slider transition + easing + Sets the easing function of the slider transition + """ + + def __init__(self, arg=None, duration=None, easing=None, **kwargs): + """ + Construct a new Transition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.slider.Transition` + duration + Sets the duration of the slider transition + easing + Sets the easing function of the slider transition + + Returns + ------- + Transition + """ + super(Transition, self).__init__("transition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.slider.Transition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.slider.Transition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("duration", None) + _v = duration if duration is not None else _v + if _v is not None: + self["duration"] = _v + _v = arg.pop("easing", None) + _v = easing if easing is not None else _v + if _v is not None: + self["easing"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py index 285da460e04..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py @@ -1,229 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.slider.currentvalue" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the font of the current value label text. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.slider. - currentvalue.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.slider.currentvalue.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.slider.currentvalue.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.slider.currentvalue import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/_font.py b/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/_font.py new file mode 100644 index 00000000000..8478ad70344 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.slider.currentvalue" + _path_str = "layout.slider.currentvalue.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the font of the current value label text. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.slider. + currentvalue.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.slider.currentvalue.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.slider.currentvalue.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py index d79d09c5515..c5a5a83756d 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py @@ -1,1643 +1,12 @@ -from plotly.graph_objs import Layout - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Data(_BaseLayoutHierarchyType): - - # area - # ---- - @property - def area(self): - """ - The 'area' property is a tuple of instances of - Area that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Area - - A list or tuple of dicts of string/value properties that - will be passed to the Area constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Area] - """ - return self["area"] - - @area.setter - def area(self, val): - self["area"] = val - - # barpolar - # -------- - @property - def barpolar(self): - """ - The 'barpolar' property is a tuple of instances of - Barpolar that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Barpolar - - A list or tuple of dicts of string/value properties that - will be passed to the Barpolar constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Barpolar] - """ - return self["barpolar"] - - @barpolar.setter - def barpolar(self, val): - self["barpolar"] = val - - # bar - # --- - @property - def bar(self): - """ - The 'bar' property is a tuple of instances of - Bar that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Bar - - A list or tuple of dicts of string/value properties that - will be passed to the Bar constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Bar] - """ - return self["bar"] - - @bar.setter - def bar(self, val): - self["bar"] = val - - # box - # --- - @property - def box(self): - """ - The 'box' property is a tuple of instances of - Box that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Box - - A list or tuple of dicts of string/value properties that - will be passed to the Box constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Box] - """ - return self["box"] - - @box.setter - def box(self, val): - self["box"] = val - - # candlestick - # ----------- - @property - def candlestick(self): - """ - The 'candlestick' property is a tuple of instances of - Candlestick that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Candlestick - - A list or tuple of dicts of string/value properties that - will be passed to the Candlestick constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Candlestick] - """ - return self["candlestick"] - - @candlestick.setter - def candlestick(self, val): - self["candlestick"] = val - - # carpet - # ------ - @property - def carpet(self): - """ - The 'carpet' property is a tuple of instances of - Carpet that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Carpet - - A list or tuple of dicts of string/value properties that - will be passed to the Carpet constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Carpet] - """ - return self["carpet"] - - @carpet.setter - def carpet(self, val): - self["carpet"] = val - - # choroplethmapbox - # ---------------- - @property - def choroplethmapbox(self): - """ - The 'choroplethmapbox' property is a tuple of instances of - Choroplethmapbox that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Choroplethmapbox - - A list or tuple of dicts of string/value properties that - will be passed to the Choroplethmapbox constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Choroplethmapbox] - """ - return self["choroplethmapbox"] - - @choroplethmapbox.setter - def choroplethmapbox(self, val): - self["choroplethmapbox"] = val - - # choropleth - # ---------- - @property - def choropleth(self): - """ - The 'choropleth' property is a tuple of instances of - Choropleth that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Choropleth - - A list or tuple of dicts of string/value properties that - will be passed to the Choropleth constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Choropleth] - """ - return self["choropleth"] - - @choropleth.setter - def choropleth(self, val): - self["choropleth"] = val - - # cone - # ---- - @property - def cone(self): - """ - The 'cone' property is a tuple of instances of - Cone that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Cone - - A list or tuple of dicts of string/value properties that - will be passed to the Cone constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Cone] - """ - return self["cone"] - - @cone.setter - def cone(self, val): - self["cone"] = val - - # contourcarpet - # ------------- - @property - def contourcarpet(self): - """ - The 'contourcarpet' property is a tuple of instances of - Contourcarpet that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Contourcarpet - - A list or tuple of dicts of string/value properties that - will be passed to the Contourcarpet constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Contourcarpet] - """ - return self["contourcarpet"] - - @contourcarpet.setter - def contourcarpet(self, val): - self["contourcarpet"] = val - - # contour - # ------- - @property - def contour(self): - """ - The 'contour' property is a tuple of instances of - Contour that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Contour - - A list or tuple of dicts of string/value properties that - will be passed to the Contour constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Contour] - """ - return self["contour"] - - @contour.setter - def contour(self, val): - self["contour"] = val - - # densitymapbox - # ------------- - @property - def densitymapbox(self): - """ - The 'densitymapbox' property is a tuple of instances of - Densitymapbox that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Densitymapbox - - A list or tuple of dicts of string/value properties that - will be passed to the Densitymapbox constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Densitymapbox] - """ - return self["densitymapbox"] - - @densitymapbox.setter - def densitymapbox(self, val): - self["densitymapbox"] = val - - # funnelarea - # ---------- - @property - def funnelarea(self): - """ - The 'funnelarea' property is a tuple of instances of - Funnelarea that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Funnelarea - - A list or tuple of dicts of string/value properties that - will be passed to the Funnelarea constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Funnelarea] - """ - return self["funnelarea"] - - @funnelarea.setter - def funnelarea(self, val): - self["funnelarea"] = val - - # funnel - # ------ - @property - def funnel(self): - """ - The 'funnel' property is a tuple of instances of - Funnel that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Funnel - - A list or tuple of dicts of string/value properties that - will be passed to the Funnel constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Funnel] - """ - return self["funnel"] - - @funnel.setter - def funnel(self, val): - self["funnel"] = val - - # heatmapgl - # --------- - @property - def heatmapgl(self): - """ - The 'heatmapgl' property is a tuple of instances of - Heatmapgl that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Heatmapgl - - A list or tuple of dicts of string/value properties that - will be passed to the Heatmapgl constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Heatmapgl] - """ - return self["heatmapgl"] - - @heatmapgl.setter - def heatmapgl(self, val): - self["heatmapgl"] = val - - # heatmap - # ------- - @property - def heatmap(self): - """ - The 'heatmap' property is a tuple of instances of - Heatmap that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Heatmap - - A list or tuple of dicts of string/value properties that - will be passed to the Heatmap constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Heatmap] - """ - return self["heatmap"] - - @heatmap.setter - def heatmap(self, val): - self["heatmap"] = val - - # histogram2dcontour - # ------------------ - @property - def histogram2dcontour(self): - """ - The 'histogram2dcontour' property is a tuple of instances of - Histogram2dContour that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Histogram2dContour - - A list or tuple of dicts of string/value properties that - will be passed to the Histogram2dContour constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Histogram2dContour] - """ - return self["histogram2dcontour"] - - @histogram2dcontour.setter - def histogram2dcontour(self, val): - self["histogram2dcontour"] = val - - # histogram2d - # ----------- - @property - def histogram2d(self): - """ - The 'histogram2d' property is a tuple of instances of - Histogram2d that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Histogram2d - - A list or tuple of dicts of string/value properties that - will be passed to the Histogram2d constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Histogram2d] - """ - return self["histogram2d"] - - @histogram2d.setter - def histogram2d(self, val): - self["histogram2d"] = val - - # histogram - # --------- - @property - def histogram(self): - """ - The 'histogram' property is a tuple of instances of - Histogram that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Histogram - - A list or tuple of dicts of string/value properties that - will be passed to the Histogram constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Histogram] - """ - return self["histogram"] - - @histogram.setter - def histogram(self, val): - self["histogram"] = val - - # image - # ----- - @property - def image(self): - """ - The 'image' property is a tuple of instances of - Image that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Image - - A list or tuple of dicts of string/value properties that - will be passed to the Image constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Image] - """ - return self["image"] - - @image.setter - def image(self, val): - self["image"] = val - - # indicator - # --------- - @property - def indicator(self): - """ - The 'indicator' property is a tuple of instances of - Indicator that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Indicator - - A list or tuple of dicts of string/value properties that - will be passed to the Indicator constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Indicator] - """ - return self["indicator"] - - @indicator.setter - def indicator(self, val): - self["indicator"] = val - - # isosurface - # ---------- - @property - def isosurface(self): - """ - The 'isosurface' property is a tuple of instances of - Isosurface that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Isosurface - - A list or tuple of dicts of string/value properties that - will be passed to the Isosurface constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Isosurface] - """ - return self["isosurface"] - - @isosurface.setter - def isosurface(self, val): - self["isosurface"] = val - - # mesh3d - # ------ - @property - def mesh3d(self): - """ - The 'mesh3d' property is a tuple of instances of - Mesh3d that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Mesh3d - - A list or tuple of dicts of string/value properties that - will be passed to the Mesh3d constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Mesh3d] - """ - return self["mesh3d"] - - @mesh3d.setter - def mesh3d(self, val): - self["mesh3d"] = val - - # ohlc - # ---- - @property - def ohlc(self): - """ - The 'ohlc' property is a tuple of instances of - Ohlc that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Ohlc - - A list or tuple of dicts of string/value properties that - will be passed to the Ohlc constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Ohlc] - """ - return self["ohlc"] - - @ohlc.setter - def ohlc(self, val): - self["ohlc"] = val - - # parcats - # ------- - @property - def parcats(self): - """ - The 'parcats' property is a tuple of instances of - Parcats that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Parcats - - A list or tuple of dicts of string/value properties that - will be passed to the Parcats constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Parcats] - """ - return self["parcats"] - - @parcats.setter - def parcats(self, val): - self["parcats"] = val - - # parcoords - # --------- - @property - def parcoords(self): - """ - The 'parcoords' property is a tuple of instances of - Parcoords that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Parcoords - - A list or tuple of dicts of string/value properties that - will be passed to the Parcoords constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Parcoords] - """ - return self["parcoords"] - - @parcoords.setter - def parcoords(self, val): - self["parcoords"] = val - - # pie - # --- - @property - def pie(self): - """ - The 'pie' property is a tuple of instances of - Pie that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Pie - - A list or tuple of dicts of string/value properties that - will be passed to the Pie constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Pie] - """ - return self["pie"] - - @pie.setter - def pie(self, val): - self["pie"] = val - - # pointcloud - # ---------- - @property - def pointcloud(self): - """ - The 'pointcloud' property is a tuple of instances of - Pointcloud that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Pointcloud - - A list or tuple of dicts of string/value properties that - will be passed to the Pointcloud constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Pointcloud] - """ - return self["pointcloud"] - - @pointcloud.setter - def pointcloud(self, val): - self["pointcloud"] = val - - # sankey - # ------ - @property - def sankey(self): - """ - The 'sankey' property is a tuple of instances of - Sankey that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Sankey - - A list or tuple of dicts of string/value properties that - will be passed to the Sankey constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Sankey] - """ - return self["sankey"] - - @sankey.setter - def sankey(self, val): - self["sankey"] = val - - # scatter3d - # --------- - @property - def scatter3d(self): - """ - The 'scatter3d' property is a tuple of instances of - Scatter3d that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatter3d - - A list or tuple of dicts of string/value properties that - will be passed to the Scatter3d constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scatter3d] - """ - return self["scatter3d"] - - @scatter3d.setter - def scatter3d(self, val): - self["scatter3d"] = val - - # scattercarpet - # ------------- - @property - def scattercarpet(self): - """ - The 'scattercarpet' property is a tuple of instances of - Scattercarpet that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattercarpet - - A list or tuple of dicts of string/value properties that - will be passed to the Scattercarpet constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scattercarpet] - """ - return self["scattercarpet"] - - @scattercarpet.setter - def scattercarpet(self, val): - self["scattercarpet"] = val - - # scattergeo - # ---------- - @property - def scattergeo(self): - """ - The 'scattergeo' property is a tuple of instances of - Scattergeo that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattergeo - - A list or tuple of dicts of string/value properties that - will be passed to the Scattergeo constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scattergeo] - """ - return self["scattergeo"] - - @scattergeo.setter - def scattergeo(self, val): - self["scattergeo"] = val - - # scattergl - # --------- - @property - def scattergl(self): - """ - The 'scattergl' property is a tuple of instances of - Scattergl that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattergl - - A list or tuple of dicts of string/value properties that - will be passed to the Scattergl constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scattergl] - """ - return self["scattergl"] - - @scattergl.setter - def scattergl(self, val): - self["scattergl"] = val - - # scattermapbox - # ------------- - @property - def scattermapbox(self): - """ - The 'scattermapbox' property is a tuple of instances of - Scattermapbox that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattermapbox - - A list or tuple of dicts of string/value properties that - will be passed to the Scattermapbox constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scattermapbox] - """ - return self["scattermapbox"] - - @scattermapbox.setter - def scattermapbox(self, val): - self["scattermapbox"] = val - - # scatterpolargl - # -------------- - @property - def scatterpolargl(self): - """ - The 'scatterpolargl' property is a tuple of instances of - Scatterpolargl that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatterpolargl - - A list or tuple of dicts of string/value properties that - will be passed to the Scatterpolargl constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scatterpolargl] - """ - return self["scatterpolargl"] - - @scatterpolargl.setter - def scatterpolargl(self, val): - self["scatterpolargl"] = val - - # scatterpolar - # ------------ - @property - def scatterpolar(self): - """ - The 'scatterpolar' property is a tuple of instances of - Scatterpolar that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatterpolar - - A list or tuple of dicts of string/value properties that - will be passed to the Scatterpolar constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scatterpolar] - """ - return self["scatterpolar"] - - @scatterpolar.setter - def scatterpolar(self, val): - self["scatterpolar"] = val - - # scatter - # ------- - @property - def scatter(self): - """ - The 'scatter' property is a tuple of instances of - Scatter that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatter - - A list or tuple of dicts of string/value properties that - will be passed to the Scatter constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scatter] - """ - return self["scatter"] - - @scatter.setter - def scatter(self, val): - self["scatter"] = val - - # scatterternary - # -------------- - @property - def scatterternary(self): - """ - The 'scatterternary' property is a tuple of instances of - Scatterternary that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatterternary - - A list or tuple of dicts of string/value properties that - will be passed to the Scatterternary constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Scatterternary] - """ - return self["scatterternary"] - - @scatterternary.setter - def scatterternary(self, val): - self["scatterternary"] = val - - # splom - # ----- - @property - def splom(self): - """ - The 'splom' property is a tuple of instances of - Splom that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Splom - - A list or tuple of dicts of string/value properties that - will be passed to the Splom constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Splom] - """ - return self["splom"] - - @splom.setter - def splom(self, val): - self["splom"] = val - - # streamtube - # ---------- - @property - def streamtube(self): - """ - The 'streamtube' property is a tuple of instances of - Streamtube that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Streamtube - - A list or tuple of dicts of string/value properties that - will be passed to the Streamtube constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Streamtube] - """ - return self["streamtube"] - - @streamtube.setter - def streamtube(self, val): - self["streamtube"] = val - - # sunburst - # -------- - @property - def sunburst(self): - """ - The 'sunburst' property is a tuple of instances of - Sunburst that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Sunburst - - A list or tuple of dicts of string/value properties that - will be passed to the Sunburst constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Sunburst] - """ - return self["sunburst"] - - @sunburst.setter - def sunburst(self, val): - self["sunburst"] = val - - # surface - # ------- - @property - def surface(self): - """ - The 'surface' property is a tuple of instances of - Surface that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Surface - - A list or tuple of dicts of string/value properties that - will be passed to the Surface constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Surface] - """ - return self["surface"] - - @surface.setter - def surface(self, val): - self["surface"] = val - - # table - # ----- - @property - def table(self): - """ - The 'table' property is a tuple of instances of - Table that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Table - - A list or tuple of dicts of string/value properties that - will be passed to the Table constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Table] - """ - return self["table"] - - @table.setter - def table(self, val): - self["table"] = val - - # treemap - # ------- - @property - def treemap(self): - """ - The 'treemap' property is a tuple of instances of - Treemap that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Treemap - - A list or tuple of dicts of string/value properties that - will be passed to the Treemap constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Treemap] - """ - return self["treemap"] - - @treemap.setter - def treemap(self, val): - self["treemap"] = val - - # violin - # ------ - @property - def violin(self): - """ - The 'violin' property is a tuple of instances of - Violin that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Violin - - A list or tuple of dicts of string/value properties that - will be passed to the Violin constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Violin] - """ - return self["violin"] - - @violin.setter - def violin(self, val): - self["violin"] = val - - # volume - # ------ - @property - def volume(self): - """ - The 'volume' property is a tuple of instances of - Volume that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Volume - - A list or tuple of dicts of string/value properties that - will be passed to the Volume constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Volume] - """ - return self["volume"] - - @volume.setter - def volume(self, val): - self["volume"] = val - - # waterfall - # --------- - @property - def waterfall(self): - """ - The 'waterfall' property is a tuple of instances of - Waterfall that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.template.data.Waterfall - - A list or tuple of dicts of string/value properties that - will be passed to the Waterfall constructor - - Supported dict properties: - - Returns - ------- - tuple[plotly.graph_objs.layout.template.data.Waterfall] - """ - return self["waterfall"] - - @waterfall.setter - def waterfall(self, val): - self["waterfall"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.template" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - area - A tuple of :class:`plotly.graph_objects.Area` instances - or dicts with compatible properties - barpolar - A tuple of :class:`plotly.graph_objects.Barpolar` - instances or dicts with compatible properties - bar - A tuple of :class:`plotly.graph_objects.Bar` instances - or dicts with compatible properties - box - A tuple of :class:`plotly.graph_objects.Box` instances - or dicts with compatible properties - candlestick - A tuple of :class:`plotly.graph_objects.Candlestick` - instances or dicts with compatible properties - carpet - A tuple of :class:`plotly.graph_objects.Carpet` - instances or dicts with compatible properties - choroplethmapbox - A tuple of - :class:`plotly.graph_objects.Choroplethmapbox` - instances or dicts with compatible properties - choropleth - A tuple of :class:`plotly.graph_objects.Choropleth` - instances or dicts with compatible properties - cone - A tuple of :class:`plotly.graph_objects.Cone` instances - or dicts with compatible properties - contourcarpet - A tuple of :class:`plotly.graph_objects.Contourcarpet` - instances or dicts with compatible properties - contour - A tuple of :class:`plotly.graph_objects.Contour` - instances or dicts with compatible properties - densitymapbox - A tuple of :class:`plotly.graph_objects.Densitymapbox` - instances or dicts with compatible properties - funnelarea - A tuple of :class:`plotly.graph_objects.Funnelarea` - instances or dicts with compatible properties - funnel - A tuple of :class:`plotly.graph_objects.Funnel` - instances or dicts with compatible properties - heatmapgl - A tuple of :class:`plotly.graph_objects.Heatmapgl` - instances or dicts with compatible properties - heatmap - A tuple of :class:`plotly.graph_objects.Heatmap` - instances or dicts with compatible properties - histogram2dcontour - A tuple of - :class:`plotly.graph_objects.Histogram2dContour` - instances or dicts with compatible properties - histogram2d - A tuple of :class:`plotly.graph_objects.Histogram2d` - instances or dicts with compatible properties - histogram - A tuple of :class:`plotly.graph_objects.Histogram` - instances or dicts with compatible properties - image - A tuple of :class:`plotly.graph_objects.Image` - instances or dicts with compatible properties - indicator - A tuple of :class:`plotly.graph_objects.Indicator` - instances or dicts with compatible properties - isosurface - A tuple of :class:`plotly.graph_objects.Isosurface` - instances or dicts with compatible properties - mesh3d - A tuple of :class:`plotly.graph_objects.Mesh3d` - instances or dicts with compatible properties - ohlc - A tuple of :class:`plotly.graph_objects.Ohlc` instances - or dicts with compatible properties - parcats - A tuple of :class:`plotly.graph_objects.Parcats` - instances or dicts with compatible properties - parcoords - A tuple of :class:`plotly.graph_objects.Parcoords` - instances or dicts with compatible properties - pie - A tuple of :class:`plotly.graph_objects.Pie` instances - or dicts with compatible properties - pointcloud - A tuple of :class:`plotly.graph_objects.Pointcloud` - instances or dicts with compatible properties - sankey - A tuple of :class:`plotly.graph_objects.Sankey` - instances or dicts with compatible properties - scatter3d - A tuple of :class:`plotly.graph_objects.Scatter3d` - instances or dicts with compatible properties - scattercarpet - A tuple of :class:`plotly.graph_objects.Scattercarpet` - instances or dicts with compatible properties - scattergeo - A tuple of :class:`plotly.graph_objects.Scattergeo` - instances or dicts with compatible properties - scattergl - A tuple of :class:`plotly.graph_objects.Scattergl` - instances or dicts with compatible properties - scattermapbox - A tuple of :class:`plotly.graph_objects.Scattermapbox` - instances or dicts with compatible properties - scatterpolargl - A tuple of :class:`plotly.graph_objects.Scatterpolargl` - instances or dicts with compatible properties - scatterpolar - A tuple of :class:`plotly.graph_objects.Scatterpolar` - instances or dicts with compatible properties - scatter - A tuple of :class:`plotly.graph_objects.Scatter` - instances or dicts with compatible properties - scatterternary - A tuple of :class:`plotly.graph_objects.Scatterternary` - instances or dicts with compatible properties - splom - A tuple of :class:`plotly.graph_objects.Splom` - instances or dicts with compatible properties - streamtube - A tuple of :class:`plotly.graph_objects.Streamtube` - instances or dicts with compatible properties - sunburst - A tuple of :class:`plotly.graph_objects.Sunburst` - instances or dicts with compatible properties - surface - A tuple of :class:`plotly.graph_objects.Surface` - instances or dicts with compatible properties - table - A tuple of :class:`plotly.graph_objects.Table` - instances or dicts with compatible properties - treemap - A tuple of :class:`plotly.graph_objects.Treemap` - instances or dicts with compatible properties - violin - A tuple of :class:`plotly.graph_objects.Violin` - instances or dicts with compatible properties - volume - A tuple of :class:`plotly.graph_objects.Volume` - instances or dicts with compatible properties - waterfall - A tuple of :class:`plotly.graph_objects.Waterfall` - instances or dicts with compatible properties - """ - - def __init__( - self, - arg=None, - area=None, - barpolar=None, - bar=None, - box=None, - candlestick=None, - carpet=None, - choroplethmapbox=None, - choropleth=None, - cone=None, - contourcarpet=None, - contour=None, - densitymapbox=None, - funnelarea=None, - funnel=None, - heatmapgl=None, - heatmap=None, - histogram2dcontour=None, - histogram2d=None, - histogram=None, - image=None, - indicator=None, - isosurface=None, - mesh3d=None, - ohlc=None, - parcats=None, - parcoords=None, - pie=None, - pointcloud=None, - sankey=None, - scatter3d=None, - scattercarpet=None, - scattergeo=None, - scattergl=None, - scattermapbox=None, - scatterpolargl=None, - scatterpolar=None, - scatter=None, - scatterternary=None, - splom=None, - streamtube=None, - sunburst=None, - surface=None, - table=None, - treemap=None, - violin=None, - volume=None, - waterfall=None, - **kwargs - ): - """ - Construct a new Data object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.template.Data` - area - A tuple of :class:`plotly.graph_objects.Area` instances - or dicts with compatible properties - barpolar - A tuple of :class:`plotly.graph_objects.Barpolar` - instances or dicts with compatible properties - bar - A tuple of :class:`plotly.graph_objects.Bar` instances - or dicts with compatible properties - box - A tuple of :class:`plotly.graph_objects.Box` instances - or dicts with compatible properties - candlestick - A tuple of :class:`plotly.graph_objects.Candlestick` - instances or dicts with compatible properties - carpet - A tuple of :class:`plotly.graph_objects.Carpet` - instances or dicts with compatible properties - choroplethmapbox - A tuple of - :class:`plotly.graph_objects.Choroplethmapbox` - instances or dicts with compatible properties - choropleth - A tuple of :class:`plotly.graph_objects.Choropleth` - instances or dicts with compatible properties - cone - A tuple of :class:`plotly.graph_objects.Cone` instances - or dicts with compatible properties - contourcarpet - A tuple of :class:`plotly.graph_objects.Contourcarpet` - instances or dicts with compatible properties - contour - A tuple of :class:`plotly.graph_objects.Contour` - instances or dicts with compatible properties - densitymapbox - A tuple of :class:`plotly.graph_objects.Densitymapbox` - instances or dicts with compatible properties - funnelarea - A tuple of :class:`plotly.graph_objects.Funnelarea` - instances or dicts with compatible properties - funnel - A tuple of :class:`plotly.graph_objects.Funnel` - instances or dicts with compatible properties - heatmapgl - A tuple of :class:`plotly.graph_objects.Heatmapgl` - instances or dicts with compatible properties - heatmap - A tuple of :class:`plotly.graph_objects.Heatmap` - instances or dicts with compatible properties - histogram2dcontour - A tuple of - :class:`plotly.graph_objects.Histogram2dContour` - instances or dicts with compatible properties - histogram2d - A tuple of :class:`plotly.graph_objects.Histogram2d` - instances or dicts with compatible properties - histogram - A tuple of :class:`plotly.graph_objects.Histogram` - instances or dicts with compatible properties - image - A tuple of :class:`plotly.graph_objects.Image` - instances or dicts with compatible properties - indicator - A tuple of :class:`plotly.graph_objects.Indicator` - instances or dicts with compatible properties - isosurface - A tuple of :class:`plotly.graph_objects.Isosurface` - instances or dicts with compatible properties - mesh3d - A tuple of :class:`plotly.graph_objects.Mesh3d` - instances or dicts with compatible properties - ohlc - A tuple of :class:`plotly.graph_objects.Ohlc` instances - or dicts with compatible properties - parcats - A tuple of :class:`plotly.graph_objects.Parcats` - instances or dicts with compatible properties - parcoords - A tuple of :class:`plotly.graph_objects.Parcoords` - instances or dicts with compatible properties - pie - A tuple of :class:`plotly.graph_objects.Pie` instances - or dicts with compatible properties - pointcloud - A tuple of :class:`plotly.graph_objects.Pointcloud` - instances or dicts with compatible properties - sankey - A tuple of :class:`plotly.graph_objects.Sankey` - instances or dicts with compatible properties - scatter3d - A tuple of :class:`plotly.graph_objects.Scatter3d` - instances or dicts with compatible properties - scattercarpet - A tuple of :class:`plotly.graph_objects.Scattercarpet` - instances or dicts with compatible properties - scattergeo - A tuple of :class:`plotly.graph_objects.Scattergeo` - instances or dicts with compatible properties - scattergl - A tuple of :class:`plotly.graph_objects.Scattergl` - instances or dicts with compatible properties - scattermapbox - A tuple of :class:`plotly.graph_objects.Scattermapbox` - instances or dicts with compatible properties - scatterpolargl - A tuple of :class:`plotly.graph_objects.Scatterpolargl` - instances or dicts with compatible properties - scatterpolar - A tuple of :class:`plotly.graph_objects.Scatterpolar` - instances or dicts with compatible properties - scatter - A tuple of :class:`plotly.graph_objects.Scatter` - instances or dicts with compatible properties - scatterternary - A tuple of :class:`plotly.graph_objects.Scatterternary` - instances or dicts with compatible properties - splom - A tuple of :class:`plotly.graph_objects.Splom` - instances or dicts with compatible properties - streamtube - A tuple of :class:`plotly.graph_objects.Streamtube` - instances or dicts with compatible properties - sunburst - A tuple of :class:`plotly.graph_objects.Sunburst` - instances or dicts with compatible properties - surface - A tuple of :class:`plotly.graph_objects.Surface` - instances or dicts with compatible properties - table - A tuple of :class:`plotly.graph_objects.Table` - instances or dicts with compatible properties - treemap - A tuple of :class:`plotly.graph_objects.Treemap` - instances or dicts with compatible properties - violin - A tuple of :class:`plotly.graph_objects.Violin` - instances or dicts with compatible properties - volume - A tuple of :class:`plotly.graph_objects.Volume` - instances or dicts with compatible properties - waterfall - A tuple of :class:`plotly.graph_objects.Waterfall` - instances or dicts with compatible properties - - Returns - ------- - Data - """ - super(Data, self).__init__("data") - - # Validate arg - # ------------ - 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.template.Data -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.template.Data`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.template import data as v_data - - # Initialize validators - # --------------------- - self._validators["area"] = v_data.AreasValidator() - self._validators["barpolar"] = v_data.BarpolarsValidator() - self._validators["bar"] = v_data.BarsValidator() - self._validators["box"] = v_data.BoxsValidator() - self._validators["candlestick"] = v_data.CandlesticksValidator() - self._validators["carpet"] = v_data.CarpetsValidator() - self._validators["choroplethmapbox"] = v_data.ChoroplethmapboxsValidator() - self._validators["choropleth"] = v_data.ChoroplethsValidator() - self._validators["cone"] = v_data.ConesValidator() - self._validators["contourcarpet"] = v_data.ContourcarpetsValidator() - self._validators["contour"] = v_data.ContoursValidator() - self._validators["densitymapbox"] = v_data.DensitymapboxsValidator() - self._validators["funnelarea"] = v_data.FunnelareasValidator() - self._validators["funnel"] = v_data.FunnelsValidator() - self._validators["heatmapgl"] = v_data.HeatmapglsValidator() - self._validators["heatmap"] = v_data.HeatmapsValidator() - self._validators["histogram2dcontour"] = v_data.Histogram2dContoursValidator() - self._validators["histogram2d"] = v_data.Histogram2dsValidator() - self._validators["histogram"] = v_data.HistogramsValidator() - self._validators["image"] = v_data.ImagesValidator() - self._validators["indicator"] = v_data.IndicatorsValidator() - self._validators["isosurface"] = v_data.IsosurfacesValidator() - self._validators["mesh3d"] = v_data.Mesh3dsValidator() - self._validators["ohlc"] = v_data.OhlcsValidator() - self._validators["parcats"] = v_data.ParcatssValidator() - self._validators["parcoords"] = v_data.ParcoordssValidator() - self._validators["pie"] = v_data.PiesValidator() - self._validators["pointcloud"] = v_data.PointcloudsValidator() - self._validators["sankey"] = v_data.SankeysValidator() - self._validators["scatter3d"] = v_data.Scatter3dsValidator() - self._validators["scattercarpet"] = v_data.ScattercarpetsValidator() - self._validators["scattergeo"] = v_data.ScattergeosValidator() - self._validators["scattergl"] = v_data.ScatterglsValidator() - self._validators["scattermapbox"] = v_data.ScattermapboxsValidator() - self._validators["scatterpolargl"] = v_data.ScatterpolarglsValidator() - self._validators["scatterpolar"] = v_data.ScatterpolarsValidator() - self._validators["scatter"] = v_data.ScattersValidator() - self._validators["scatterternary"] = v_data.ScatterternarysValidator() - self._validators["splom"] = v_data.SplomsValidator() - self._validators["streamtube"] = v_data.StreamtubesValidator() - self._validators["sunburst"] = v_data.SunburstsValidator() - self._validators["surface"] = v_data.SurfacesValidator() - self._validators["table"] = v_data.TablesValidator() - self._validators["treemap"] = v_data.TreemapsValidator() - self._validators["violin"] = v_data.ViolinsValidator() - self._validators["volume"] = v_data.VolumesValidator() - self._validators["waterfall"] = v_data.WaterfallsValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("area", None) - self["area"] = area if area is not None else _v - _v = arg.pop("barpolar", None) - self["barpolar"] = barpolar if barpolar is not None else _v - _v = arg.pop("bar", None) - self["bar"] = bar if bar is not None else _v - _v = arg.pop("box", None) - self["box"] = box if box is not None else _v - _v = arg.pop("candlestick", None) - self["candlestick"] = candlestick if candlestick is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v - _v = arg.pop("choroplethmapbox", None) - self["choroplethmapbox"] = ( - choroplethmapbox if choroplethmapbox is not None else _v - ) - _v = arg.pop("choropleth", None) - self["choropleth"] = choropleth if choropleth is not None else _v - _v = arg.pop("cone", None) - self["cone"] = cone if cone is not None else _v - _v = arg.pop("contourcarpet", None) - self["contourcarpet"] = contourcarpet if contourcarpet is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v - _v = arg.pop("densitymapbox", None) - self["densitymapbox"] = densitymapbox if densitymapbox is not None else _v - _v = arg.pop("funnelarea", None) - self["funnelarea"] = funnelarea if funnelarea is not None else _v - _v = arg.pop("funnel", None) - self["funnel"] = funnel if funnel is not None else _v - _v = arg.pop("heatmapgl", None) - self["heatmapgl"] = heatmapgl if heatmapgl is not None else _v - _v = arg.pop("heatmap", None) - self["heatmap"] = heatmap if heatmap is not None else _v - _v = arg.pop("histogram2dcontour", None) - self["histogram2dcontour"] = ( - histogram2dcontour if histogram2dcontour is not None else _v - ) - _v = arg.pop("histogram2d", None) - self["histogram2d"] = histogram2d if histogram2d is not None else _v - _v = arg.pop("histogram", None) - self["histogram"] = histogram if histogram is not None else _v - _v = arg.pop("image", None) - self["image"] = image if image is not None else _v - _v = arg.pop("indicator", None) - self["indicator"] = indicator if indicator is not None else _v - _v = arg.pop("isosurface", None) - self["isosurface"] = isosurface if isosurface is not None else _v - _v = arg.pop("mesh3d", None) - self["mesh3d"] = mesh3d if mesh3d is not None else _v - _v = arg.pop("ohlc", None) - self["ohlc"] = ohlc if ohlc is not None else _v - _v = arg.pop("parcats", None) - self["parcats"] = parcats if parcats is not None else _v - _v = arg.pop("parcoords", None) - self["parcoords"] = parcoords if parcoords is not None else _v - _v = arg.pop("pie", None) - self["pie"] = pie if pie is not None else _v - _v = arg.pop("pointcloud", None) - self["pointcloud"] = pointcloud if pointcloud is not None else _v - _v = arg.pop("sankey", None) - self["sankey"] = sankey if sankey is not None else _v - _v = arg.pop("scatter3d", None) - self["scatter3d"] = scatter3d if scatter3d is not None else _v - _v = arg.pop("scattercarpet", None) - self["scattercarpet"] = scattercarpet if scattercarpet is not None else _v - _v = arg.pop("scattergeo", None) - self["scattergeo"] = scattergeo if scattergeo is not None else _v - _v = arg.pop("scattergl", None) - self["scattergl"] = scattergl if scattergl is not None else _v - _v = arg.pop("scattermapbox", None) - self["scattermapbox"] = scattermapbox if scattermapbox is not None else _v - _v = arg.pop("scatterpolargl", None) - self["scatterpolargl"] = scatterpolargl if scatterpolargl is not None else _v - _v = arg.pop("scatterpolar", None) - self["scatterpolar"] = scatterpolar if scatterpolar is not None else _v - _v = arg.pop("scatter", None) - self["scatter"] = scatter if scatter is not None else _v - _v = arg.pop("scatterternary", None) - self["scatterternary"] = scatterternary if scatterternary is not None else _v - _v = arg.pop("splom", None) - self["splom"] = splom if splom is not None else _v - _v = arg.pop("streamtube", None) - self["streamtube"] = streamtube if streamtube is not None else _v - _v = arg.pop("sunburst", None) - self["sunburst"] = sunburst if sunburst is not None else _v - _v = arg.pop("surface", None) - self["surface"] = surface if surface is not None else _v - _v = arg.pop("table", None) - self["table"] = table if table is not None else _v - _v = arg.pop("treemap", None) - self["treemap"] = treemap if treemap is not None else _v - _v = arg.pop("violin", None) - self["violin"] = violin if violin is not None else _v - _v = arg.pop("volume", None) - self["volume"] = volume if volume is not None else _v - _v = arg.pop("waterfall", None) - self["waterfall"] = waterfall if waterfall is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Data", "Layout", "data"] - -from plotly.graph_objs.layout.template import data +import sys + +if sys.version_info < (3, 7): + from ._layout import Layout + from ._data import Data + from . import data +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".data"], ["._layout.Layout", "._data.Data"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/_data.py b/packages/python/plotly/plotly/graph_objs/layout/template/_data.py new file mode 100644 index 00000000000..2d096f99f1b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/_data.py @@ -0,0 +1,1724 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Data(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.template" + _path_str = "layout.template.data" + _valid_props = { + "area", + "bar", + "barpolar", + "box", + "candlestick", + "carpet", + "choropleth", + "choroplethmapbox", + "cone", + "contour", + "contourcarpet", + "densitymapbox", + "funnel", + "funnelarea", + "heatmap", + "heatmapgl", + "histogram", + "histogram2d", + "histogram2dcontour", + "image", + "indicator", + "isosurface", + "mesh3d", + "ohlc", + "parcats", + "parcoords", + "pie", + "pointcloud", + "sankey", + "scatter", + "scatter3d", + "scattercarpet", + "scattergeo", + "scattergl", + "scattermapbox", + "scatterpolar", + "scatterpolargl", + "scatterternary", + "splom", + "streamtube", + "sunburst", + "surface", + "table", + "treemap", + "violin", + "volume", + "waterfall", + } + + # area + # ---- + @property + def area(self): + """ + The 'area' property is a tuple of instances of + Area that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Area + - A list or tuple of dicts of string/value properties that + will be passed to the Area constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Area] + """ + return self["area"] + + @area.setter + def area(self, val): + self["area"] = val + + # barpolar + # -------- + @property + def barpolar(self): + """ + The 'barpolar' property is a tuple of instances of + Barpolar that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Barpolar + - A list or tuple of dicts of string/value properties that + will be passed to the Barpolar constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Barpolar] + """ + return self["barpolar"] + + @barpolar.setter + def barpolar(self, val): + self["barpolar"] = val + + # bar + # --- + @property + def bar(self): + """ + The 'bar' property is a tuple of instances of + Bar that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Bar + - A list or tuple of dicts of string/value properties that + will be passed to the Bar constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Bar] + """ + return self["bar"] + + @bar.setter + def bar(self, val): + self["bar"] = val + + # box + # --- + @property + def box(self): + """ + The 'box' property is a tuple of instances of + Box that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Box + - A list or tuple of dicts of string/value properties that + will be passed to the Box constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Box] + """ + return self["box"] + + @box.setter + def box(self, val): + self["box"] = val + + # candlestick + # ----------- + @property + def candlestick(self): + """ + The 'candlestick' property is a tuple of instances of + Candlestick that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Candlestick + - A list or tuple of dicts of string/value properties that + will be passed to the Candlestick constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Candlestick] + """ + return self["candlestick"] + + @candlestick.setter + def candlestick(self, val): + self["candlestick"] = val + + # carpet + # ------ + @property + def carpet(self): + """ + The 'carpet' property is a tuple of instances of + Carpet that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Carpet + - A list or tuple of dicts of string/value properties that + will be passed to the Carpet constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Carpet] + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + # choroplethmapbox + # ---------------- + @property + def choroplethmapbox(self): + """ + The 'choroplethmapbox' property is a tuple of instances of + Choroplethmapbox that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Choroplethmapbox + - A list or tuple of dicts of string/value properties that + will be passed to the Choroplethmapbox constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Choroplethmapbox] + """ + return self["choroplethmapbox"] + + @choroplethmapbox.setter + def choroplethmapbox(self, val): + self["choroplethmapbox"] = val + + # choropleth + # ---------- + @property + def choropleth(self): + """ + The 'choropleth' property is a tuple of instances of + Choropleth that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Choropleth + - A list or tuple of dicts of string/value properties that + will be passed to the Choropleth constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Choropleth] + """ + return self["choropleth"] + + @choropleth.setter + def choropleth(self, val): + self["choropleth"] = val + + # cone + # ---- + @property + def cone(self): + """ + The 'cone' property is a tuple of instances of + Cone that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Cone + - A list or tuple of dicts of string/value properties that + will be passed to the Cone constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Cone] + """ + return self["cone"] + + @cone.setter + def cone(self, val): + self["cone"] = val + + # contourcarpet + # ------------- + @property + def contourcarpet(self): + """ + The 'contourcarpet' property is a tuple of instances of + Contourcarpet that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Contourcarpet + - A list or tuple of dicts of string/value properties that + will be passed to the Contourcarpet constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Contourcarpet] + """ + return self["contourcarpet"] + + @contourcarpet.setter + def contourcarpet(self, val): + self["contourcarpet"] = val + + # contour + # ------- + @property + def contour(self): + """ + The 'contour' property is a tuple of instances of + Contour that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Contour + - A list or tuple of dicts of string/value properties that + will be passed to the Contour constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Contour] + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + # densitymapbox + # ------------- + @property + def densitymapbox(self): + """ + The 'densitymapbox' property is a tuple of instances of + Densitymapbox that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Densitymapbox + - A list or tuple of dicts of string/value properties that + will be passed to the Densitymapbox constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Densitymapbox] + """ + return self["densitymapbox"] + + @densitymapbox.setter + def densitymapbox(self, val): + self["densitymapbox"] = val + + # funnelarea + # ---------- + @property + def funnelarea(self): + """ + The 'funnelarea' property is a tuple of instances of + Funnelarea that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Funnelarea + - A list or tuple of dicts of string/value properties that + will be passed to the Funnelarea constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Funnelarea] + """ + return self["funnelarea"] + + @funnelarea.setter + def funnelarea(self, val): + self["funnelarea"] = val + + # funnel + # ------ + @property + def funnel(self): + """ + The 'funnel' property is a tuple of instances of + Funnel that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Funnel + - A list or tuple of dicts of string/value properties that + will be passed to the Funnel constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Funnel] + """ + return self["funnel"] + + @funnel.setter + def funnel(self, val): + self["funnel"] = val + + # heatmapgl + # --------- + @property + def heatmapgl(self): + """ + The 'heatmapgl' property is a tuple of instances of + Heatmapgl that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Heatmapgl + - A list or tuple of dicts of string/value properties that + will be passed to the Heatmapgl constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Heatmapgl] + """ + return self["heatmapgl"] + + @heatmapgl.setter + def heatmapgl(self, val): + self["heatmapgl"] = val + + # heatmap + # ------- + @property + def heatmap(self): + """ + The 'heatmap' property is a tuple of instances of + Heatmap that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Heatmap + - A list or tuple of dicts of string/value properties that + will be passed to the Heatmap constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Heatmap] + """ + return self["heatmap"] + + @heatmap.setter + def heatmap(self, val): + self["heatmap"] = val + + # histogram2dcontour + # ------------------ + @property + def histogram2dcontour(self): + """ + The 'histogram2dcontour' property is a tuple of instances of + Histogram2dContour that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Histogram2dContour + - A list or tuple of dicts of string/value properties that + will be passed to the Histogram2dContour constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Histogram2dContour] + """ + return self["histogram2dcontour"] + + @histogram2dcontour.setter + def histogram2dcontour(self, val): + self["histogram2dcontour"] = val + + # histogram2d + # ----------- + @property + def histogram2d(self): + """ + The 'histogram2d' property is a tuple of instances of + Histogram2d that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Histogram2d + - A list or tuple of dicts of string/value properties that + will be passed to the Histogram2d constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Histogram2d] + """ + return self["histogram2d"] + + @histogram2d.setter + def histogram2d(self, val): + self["histogram2d"] = val + + # histogram + # --------- + @property + def histogram(self): + """ + The 'histogram' property is a tuple of instances of + Histogram that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Histogram + - A list or tuple of dicts of string/value properties that + will be passed to the Histogram constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Histogram] + """ + return self["histogram"] + + @histogram.setter + def histogram(self, val): + self["histogram"] = val + + # image + # ----- + @property + def image(self): + """ + The 'image' property is a tuple of instances of + Image that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Image + - A list or tuple of dicts of string/value properties that + will be passed to the Image constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Image] + """ + return self["image"] + + @image.setter + def image(self, val): + self["image"] = val + + # indicator + # --------- + @property + def indicator(self): + """ + The 'indicator' property is a tuple of instances of + Indicator that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Indicator + - A list or tuple of dicts of string/value properties that + will be passed to the Indicator constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Indicator] + """ + return self["indicator"] + + @indicator.setter + def indicator(self, val): + self["indicator"] = val + + # isosurface + # ---------- + @property + def isosurface(self): + """ + The 'isosurface' property is a tuple of instances of + Isosurface that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Isosurface + - A list or tuple of dicts of string/value properties that + will be passed to the Isosurface constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Isosurface] + """ + return self["isosurface"] + + @isosurface.setter + def isosurface(self, val): + self["isosurface"] = val + + # mesh3d + # ------ + @property + def mesh3d(self): + """ + The 'mesh3d' property is a tuple of instances of + Mesh3d that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Mesh3d + - A list or tuple of dicts of string/value properties that + will be passed to the Mesh3d constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Mesh3d] + """ + return self["mesh3d"] + + @mesh3d.setter + def mesh3d(self, val): + self["mesh3d"] = val + + # ohlc + # ---- + @property + def ohlc(self): + """ + The 'ohlc' property is a tuple of instances of + Ohlc that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Ohlc + - A list or tuple of dicts of string/value properties that + will be passed to the Ohlc constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Ohlc] + """ + return self["ohlc"] + + @ohlc.setter + def ohlc(self, val): + self["ohlc"] = val + + # parcats + # ------- + @property + def parcats(self): + """ + The 'parcats' property is a tuple of instances of + Parcats that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Parcats + - A list or tuple of dicts of string/value properties that + will be passed to the Parcats constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Parcats] + """ + return self["parcats"] + + @parcats.setter + def parcats(self, val): + self["parcats"] = val + + # parcoords + # --------- + @property + def parcoords(self): + """ + The 'parcoords' property is a tuple of instances of + Parcoords that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Parcoords + - A list or tuple of dicts of string/value properties that + will be passed to the Parcoords constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Parcoords] + """ + return self["parcoords"] + + @parcoords.setter + def parcoords(self, val): + self["parcoords"] = val + + # pie + # --- + @property + def pie(self): + """ + The 'pie' property is a tuple of instances of + Pie that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Pie + - A list or tuple of dicts of string/value properties that + will be passed to the Pie constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Pie] + """ + return self["pie"] + + @pie.setter + def pie(self, val): + self["pie"] = val + + # pointcloud + # ---------- + @property + def pointcloud(self): + """ + The 'pointcloud' property is a tuple of instances of + Pointcloud that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Pointcloud + - A list or tuple of dicts of string/value properties that + will be passed to the Pointcloud constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Pointcloud] + """ + return self["pointcloud"] + + @pointcloud.setter + def pointcloud(self, val): + self["pointcloud"] = val + + # sankey + # ------ + @property + def sankey(self): + """ + The 'sankey' property is a tuple of instances of + Sankey that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Sankey + - A list or tuple of dicts of string/value properties that + will be passed to the Sankey constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Sankey] + """ + return self["sankey"] + + @sankey.setter + def sankey(self, val): + self["sankey"] = val + + # scatter3d + # --------- + @property + def scatter3d(self): + """ + The 'scatter3d' property is a tuple of instances of + Scatter3d that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatter3d + - A list or tuple of dicts of string/value properties that + will be passed to the Scatter3d constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scatter3d] + """ + return self["scatter3d"] + + @scatter3d.setter + def scatter3d(self, val): + self["scatter3d"] = val + + # scattercarpet + # ------------- + @property + def scattercarpet(self): + """ + The 'scattercarpet' property is a tuple of instances of + Scattercarpet that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattercarpet + - A list or tuple of dicts of string/value properties that + will be passed to the Scattercarpet constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scattercarpet] + """ + return self["scattercarpet"] + + @scattercarpet.setter + def scattercarpet(self, val): + self["scattercarpet"] = val + + # scattergeo + # ---------- + @property + def scattergeo(self): + """ + The 'scattergeo' property is a tuple of instances of + Scattergeo that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattergeo + - A list or tuple of dicts of string/value properties that + will be passed to the Scattergeo constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scattergeo] + """ + return self["scattergeo"] + + @scattergeo.setter + def scattergeo(self, val): + self["scattergeo"] = val + + # scattergl + # --------- + @property + def scattergl(self): + """ + The 'scattergl' property is a tuple of instances of + Scattergl that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattergl + - A list or tuple of dicts of string/value properties that + will be passed to the Scattergl constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scattergl] + """ + return self["scattergl"] + + @scattergl.setter + def scattergl(self, val): + self["scattergl"] = val + + # scattermapbox + # ------------- + @property + def scattermapbox(self): + """ + The 'scattermapbox' property is a tuple of instances of + Scattermapbox that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scattermapbox + - A list or tuple of dicts of string/value properties that + will be passed to the Scattermapbox constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scattermapbox] + """ + return self["scattermapbox"] + + @scattermapbox.setter + def scattermapbox(self, val): + self["scattermapbox"] = val + + # scatterpolargl + # -------------- + @property + def scatterpolargl(self): + """ + The 'scatterpolargl' property is a tuple of instances of + Scatterpolargl that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatterpolargl + - A list or tuple of dicts of string/value properties that + will be passed to the Scatterpolargl constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scatterpolargl] + """ + return self["scatterpolargl"] + + @scatterpolargl.setter + def scatterpolargl(self, val): + self["scatterpolargl"] = val + + # scatterpolar + # ------------ + @property + def scatterpolar(self): + """ + The 'scatterpolar' property is a tuple of instances of + Scatterpolar that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatterpolar + - A list or tuple of dicts of string/value properties that + will be passed to the Scatterpolar constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scatterpolar] + """ + return self["scatterpolar"] + + @scatterpolar.setter + def scatterpolar(self, val): + self["scatterpolar"] = val + + # scatter + # ------- + @property + def scatter(self): + """ + The 'scatter' property is a tuple of instances of + Scatter that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatter + - A list or tuple of dicts of string/value properties that + will be passed to the Scatter constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scatter] + """ + return self["scatter"] + + @scatter.setter + def scatter(self, val): + self["scatter"] = val + + # scatterternary + # -------------- + @property + def scatterternary(self): + """ + The 'scatterternary' property is a tuple of instances of + Scatterternary that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Scatterternary + - A list or tuple of dicts of string/value properties that + will be passed to the Scatterternary constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Scatterternary] + """ + return self["scatterternary"] + + @scatterternary.setter + def scatterternary(self, val): + self["scatterternary"] = val + + # splom + # ----- + @property + def splom(self): + """ + The 'splom' property is a tuple of instances of + Splom that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Splom + - A list or tuple of dicts of string/value properties that + will be passed to the Splom constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Splom] + """ + return self["splom"] + + @splom.setter + def splom(self, val): + self["splom"] = val + + # streamtube + # ---------- + @property + def streamtube(self): + """ + The 'streamtube' property is a tuple of instances of + Streamtube that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Streamtube + - A list or tuple of dicts of string/value properties that + will be passed to the Streamtube constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Streamtube] + """ + return self["streamtube"] + + @streamtube.setter + def streamtube(self, val): + self["streamtube"] = val + + # sunburst + # -------- + @property + def sunburst(self): + """ + The 'sunburst' property is a tuple of instances of + Sunburst that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Sunburst + - A list or tuple of dicts of string/value properties that + will be passed to the Sunburst constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Sunburst] + """ + return self["sunburst"] + + @sunburst.setter + def sunburst(self, val): + self["sunburst"] = val + + # surface + # ------- + @property + def surface(self): + """ + The 'surface' property is a tuple of instances of + Surface that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Surface + - A list or tuple of dicts of string/value properties that + will be passed to the Surface constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Surface] + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + + # table + # ----- + @property + def table(self): + """ + The 'table' property is a tuple of instances of + Table that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Table + - A list or tuple of dicts of string/value properties that + will be passed to the Table constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Table] + """ + return self["table"] + + @table.setter + def table(self, val): + self["table"] = val + + # treemap + # ------- + @property + def treemap(self): + """ + The 'treemap' property is a tuple of instances of + Treemap that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Treemap + - A list or tuple of dicts of string/value properties that + will be passed to the Treemap constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Treemap] + """ + return self["treemap"] + + @treemap.setter + def treemap(self, val): + self["treemap"] = val + + # violin + # ------ + @property + def violin(self): + """ + The 'violin' property is a tuple of instances of + Violin that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Violin + - A list or tuple of dicts of string/value properties that + will be passed to the Violin constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Violin] + """ + return self["violin"] + + @violin.setter + def violin(self, val): + self["violin"] = val + + # volume + # ------ + @property + def volume(self): + """ + The 'volume' property is a tuple of instances of + Volume that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Volume + - A list or tuple of dicts of string/value properties that + will be passed to the Volume constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Volume] + """ + return self["volume"] + + @volume.setter + def volume(self, val): + self["volume"] = val + + # waterfall + # --------- + @property + def waterfall(self): + """ + The 'waterfall' property is a tuple of instances of + Waterfall that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Waterfall + - A list or tuple of dicts of string/value properties that + will be passed to the Waterfall constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Waterfall] + """ + return self["waterfall"] + + @waterfall.setter + def waterfall(self, val): + self["waterfall"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + area + A tuple of :class:`plotly.graph_objects.Area` instances + or dicts with compatible properties + barpolar + A tuple of :class:`plotly.graph_objects.Barpolar` + instances or dicts with compatible properties + bar + A tuple of :class:`plotly.graph_objects.Bar` instances + or dicts with compatible properties + box + A tuple of :class:`plotly.graph_objects.Box` instances + or dicts with compatible properties + candlestick + A tuple of :class:`plotly.graph_objects.Candlestick` + instances or dicts with compatible properties + carpet + A tuple of :class:`plotly.graph_objects.Carpet` + instances or dicts with compatible properties + choroplethmapbox + A tuple of + :class:`plotly.graph_objects.Choroplethmapbox` + instances or dicts with compatible properties + choropleth + A tuple of :class:`plotly.graph_objects.Choropleth` + instances or dicts with compatible properties + cone + A tuple of :class:`plotly.graph_objects.Cone` instances + or dicts with compatible properties + contourcarpet + A tuple of :class:`plotly.graph_objects.Contourcarpet` + instances or dicts with compatible properties + contour + A tuple of :class:`plotly.graph_objects.Contour` + instances or dicts with compatible properties + densitymapbox + A tuple of :class:`plotly.graph_objects.Densitymapbox` + instances or dicts with compatible properties + funnelarea + A tuple of :class:`plotly.graph_objects.Funnelarea` + instances or dicts with compatible properties + funnel + A tuple of :class:`plotly.graph_objects.Funnel` + instances or dicts with compatible properties + heatmapgl + A tuple of :class:`plotly.graph_objects.Heatmapgl` + instances or dicts with compatible properties + heatmap + A tuple of :class:`plotly.graph_objects.Heatmap` + instances or dicts with compatible properties + histogram2dcontour + A tuple of + :class:`plotly.graph_objects.Histogram2dContour` + instances or dicts with compatible properties + histogram2d + A tuple of :class:`plotly.graph_objects.Histogram2d` + instances or dicts with compatible properties + histogram + A tuple of :class:`plotly.graph_objects.Histogram` + instances or dicts with compatible properties + image + A tuple of :class:`plotly.graph_objects.Image` + instances or dicts with compatible properties + indicator + A tuple of :class:`plotly.graph_objects.Indicator` + instances or dicts with compatible properties + isosurface + A tuple of :class:`plotly.graph_objects.Isosurface` + instances or dicts with compatible properties + mesh3d + A tuple of :class:`plotly.graph_objects.Mesh3d` + instances or dicts with compatible properties + ohlc + A tuple of :class:`plotly.graph_objects.Ohlc` instances + or dicts with compatible properties + parcats + A tuple of :class:`plotly.graph_objects.Parcats` + instances or dicts with compatible properties + parcoords + A tuple of :class:`plotly.graph_objects.Parcoords` + instances or dicts with compatible properties + pie + A tuple of :class:`plotly.graph_objects.Pie` instances + or dicts with compatible properties + pointcloud + A tuple of :class:`plotly.graph_objects.Pointcloud` + instances or dicts with compatible properties + sankey + A tuple of :class:`plotly.graph_objects.Sankey` + instances or dicts with compatible properties + scatter3d + A tuple of :class:`plotly.graph_objects.Scatter3d` + instances or dicts with compatible properties + scattercarpet + A tuple of :class:`plotly.graph_objects.Scattercarpet` + instances or dicts with compatible properties + scattergeo + A tuple of :class:`plotly.graph_objects.Scattergeo` + instances or dicts with compatible properties + scattergl + A tuple of :class:`plotly.graph_objects.Scattergl` + instances or dicts with compatible properties + scattermapbox + A tuple of :class:`plotly.graph_objects.Scattermapbox` + instances or dicts with compatible properties + scatterpolargl + A tuple of :class:`plotly.graph_objects.Scatterpolargl` + instances or dicts with compatible properties + scatterpolar + A tuple of :class:`plotly.graph_objects.Scatterpolar` + instances or dicts with compatible properties + scatter + A tuple of :class:`plotly.graph_objects.Scatter` + instances or dicts with compatible properties + scatterternary + A tuple of :class:`plotly.graph_objects.Scatterternary` + instances or dicts with compatible properties + splom + A tuple of :class:`plotly.graph_objects.Splom` + instances or dicts with compatible properties + streamtube + A tuple of :class:`plotly.graph_objects.Streamtube` + instances or dicts with compatible properties + sunburst + A tuple of :class:`plotly.graph_objects.Sunburst` + instances or dicts with compatible properties + surface + A tuple of :class:`plotly.graph_objects.Surface` + instances or dicts with compatible properties + table + A tuple of :class:`plotly.graph_objects.Table` + instances or dicts with compatible properties + treemap + A tuple of :class:`plotly.graph_objects.Treemap` + instances or dicts with compatible properties + violin + A tuple of :class:`plotly.graph_objects.Violin` + instances or dicts with compatible properties + volume + A tuple of :class:`plotly.graph_objects.Volume` + instances or dicts with compatible properties + waterfall + A tuple of :class:`plotly.graph_objects.Waterfall` + instances or dicts with compatible properties + """ + + def __init__( + self, + arg=None, + area=None, + barpolar=None, + bar=None, + box=None, + candlestick=None, + carpet=None, + choroplethmapbox=None, + choropleth=None, + cone=None, + contourcarpet=None, + contour=None, + densitymapbox=None, + funnelarea=None, + funnel=None, + heatmapgl=None, + heatmap=None, + histogram2dcontour=None, + histogram2d=None, + histogram=None, + image=None, + indicator=None, + isosurface=None, + mesh3d=None, + ohlc=None, + parcats=None, + parcoords=None, + pie=None, + pointcloud=None, + sankey=None, + scatter3d=None, + scattercarpet=None, + scattergeo=None, + scattergl=None, + scattermapbox=None, + scatterpolargl=None, + scatterpolar=None, + scatter=None, + scatterternary=None, + splom=None, + streamtube=None, + sunburst=None, + surface=None, + table=None, + treemap=None, + violin=None, + volume=None, + waterfall=None, + **kwargs + ): + """ + Construct a new Data object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.template.Data` + area + A tuple of :class:`plotly.graph_objects.Area` instances + or dicts with compatible properties + barpolar + A tuple of :class:`plotly.graph_objects.Barpolar` + instances or dicts with compatible properties + bar + A tuple of :class:`plotly.graph_objects.Bar` instances + or dicts with compatible properties + box + A tuple of :class:`plotly.graph_objects.Box` instances + or dicts with compatible properties + candlestick + A tuple of :class:`plotly.graph_objects.Candlestick` + instances or dicts with compatible properties + carpet + A tuple of :class:`plotly.graph_objects.Carpet` + instances or dicts with compatible properties + choroplethmapbox + A tuple of + :class:`plotly.graph_objects.Choroplethmapbox` + instances or dicts with compatible properties + choropleth + A tuple of :class:`plotly.graph_objects.Choropleth` + instances or dicts with compatible properties + cone + A tuple of :class:`plotly.graph_objects.Cone` instances + or dicts with compatible properties + contourcarpet + A tuple of :class:`plotly.graph_objects.Contourcarpet` + instances or dicts with compatible properties + contour + A tuple of :class:`plotly.graph_objects.Contour` + instances or dicts with compatible properties + densitymapbox + A tuple of :class:`plotly.graph_objects.Densitymapbox` + instances or dicts with compatible properties + funnelarea + A tuple of :class:`plotly.graph_objects.Funnelarea` + instances or dicts with compatible properties + funnel + A tuple of :class:`plotly.graph_objects.Funnel` + instances or dicts with compatible properties + heatmapgl + A tuple of :class:`plotly.graph_objects.Heatmapgl` + instances or dicts with compatible properties + heatmap + A tuple of :class:`plotly.graph_objects.Heatmap` + instances or dicts with compatible properties + histogram2dcontour + A tuple of + :class:`plotly.graph_objects.Histogram2dContour` + instances or dicts with compatible properties + histogram2d + A tuple of :class:`plotly.graph_objects.Histogram2d` + instances or dicts with compatible properties + histogram + A tuple of :class:`plotly.graph_objects.Histogram` + instances or dicts with compatible properties + image + A tuple of :class:`plotly.graph_objects.Image` + instances or dicts with compatible properties + indicator + A tuple of :class:`plotly.graph_objects.Indicator` + instances or dicts with compatible properties + isosurface + A tuple of :class:`plotly.graph_objects.Isosurface` + instances or dicts with compatible properties + mesh3d + A tuple of :class:`plotly.graph_objects.Mesh3d` + instances or dicts with compatible properties + ohlc + A tuple of :class:`plotly.graph_objects.Ohlc` instances + or dicts with compatible properties + parcats + A tuple of :class:`plotly.graph_objects.Parcats` + instances or dicts with compatible properties + parcoords + A tuple of :class:`plotly.graph_objects.Parcoords` + instances or dicts with compatible properties + pie + A tuple of :class:`plotly.graph_objects.Pie` instances + or dicts with compatible properties + pointcloud + A tuple of :class:`plotly.graph_objects.Pointcloud` + instances or dicts with compatible properties + sankey + A tuple of :class:`plotly.graph_objects.Sankey` + instances or dicts with compatible properties + scatter3d + A tuple of :class:`plotly.graph_objects.Scatter3d` + instances or dicts with compatible properties + scattercarpet + A tuple of :class:`plotly.graph_objects.Scattercarpet` + instances or dicts with compatible properties + scattergeo + A tuple of :class:`plotly.graph_objects.Scattergeo` + instances or dicts with compatible properties + scattergl + A tuple of :class:`plotly.graph_objects.Scattergl` + instances or dicts with compatible properties + scattermapbox + A tuple of :class:`plotly.graph_objects.Scattermapbox` + instances or dicts with compatible properties + scatterpolargl + A tuple of :class:`plotly.graph_objects.Scatterpolargl` + instances or dicts with compatible properties + scatterpolar + A tuple of :class:`plotly.graph_objects.Scatterpolar` + instances or dicts with compatible properties + scatter + A tuple of :class:`plotly.graph_objects.Scatter` + instances or dicts with compatible properties + scatterternary + A tuple of :class:`plotly.graph_objects.Scatterternary` + instances or dicts with compatible properties + splom + A tuple of :class:`plotly.graph_objects.Splom` + instances or dicts with compatible properties + streamtube + A tuple of :class:`plotly.graph_objects.Streamtube` + instances or dicts with compatible properties + sunburst + A tuple of :class:`plotly.graph_objects.Sunburst` + instances or dicts with compatible properties + surface + A tuple of :class:`plotly.graph_objects.Surface` + instances or dicts with compatible properties + table + A tuple of :class:`plotly.graph_objects.Table` + instances or dicts with compatible properties + treemap + A tuple of :class:`plotly.graph_objects.Treemap` + instances or dicts with compatible properties + violin + A tuple of :class:`plotly.graph_objects.Violin` + instances or dicts with compatible properties + volume + A tuple of :class:`plotly.graph_objects.Volume` + instances or dicts with compatible properties + waterfall + A tuple of :class:`plotly.graph_objects.Waterfall` + instances or dicts with compatible properties + + Returns + ------- + Data + """ + super(Data, self).__init__("data") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.template.Data +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.template.Data`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("area", None) + _v = area if area is not None else _v + if _v is not None: + self["area"] = _v + _v = arg.pop("barpolar", None) + _v = barpolar if barpolar is not None else _v + if _v is not None: + self["barpolar"] = _v + _v = arg.pop("bar", None) + _v = bar if bar is not None else _v + if _v is not None: + self["bar"] = _v + _v = arg.pop("box", None) + _v = box if box is not None else _v + if _v is not None: + self["box"] = _v + _v = arg.pop("candlestick", None) + _v = candlestick if candlestick is not None else _v + if _v is not None: + self["candlestick"] = _v + _v = arg.pop("carpet", None) + _v = carpet if carpet is not None else _v + if _v is not None: + self["carpet"] = _v + _v = arg.pop("choroplethmapbox", None) + _v = choroplethmapbox if choroplethmapbox is not None else _v + if _v is not None: + self["choroplethmapbox"] = _v + _v = arg.pop("choropleth", None) + _v = choropleth if choropleth is not None else _v + if _v is not None: + self["choropleth"] = _v + _v = arg.pop("cone", None) + _v = cone if cone is not None else _v + if _v is not None: + self["cone"] = _v + _v = arg.pop("contourcarpet", None) + _v = contourcarpet if contourcarpet is not None else _v + if _v is not None: + self["contourcarpet"] = _v + _v = arg.pop("contour", None) + _v = contour if contour is not None else _v + if _v is not None: + self["contour"] = _v + _v = arg.pop("densitymapbox", None) + _v = densitymapbox if densitymapbox is not None else _v + if _v is not None: + self["densitymapbox"] = _v + _v = arg.pop("funnelarea", None) + _v = funnelarea if funnelarea is not None else _v + if _v is not None: + self["funnelarea"] = _v + _v = arg.pop("funnel", None) + _v = funnel if funnel is not None else _v + if _v is not None: + self["funnel"] = _v + _v = arg.pop("heatmapgl", None) + _v = heatmapgl if heatmapgl is not None else _v + if _v is not None: + self["heatmapgl"] = _v + _v = arg.pop("heatmap", None) + _v = heatmap if heatmap is not None else _v + if _v is not None: + self["heatmap"] = _v + _v = arg.pop("histogram2dcontour", None) + _v = histogram2dcontour if histogram2dcontour is not None else _v + if _v is not None: + self["histogram2dcontour"] = _v + _v = arg.pop("histogram2d", None) + _v = histogram2d if histogram2d is not None else _v + if _v is not None: + self["histogram2d"] = _v + _v = arg.pop("histogram", None) + _v = histogram if histogram is not None else _v + if _v is not None: + self["histogram"] = _v + _v = arg.pop("image", None) + _v = image if image is not None else _v + if _v is not None: + self["image"] = _v + _v = arg.pop("indicator", None) + _v = indicator if indicator is not None else _v + if _v is not None: + self["indicator"] = _v + _v = arg.pop("isosurface", None) + _v = isosurface if isosurface is not None else _v + if _v is not None: + self["isosurface"] = _v + _v = arg.pop("mesh3d", None) + _v = mesh3d if mesh3d is not None else _v + if _v is not None: + self["mesh3d"] = _v + _v = arg.pop("ohlc", None) + _v = ohlc if ohlc is not None else _v + if _v is not None: + self["ohlc"] = _v + _v = arg.pop("parcats", None) + _v = parcats if parcats is not None else _v + if _v is not None: + self["parcats"] = _v + _v = arg.pop("parcoords", None) + _v = parcoords if parcoords is not None else _v + if _v is not None: + self["parcoords"] = _v + _v = arg.pop("pie", None) + _v = pie if pie is not None else _v + if _v is not None: + self["pie"] = _v + _v = arg.pop("pointcloud", None) + _v = pointcloud if pointcloud is not None else _v + if _v is not None: + self["pointcloud"] = _v + _v = arg.pop("sankey", None) + _v = sankey if sankey is not None else _v + if _v is not None: + self["sankey"] = _v + _v = arg.pop("scatter3d", None) + _v = scatter3d if scatter3d is not None else _v + if _v is not None: + self["scatter3d"] = _v + _v = arg.pop("scattercarpet", None) + _v = scattercarpet if scattercarpet is not None else _v + if _v is not None: + self["scattercarpet"] = _v + _v = arg.pop("scattergeo", None) + _v = scattergeo if scattergeo is not None else _v + if _v is not None: + self["scattergeo"] = _v + _v = arg.pop("scattergl", None) + _v = scattergl if scattergl is not None else _v + if _v is not None: + self["scattergl"] = _v + _v = arg.pop("scattermapbox", None) + _v = scattermapbox if scattermapbox is not None else _v + if _v is not None: + self["scattermapbox"] = _v + _v = arg.pop("scatterpolargl", None) + _v = scatterpolargl if scatterpolargl is not None else _v + if _v is not None: + self["scatterpolargl"] = _v + _v = arg.pop("scatterpolar", None) + _v = scatterpolar if scatterpolar is not None else _v + if _v is not None: + self["scatterpolar"] = _v + _v = arg.pop("scatter", None) + _v = scatter if scatter is not None else _v + if _v is not None: + self["scatter"] = _v + _v = arg.pop("scatterternary", None) + _v = scatterternary if scatterternary is not None else _v + if _v is not None: + self["scatterternary"] = _v + _v = arg.pop("splom", None) + _v = splom if splom is not None else _v + if _v is not None: + self["splom"] = _v + _v = arg.pop("streamtube", None) + _v = streamtube if streamtube is not None else _v + if _v is not None: + self["streamtube"] = _v + _v = arg.pop("sunburst", None) + _v = sunburst if sunburst is not None else _v + if _v is not None: + self["sunburst"] = _v + _v = arg.pop("surface", None) + _v = surface if surface is not None else _v + if _v is not None: + self["surface"] = _v + _v = arg.pop("table", None) + _v = table if table is not None else _v + if _v is not None: + self["table"] = _v + _v = arg.pop("treemap", None) + _v = treemap if treemap is not None else _v + if _v is not None: + self["treemap"] = _v + _v = arg.pop("violin", None) + _v = violin if violin is not None else _v + if _v is not None: + self["violin"] = _v + _v = arg.pop("volume", None) + _v = volume if volume is not None else _v + if _v is not None: + self["volume"] = _v + _v = arg.pop("waterfall", None) + _v = waterfall if waterfall is not None else _v + if _v is not None: + self["waterfall"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/_layout.py b/packages/python/plotly/plotly/graph_objs/layout/template/_layout.py new file mode 100644 index 00000000000..058b60b807d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/_layout.py @@ -0,0 +1 @@ +from plotly.graph_objs import Layout diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py index 886b7b9030e..286214206d4 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py @@ -1,143 +1,106 @@ -from plotly.graph_objs import Waterfall - -from plotly.graph_objs import Volume - -from plotly.graph_objs import Violin - -from plotly.graph_objs import Treemap - -from plotly.graph_objs import Table - -from plotly.graph_objs import Surface - -from plotly.graph_objs import Sunburst - -from plotly.graph_objs import Streamtube - -from plotly.graph_objs import Splom - -from plotly.graph_objs import Scatterternary - -from plotly.graph_objs import Scatter - -from plotly.graph_objs import Scatterpolar - -from plotly.graph_objs import Scatterpolargl - -from plotly.graph_objs import Scattermapbox - -from plotly.graph_objs import Scattergl - -from plotly.graph_objs import Scattergeo - -from plotly.graph_objs import Scattercarpet - -from plotly.graph_objs import Scatter3d - -from plotly.graph_objs import Sankey - -from plotly.graph_objs import Pointcloud - -from plotly.graph_objs import Pie - -from plotly.graph_objs import Parcoords - -from plotly.graph_objs import Parcats - -from plotly.graph_objs import Ohlc - -from plotly.graph_objs import Mesh3d - -from plotly.graph_objs import Isosurface - -from plotly.graph_objs import Indicator - -from plotly.graph_objs import Image - -from plotly.graph_objs import Histogram - -from plotly.graph_objs import Histogram2d - -from plotly.graph_objs import Histogram2dContour - -from plotly.graph_objs import Heatmap - -from plotly.graph_objs import Heatmapgl - -from plotly.graph_objs import Funnel - -from plotly.graph_objs import Funnelarea - -from plotly.graph_objs import Densitymapbox - -from plotly.graph_objs import Contour - -from plotly.graph_objs import Contourcarpet - -from plotly.graph_objs import Cone - -from plotly.graph_objs import Choropleth - -from plotly.graph_objs import Choroplethmapbox - -from plotly.graph_objs import Carpet - -from plotly.graph_objs import Candlestick - -from plotly.graph_objs import Box - -from plotly.graph_objs import Bar - -from plotly.graph_objs import Barpolar - -from plotly.graph_objs import Area - -__all__ = [ - "Area", - "Bar", - "Barpolar", - "Box", - "Candlestick", - "Carpet", - "Choropleth", - "Choroplethmapbox", - "Cone", - "Contour", - "Contourcarpet", - "Densitymapbox", - "Funnel", - "Funnelarea", - "Heatmap", - "Heatmapgl", - "Histogram", - "Histogram2d", - "Histogram2dContour", - "Image", - "Indicator", - "Isosurface", - "Mesh3d", - "Ohlc", - "Parcats", - "Parcoords", - "Pie", - "Pointcloud", - "Sankey", - "Scatter", - "Scatter3d", - "Scattercarpet", - "Scattergeo", - "Scattergl", - "Scattermapbox", - "Scatterpolar", - "Scatterpolargl", - "Scatterternary", - "Splom", - "Streamtube", - "Sunburst", - "Surface", - "Table", - "Treemap", - "Violin", - "Volume", - "Waterfall", -] +import sys + +if sys.version_info < (3, 7): + from ._waterfall import Waterfall + from ._volume import Volume + from ._violin import Violin + from ._treemap import Treemap + from ._table import Table + from ._surface import Surface + from ._sunburst import Sunburst + from ._streamtube import Streamtube + from ._splom import Splom + from ._scatterternary import Scatterternary + from ._scatter import Scatter + from ._scatterpolar import Scatterpolar + from ._scatterpolargl import Scatterpolargl + from ._scattermapbox import Scattermapbox + from ._scattergl import Scattergl + from ._scattergeo import Scattergeo + from ._scattercarpet import Scattercarpet + from ._scatter3d import Scatter3d + from ._sankey import Sankey + from ._pointcloud import Pointcloud + from ._pie import Pie + from ._parcoords import Parcoords + from ._parcats import Parcats + from ._ohlc import Ohlc + from ._mesh3d import Mesh3d + from ._isosurface import Isosurface + from ._indicator import Indicator + from ._image import Image + from ._histogram import Histogram + from ._histogram2d import Histogram2d + from ._histogram2dcontour import Histogram2dContour + from ._heatmap import Heatmap + from ._heatmapgl import Heatmapgl + from ._funnel import Funnel + from ._funnelarea import Funnelarea + from ._densitymapbox import Densitymapbox + from ._contour import Contour + from ._contourcarpet import Contourcarpet + from ._cone import Cone + from ._choropleth import Choropleth + from ._choroplethmapbox import Choroplethmapbox + from ._carpet import Carpet + from ._candlestick import Candlestick + from ._box import Box + from ._bar import Bar + from ._barpolar import Barpolar + from ._area import Area +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._waterfall.Waterfall", + "._volume.Volume", + "._violin.Violin", + "._treemap.Treemap", + "._table.Table", + "._surface.Surface", + "._sunburst.Sunburst", + "._streamtube.Streamtube", + "._splom.Splom", + "._scatterternary.Scatterternary", + "._scatter.Scatter", + "._scatterpolar.Scatterpolar", + "._scatterpolargl.Scatterpolargl", + "._scattermapbox.Scattermapbox", + "._scattergl.Scattergl", + "._scattergeo.Scattergeo", + "._scattercarpet.Scattercarpet", + "._scatter3d.Scatter3d", + "._sankey.Sankey", + "._pointcloud.Pointcloud", + "._pie.Pie", + "._parcoords.Parcoords", + "._parcats.Parcats", + "._ohlc.Ohlc", + "._mesh3d.Mesh3d", + "._isosurface.Isosurface", + "._indicator.Indicator", + "._image.Image", + "._histogram.Histogram", + "._histogram2d.Histogram2d", + "._histogram2dcontour.Histogram2dContour", + "._heatmap.Heatmap", + "._heatmapgl.Heatmapgl", + "._funnel.Funnel", + "._funnelarea.Funnelarea", + "._densitymapbox.Densitymapbox", + "._contour.Contour", + "._contourcarpet.Contourcarpet", + "._cone.Cone", + "._choropleth.Choropleth", + "._choroplethmapbox.Choroplethmapbox", + "._carpet.Carpet", + "._candlestick.Candlestick", + "._box.Box", + "._bar.Bar", + "._barpolar.Barpolar", + "._area.Area", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_area.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_area.py new file mode 100644 index 00000000000..ad21bdf3e8d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_area.py @@ -0,0 +1 @@ +from plotly.graph_objs import Area diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_bar.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_bar.py new file mode 100644 index 00000000000..5a800e64085 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_bar.py @@ -0,0 +1 @@ +from plotly.graph_objs import Bar diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_barpolar.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_barpolar.py new file mode 100644 index 00000000000..18abed8bbb6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_barpolar.py @@ -0,0 +1 @@ +from plotly.graph_objs import Barpolar diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_box.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_box.py new file mode 100644 index 00000000000..ffdd1d92139 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_box.py @@ -0,0 +1 @@ +from plotly.graph_objs import Box diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_candlestick.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_candlestick.py new file mode 100644 index 00000000000..5d11b448593 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_candlestick.py @@ -0,0 +1 @@ +from plotly.graph_objs import Candlestick diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_carpet.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_carpet.py new file mode 100644 index 00000000000..b923d73904d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_carpet.py @@ -0,0 +1 @@ +from plotly.graph_objs import Carpet diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_choropleth.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_choropleth.py new file mode 100644 index 00000000000..733e12709cc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_choropleth.py @@ -0,0 +1 @@ +from plotly.graph_objs import Choropleth diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_choroplethmapbox.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_choroplethmapbox.py new file mode 100644 index 00000000000..220b93564e7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_choroplethmapbox.py @@ -0,0 +1 @@ +from plotly.graph_objs import Choroplethmapbox diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_cone.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_cone.py new file mode 100644 index 00000000000..7a284527a8d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_cone.py @@ -0,0 +1 @@ +from plotly.graph_objs import Cone diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_contour.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_contour.py new file mode 100644 index 00000000000..e474909a4d2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_contour.py @@ -0,0 +1 @@ +from plotly.graph_objs import Contour diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_contourcarpet.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_contourcarpet.py new file mode 100644 index 00000000000..6240faf5100 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_contourcarpet.py @@ -0,0 +1 @@ +from plotly.graph_objs import Contourcarpet diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_densitymapbox.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_densitymapbox.py new file mode 100644 index 00000000000..d655b21ab3f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_densitymapbox.py @@ -0,0 +1 @@ +from plotly.graph_objs import Densitymapbox diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_funnel.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_funnel.py new file mode 100644 index 00000000000..70e2ba74d48 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_funnel.py @@ -0,0 +1 @@ +from plotly.graph_objs import Funnel diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_funnelarea.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_funnelarea.py new file mode 100644 index 00000000000..242d0fcc962 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_funnelarea.py @@ -0,0 +1 @@ +from plotly.graph_objs import Funnelarea diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_heatmap.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_heatmap.py new file mode 100644 index 00000000000..6098ee83e70 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_heatmap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Heatmap diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_heatmapgl.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_heatmapgl.py new file mode 100644 index 00000000000..625f2797d24 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_heatmapgl.py @@ -0,0 +1 @@ +from plotly.graph_objs import Heatmapgl diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram.py new file mode 100644 index 00000000000..7ba4c6df2fe --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram.py @@ -0,0 +1 @@ +from plotly.graph_objs import Histogram diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram2d.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram2d.py new file mode 100644 index 00000000000..710f7f99296 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram2d.py @@ -0,0 +1 @@ +from plotly.graph_objs import Histogram2d diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram2dcontour.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram2dcontour.py new file mode 100644 index 00000000000..94af41aa922 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_histogram2dcontour.py @@ -0,0 +1 @@ +from plotly.graph_objs import Histogram2dContour diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_image.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_image.py new file mode 100644 index 00000000000..828920ac697 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_image.py @@ -0,0 +1 @@ +from plotly.graph_objs import Image diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_indicator.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_indicator.py new file mode 100644 index 00000000000..a5a488f8bbe --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_indicator.py @@ -0,0 +1 @@ +from plotly.graph_objs import Indicator diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_isosurface.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_isosurface.py new file mode 100644 index 00000000000..5a7885ab64b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_isosurface.py @@ -0,0 +1 @@ +from plotly.graph_objs import Isosurface diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_mesh3d.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_mesh3d.py new file mode 100644 index 00000000000..2172a23bd4b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_mesh3d.py @@ -0,0 +1 @@ +from plotly.graph_objs import Mesh3d diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_ohlc.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_ohlc.py new file mode 100644 index 00000000000..d3f857428cc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_ohlc.py @@ -0,0 +1 @@ +from plotly.graph_objs import Ohlc diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_parcats.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_parcats.py new file mode 100644 index 00000000000..9b0290bcce8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_parcats.py @@ -0,0 +1 @@ +from plotly.graph_objs import Parcats diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_parcoords.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_parcoords.py new file mode 100644 index 00000000000..ccf5629c54f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_parcoords.py @@ -0,0 +1 @@ +from plotly.graph_objs import Parcoords diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_pie.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_pie.py new file mode 100644 index 00000000000..0625fd28881 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_pie.py @@ -0,0 +1 @@ +from plotly.graph_objs import Pie diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_pointcloud.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_pointcloud.py new file mode 100644 index 00000000000..af62ef6313d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_pointcloud.py @@ -0,0 +1 @@ +from plotly.graph_objs import Pointcloud diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_sankey.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_sankey.py new file mode 100644 index 00000000000..b572f657ce9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_sankey.py @@ -0,0 +1 @@ +from plotly.graph_objs import Sankey diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatter.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatter.py new file mode 100644 index 00000000000..afcfab30afa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatter.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatter diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatter3d.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatter3d.py new file mode 100644 index 00000000000..93146220e39 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatter3d.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatter3d diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattercarpet.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattercarpet.py new file mode 100644 index 00000000000..26d87ca7c1c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattercarpet.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattercarpet diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattergeo.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattergeo.py new file mode 100644 index 00000000000..34308e1a081 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattergeo.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattergeo diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattergl.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattergl.py new file mode 100644 index 00000000000..30bd3712b80 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattergl.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattergl diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattermapbox.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattermapbox.py new file mode 100644 index 00000000000..6c3333aa945 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scattermapbox.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattermapbox diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterpolar.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterpolar.py new file mode 100644 index 00000000000..e1417b23810 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterpolar.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatterpolar diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterpolargl.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterpolargl.py new file mode 100644 index 00000000000..60b023a581b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterpolargl.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatterpolargl diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterternary.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterternary.py new file mode 100644 index 00000000000..2221eadd54d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_scatterternary.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatterternary diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_splom.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_splom.py new file mode 100644 index 00000000000..0909cdfd9dd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_splom.py @@ -0,0 +1 @@ +from plotly.graph_objs import Splom diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_streamtube.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_streamtube.py new file mode 100644 index 00000000000..8b23c3161cb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_streamtube.py @@ -0,0 +1 @@ +from plotly.graph_objs import Streamtube diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_sunburst.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_sunburst.py new file mode 100644 index 00000000000..1b9511c7d5b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_sunburst.py @@ -0,0 +1 @@ +from plotly.graph_objs import Sunburst diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_surface.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_surface.py new file mode 100644 index 00000000000..cfaa55d7385 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_surface.py @@ -0,0 +1 @@ +from plotly.graph_objs import Surface diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_table.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_table.py new file mode 100644 index 00000000000..2b6d4ad1e57 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_table.py @@ -0,0 +1 @@ +from plotly.graph_objs import Table diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_treemap.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_treemap.py new file mode 100644 index 00000000000..5c648e7108e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_treemap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Treemap diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_violin.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_violin.py new file mode 100644 index 00000000000..23221b66776 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_violin.py @@ -0,0 +1 @@ +from plotly.graph_objs import Violin diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_volume.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_volume.py new file mode 100644 index 00000000000..1128580ca0f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_volume.py @@ -0,0 +1 @@ +from plotly.graph_objs import Volume diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/_waterfall.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/_waterfall.py new file mode 100644 index 00000000000..c45e7852a2c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/_waterfall.py @@ -0,0 +1 @@ +from plotly.graph_objs import Waterfall diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py index 0519c0f230e..ac9c0b61532 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py @@ -1,5390 +1,18 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Domain(_BaseLayoutHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this ternary subplot . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this ternary subplot . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this ternary subplot (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this ternary subplot (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this ternary subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this ternary subplot . - x - Sets the horizontal domain of this ternary subplot (in - plot fraction). - y - Sets the vertical domain of this ternary subplot (in - plot fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this ternary subplot . - row - If there is a layout grid, use the domain for this row - in the grid for this ternary subplot . - x - Sets the horizontal domain of this ternary subplot (in - plot fraction). - y - Sets the vertical domain of this ternary subplot (in - plot fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.ternary.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Caxis(_BaseLayoutHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # min - # --- - @property - def min(self): - """ - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the other two - axes. The full view corresponds to all the minima set to zero. - - The 'min' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["min"] - - @min.setter - def min(self, val): - self["min"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.ternary.caxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.ternary.caxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.ternary.caxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.ternary.caxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.ternary.caxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.ternary.caxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.ternary.caxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.ternary.caxis.title.font instead. - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `min`, and - `title` if in `editable: true` configuration. Defaults to - `ternary.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the - other two axes. The full view corresponds to all the - minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.ternary. - caxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.tern - ary.caxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.ternary.caxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.caxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.ternary.caxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in axis - `min`, and `title` if in `editable: true` - configuration. Defaults to `ternary.uirevision`. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - min=None, - nticks=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - uirevision=None, - **kwargs - ): - """ - Construct a new Caxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.Caxis` - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the - other two axes. The full view corresponds to all the - minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.ternary. - caxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.tern - ary.caxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.ternary.caxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.caxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.ternary.caxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in axis - `min`, and `title` if in `editable: true` - configuration. Defaults to `ternary.uirevision`. - - Returns - ------- - Caxis - """ - super(Caxis, self).__init__("caxis") - - # Validate arg - # ------------ - 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.ternary.Caxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.Caxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary import caxis as v_caxis - - # Initialize validators - # --------------------- - self._validators["color"] = v_caxis.ColorValidator() - self._validators["dtick"] = v_caxis.DtickValidator() - self._validators["exponentformat"] = v_caxis.ExponentformatValidator() - self._validators["gridcolor"] = v_caxis.GridcolorValidator() - self._validators["gridwidth"] = v_caxis.GridwidthValidator() - self._validators["hoverformat"] = v_caxis.HoverformatValidator() - self._validators["layer"] = v_caxis.LayerValidator() - self._validators["linecolor"] = v_caxis.LinecolorValidator() - self._validators["linewidth"] = v_caxis.LinewidthValidator() - self._validators["min"] = v_caxis.MinValidator() - self._validators["nticks"] = v_caxis.NticksValidator() - self._validators["separatethousands"] = v_caxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_caxis.ShowexponentValidator() - self._validators["showgrid"] = v_caxis.ShowgridValidator() - self._validators["showline"] = v_caxis.ShowlineValidator() - self._validators["showticklabels"] = v_caxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_caxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_caxis.ShowticksuffixValidator() - self._validators["tick0"] = v_caxis.Tick0Validator() - self._validators["tickangle"] = v_caxis.TickangleValidator() - self._validators["tickcolor"] = v_caxis.TickcolorValidator() - self._validators["tickfont"] = v_caxis.TickfontValidator() - self._validators["tickformat"] = v_caxis.TickformatValidator() - self._validators["tickformatstops"] = v_caxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_caxis.TickformatstopValidator() - self._validators["ticklen"] = v_caxis.TicklenValidator() - self._validators["tickmode"] = v_caxis.TickmodeValidator() - self._validators["tickprefix"] = v_caxis.TickprefixValidator() - self._validators["ticks"] = v_caxis.TicksValidator() - self._validators["ticksuffix"] = v_caxis.TicksuffixValidator() - self._validators["ticktext"] = v_caxis.TicktextValidator() - self._validators["ticktextsrc"] = v_caxis.TicktextsrcValidator() - self._validators["tickvals"] = v_caxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_caxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_caxis.TickwidthValidator() - self._validators["title"] = v_caxis.TitleValidator() - self._validators["uirevision"] = v_caxis.UirevisionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("min", None) - self["min"] = min if min is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Baxis(_BaseLayoutHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # min - # --- - @property - def min(self): - """ - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the other two - axes. The full view corresponds to all the minima set to zero. - - The 'min' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["min"] - - @min.setter - def min(self, val): - self["min"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.ternary.baxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.ternary.baxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.ternary.baxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.ternary.baxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.ternary.baxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.ternary.baxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.ternary.baxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.ternary.baxis.title.font instead. - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `min`, and - `title` if in `editable: true` configuration. Defaults to - `ternary.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the - other two axes. The full view corresponds to all the - minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.ternary. - baxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.tern - ary.baxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.ternary.baxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.baxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.ternary.baxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in axis - `min`, and `title` if in `editable: true` - configuration. Defaults to `ternary.uirevision`. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - min=None, - nticks=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - uirevision=None, - **kwargs - ): - """ - Construct a new Baxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.Baxis` - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the - other two axes. The full view corresponds to all the - minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.ternary. - baxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.tern - ary.baxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.ternary.baxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.baxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.ternary.baxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in axis - `min`, and `title` if in `editable: true` - configuration. Defaults to `ternary.uirevision`. - - Returns - ------- - Baxis - """ - super(Baxis, self).__init__("baxis") - - # Validate arg - # ------------ - 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.ternary.Baxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.Baxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary import baxis as v_baxis - - # Initialize validators - # --------------------- - self._validators["color"] = v_baxis.ColorValidator() - self._validators["dtick"] = v_baxis.DtickValidator() - self._validators["exponentformat"] = v_baxis.ExponentformatValidator() - self._validators["gridcolor"] = v_baxis.GridcolorValidator() - self._validators["gridwidth"] = v_baxis.GridwidthValidator() - self._validators["hoverformat"] = v_baxis.HoverformatValidator() - self._validators["layer"] = v_baxis.LayerValidator() - self._validators["linecolor"] = v_baxis.LinecolorValidator() - self._validators["linewidth"] = v_baxis.LinewidthValidator() - self._validators["min"] = v_baxis.MinValidator() - self._validators["nticks"] = v_baxis.NticksValidator() - self._validators["separatethousands"] = v_baxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_baxis.ShowexponentValidator() - self._validators["showgrid"] = v_baxis.ShowgridValidator() - self._validators["showline"] = v_baxis.ShowlineValidator() - self._validators["showticklabels"] = v_baxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_baxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_baxis.ShowticksuffixValidator() - self._validators["tick0"] = v_baxis.Tick0Validator() - self._validators["tickangle"] = v_baxis.TickangleValidator() - self._validators["tickcolor"] = v_baxis.TickcolorValidator() - self._validators["tickfont"] = v_baxis.TickfontValidator() - self._validators["tickformat"] = v_baxis.TickformatValidator() - self._validators["tickformatstops"] = v_baxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_baxis.TickformatstopValidator() - self._validators["ticklen"] = v_baxis.TicklenValidator() - self._validators["tickmode"] = v_baxis.TickmodeValidator() - self._validators["tickprefix"] = v_baxis.TickprefixValidator() - self._validators["ticks"] = v_baxis.TicksValidator() - self._validators["ticksuffix"] = v_baxis.TicksuffixValidator() - self._validators["ticktext"] = v_baxis.TicktextValidator() - self._validators["ticktextsrc"] = v_baxis.TicktextsrcValidator() - self._validators["tickvals"] = v_baxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_baxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_baxis.TickwidthValidator() - self._validators["title"] = v_baxis.TitleValidator() - self._validators["uirevision"] = v_baxis.UirevisionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("min", None) - self["min"] = min if min is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Aaxis(_BaseLayoutHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # gridcolor - # --------- - @property - def gridcolor(self): - """ - Sets the color of the grid lines. - - The 'gridcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["gridcolor"] - - @gridcolor.setter - def gridcolor(self, val): - self["gridcolor"] = val - - # gridwidth - # --------- - @property - def gridwidth(self): - """ - Sets the width (in px) of the grid lines. - - The 'gridwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["gridwidth"] - - @gridwidth.setter - def gridwidth(self, val): - self["gridwidth"] = val - - # hoverformat - # ----------- - @property - def hoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'hoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hoverformat"] - - @hoverformat.setter - def hoverformat(self, val): - self["hoverformat"] = val - - # layer - # ----- - @property - def layer(self): - """ - Sets the layer on which this axis is displayed. If *above - traces*, this axis is displayed above all the subplot's traces - If *below traces*, this axis is displayed below all the - subplot's traces, but above the grid lines. Useful when used - together with scatter-like traces with `cliponaxis` set to - False to show markers and/or text nodes above this axis. - - The 'layer' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['above traces', 'below traces'] - - Returns - ------- - Any - """ - return self["layer"] - - @layer.setter - def layer(self, val): - self["layer"] = val - - # linecolor - # --------- - @property - def linecolor(self): - """ - Sets the axis line color. - - The 'linecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["linecolor"] - - @linecolor.setter - def linecolor(self, val): - self["linecolor"] = val - - # linewidth - # --------- - @property - def linewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'linewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["linewidth"] - - @linewidth.setter - def linewidth(self, val): - self["linewidth"] = val - - # min - # --- - @property - def min(self): - """ - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the other two - axes. The full view corresponds to all the minima set to zero. - - The 'min' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["min"] - - @min.setter - def min(self, val): - self["min"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showgrid - # -------- - @property - def showgrid(self): - """ - Determines whether or not grid lines are drawn. If True, the - grid lines are drawn at every tick mark. - - The 'showgrid' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showgrid"] - - @showgrid.setter - def showgrid(self, val): - self["showgrid"] = val - - # showline - # -------- - @property - def showline(self): - """ - Determines whether or not a line bounding this axis is drawn. - - The 'showline' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showline"] - - @showline.setter - def showline(self, val): - self["showline"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the tick font. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.ternary.aaxis.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.ternary.aaxis.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.layout.ternary.aaxis.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.layout.ternary.aaxis.tickformatstopdefaults), - sets the default property values to use for elements of - layout.ternary.aaxis.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.ternary.aaxis.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. - - Returns - ------- - plotly.graph_objs.layout.ternary.aaxis.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.ternary.aaxis.title.font instead. - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of user-driven changes in axis `min`, and - `title` if in `editable: true` configuration. Defaults to - `ternary.uirevision`. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the - other two axes. The full view corresponds to all the - minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.ternary. - aaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.tern - ary.aaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.ternary.aaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.aaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.ternary.aaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in axis - `min`, and `title` if in `editable: true` - configuration. Defaults to `ternary.uirevision`. - """ - - _mapped_properties = {"titlefont": ("title", "font")} - - def __init__( - self, - arg=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - layer=None, - linecolor=None, - linewidth=None, - min=None, - nticks=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - uirevision=None, - **kwargs - ): - """ - Construct a new Aaxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.Aaxis` - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - layer - Sets the layer on which this axis is displayed. If - *above traces*, this axis is displayed above all the - subplot's traces If *below traces*, this axis is - displayed below all the subplot's traces, but above the - grid lines. Useful when used together with scatter-like - traces with `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The maximum is - determined by the sum minus the minimum values of the - other two axes. The full view corresponds to all the - minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. If - True, the grid lines are drawn at every tick mark. - showline - Determines whether or not a line bounding this axis is - drawn. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout.ternary. - aaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.layout.tern - ary.aaxis.tickformatstopdefaults), sets the default - property values to use for elements of - layout.ternary.aaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.aaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.ternary.aaxis.title.font - instead. Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in axis - `min`, and `title` if in `editable: true` - configuration. Defaults to `ternary.uirevision`. - - Returns - ------- - Aaxis - """ - super(Aaxis, self).__init__("aaxis") - - # Validate arg - # ------------ - 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.ternary.Aaxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.Aaxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary import aaxis as v_aaxis - - # Initialize validators - # --------------------- - self._validators["color"] = v_aaxis.ColorValidator() - self._validators["dtick"] = v_aaxis.DtickValidator() - self._validators["exponentformat"] = v_aaxis.ExponentformatValidator() - self._validators["gridcolor"] = v_aaxis.GridcolorValidator() - self._validators["gridwidth"] = v_aaxis.GridwidthValidator() - self._validators["hoverformat"] = v_aaxis.HoverformatValidator() - self._validators["layer"] = v_aaxis.LayerValidator() - self._validators["linecolor"] = v_aaxis.LinecolorValidator() - self._validators["linewidth"] = v_aaxis.LinewidthValidator() - self._validators["min"] = v_aaxis.MinValidator() - self._validators["nticks"] = v_aaxis.NticksValidator() - self._validators["separatethousands"] = v_aaxis.SeparatethousandsValidator() - self._validators["showexponent"] = v_aaxis.ShowexponentValidator() - self._validators["showgrid"] = v_aaxis.ShowgridValidator() - self._validators["showline"] = v_aaxis.ShowlineValidator() - self._validators["showticklabels"] = v_aaxis.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_aaxis.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_aaxis.ShowticksuffixValidator() - self._validators["tick0"] = v_aaxis.Tick0Validator() - self._validators["tickangle"] = v_aaxis.TickangleValidator() - self._validators["tickcolor"] = v_aaxis.TickcolorValidator() - self._validators["tickfont"] = v_aaxis.TickfontValidator() - self._validators["tickformat"] = v_aaxis.TickformatValidator() - self._validators["tickformatstops"] = v_aaxis.TickformatstopsValidator() - self._validators["tickformatstopdefaults"] = v_aaxis.TickformatstopValidator() - self._validators["ticklen"] = v_aaxis.TicklenValidator() - self._validators["tickmode"] = v_aaxis.TickmodeValidator() - self._validators["tickprefix"] = v_aaxis.TickprefixValidator() - self._validators["ticks"] = v_aaxis.TicksValidator() - self._validators["ticksuffix"] = v_aaxis.TicksuffixValidator() - self._validators["ticktext"] = v_aaxis.TicktextValidator() - self._validators["ticktextsrc"] = v_aaxis.TicktextsrcValidator() - self._validators["tickvals"] = v_aaxis.TickvalsValidator() - self._validators["tickvalssrc"] = v_aaxis.TickvalssrcValidator() - self._validators["tickwidth"] = v_aaxis.TickwidthValidator() - self._validators["title"] = v_aaxis.TitleValidator() - self._validators["uirevision"] = v_aaxis.UirevisionValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("gridcolor", None) - self["gridcolor"] = gridcolor if gridcolor is not None else _v - _v = arg.pop("gridwidth", None) - self["gridwidth"] = gridwidth if gridwidth is not None else _v - _v = arg.pop("hoverformat", None) - self["hoverformat"] = hoverformat if hoverformat is not None else _v - _v = arg.pop("layer", None) - self["layer"] = layer if layer is not None else _v - _v = arg.pop("linecolor", None) - self["linecolor"] = linecolor if linecolor is not None else _v - _v = arg.pop("linewidth", None) - self["linewidth"] = linewidth if linewidth is not None else _v - _v = arg.pop("min", None) - self["min"] = min if min is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showgrid", None) - self["showgrid"] = showgrid if showgrid is not None else _v - _v = arg.pop("showline", None) - self["showline"] = showline if showline is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Aaxis", "Baxis", "Caxis", "Domain", "aaxis", "baxis", "caxis"] - -from plotly.graph_objs.layout.ternary import caxis -from plotly.graph_objs.layout.ternary import baxis -from plotly.graph_objs.layout.ternary import aaxis +import sys + +if sys.version_info < (3, 7): + from ._domain import Domain + from ._caxis import Caxis + from ._baxis import Baxis + from ._aaxis import Aaxis + from . import caxis + from . import baxis + from . import aaxis +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".caxis", ".baxis", ".aaxis"], + ["._domain.Domain", "._caxis.Caxis", "._baxis.Baxis", "._aaxis.Aaxis"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py new file mode 100644 index 00000000000..70ff4a88731 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py @@ -0,0 +1,1793 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Aaxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary" + _path_str = "layout.ternary.aaxis" + _valid_props = { + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "min", + "nticks", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "uirevision", + } + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # min + # --- + @property + def min(self): + """ + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the other two + axes. The full view corresponds to all the minima set to zero. + + The 'min' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["min"] + + @min.setter + def min(self, val): + self["min"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.ternary.aaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.ternary.aaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.ternary.aaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.ternary.aaxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.ternary.aaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.ternary.aaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.ternary.aaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.ternary.aaxis.title.font instead. + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `min`, and + `title` if in `editable: true` configuration. Defaults to + `ternary.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the + other two axes. The full view corresponds to all the + minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.ternary. + aaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.tern + ary.aaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.ternary.aaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.aaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.ternary.aaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in axis + `min`, and `title` if in `editable: true` + configuration. Defaults to `ternary.uirevision`. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + min=None, + nticks=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + uirevision=None, + **kwargs + ): + """ + Construct a new Aaxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.Aaxis` + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the + other two axes. The full view corresponds to all the + minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.ternary. + aaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.tern + ary.aaxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.ternary.aaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.aaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.ternary.aaxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in axis + `min`, and `title` if in `editable: true` + configuration. Defaults to `ternary.uirevision`. + + Returns + ------- + Aaxis + """ + super(Aaxis, self).__init__("aaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.Aaxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.Aaxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("min", None) + _v = min if min is not None else _v + if _v is not None: + self["min"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py new file mode 100644 index 00000000000..c916bb05e50 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py @@ -0,0 +1,1793 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Baxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary" + _path_str = "layout.ternary.baxis" + _valid_props = { + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "min", + "nticks", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "uirevision", + } + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # min + # --- + @property + def min(self): + """ + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the other two + axes. The full view corresponds to all the minima set to zero. + + The 'min' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["min"] + + @min.setter + def min(self, val): + self["min"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.ternary.baxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.ternary.baxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.ternary.baxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.ternary.baxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.ternary.baxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.ternary.baxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.ternary.baxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.ternary.baxis.title.font instead. + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `min`, and + `title` if in `editable: true` configuration. Defaults to + `ternary.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the + other two axes. The full view corresponds to all the + minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.ternary. + baxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.tern + ary.baxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.ternary.baxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.baxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.ternary.baxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in axis + `min`, and `title` if in `editable: true` + configuration. Defaults to `ternary.uirevision`. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + min=None, + nticks=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + uirevision=None, + **kwargs + ): + """ + Construct a new Baxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.Baxis` + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the + other two axes. The full view corresponds to all the + minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.ternary. + baxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.tern + ary.baxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.ternary.baxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.baxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.ternary.baxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in axis + `min`, and `title` if in `editable: true` + configuration. Defaults to `ternary.uirevision`. + + Returns + ------- + Baxis + """ + super(Baxis, self).__init__("baxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.Baxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.Baxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("min", None) + _v = min if min is not None else _v + if _v is not None: + self["min"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py new file mode 100644 index 00000000000..30ae9ea72d5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py @@ -0,0 +1,1793 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Caxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary" + _path_str = "layout.ternary.caxis" + _valid_props = { + "color", + "dtick", + "exponentformat", + "gridcolor", + "gridwidth", + "hoverformat", + "layer", + "linecolor", + "linewidth", + "min", + "nticks", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "uirevision", + } + + # color + # ----- + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # gridcolor + # --------- + @property + def gridcolor(self): + """ + Sets the color of the grid lines. + + The 'gridcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + # gridwidth + # --------- + @property + def gridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + # hoverformat + # ----------- + @property + def hoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'hoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hoverformat"] + + @hoverformat.setter + def hoverformat(self, val): + self["hoverformat"] = val + + # layer + # ----- + @property + def layer(self): + """ + Sets the layer on which this axis is displayed. If *above + traces*, this axis is displayed above all the subplot's traces + If *below traces*, this axis is displayed below all the + subplot's traces, but above the grid lines. Useful when used + together with scatter-like traces with `cliponaxis` set to + False to show markers and/or text nodes above this axis. + + The 'layer' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['above traces', 'below traces'] + + Returns + ------- + Any + """ + return self["layer"] + + @layer.setter + def layer(self, val): + self["layer"] = val + + # linecolor + # --------- + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + # linewidth + # --------- + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + # min + # --- + @property + def min(self): + """ + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the other two + axes. The full view corresponds to all the minima set to zero. + + The 'min' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["min"] + + @min.setter + def min(self, val): + self["min"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showgrid + # -------- + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + # showline + # -------- + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.ternary.caxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.ternary.caxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.layout.ternary.caxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.layout.ternary.caxis.tickformatstopdefaults), + sets the default property values to use for elements of + layout.ternary.caxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.ternary.caxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. + + Returns + ------- + plotly.graph_objs.layout.ternary.caxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use layout.ternary.caxis.title.font instead. + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of user-driven changes in axis `min`, and + `title` if in `editable: true` configuration. Defaults to + `ternary.uirevision`. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the + other two axes. The full view corresponds to all the + minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.ternary. + caxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.tern + ary.caxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.ternary.caxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.caxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.ternary.caxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in axis + `min`, and `title` if in `editable: true` + configuration. Defaults to `ternary.uirevision`. + """ + + _mapped_properties = {"titlefont": ("title", "font")} + + def __init__( + self, + arg=None, + color=None, + dtick=None, + exponentformat=None, + gridcolor=None, + gridwidth=None, + hoverformat=None, + layer=None, + linecolor=None, + linewidth=None, + min=None, + nticks=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + uirevision=None, + **kwargs + ): + """ + Construct a new Caxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.Caxis` + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + layer + Sets the layer on which this axis is displayed. If + *above traces*, this axis is displayed above all the + subplot's traces If *below traces*, this axis is + displayed below all the subplot's traces, but above the + grid lines. Useful when used together with scatter-like + traces with `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The maximum is + determined by the sum minus the minimum values of the + other two axes. The full view corresponds to all the + minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout.ternary. + caxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.layout.tern + ary.caxis.tickformatstopdefaults), sets the default + property values to use for elements of + layout.ternary.caxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.caxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.ternary.caxis.title.font + instead. Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in axis + `min`, and `title` if in `editable: true` + configuration. Defaults to `ternary.uirevision`. + + Returns + ------- + Caxis + """ + super(Caxis, self).__init__("caxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.Caxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.Caxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("gridcolor", None) + _v = gridcolor if gridcolor is not None else _v + if _v is not None: + self["gridcolor"] = _v + _v = arg.pop("gridwidth", None) + _v = gridwidth if gridwidth is not None else _v + if _v is not None: + self["gridwidth"] = _v + _v = arg.pop("hoverformat", None) + _v = hoverformat if hoverformat is not None else _v + if _v is not None: + self["hoverformat"] = _v + _v = arg.pop("layer", None) + _v = layer if layer is not None else _v + if _v is not None: + self["layer"] = _v + _v = arg.pop("linecolor", None) + _v = linecolor if linecolor is not None else _v + if _v is not None: + self["linecolor"] = _v + _v = arg.pop("linewidth", None) + _v = linewidth if linewidth is not None else _v + if _v is not None: + self["linewidth"] = _v + _v = arg.pop("min", None) + _v = min if min is not None else _v + if _v is not None: + self["min"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showgrid", None) + _v = showgrid if showgrid is not None else _v + if _v is not None: + self["showgrid"] = _v + _v = arg.pop("showline", None) + _v = showline if showline is not None else _v + if _v is not None: + self["showline"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("uirevision", None) + _v = uirevision if uirevision is not None else _v + if _v is not None: + self["uirevision"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_domain.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_domain.py new file mode 100644 index 00000000000..577186f929a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Domain(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary" + _path_str = "layout.ternary.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this ternary subplot . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this ternary subplot . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this ternary subplot (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this ternary subplot (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this ternary subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this ternary subplot . + x + Sets the horizontal domain of this ternary subplot (in + plot fraction). + y + Sets the vertical domain of this ternary subplot (in + plot fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this ternary subplot . + row + If there is a layout grid, use the domain for this row + in the grid for this ternary subplot . + x + Sets the horizontal domain of this ternary subplot (in + plot fraction). + y + Sets the vertical domain of this ternary subplot (in + plot fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py index 5f57bb595aa..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.ternary.aaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.aaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.aaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.ternary.aaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.aaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.aaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .aaxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.ternary.aaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.aaxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.aaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .aaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.ternary.aaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.aaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.ternary.aaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py new file mode 100644 index 00000000000..3c6437ef625 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.aaxis" + _path_str = "layout.ternary.aaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .aaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.aaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py new file mode 100644 index 00000000000..7c52597d55f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.aaxis" + _path_str = "layout.ternary.aaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .aaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.aaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_title.py new file mode 100644 index 00000000000..54d6a1b5076 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.aaxis" + _path_str = "layout.ternary.aaxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.ternary.aaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.aaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.aaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py index d2200e850bc..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.aaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .aaxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.ternary.aaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.aaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/_font.py new file mode 100644 index 00000000000..91201aef3e8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.aaxis.title" + _path_str = "layout.ternary.aaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .aaxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.aaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py index 818ea813585..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.ternary.baxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.baxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.baxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.ternary.baxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.baxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.baxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .baxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.ternary.baxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.baxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.baxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .baxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.ternary.baxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.baxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.ternary.baxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_tickfont.py new file mode 100644 index 00000000000..faa80771b73 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.baxis" + _path_str = "layout.ternary.baxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .baxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.baxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py new file mode 100644 index 00000000000..85f4ef6f66d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.baxis" + _path_str = "layout.ternary.baxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .baxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.baxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_title.py new file mode 100644 index 00000000000..91cdd5275b2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.baxis" + _path_str = "layout.ternary.baxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.ternary.baxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.baxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.baxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py index a1239d4c64a..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.baxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .baxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.ternary.baxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.baxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/_font.py new file mode 100644 index 00000000000..bd817cc017d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.baxis.title" + _path_str = "layout.ternary.baxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .baxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.baxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py index bc0e9a3db4d..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py @@ -1,688 +1,15 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.ternary.caxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.caxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.ternary.caxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.ternary.caxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.caxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.caxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .caxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.ternary.caxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.caxis import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.caxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .caxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.ternary.caxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.caxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.layout.ternary.caxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_tickfont.py new file mode 100644 index 00000000000..96391226ff9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.caxis" + _path_str = "layout.ternary.caxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .caxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.caxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py new file mode 100644 index 00000000000..60994cbe707 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.caxis" + _path_str = "layout.ternary.caxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .caxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.caxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_title.py new file mode 100644 index 00000000000..d8ca6dac912 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/_title.py @@ -0,0 +1,166 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.caxis" + _path_str = "layout.ternary.caxis.title" + _valid_props = {"font", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.ternary.caxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.ternary.caxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.caxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py index 9196bc15ba1..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.ternary.caxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.ternary - .caxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.ternary.caxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.ternary.caxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/_font.py new file mode 100644 index 00000000000..34cd0bb8cf0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.ternary.caxis.title" + _path_str = "layout.ternary.caxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.ternary + .caxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ternary.caxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py index 53f9a18be2f..cd4cff580b1 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py @@ -1,431 +1,11 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._pad import Pad + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Pad(_BaseLayoutHierarchyType): - - # b - # - - @property - def b(self): - """ - The amount of padding (in px) along the bottom of the - component. - - The 'b' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # l - # - - @property - def l(self): - """ - The amount of padding (in px) on the left side of the - component. - - The 'l' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["l"] - - @l.setter - def l(self, val): - self["l"] = val - - # r - # - - @property - def r(self): - """ - The amount of padding (in px) on the right side of the - component. - - The 'r' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # t - # - - @property - def t(self): - """ - The amount of padding (in px) along the top of the component. - - The 't' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - b - The amount of padding (in px) along the bottom of the - component. - l - The amount of padding (in px) on the left side of the - component. - r - The amount of padding (in px) on the right side of the - component. - t - The amount of padding (in px) along the top of the - component. - """ - - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): - """ - Construct a new Pad object - - Sets the padding of the title. Each padding value only applies - when the corresponding `xanchor`/`yanchor` value is set - accordingly. E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined automatically. Padding is - muted if the respective anchor value is "middle*/*center". - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.title.Pad` - b - The amount of padding (in px) along the bottom of the - component. - l - The amount of padding (in px) on the left side of the - component. - r - The amount of padding (in px) on the right side of the - component. - t - The amount of padding (in px) along the top of the - component. - - Returns - ------- - Pad - """ - super(Pad, self).__init__("pad") - - # Validate arg - # ------------ - 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.title.Pad -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.title.Pad`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.title import pad as v_pad - - # Initialize validators - # --------------------- - self._validators["b"] = v_pad.BValidator() - self._validators["l"] = v_pad.LValidator() - self._validators["r"] = v_pad.RValidator() - self._validators["t"] = v_pad.TValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("l", None) - self["l"] = l if l is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font", "Pad"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._pad.Pad", "._font.Font"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/title/_font.py new file mode 100644 index 00000000000..fe292cba640 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.title" + _path_str = "layout.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/title/_pad.py b/packages/python/plotly/plotly/graph_objs/layout/title/_pad.py new file mode 100644 index 00000000000..335997afb95 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/title/_pad.py @@ -0,0 +1,200 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Pad(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.title" + _path_str = "layout.title.pad" + _valid_props = {"b", "l", "r", "t"} + + # b + # - + @property + def b(self): + """ + The amount of padding (in px) along the bottom of the + component. + + The 'b' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # l + # - + @property + def l(self): + """ + The amount of padding (in px) on the left side of the + component. + + The 'l' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["l"] + + @l.setter + def l(self, val): + self["l"] = val + + # r + # - + @property + def r(self): + """ + The amount of padding (in px) on the right side of the + component. + + The 'r' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # t + # - + @property + def t(self): + """ + The amount of padding (in px) along the top of the component. + + The 't' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + b + The amount of padding (in px) along the bottom of the + component. + l + The amount of padding (in px) on the left side of the + component. + r + The amount of padding (in px) on the right side of the + component. + t + The amount of padding (in px) along the top of the + component. + """ + + def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + """ + Construct a new Pad object + + Sets the padding of the title. Each padding value only applies + when the corresponding `xanchor`/`yanchor` value is set + accordingly. E.g. for left padding to take effect, `xanchor` + must be set to "left". The same rule applies if + `xanchor`/`yanchor` is determined automatically. Padding is + muted if the respective anchor value is "middle*/*center". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.title.Pad` + b + The amount of padding (in px) along the bottom of the + component. + l + The amount of padding (in px) on the left side of the + component. + r + The amount of padding (in px) on the right side of the + component. + t + The amount of padding (in px) along the top of the + component. + + Returns + ------- + Pad + """ + super(Pad, self).__init__("pad") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.title.Pad +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.title.Pad`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("l", None) + _v = l if l is not None else _v + if _v is not None: + self["l"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py index 57c63d44d4e..b62ebf46f26 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py @@ -1,830 +1,12 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Pad(_BaseLayoutHierarchyType): - - # b - # - - @property - def b(self): - """ - The amount of padding (in px) along the bottom of the - component. - - The 'b' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # l - # - - @property - def l(self): - """ - The amount of padding (in px) on the left side of the - component. - - The 'l' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["l"] - - @l.setter - def l(self, val): - self["l"] = val - - # r - # - - @property - def r(self): - """ - The amount of padding (in px) on the right side of the - component. - - The 'r' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # t - # - - @property - def t(self): - """ - The amount of padding (in px) along the top of the component. - - The 't' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.updatemenu" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - b - The amount of padding (in px) along the bottom of the - component. - l - The amount of padding (in px) on the left side of the - component. - r - The amount of padding (in px) on the right side of the - component. - t - The amount of padding (in px) along the top of the - component. - """ - - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): - """ - Construct a new Pad object - - Sets the padding around the buttons or dropdown menu. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.updatemenu.Pad` - b - The amount of padding (in px) along the bottom of the - component. - l - The amount of padding (in px) on the left side of the - component. - r - The amount of padding (in px) on the right side of the - component. - t - The amount of padding (in px) along the top of the - component. - - Returns - ------- - Pad - """ - super(Pad, self).__init__("pad") - - # Validate arg - # ------------ - 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.updatemenu.Pad -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.updatemenu.Pad`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.updatemenu import pad as v_pad - - # Initialize validators - # --------------------- - self._validators["b"] = v_pad.BValidator() - self._validators["l"] = v_pad.LValidator() - self._validators["r"] = v_pad.RValidator() - self._validators["t"] = v_pad.TValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("l", None) - self["l"] = l if l is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.updatemenu" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the font of the update menu button text. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.updatemenu.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.updatemenu.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.updatemenu.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.updatemenu import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Button(_BaseLayoutHierarchyType): - - # args - # ---- - @property - def args(self): - """ - Sets the arguments values to be passed to the Plotly method set - in `method` on click. - - The 'args' property is an info array that may be specified as: - - * a list or tuple of up to 3 elements where: - (0) The 'args[0]' property accepts values of any type - (1) The 'args[1]' property accepts values of any type - (2) The 'args[2]' property accepts values of any type - - Returns - ------- - list - """ - return self["args"] - - @args.setter - def args(self, val): - self["args"] = val - - # args2 - # ----- - @property - def args2(self): - """ - Sets a 2nd set of `args`, these arguments values are passed to - the Plotly method set in `method` when clicking this button - while in the active state. Use this to create toggle buttons. - - The 'args2' property is an info array that may be specified as: - - * a list or tuple of up to 3 elements where: - (0) The 'args2[0]' property accepts values of any type - (1) The 'args2[1]' property accepts values of any type - (2) The 'args2[2]' property accepts values of any type - - Returns - ------- - list - """ - return self["args2"] - - @args2.setter - def args2(self, val): - self["args2"] = val - - # execute - # ------- - @property - def execute(self): - """ - When true, the API method is executed. When false, all other - behaviors are the same and command execution is skipped. This - may be useful when hooking into, for example, the - `plotly_buttonclicked` method and executing the API command - manually without losing the benefit of the updatemenu - automatically binding to the state of the plot through the - specification of `method` and `args`. - - The 'execute' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["execute"] - - @execute.setter - def execute(self, val): - self["execute"] = val - - # label - # ----- - @property - def label(self): - """ - Sets the text label to appear on the button. - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # method - # ------ - @property - def method(self): - """ - Sets the Plotly method to be called on click. If the `skip` - method is used, the API updatemenu will function as normal but - will perform no API calls and will not bind automatically to - state updates. This may be used to create a component interface - and attach to updatemenu events manually via JavaScript. - - The 'method' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['restyle', 'relayout', 'animate', 'update', 'skip'] - - Returns - ------- - Any - """ - return self["method"] - - @method.setter - def method(self, val): - self["method"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this button is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.updatemenu" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - args - Sets the arguments values to be passed to the Plotly - method set in `method` on click. - args2 - Sets a 2nd set of `args`, these arguments values are - passed to the Plotly method set in `method` when - clicking this button while in the active state. Use - this to create toggle buttons. - execute - When true, the API method is executed. When false, all - other behaviors are the same and command execution is - skipped. This may be useful when hooking into, for - example, the `plotly_buttonclicked` method and - executing the API command manually without losing the - benefit of the updatemenu automatically binding to the - state of the plot through the specification of `method` - and `args`. - label - Sets the text label to appear on the button. - method - Sets the Plotly method to be called on click. If the - `skip` method is used, the API updatemenu will function - as normal but will perform no API calls and will not - bind automatically to state updates. This may be used - to create a component interface and attach to - updatemenu events manually via JavaScript. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - visible - Determines whether or not this button is visible. - """ - - def __init__( - self, - arg=None, - args=None, - args2=None, - execute=None, - label=None, - method=None, - name=None, - templateitemname=None, - visible=None, - **kwargs - ): - """ - Construct a new Button object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.updatemenu.Button` - args - Sets the arguments values to be passed to the Plotly - method set in `method` on click. - args2 - Sets a 2nd set of `args`, these arguments values are - passed to the Plotly method set in `method` when - clicking this button while in the active state. Use - this to create toggle buttons. - execute - When true, the API method is executed. When false, all - other behaviors are the same and command execution is - skipped. This may be useful when hooking into, for - example, the `plotly_buttonclicked` method and - executing the API command manually without losing the - benefit of the updatemenu automatically binding to the - state of the plot through the specification of `method` - and `args`. - label - Sets the text label to appear on the button. - method - Sets the Plotly method to be called on click. If the - `skip` method is used, the API updatemenu will function - as normal but will perform no API calls and will not - bind automatically to state updates. This may be used - to create a component interface and attach to - updatemenu events manually via JavaScript. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - visible - Determines whether or not this button is visible. - - Returns - ------- - Button - """ - super(Button, self).__init__("buttons") - - # Validate arg - # ------------ - 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.updatemenu.Button -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.updatemenu.Button`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.updatemenu import button as v_button - - # Initialize validators - # --------------------- - self._validators["args"] = v_button.ArgsValidator() - self._validators["args2"] = v_button.Args2Validator() - self._validators["execute"] = v_button.ExecuteValidator() - self._validators["label"] = v_button.LabelValidator() - self._validators["method"] = v_button.MethodValidator() - self._validators["name"] = v_button.NameValidator() - self._validators["templateitemname"] = v_button.TemplateitemnameValidator() - self._validators["visible"] = v_button.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("args", None) - self["args"] = args if args is not None else _v - _v = arg.pop("args2", None) - self["args2"] = args2 if args2 is not None else _v - _v = arg.pop("execute", None) - self["execute"] = execute if execute is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("method", None) - self["method"] = method if method is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Button", "Button", "Font", "Pad"] +import sys + +if sys.version_info < (3, 7): + from ._pad import Pad + from ._font import Font + from ._button import Button +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._pad.Pad", "._font.Font", "._button.Button"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_button.py b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_button.py new file mode 100644 index 00000000000..ccb4618ac4a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_button.py @@ -0,0 +1,415 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Button(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.updatemenu" + _path_str = "layout.updatemenu.button" + _valid_props = { + "args", + "args2", + "execute", + "label", + "method", + "name", + "templateitemname", + "visible", + } + + # args + # ---- + @property + def args(self): + """ + Sets the arguments values to be passed to the Plotly method set + in `method` on click. + + The 'args' property is an info array that may be specified as: + + * a list or tuple of up to 3 elements where: + (0) The 'args[0]' property accepts values of any type + (1) The 'args[1]' property accepts values of any type + (2) The 'args[2]' property accepts values of any type + + Returns + ------- + list + """ + return self["args"] + + @args.setter + def args(self, val): + self["args"] = val + + # args2 + # ----- + @property + def args2(self): + """ + Sets a 2nd set of `args`, these arguments values are passed to + the Plotly method set in `method` when clicking this button + while in the active state. Use this to create toggle buttons. + + The 'args2' property is an info array that may be specified as: + + * a list or tuple of up to 3 elements where: + (0) The 'args2[0]' property accepts values of any type + (1) The 'args2[1]' property accepts values of any type + (2) The 'args2[2]' property accepts values of any type + + Returns + ------- + list + """ + return self["args2"] + + @args2.setter + def args2(self, val): + self["args2"] = val + + # execute + # ------- + @property + def execute(self): + """ + When true, the API method is executed. When false, all other + behaviors are the same and command execution is skipped. This + may be useful when hooking into, for example, the + `plotly_buttonclicked` method and executing the API command + manually without losing the benefit of the updatemenu + automatically binding to the state of the plot through the + specification of `method` and `args`. + + The 'execute' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["execute"] + + @execute.setter + def execute(self, val): + self["execute"] = val + + # label + # ----- + @property + def label(self): + """ + Sets the text label to appear on the button. + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # method + # ------ + @property + def method(self): + """ + Sets the Plotly method to be called on click. If the `skip` + method is used, the API updatemenu will function as normal but + will perform no API calls and will not bind automatically to + state updates. This may be used to create a component interface + and attach to updatemenu events manually via JavaScript. + + The 'method' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['restyle', 'relayout', 'animate', 'update', 'skip'] + + Returns + ------- + Any + """ + return self["method"] + + @method.setter + def method(self, val): + self["method"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this button is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + args + Sets the arguments values to be passed to the Plotly + method set in `method` on click. + args2 + Sets a 2nd set of `args`, these arguments values are + passed to the Plotly method set in `method` when + clicking this button while in the active state. Use + this to create toggle buttons. + execute + When true, the API method is executed. When false, all + other behaviors are the same and command execution is + skipped. This may be useful when hooking into, for + example, the `plotly_buttonclicked` method and + executing the API command manually without losing the + benefit of the updatemenu automatically binding to the + state of the plot through the specification of `method` + and `args`. + label + Sets the text label to appear on the button. + method + Sets the Plotly method to be called on click. If the + `skip` method is used, the API updatemenu will function + as normal but will perform no API calls and will not + bind automatically to state updates. This may be used + to create a component interface and attach to + updatemenu events manually via JavaScript. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this button is visible. + """ + + def __init__( + self, + arg=None, + args=None, + args2=None, + execute=None, + label=None, + method=None, + name=None, + templateitemname=None, + visible=None, + **kwargs + ): + """ + Construct a new Button object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.updatemenu.Button` + args + Sets the arguments values to be passed to the Plotly + method set in `method` on click. + args2 + Sets a 2nd set of `args`, these arguments values are + passed to the Plotly method set in `method` when + clicking this button while in the active state. Use + this to create toggle buttons. + execute + When true, the API method is executed. When false, all + other behaviors are the same and command execution is + skipped. This may be useful when hooking into, for + example, the `plotly_buttonclicked` method and + executing the API command manually without losing the + benefit of the updatemenu automatically binding to the + state of the plot through the specification of `method` + and `args`. + label + Sets the text label to appear on the button. + method + Sets the Plotly method to be called on click. If the + `skip` method is used, the API updatemenu will function + as normal but will perform no API calls and will not + bind automatically to state updates. This may be used + to create a component interface and attach to + updatemenu events manually via JavaScript. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this button is visible. + + Returns + ------- + Button + """ + super(Button, self).__init__("buttons") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.updatemenu.Button +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.updatemenu.Button`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("args", None) + _v = args if args is not None else _v + if _v is not None: + self["args"] = _v + _v = arg.pop("args2", None) + _v = args2 if args2 is not None else _v + if _v is not None: + self["args2"] = _v + _v = arg.pop("execute", None) + _v = execute if execute is not None else _v + if _v is not None: + self["execute"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("method", None) + _v = method if method is not None else _v + if _v is not None: + self["method"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_font.py b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_font.py new file mode 100644 index 00000000000..72aec658542 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.updatemenu" + _path_str = "layout.updatemenu.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the font of the update menu button text. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.updatemenu.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.updatemenu.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.updatemenu.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_pad.py b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_pad.py new file mode 100644 index 00000000000..cda763cf3f1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/_pad.py @@ -0,0 +1,195 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Pad(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.updatemenu" + _path_str = "layout.updatemenu.pad" + _valid_props = {"b", "l", "r", "t"} + + # b + # - + @property + def b(self): + """ + The amount of padding (in px) along the bottom of the + component. + + The 'b' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # l + # - + @property + def l(self): + """ + The amount of padding (in px) on the left side of the + component. + + The 'l' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["l"] + + @l.setter + def l(self, val): + self["l"] = val + + # r + # - + @property + def r(self): + """ + The amount of padding (in px) on the right side of the + component. + + The 'r' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # t + # - + @property + def t(self): + """ + The amount of padding (in px) along the top of the component. + + The 't' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + b + The amount of padding (in px) along the bottom of the + component. + l + The amount of padding (in px) on the left side of the + component. + r + The amount of padding (in px) on the right side of the + component. + t + The amount of padding (in px) along the top of the + component. + """ + + def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + """ + Construct a new Pad object + + Sets the padding around the buttons or dropdown menu. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.updatemenu.Pad` + b + The amount of padding (in px) along the bottom of the + component. + l + The amount of padding (in px) on the left side of the + component. + r + The amount of padding (in px) on the right side of the + component. + t + The amount of padding (in px) along the top of the + component. + + Returns + ------- + Pad + """ + super(Pad, self).__init__("pad") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.updatemenu.Pad +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.updatemenu.Pad`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("l", None) + _v = l if l is not None else _v + if _v is not None: + self["l"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py index d20748d7101..96fe91ecdf6 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py @@ -1,2223 +1,27 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.xaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # standoff - # -------- - @property - def standoff(self): - """ - Sets the standoff distance (in px) between the axis labels and - the title text The default value is a function of the axis tick - labels, the title `font.size` and the axis `linewidth`. Note - that the axis title position is always constrained within the - margins, so the actual standoff distance is always less than - the set or default value. By setting `standoff` and turning on - `automargin`, plotly.js will push the margins to fit the axis - title at given standoff distance. - - The 'standoff' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["standoff"] - - @standoff.setter - def standoff(self, val): - self["standoff"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - standoff - Sets the standoff distance (in px) between the axis - labels and the title text The default value is a - function of the axis tick labels, the title `font.size` - and the axis `linewidth`. Note that the axis title - position is always constrained within the margins, so - the actual standoff distance is always less than the - set or default value. By setting `standoff` and turning - on `automargin`, plotly.js will push the margins to fit - the axis title at given standoff distance. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - standoff - Sets the standoff distance (in px) between the axis - labels and the title text The default value is a - function of the axis tick labels, the title `font.size` - and the axis `linewidth`. Note that the axis title - position is always constrained within the margins, so - the actual standoff distance is always less than the - set or default value. By setting `standoff` and turning - on `automargin`, plotly.js will push the margins to fit - the axis title at given standoff distance. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.xaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["standoff"] = v_title.StandoffValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("standoff", None) - self["standoff"] = standoff if standoff is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.xaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.xaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Rangeslider(_BaseLayoutHierarchyType): - - # autorange - # --------- - @property - def autorange(self): - """ - Determines whether or not the range slider range is computed in - relation to the input data. If `range` is provided, then - `autorange` is set to False. - - The 'autorange' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autorange"] - - @autorange.setter - def autorange(self, val): - self["autorange"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the range slider. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the range slider. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the border width of the range slider. - - The 'borderwidth' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # range - # ----- - @property - def range(self): - """ - Sets the range of the range slider. If not set, defaults to the - full xaxis range. If the axis `type` is "log", then you must - take the log of your desired range. If the axis `type` is - "date", it should be date strings, like date data, though Date - objects and unix milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it should be - numbers, using the scale where each category is assigned a - serial number from zero in the order it appears. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - The height of the range slider as a fraction of the total plot - area height. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not the range slider will be visible. If - visible, perpendicular axes will be set to `fixedrange` - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - The 'yaxis' property is an instance of YAxis - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis` - - A dict of string/value properties that will be passed - to the YAxis constructor - - Supported dict properties: - - range - Sets the range of this axis for the - rangeslider. - rangemode - Determines whether or not the range of this - axis in the rangeslider use the same value than - in the main plot when zooming in/out. If - "auto", the autorange will be used. If "fixed", - the `range` is used. If "match", the current - range of the corresponding y-axis on the main - subplot is used. - - Returns - ------- - plotly.graph_objs.layout.xaxis.rangeslider.YAxis - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autorange - Determines whether or not the range slider range is - computed in relation to the input data. If `range` is - provided, then `autorange` is set to False. - bgcolor - Sets the background color of the range slider. - bordercolor - Sets the border color of the range slider. - borderwidth - Sets the border width of the range slider. - range - Sets the range of the range slider. If not set, - defaults to the full xaxis range. If the axis `type` is - "log", then you must take the log of your desired - range. If the axis `type` is "date", it should be date - strings, like date data, though Date objects and unix - milliseconds will be accepted and converted to strings. - If the axis `type` is "category", it should be numbers, - using the scale where each category is assigned a - serial number from zero in the order it appears. - thickness - The height of the range slider as a fraction of the - total plot area height. - visible - Determines whether or not the range slider will be - visible. If visible, perpendicular axes will be set to - `fixedrange` - yaxis - :class:`plotly.graph_objects.layout.xaxis.rangeslider.Y - Axis` instance or dict with compatible properties - """ - - def __init__( - self, - arg=None, - autorange=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - range=None, - thickness=None, - visible=None, - yaxis=None, - **kwargs - ): - """ - Construct a new Rangeslider object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.Rangeslider` - autorange - Determines whether or not the range slider range is - computed in relation to the input data. If `range` is - provided, then `autorange` is set to False. - bgcolor - Sets the background color of the range slider. - bordercolor - Sets the border color of the range slider. - borderwidth - Sets the border width of the range slider. - range - Sets the range of the range slider. If not set, - defaults to the full xaxis range. If the axis `type` is - "log", then you must take the log of your desired - range. If the axis `type` is "date", it should be date - strings, like date data, though Date objects and unix - milliseconds will be accepted and converted to strings. - If the axis `type` is "category", it should be numbers, - using the scale where each category is assigned a - serial number from zero in the order it appears. - thickness - The height of the range slider as a fraction of the - total plot area height. - visible - Determines whether or not the range slider will be - visible. If visible, perpendicular axes will be set to - `fixedrange` - yaxis - :class:`plotly.graph_objects.layout.xaxis.rangeslider.Y - Axis` instance or dict with compatible properties - - Returns - ------- - Rangeslider - """ - super(Rangeslider, self).__init__("rangeslider") - - # Validate arg - # ------------ - 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.xaxis.Rangeslider -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeslider`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis import rangeslider as v_rangeslider - - # Initialize validators - # --------------------- - self._validators["autorange"] = v_rangeslider.AutorangeValidator() - self._validators["bgcolor"] = v_rangeslider.BgcolorValidator() - self._validators["bordercolor"] = v_rangeslider.BordercolorValidator() - self._validators["borderwidth"] = v_rangeslider.BorderwidthValidator() - self._validators["range"] = v_rangeslider.RangeValidator() - self._validators["thickness"] = v_rangeslider.ThicknessValidator() - self._validators["visible"] = v_rangeslider.VisibleValidator() - self._validators["yaxis"] = v_rangeslider.YAxisValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - self["autorange"] = autorange if autorange is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Rangeselector(_BaseLayoutHierarchyType): - - # activecolor - # ----------- - @property - def activecolor(self): - """ - Sets the background color of the active range selector button. - - The 'activecolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["activecolor"] - - @activecolor.setter - def activecolor(self, val): - self["activecolor"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the range selector buttons. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the color of the border enclosing the range selector. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) of the border enclosing the range - selector. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # buttons - # ------- - @property - def buttons(self): - """ - Sets the specifications for each buttons. By default, a range - selector comes with no buttons. - - The 'buttons' property is a tuple of instances of - Button that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.xaxis.rangeselector.Button - - A list or tuple of dicts of string/value properties that - will be passed to the Button constructor - - Supported dict properties: - - count - Sets the number of steps to take to update the - range. Use with `step` to specify the update - interval. - label - Sets the text label to appear on the button. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - step - The unit of measurement that the `count` value - will set the range by. - stepmode - Sets the range update mode. If "backward", the - range update shifts the start of range back - "count" times "step" milliseconds. If "todate", - the range update shifts the start of range back - to the first timestamp from "count" times - "step" milliseconds back. For example, with - `step` set to "year" and `count` set to 1 the - range update shifts the start of the range back - to January 01 of the current year. Month and - year "todate" are currently available only for - the built-in (Gregorian) calendar. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. - - Returns - ------- - tuple[plotly.graph_objs.layout.xaxis.rangeselector.Button] - """ - return self["buttons"] - - @buttons.setter - def buttons(self, val): - self["buttons"] = val - - # buttondefaults - # -------------- - @property - def buttondefaults(self): - """ - When used in a template (as - layout.template.layout.xaxis.rangeselector.buttondefaults), - sets the default property values to use for elements of - layout.xaxis.rangeselector.buttons - - The 'buttondefaults' property is an instance of Button - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Button` - - A dict of string/value properties that will be passed - to the Button constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.layout.xaxis.rangeselector.Button - """ - return self["buttondefaults"] - - @buttondefaults.setter - def buttondefaults(self, val): - self["buttondefaults"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font of the range selector button text. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.xaxis.rangeselector.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this range selector is visible. Note - that range selectors are only available for x axes of `type` - set to or auto-typed to "date". - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position (in normalized coordinates) of the range - selector. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets the range selector's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" or - "right" of the range selector. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position (in normalized coordinates) of the range - selector. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets the range selector's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the range selector. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - activecolor - Sets the background color of the active range selector - button. - bgcolor - Sets the background color of the range selector - buttons. - bordercolor - Sets the color of the border enclosing the range - selector. - borderwidth - Sets the width (in px) of the border enclosing the - range selector. - buttons - Sets the specifications for each buttons. By default, a - range selector comes with no buttons. - buttondefaults - When used in a template (as layout.template.layout.xaxi - s.rangeselector.buttondefaults), sets the default - property values to use for elements of - layout.xaxis.rangeselector.buttons - font - Sets the font of the range selector button text. - visible - Determines whether or not this range selector is - visible. Note that range selectors are only available - for x axes of `type` set to or auto-typed to "date". - x - Sets the x position (in normalized coordinates) of the - range selector. - xanchor - Sets the range selector's horizontal position anchor. - This anchor binds the `x` position to the "left", - "center" or "right" of the range selector. - y - Sets the y position (in normalized coordinates) of the - range selector. - yanchor - Sets the range selector's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the range selector. - """ - - def __init__( - self, - arg=None, - activecolor=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - buttons=None, - buttondefaults=None, - font=None, - visible=None, - x=None, - xanchor=None, - y=None, - yanchor=None, - **kwargs - ): - """ - Construct a new Rangeselector object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.Rangeselector` - activecolor - Sets the background color of the active range selector - button. - bgcolor - Sets the background color of the range selector - buttons. - bordercolor - Sets the color of the border enclosing the range - selector. - borderwidth - Sets the width (in px) of the border enclosing the - range selector. - buttons - Sets the specifications for each buttons. By default, a - range selector comes with no buttons. - buttondefaults - When used in a template (as layout.template.layout.xaxi - s.rangeselector.buttondefaults), sets the default - property values to use for elements of - layout.xaxis.rangeselector.buttons - font - Sets the font of the range selector button text. - visible - Determines whether or not this range selector is - visible. Note that range selectors are only available - for x axes of `type` set to or auto-typed to "date". - x - Sets the x position (in normalized coordinates) of the - range selector. - xanchor - Sets the range selector's horizontal position anchor. - This anchor binds the `x` position to the "left", - "center" or "right" of the range selector. - y - Sets the y position (in normalized coordinates) of the - range selector. - yanchor - Sets the range selector's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the range selector. - - Returns - ------- - Rangeselector - """ - super(Rangeselector, self).__init__("rangeselector") - - # Validate arg - # ------------ - 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.xaxis.Rangeselector -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis import rangeselector as v_rangeselector - - # Initialize validators - # --------------------- - self._validators["activecolor"] = v_rangeselector.ActivecolorValidator() - self._validators["bgcolor"] = v_rangeselector.BgcolorValidator() - self._validators["bordercolor"] = v_rangeselector.BordercolorValidator() - self._validators["borderwidth"] = v_rangeselector.BorderwidthValidator() - self._validators["buttons"] = v_rangeselector.ButtonsValidator() - self._validators["buttondefaults"] = v_rangeselector.ButtonValidator() - self._validators["font"] = v_rangeselector.FontValidator() - self._validators["visible"] = v_rangeselector.VisibleValidator() - self._validators["x"] = v_rangeselector.XValidator() - self._validators["xanchor"] = v_rangeselector.XanchorValidator() - self._validators["y"] = v_rangeselector.YValidator() - self._validators["yanchor"] = v_rangeselector.YanchorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("activecolor", None) - self["activecolor"] = activecolor if activecolor is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("buttons", None) - self["buttons"] = buttons if buttons is not None else _v - _v = arg.pop("buttondefaults", None) - self["buttondefaults"] = buttondefaults if buttondefaults is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Rangebreak(_BaseLayoutHierarchyType): - - # bounds - # ------ - @property - def bounds(self): - """ - Sets the lower and upper bounds of this axis rangebreak. Can be - used with `pattern`. - - The 'bounds' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'bounds[0]' property accepts values of any type - (1) The 'bounds[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["bounds"] - - @bounds.setter - def bounds(self, val): - self["bounds"] = val - - # dvalue - # ------ - @property - def dvalue(self): - """ - Sets the size of each `values` item. The default is one day in - milliseconds. - - The 'dvalue' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["dvalue"] - - @dvalue.setter - def dvalue(self, val): - self["dvalue"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether this axis rangebreak is enabled or disabled. - Please note that `rangebreaks` only work for "date" axis type. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # pattern - # ------- - @property - def pattern(self): - """ - Determines a pattern on the time line that generates breaks. If - *day of week* - days of the week in English e.g. 'Sunday' or - `sun` (matching is case-insensitive and considers only the - first three characters), as well as Sunday-based integers - between 0 and 6. If "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. Examples: - { pattern: - 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', - 'mon'] } breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from - 5pm to 8am (i.e. skips non-work hours). - - The 'pattern' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['day of week', 'hour', ''] - - Returns - ------- - Any - """ - return self["pattern"] - - @pattern.setter - def pattern(self, val): - self["pattern"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the coordinate values corresponding to the rangebreaks. An - alternative to `bounds`. Use `dvalue` to set the size of the - values along the axis. - - The 'values' property is an info array that may be specified as: - * a list of elements where: - The 'values[i]' property accepts values of any type - - Returns - ------- - list - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The default is one - day in milliseconds. - enabled - Determines whether this axis rangebreak is enabled or - disabled. Please note that `rangebreaks` only work for - "date" axis type. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pattern - Determines a pattern on the time line that generates - breaks. If *day of week* - days of the week in English - e.g. 'Sunday' or `sun` (matching is case-insensitive - and considers only the first three characters), as well - as Sunday-based integers between 0 and 6. If "hour" - - hour (24-hour clock) as decimal numbers between 0 and - 24. for more info. Examples: - { pattern: 'day of - week', bounds: [6, 1] } or simply { bounds: ['sat', - 'mon'] } breaks from Saturday to Monday (i.e. skips - the weekends). - { pattern: 'hour', bounds: [17, 8] } - breaks from 5pm to 8am (i.e. skips non-work hours). - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use `dvalue` - to set the size of the values along the axis. - """ - - def __init__( - self, - arg=None, - bounds=None, - dvalue=None, - enabled=None, - name=None, - pattern=None, - templateitemname=None, - values=None, - **kwargs - ): - """ - Construct a new Rangebreak object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.Rangebreak` - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The default is one - day in milliseconds. - enabled - Determines whether this axis rangebreak is enabled or - disabled. Please note that `rangebreaks` only work for - "date" axis type. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pattern - Determines a pattern on the time line that generates - breaks. If *day of week* - days of the week in English - e.g. 'Sunday' or `sun` (matching is case-insensitive - and considers only the first three characters), as well - as Sunday-based integers between 0 and 6. If "hour" - - hour (24-hour clock) as decimal numbers between 0 and - 24. for more info. Examples: - { pattern: 'day of - week', bounds: [6, 1] } or simply { bounds: ['sat', - 'mon'] } breaks from Saturday to Monday (i.e. skips - the weekends). - { pattern: 'hour', bounds: [17, 8] } - breaks from 5pm to 8am (i.e. skips non-work hours). - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use `dvalue` - to set the size of the values along the axis. - - Returns - ------- - Rangebreak - """ - super(Rangebreak, self).__init__("rangebreaks") - - # Validate arg - # ------------ - 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.xaxis.Rangebreak -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis import rangebreak as v_rangebreak - - # Initialize validators - # --------------------- - self._validators["bounds"] = v_rangebreak.BoundsValidator() - self._validators["dvalue"] = v_rangebreak.DvalueValidator() - self._validators["enabled"] = v_rangebreak.EnabledValidator() - self._validators["name"] = v_rangebreak.NameValidator() - self._validators["pattern"] = v_rangebreak.PatternValidator() - self._validators["templateitemname"] = v_rangebreak.TemplateitemnameValidator() - self._validators["values"] = v_rangebreak.ValuesValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bounds", None) - self["bounds"] = bounds if bounds is not None else _v - _v = arg.pop("dvalue", None) - self["dvalue"] = dvalue if dvalue is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("pattern", None) - self["pattern"] = pattern if pattern is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Rangebreak", - "Rangebreak", - "Rangeselector", - "Rangeslider", - "Tickfont", - "Tickformatstop", - "Tickformatstop", - "Title", - "rangeselector", - "rangeslider", - "title", -] - -from plotly.graph_objs.layout.xaxis import title -from plotly.graph_objs.layout.xaxis import rangeslider -from plotly.graph_objs.layout.xaxis import rangeselector +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from ._rangeslider import Rangeslider + from ._rangeselector import Rangeselector + from ._rangebreak import Rangebreak + from . import title + from . import rangeslider + from . import rangeselector +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title", ".rangeslider", ".rangeselector"], + [ + "._title.Title", + "._tickformatstop.Tickformatstop", + "._tickfont.Tickfont", + "._rangeslider.Rangeslider", + "._rangeselector.Rangeselector", + "._rangebreak.Rangebreak", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangebreak.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangebreak.py new file mode 100644 index 00000000000..0be29535fdd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangebreak.py @@ -0,0 +1,381 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Rangebreak(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis" + _path_str = "layout.xaxis.rangebreak" + _valid_props = { + "bounds", + "dvalue", + "enabled", + "name", + "pattern", + "templateitemname", + "values", + } + + # bounds + # ------ + @property + def bounds(self): + """ + Sets the lower and upper bounds of this axis rangebreak. Can be + used with `pattern`. + + The 'bounds' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'bounds[0]' property accepts values of any type + (1) The 'bounds[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["bounds"] + + @bounds.setter + def bounds(self, val): + self["bounds"] = val + + # dvalue + # ------ + @property + def dvalue(self): + """ + Sets the size of each `values` item. The default is one day in + milliseconds. + + The 'dvalue' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["dvalue"] + + @dvalue.setter + def dvalue(self, val): + self["dvalue"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether this axis rangebreak is enabled or disabled. + Please note that `rangebreaks` only work for "date" axis type. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # pattern + # ------- + @property + def pattern(self): + """ + Determines a pattern on the time line that generates breaks. If + *day of week* - days of the week in English e.g. 'Sunday' or + `sun` (matching is case-insensitive and considers only the + first three characters), as well as Sunday-based integers + between 0 and 6. If "hour" - hour (24-hour clock) as decimal + numbers between 0 and 24. for more info. Examples: - { pattern: + 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', + 'mon'] } breaks from Saturday to Monday (i.e. skips the + weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from + 5pm to 8am (i.e. skips non-work hours). + + The 'pattern' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['day of week', 'hour', ''] + + Returns + ------- + Any + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the coordinate values corresponding to the rangebreaks. An + alternative to `bounds`. Use `dvalue` to set the size of the + values along the axis. + + The 'values' property is an info array that may be specified as: + * a list of elements where: + The 'values[i]' property accepts values of any type + + Returns + ------- + list + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The default is one + day in milliseconds. + enabled + Determines whether this axis rangebreak is enabled or + disabled. Please note that `rangebreaks` only work for + "date" axis type. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pattern + Determines a pattern on the time line that generates + breaks. If *day of week* - days of the week in English + e.g. 'Sunday' or `sun` (matching is case-insensitive + and considers only the first three characters), as well + as Sunday-based integers between 0 and 6. If "hour" - + hour (24-hour clock) as decimal numbers between 0 and + 24. for more info. Examples: - { pattern: 'day of + week', bounds: [6, 1] } or simply { bounds: ['sat', + 'mon'] } breaks from Saturday to Monday (i.e. skips + the weekends). - { pattern: 'hour', bounds: [17, 8] } + breaks from 5pm to 8am (i.e. skips non-work hours). + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use `dvalue` + to set the size of the values along the axis. + """ + + def __init__( + self, + arg=None, + bounds=None, + dvalue=None, + enabled=None, + name=None, + pattern=None, + templateitemname=None, + values=None, + **kwargs + ): + """ + Construct a new Rangebreak object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.Rangebreak` + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The default is one + day in milliseconds. + enabled + Determines whether this axis rangebreak is enabled or + disabled. Please note that `rangebreaks` only work for + "date" axis type. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pattern + Determines a pattern on the time line that generates + breaks. If *day of week* - days of the week in English + e.g. 'Sunday' or `sun` (matching is case-insensitive + and considers only the first three characters), as well + as Sunday-based integers between 0 and 6. If "hour" - + hour (24-hour clock) as decimal numbers between 0 and + 24. for more info. Examples: - { pattern: 'day of + week', bounds: [6, 1] } or simply { bounds: ['sat', + 'mon'] } breaks from Saturday to Monday (i.e. skips + the weekends). - { pattern: 'hour', bounds: [17, 8] } + breaks from 5pm to 8am (i.e. skips non-work hours). + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use `dvalue` + to set the size of the values along the axis. + + Returns + ------- + Rangebreak + """ + super(Rangebreak, self).__init__("rangebreaks") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.Rangebreak +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bounds", None) + _v = bounds if bounds is not None else _v + if _v is not None: + self["bounds"] = _v + _v = arg.pop("dvalue", None) + _v = dvalue if dvalue is not None else _v + if _v is not None: + self["dvalue"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("pattern", None) + _v = pattern if pattern is not None else _v + if _v is not None: + self["pattern"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangeselector.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangeselector.py new file mode 100644 index 00000000000..483f5002800 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangeselector.py @@ -0,0 +1,681 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Rangeselector(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis" + _path_str = "layout.xaxis.rangeselector" + _valid_props = { + "activecolor", + "bgcolor", + "bordercolor", + "borderwidth", + "buttondefaults", + "buttons", + "font", + "visible", + "x", + "xanchor", + "y", + "yanchor", + } + + # activecolor + # ----------- + @property + def activecolor(self): + """ + Sets the background color of the active range selector button. + + The 'activecolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["activecolor"] + + @activecolor.setter + def activecolor(self, val): + self["activecolor"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the range selector buttons. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the color of the border enclosing the range selector. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) of the border enclosing the range + selector. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # buttons + # ------- + @property + def buttons(self): + """ + Sets the specifications for each buttons. By default, a range + selector comes with no buttons. + + The 'buttons' property is a tuple of instances of + Button that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.xaxis.rangeselector.Button + - A list or tuple of dicts of string/value properties that + will be passed to the Button constructor + + Supported dict properties: + + count + Sets the number of steps to take to update the + range. Use with `step` to specify the update + interval. + label + Sets the text label to appear on the button. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + step + The unit of measurement that the `count` value + will set the range by. + stepmode + Sets the range update mode. If "backward", the + range update shifts the start of range back + "count" times "step" milliseconds. If "todate", + the range update shifts the start of range back + to the first timestamp from "count" times + "step" milliseconds back. For example, with + `step` set to "year" and `count` set to 1 the + range update shifts the start of the range back + to January 01 of the current year. Month and + year "todate" are currently available only for + the built-in (Gregorian) calendar. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this button is + visible. + + Returns + ------- + tuple[plotly.graph_objs.layout.xaxis.rangeselector.Button] + """ + return self["buttons"] + + @buttons.setter + def buttons(self, val): + self["buttons"] = val + + # buttondefaults + # -------------- + @property + def buttondefaults(self): + """ + When used in a template (as + layout.template.layout.xaxis.rangeselector.buttondefaults), + sets the default property values to use for elements of + layout.xaxis.rangeselector.buttons + + The 'buttondefaults' property is an instance of Button + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Button` + - A dict of string/value properties that will be passed + to the Button constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.layout.xaxis.rangeselector.Button + """ + return self["buttondefaults"] + + @buttondefaults.setter + def buttondefaults(self, val): + self["buttondefaults"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font of the range selector button text. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.xaxis.rangeselector.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this range selector is visible. Note + that range selectors are only available for x axes of `type` + set to or auto-typed to "date". + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position (in normalized coordinates) of the range + selector. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets the range selector's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" or + "right" of the range selector. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position (in normalized coordinates) of the range + selector. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets the range selector's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the range selector. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + activecolor + Sets the background color of the active range selector + button. + bgcolor + Sets the background color of the range selector + buttons. + bordercolor + Sets the color of the border enclosing the range + selector. + borderwidth + Sets the width (in px) of the border enclosing the + range selector. + buttons + Sets the specifications for each buttons. By default, a + range selector comes with no buttons. + buttondefaults + When used in a template (as layout.template.layout.xaxi + s.rangeselector.buttondefaults), sets the default + property values to use for elements of + layout.xaxis.rangeselector.buttons + font + Sets the font of the range selector button text. + visible + Determines whether or not this range selector is + visible. Note that range selectors are only available + for x axes of `type` set to or auto-typed to "date". + x + Sets the x position (in normalized coordinates) of the + range selector. + xanchor + Sets the range selector's horizontal position anchor. + This anchor binds the `x` position to the "left", + "center" or "right" of the range selector. + y + Sets the y position (in normalized coordinates) of the + range selector. + yanchor + Sets the range selector's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the range selector. + """ + + def __init__( + self, + arg=None, + activecolor=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + buttons=None, + buttondefaults=None, + font=None, + visible=None, + x=None, + xanchor=None, + y=None, + yanchor=None, + **kwargs + ): + """ + Construct a new Rangeselector object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.Rangeselector` + activecolor + Sets the background color of the active range selector + button. + bgcolor + Sets the background color of the range selector + buttons. + bordercolor + Sets the color of the border enclosing the range + selector. + borderwidth + Sets the width (in px) of the border enclosing the + range selector. + buttons + Sets the specifications for each buttons. By default, a + range selector comes with no buttons. + buttondefaults + When used in a template (as layout.template.layout.xaxi + s.rangeselector.buttondefaults), sets the default + property values to use for elements of + layout.xaxis.rangeselector.buttons + font + Sets the font of the range selector button text. + visible + Determines whether or not this range selector is + visible. Note that range selectors are only available + for x axes of `type` set to or auto-typed to "date". + x + Sets the x position (in normalized coordinates) of the + range selector. + xanchor + Sets the range selector's horizontal position anchor. + This anchor binds the `x` position to the "left", + "center" or "right" of the range selector. + y + Sets the y position (in normalized coordinates) of the + range selector. + yanchor + Sets the range selector's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the range selector. + + Returns + ------- + Rangeselector + """ + super(Rangeselector, self).__init__("rangeselector") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.Rangeselector +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("activecolor", None) + _v = activecolor if activecolor is not None else _v + if _v is not None: + self["activecolor"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("buttons", None) + _v = buttons if buttons is not None else _v + if _v is not None: + self["buttons"] = _v + _v = arg.pop("buttondefaults", None) + _v = buttondefaults if buttondefaults is not None else _v + if _v is not None: + self["buttondefaults"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangeslider.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangeslider.py new file mode 100644 index 00000000000..03900350394 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_rangeslider.py @@ -0,0 +1,451 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Rangeslider(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis" + _path_str = "layout.xaxis.rangeslider" + _valid_props = { + "autorange", + "bgcolor", + "bordercolor", + "borderwidth", + "range", + "thickness", + "visible", + "yaxis", + } + + # autorange + # --------- + @property + def autorange(self): + """ + Determines whether or not the range slider range is computed in + relation to the input data. If `range` is provided, then + `autorange` is set to False. + + The 'autorange' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the range slider. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the range slider. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the border width of the range slider. + + The 'borderwidth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # range + # ----- + @property + def range(self): + """ + Sets the range of the range slider. If not set, defaults to the + full xaxis range. If the axis `type` is "log", then you must + take the log of your desired range. If the axis `type` is + "date", it should be date strings, like date data, though Date + objects and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is assigned a + serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + The height of the range slider as a fraction of the total plot + area height. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not the range slider will be visible. If + visible, perpendicular axes will be set to `fixedrange` + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + The 'yaxis' property is an instance of YAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis` + - A dict of string/value properties that will be passed + to the YAxis constructor + + Supported dict properties: + + range + Sets the range of this axis for the + rangeslider. + rangemode + Determines whether or not the range of this + axis in the rangeslider use the same value than + in the main plot when zooming in/out. If + "auto", the autorange will be used. If "fixed", + the `range` is used. If "match", the current + range of the corresponding y-axis on the main + subplot is used. + + Returns + ------- + plotly.graph_objs.layout.xaxis.rangeslider.YAxis + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autorange + Determines whether or not the range slider range is + computed in relation to the input data. If `range` is + provided, then `autorange` is set to False. + bgcolor + Sets the background color of the range slider. + bordercolor + Sets the border color of the range slider. + borderwidth + Sets the border width of the range slider. + range + Sets the range of the range slider. If not set, + defaults to the full xaxis range. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + thickness + The height of the range slider as a fraction of the + total plot area height. + visible + Determines whether or not the range slider will be + visible. If visible, perpendicular axes will be set to + `fixedrange` + yaxis + :class:`plotly.graph_objects.layout.xaxis.rangeslider.Y + Axis` instance or dict with compatible properties + """ + + def __init__( + self, + arg=None, + autorange=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + range=None, + thickness=None, + visible=None, + yaxis=None, + **kwargs + ): + """ + Construct a new Rangeslider object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.Rangeslider` + autorange + Determines whether or not the range slider range is + computed in relation to the input data. If `range` is + provided, then `autorange` is set to False. + bgcolor + Sets the background color of the range slider. + bordercolor + Sets the border color of the range slider. + borderwidth + Sets the border width of the range slider. + range + Sets the range of the range slider. If not set, + defaults to the full xaxis range. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + thickness + The height of the range slider as a fraction of the + total plot area height. + visible + Determines whether or not the range slider will be + visible. If visible, perpendicular axes will be set to + `fixedrange` + yaxis + :class:`plotly.graph_objects.layout.xaxis.rangeslider.Y + Axis` instance or dict with compatible properties + + Returns + ------- + Rangeslider + """ + super(Rangeslider, self).__init__("rangeslider") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.Rangeslider +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeslider`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autorange", None) + _v = autorange if autorange is not None else _v + if _v is not None: + self["autorange"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("yaxis", None) + _v = yaxis if yaxis is not None else _v + if _v is not None: + self["yaxis"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickfont.py new file mode 100644 index 00000000000..ca246f0f48e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis" + _path_str = "layout.xaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickformatstop.py new file mode 100644 index 00000000000..5271dcb5c31 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis" + _path_str = "layout.xaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_title.py new file mode 100644 index 00000000000..2dc5087b3d0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_title.py @@ -0,0 +1,217 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis" + _path_str = "layout.xaxis.title" + _valid_props = {"font", "standoff", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.xaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.xaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # standoff + # -------- + @property + def standoff(self): + """ + Sets the standoff distance (in px) between the axis labels and + the title text The default value is a function of the axis tick + labels, the title `font.size` and the axis `linewidth`. Note + that the axis title position is always constrained within the + margins, so the actual standoff distance is always less than + the set or default value. By setting `standoff` and turning on + `automargin`, plotly.js will push the margins to fit the axis + title at given standoff distance. + + The 'standoff' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["standoff"] + + @standoff.setter + def standoff(self, val): + self["standoff"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + standoff + Sets the standoff distance (in px) between the axis + labels and the title text The default value is a + function of the axis tick labels, the title `font.size` + and the axis `linewidth`. Note that the axis title + position is always constrained within the margins, so + the actual standoff distance is always less than the + set or default value. By setting `standoff` and turning + on `automargin`, plotly.js will push the margins to fit + the axis title at given standoff distance. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + standoff + Sets the standoff distance (in px) between the axis + labels and the title text The default value is a + function of the axis tick labels, the title `font.size` + and the axis `linewidth`. Note that the axis title + position is always constrained within the margins, so + the actual standoff distance is always less than the + set or default value. By setting `standoff` and turning + on `automargin`, plotly.js will push the margins to fit + the axis title at given standoff distance. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("standoff", None) + _v = standoff if standoff is not None else _v + if _v is not None: + self["standoff"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py index 879e934af7b..7de2438c984 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py @@ -1,590 +1,11 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font + from ._button import Button +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis.rangeselector" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets the font of the range selector button text. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.xaxis.r - angeselector.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.xaxis.rangeselector.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis.rangeselector import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Button(_BaseLayoutHierarchyType): - - # count - # ----- - @property - def count(self): - """ - Sets the number of steps to take to update the range. Use with - `step` to specify the update interval. - - The 'count' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["count"] - - @count.setter - def count(self, val): - self["count"] = val - - # label - # ----- - @property - def label(self): - """ - Sets the text label to appear on the button. - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # step - # ---- - @property - def step(self): - """ - The unit of measurement that the `count` value will set the - range by. - - The 'step' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['month', 'year', 'day', 'hour', 'minute', 'second', - 'all'] - - Returns - ------- - Any - """ - return self["step"] - - @step.setter - def step(self, val): - self["step"] = val - - # stepmode - # -------- - @property - def stepmode(self): - """ - Sets the range update mode. If "backward", the range update - shifts the start of range back "count" times "step" - milliseconds. If "todate", the range update shifts the start of - range back to the first timestamp from "count" times "step" - milliseconds back. For example, with `step` set to "year" and - `count` set to 1 the range update shifts the start of the range - back to January 01 of the current year. Month and year "todate" - are currently available only for the built-in (Gregorian) - calendar. - - The 'stepmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['backward', 'todate'] - - Returns - ------- - Any - """ - return self["stepmode"] - - @stepmode.setter - def stepmode(self, val): - self["stepmode"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this button is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis.rangeselector" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - count - Sets the number of steps to take to update the range. - Use with `step` to specify the update interval. - label - Sets the text label to appear on the button. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - step - The unit of measurement that the `count` value will set - the range by. - stepmode - Sets the range update mode. If "backward", the range - update shifts the start of range back "count" times - "step" milliseconds. If "todate", the range update - shifts the start of range back to the first timestamp - from "count" times "step" milliseconds back. For - example, with `step` set to "year" and `count` set to 1 - the range update shifts the start of the range back to - January 01 of the current year. Month and year "todate" - are currently available only for the built-in - (Gregorian) calendar. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - visible - Determines whether or not this button is visible. - """ - - def __init__( - self, - arg=None, - count=None, - label=None, - name=None, - step=None, - stepmode=None, - templateitemname=None, - visible=None, - **kwargs - ): - """ - Construct a new Button object - - Sets the specifications for each buttons. By default, a range - selector comes with no buttons. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.xaxis.r - angeselector.Button` - count - Sets the number of steps to take to update the range. - Use with `step` to specify the update interval. - label - Sets the text label to appear on the button. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - step - The unit of measurement that the `count` value will set - the range by. - stepmode - Sets the range update mode. If "backward", the range - update shifts the start of range back "count" times - "step" milliseconds. If "todate", the range update - shifts the start of range back to the first timestamp - from "count" times "step" milliseconds back. For - example, with `step` set to "year" and `count` set to 1 - the range update shifts the start of the range back to - January 01 of the current year. Month and year "todate" - are currently available only for the built-in - (Gregorian) calendar. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - visible - Determines whether or not this button is visible. - - Returns - ------- - Button - """ - super(Button, self).__init__("buttons") - - # Validate arg - # ------------ - 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.xaxis.rangeselector.Button -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Button`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis.rangeselector import button as v_button - - # Initialize validators - # --------------------- - self._validators["count"] = v_button.CountValidator() - self._validators["label"] = v_button.LabelValidator() - self._validators["name"] = v_button.NameValidator() - self._validators["step"] = v_button.StepValidator() - self._validators["stepmode"] = v_button.StepmodeValidator() - self._validators["templateitemname"] = v_button.TemplateitemnameValidator() - self._validators["visible"] = v_button.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("count", None) - self["count"] = count if count is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("step", None) - self["step"] = step if step is not None else _v - _v = arg.pop("stepmode", None) - self["stepmode"] = stepmode if stepmode is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Button", "Button", "Font"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._font.Font", "._button.Button"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/_button.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/_button.py new file mode 100644 index 00000000000..dc23d1c7fec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/_button.py @@ -0,0 +1,369 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Button(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis.rangeselector" + _path_str = "layout.xaxis.rangeselector.button" + _valid_props = { + "count", + "label", + "name", + "step", + "stepmode", + "templateitemname", + "visible", + } + + # count + # ----- + @property + def count(self): + """ + Sets the number of steps to take to update the range. Use with + `step` to specify the update interval. + + The 'count' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + # label + # ----- + @property + def label(self): + """ + Sets the text label to appear on the button. + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # step + # ---- + @property + def step(self): + """ + The unit of measurement that the `count` value will set the + range by. + + The 'step' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['month', 'year', 'day', 'hour', 'minute', 'second', + 'all'] + + Returns + ------- + Any + """ + return self["step"] + + @step.setter + def step(self, val): + self["step"] = val + + # stepmode + # -------- + @property + def stepmode(self): + """ + Sets the range update mode. If "backward", the range update + shifts the start of range back "count" times "step" + milliseconds. If "todate", the range update shifts the start of + range back to the first timestamp from "count" times "step" + milliseconds back. For example, with `step` set to "year" and + `count` set to 1 the range update shifts the start of the range + back to January 01 of the current year. Month and year "todate" + are currently available only for the built-in (Gregorian) + calendar. + + The 'stepmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['backward', 'todate'] + + Returns + ------- + Any + """ + return self["stepmode"] + + @stepmode.setter + def stepmode(self, val): + self["stepmode"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this button is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + count + Sets the number of steps to take to update the range. + Use with `step` to specify the update interval. + label + Sets the text label to appear on the button. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + step + The unit of measurement that the `count` value will set + the range by. + stepmode + Sets the range update mode. If "backward", the range + update shifts the start of range back "count" times + "step" milliseconds. If "todate", the range update + shifts the start of range back to the first timestamp + from "count" times "step" milliseconds back. For + example, with `step` set to "year" and `count` set to 1 + the range update shifts the start of the range back to + January 01 of the current year. Month and year "todate" + are currently available only for the built-in + (Gregorian) calendar. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this button is visible. + """ + + def __init__( + self, + arg=None, + count=None, + label=None, + name=None, + step=None, + stepmode=None, + templateitemname=None, + visible=None, + **kwargs + ): + """ + Construct a new Button object + + Sets the specifications for each buttons. By default, a range + selector comes with no buttons. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.xaxis.r + angeselector.Button` + count + Sets the number of steps to take to update the range. + Use with `step` to specify the update interval. + label + Sets the text label to appear on the button. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + step + The unit of measurement that the `count` value will set + the range by. + stepmode + Sets the range update mode. If "backward", the range + update shifts the start of range back "count" times + "step" milliseconds. If "todate", the range update + shifts the start of range back to the first timestamp + from "count" times "step" milliseconds back. For + example, with `step` set to "year" and `count` set to 1 + the range update shifts the start of the range back to + January 01 of the current year. Month and year "todate" + are currently available only for the built-in + (Gregorian) calendar. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this button is visible. + + Returns + ------- + Button + """ + super(Button, self).__init__("buttons") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.rangeselector.Button +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Button`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("count", None) + _v = count if count is not None else _v + if _v is not None: + self["count"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("step", None) + _v = step if step is not None else _v + if _v is not None: + self["step"] = _v + _v = arg.pop("stepmode", None) + _v = stepmode if stepmode is not None else _v + if _v is not None: + self["stepmode"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/_font.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/_font.py new file mode 100644 index 00000000000..e0470232183 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/_font.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis.rangeselector" + _path_str = "layout.xaxis.rangeselector.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets the font of the range selector button text. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.xaxis.r + angeselector.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.rangeselector.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py index 8529a311c22..1fce1019ba6 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py @@ -1,148 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._yaxis import YAxis +else: + from _plotly_utils.importers import relative_import -class YAxis(_BaseLayoutHierarchyType): - - # range - # ----- - @property - def range(self): - """ - Sets the range of this axis for the rangeslider. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property accepts values of any type - (1) The 'range[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # rangemode - # --------- - @property - def rangemode(self): - """ - Determines whether or not the range of this axis in the - rangeslider use the same value than in the main plot when - zooming in/out. If "auto", the autorange will be used. If - "fixed", the `range` is used. If "match", the current range of - the corresponding y-axis on the main subplot is used. - - The 'rangemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'fixed', 'match'] - - Returns - ------- - Any - """ - return self["rangemode"] - - @rangemode.setter - def rangemode(self, val): - self["rangemode"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis.rangeslider" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - range - Sets the range of this axis for the rangeslider. - rangemode - Determines whether or not the range of this axis in the - rangeslider use the same value than in the main plot - when zooming in/out. If "auto", the autorange will be - used. If "fixed", the `range` is used. If "match", the - current range of the corresponding y-axis on the main - subplot is used. - """ - - def __init__(self, arg=None, range=None, rangemode=None, **kwargs): - """ - Construct a new YAxis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.layout.xaxis.r - angeslider.YAxis` - range - Sets the range of this axis for the rangeslider. - rangemode - Determines whether or not the range of this axis in the - rangeslider use the same value than in the main plot - when zooming in/out. If "auto", the autorange will be - used. If "fixed", the `range` is used. If "match", the - current range of the corresponding y-axis on the main - subplot is used. - - Returns - ------- - YAxis - """ - super(YAxis, self).__init__("yaxis") - - # Validate arg - # ------------ - 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.xaxis.rangeslider.YAxis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis.rangeslider import yaxis as v_yaxis - - # Initialize validators - # --------------------- - self._validators["range"] = v_yaxis.RangeValidator() - self._validators["rangemode"] = v_yaxis.RangemodeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("rangemode", None) - self["rangemode"] = rangemode if rangemode is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["YAxis"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._yaxis.YAxis"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py new file mode 100644 index 00000000000..c2b54e71256 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py @@ -0,0 +1,144 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class YAxis(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis.rangeslider" + _path_str = "layout.xaxis.rangeslider.yaxis" + _valid_props = {"range", "rangemode"} + + # range + # ----- + @property + def range(self): + """ + Sets the range of this axis for the rangeslider. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # rangemode + # --------- + @property + def rangemode(self): + """ + Determines whether or not the range of this axis in the + rangeslider use the same value than in the main plot when + zooming in/out. If "auto", the autorange will be used. If + "fixed", the `range` is used. If "match", the current range of + the corresponding y-axis on the main subplot is used. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'fixed', 'match'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + range + Sets the range of this axis for the rangeslider. + rangemode + Determines whether or not the range of this axis in the + rangeslider use the same value than in the main plot + when zooming in/out. If "auto", the autorange will be + used. If "fixed", the `range` is used. If "match", the + current range of the corresponding y-axis on the main + subplot is used. + """ + + def __init__(self, arg=None, range=None, rangemode=None, **kwargs): + """ + Construct a new YAxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.layout.xaxis.r + angeslider.YAxis` + range + Sets the range of this axis for the rangeslider. + rangemode + Determines whether or not the range of this axis in the + rangeslider use the same value than in the main plot + when zooming in/out. If "auto", the autorange will be + used. If "fixed", the `range` is used. If "match", the + current range of the corresponding y-axis on the main + subplot is used. + + Returns + ------- + YAxis + """ + super(YAxis, self).__init__("yaxis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.rangeslider.YAxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("rangemode", None) + _v = rangemode if rangemode is not None else _v + if _v is not None: + self["rangemode"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py index 8398548d751..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.xaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.xaxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.xaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.xaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.xaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/_font.py new file mode 100644 index 00000000000..45edc4fe693 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.xaxis.title" + _path_str = "layout.xaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.xaxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.xaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.xaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py index e6cdefe5470..e8855f21288 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py @@ -1,1117 +1,21 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Title(_BaseLayoutHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.layout.yaxis.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.layout.yaxis.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # standoff - # -------- - @property - def standoff(self): - """ - Sets the standoff distance (in px) between the axis labels and - the title text The default value is a function of the axis tick - labels, the title `font.size` and the axis `linewidth`. Note - that the axis title position is always constrained within the - margins, so the actual standoff distance is always less than - the set or default value. By setting `standoff` and turning on - `automargin`, plotly.js will push the margins to fit the axis - title at given standoff distance. - - The 'standoff' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["standoff"] - - @standoff.setter - def standoff(self, val): - self["standoff"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of this axis. Note that before the existence of - `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - standoff - Sets the standoff distance (in px) between the axis - labels and the title text The default value is a - function of the axis tick labels, the title `font.size` - and the axis `linewidth`. Note that the axis title - position is always constrained within the margins, so - the actual standoff distance is always less than the - set or default value. By setting `standoff` and turning - on `automargin`, plotly.js will push the margins to fit - the axis title at given standoff distance. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.yaxis.Title` - font - Sets this axis' title font. Note that the title's font - used to be customized by the now deprecated `titlefont` - attribute. - standoff - Sets the standoff distance (in px) between the axis - labels and the title text The default value is a - function of the axis tick labels, the title `font.size` - and the axis `linewidth`. Note that the axis title - position is always constrained within the margins, so - the actual standoff distance is always less than the - set or default value. By setting `standoff` and turning - on `automargin`, plotly.js will push the margins to fit - the axis title at given standoff distance. - text - Sets the title of this axis. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.yaxis.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.yaxis.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.yaxis import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["standoff"] = v_title.StandoffValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("standoff", None) - self["standoff"] = standoff if standoff is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseLayoutHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.yaxis.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.yaxis.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.yaxis.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.yaxis import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Tickfont(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the tick font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.yaxis.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.yaxis.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.yaxis.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.yaxis import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy - - -class Rangebreak(_BaseLayoutHierarchyType): - - # bounds - # ------ - @property - def bounds(self): - """ - Sets the lower and upper bounds of this axis rangebreak. Can be - used with `pattern`. - - The 'bounds' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'bounds[0]' property accepts values of any type - (1) The 'bounds[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["bounds"] - - @bounds.setter - def bounds(self, val): - self["bounds"] = val - - # dvalue - # ------ - @property - def dvalue(self): - """ - Sets the size of each `values` item. The default is one day in - milliseconds. - - The 'dvalue' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["dvalue"] - - @dvalue.setter - def dvalue(self, val): - self["dvalue"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether this axis rangebreak is enabled or disabled. - Please note that `rangebreaks` only work for "date" axis type. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # pattern - # ------- - @property - def pattern(self): - """ - Determines a pattern on the time line that generates breaks. If - *day of week* - days of the week in English e.g. 'Sunday' or - `sun` (matching is case-insensitive and considers only the - first three characters), as well as Sunday-based integers - between 0 and 6. If "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. Examples: - { pattern: - 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', - 'mon'] } breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from - 5pm to 8am (i.e. skips non-work hours). - - The 'pattern' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['day of week', 'hour', ''] - - Returns - ------- - Any - """ - return self["pattern"] - - @pattern.setter - def pattern(self, val): - self["pattern"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the coordinate values corresponding to the rangebreaks. An - alternative to `bounds`. Use `dvalue` to set the size of the - values along the axis. - - The 'values' property is an info array that may be specified as: - * a list of elements where: - The 'values[i]' property accepts values of any type - - Returns - ------- - list - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.yaxis" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The default is one - day in milliseconds. - enabled - Determines whether this axis rangebreak is enabled or - disabled. Please note that `rangebreaks` only work for - "date" axis type. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pattern - Determines a pattern on the time line that generates - breaks. If *day of week* - days of the week in English - e.g. 'Sunday' or `sun` (matching is case-insensitive - and considers only the first three characters), as well - as Sunday-based integers between 0 and 6. If "hour" - - hour (24-hour clock) as decimal numbers between 0 and - 24. for more info. Examples: - { pattern: 'day of - week', bounds: [6, 1] } or simply { bounds: ['sat', - 'mon'] } breaks from Saturday to Monday (i.e. skips - the weekends). - { pattern: 'hour', bounds: [17, 8] } - breaks from 5pm to 8am (i.e. skips non-work hours). - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use `dvalue` - to set the size of the values along the axis. - """ - - def __init__( - self, - arg=None, - bounds=None, - dvalue=None, - enabled=None, - name=None, - pattern=None, - templateitemname=None, - values=None, - **kwargs - ): - """ - Construct a new Rangebreak object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.yaxis.Rangebreak` - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The default is one - day in milliseconds. - enabled - Determines whether this axis rangebreak is enabled or - disabled. Please note that `rangebreaks` only work for - "date" axis type. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - pattern - Determines a pattern on the time line that generates - breaks. If *day of week* - days of the week in English - e.g. 'Sunday' or `sun` (matching is case-insensitive - and considers only the first three characters), as well - as Sunday-based integers between 0 and 6. If "hour" - - hour (24-hour clock) as decimal numbers between 0 and - 24. for more info. Examples: - { pattern: 'day of - week', bounds: [6, 1] } or simply { bounds: ['sat', - 'mon'] } breaks from Saturday to Monday (i.e. skips - the weekends). - { pattern: 'hour', bounds: [17, 8] } - breaks from 5pm to 8am (i.e. skips non-work hours). - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use `dvalue` - to set the size of the values along the axis. - - Returns - ------- - Rangebreak - """ - super(Rangebreak, self).__init__("rangebreaks") - - # Validate arg - # ------------ - 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.yaxis.Rangebreak -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.yaxis.Rangebreak`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.yaxis import rangebreak as v_rangebreak - - # Initialize validators - # --------------------- - self._validators["bounds"] = v_rangebreak.BoundsValidator() - self._validators["dvalue"] = v_rangebreak.DvalueValidator() - self._validators["enabled"] = v_rangebreak.EnabledValidator() - self._validators["name"] = v_rangebreak.NameValidator() - self._validators["pattern"] = v_rangebreak.PatternValidator() - self._validators["templateitemname"] = v_rangebreak.TemplateitemnameValidator() - self._validators["values"] = v_rangebreak.ValuesValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bounds", None) - self["bounds"] = bounds if bounds is not None else _v - _v = arg.pop("dvalue", None) - self["dvalue"] = dvalue if dvalue is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("pattern", None) - self["pattern"] = pattern if pattern is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Rangebreak", - "Rangebreak", - "Tickfont", - "Tickformatstop", - "Tickformatstop", - "Title", - "title", -] - -from plotly.graph_objs.layout.yaxis import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from ._rangebreak import Rangebreak + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + [ + "._title.Title", + "._tickformatstop.Tickformatstop", + "._tickfont.Tickfont", + "._rangebreak.Rangebreak", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/_rangebreak.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_rangebreak.py new file mode 100644 index 00000000000..85ae7226c8e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_rangebreak.py @@ -0,0 +1,381 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Rangebreak(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.yaxis" + _path_str = "layout.yaxis.rangebreak" + _valid_props = { + "bounds", + "dvalue", + "enabled", + "name", + "pattern", + "templateitemname", + "values", + } + + # bounds + # ------ + @property + def bounds(self): + """ + Sets the lower and upper bounds of this axis rangebreak. Can be + used with `pattern`. + + The 'bounds' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'bounds[0]' property accepts values of any type + (1) The 'bounds[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["bounds"] + + @bounds.setter + def bounds(self, val): + self["bounds"] = val + + # dvalue + # ------ + @property + def dvalue(self): + """ + Sets the size of each `values` item. The default is one day in + milliseconds. + + The 'dvalue' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["dvalue"] + + @dvalue.setter + def dvalue(self, val): + self["dvalue"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether this axis rangebreak is enabled or disabled. + Please note that `rangebreaks` only work for "date" axis type. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # pattern + # ------- + @property + def pattern(self): + """ + Determines a pattern on the time line that generates breaks. If + *day of week* - days of the week in English e.g. 'Sunday' or + `sun` (matching is case-insensitive and considers only the + first three characters), as well as Sunday-based integers + between 0 and 6. If "hour" - hour (24-hour clock) as decimal + numbers between 0 and 24. for more info. Examples: - { pattern: + 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', + 'mon'] } breaks from Saturday to Monday (i.e. skips the + weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from + 5pm to 8am (i.e. skips non-work hours). + + The 'pattern' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['day of week', 'hour', ''] + + Returns + ------- + Any + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the coordinate values corresponding to the rangebreaks. An + alternative to `bounds`. Use `dvalue` to set the size of the + values along the axis. + + The 'values' property is an info array that may be specified as: + * a list of elements where: + The 'values[i]' property accepts values of any type + + Returns + ------- + list + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The default is one + day in milliseconds. + enabled + Determines whether this axis rangebreak is enabled or + disabled. Please note that `rangebreaks` only work for + "date" axis type. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pattern + Determines a pattern on the time line that generates + breaks. If *day of week* - days of the week in English + e.g. 'Sunday' or `sun` (matching is case-insensitive + and considers only the first three characters), as well + as Sunday-based integers between 0 and 6. If "hour" - + hour (24-hour clock) as decimal numbers between 0 and + 24. for more info. Examples: - { pattern: 'day of + week', bounds: [6, 1] } or simply { bounds: ['sat', + 'mon'] } breaks from Saturday to Monday (i.e. skips + the weekends). - { pattern: 'hour', bounds: [17, 8] } + breaks from 5pm to 8am (i.e. skips non-work hours). + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use `dvalue` + to set the size of the values along the axis. + """ + + def __init__( + self, + arg=None, + bounds=None, + dvalue=None, + enabled=None, + name=None, + pattern=None, + templateitemname=None, + values=None, + **kwargs + ): + """ + Construct a new Rangebreak object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.yaxis.Rangebreak` + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The default is one + day in milliseconds. + enabled + Determines whether this axis rangebreak is enabled or + disabled. Please note that `rangebreaks` only work for + "date" axis type. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + pattern + Determines a pattern on the time line that generates + breaks. If *day of week* - days of the week in English + e.g. 'Sunday' or `sun` (matching is case-insensitive + and considers only the first three characters), as well + as Sunday-based integers between 0 and 6. If "hour" - + hour (24-hour clock) as decimal numbers between 0 and + 24. for more info. Examples: - { pattern: 'day of + week', bounds: [6, 1] } or simply { bounds: ['sat', + 'mon'] } breaks from Saturday to Monday (i.e. skips + the weekends). - { pattern: 'hour', bounds: [17, 8] } + breaks from 5pm to 8am (i.e. skips non-work hours). + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use `dvalue` + to set the size of the values along the axis. + + Returns + ------- + Rangebreak + """ + super(Rangebreak, self).__init__("rangebreaks") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.yaxis.Rangebreak +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.yaxis.Rangebreak`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bounds", None) + _v = bounds if bounds is not None else _v + if _v is not None: + self["bounds"] = _v + _v = arg.pop("dvalue", None) + _v = dvalue if dvalue is not None else _v + if _v is not None: + self["dvalue"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("pattern", None) + _v = pattern if pattern is not None else _v + if _v is not None: + self["pattern"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickfont.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickfont.py new file mode 100644 index 00000000000..3740ec87b17 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickfont(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.yaxis" + _path_str = "layout.yaxis.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.yaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.yaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.yaxis.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickformatstop.py new file mode 100644 index 00000000000..4a7edb409f3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.yaxis" + _path_str = "layout.yaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.yaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.yaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.yaxis.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/_title.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_title.py new file mode 100644 index 00000000000..882b6ed18c1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_title.py @@ -0,0 +1,217 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Title(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.yaxis" + _path_str = "layout.yaxis.title" + _valid_props = {"font", "standoff", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.yaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.layout.yaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # standoff + # -------- + @property + def standoff(self): + """ + Sets the standoff distance (in px) between the axis labels and + the title text The default value is a function of the axis tick + labels, the title `font.size` and the axis `linewidth`. Note + that the axis title position is always constrained within the + margins, so the actual standoff distance is always less than + the set or default value. By setting `standoff` and turning on + `automargin`, plotly.js will push the margins to fit the axis + title at given standoff distance. + + The 'standoff' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["standoff"] + + @standoff.setter + def standoff(self, val): + self["standoff"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of this axis. Note that before the existence of + `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + standoff + Sets the standoff distance (in px) between the axis + labels and the title text The default value is a + function of the axis tick labels, the title `font.size` + and the axis `linewidth`. Note that the axis title + position is always constrained within the margins, so + the actual standoff distance is always less than the + set or default value. By setting `standoff` and turning + on `automargin`, plotly.js will push the margins to fit + the axis title at given standoff distance. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.yaxis.Title` + font + Sets this axis' title font. Note that the title's font + used to be customized by the now deprecated `titlefont` + attribute. + standoff + Sets the standoff distance (in px) between the axis + labels and the title text The default value is a + function of the axis tick labels, the title `font.size` + and the axis `linewidth`. Note that the axis title + position is always constrained within the margins, so + the actual standoff distance is always less than the + set or default value. By setting `standoff` and turning + on `automargin`, plotly.js will push the margins to fit + the axis title at given standoff distance. + text + Sets the title of this axis. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.yaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.yaxis.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("standoff", None) + _v = standoff if standoff is not None else _v + if _v is not None: + self["standoff"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py index 6d273457ad6..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseLayoutHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "layout.yaxis.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this axis' title font. Note that the title's font used to - be customized by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.layout.yaxis.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.yaxis.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.layout.yaxis.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.layout.yaxis.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/_font.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/_font.py new file mode 100644 index 00000000000..9aa6d017641 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType +import copy as _copy + + +class Font(_BaseLayoutHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "layout.yaxis.title" + _path_str = "layout.yaxis.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this axis' title font. Note that the title's font used to + be customized by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.layout.yaxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.yaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.layout.yaxis.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py index f946e4f1468..1a78018c947 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py @@ -1,3175 +1,26 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.mesh3d.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.mesh3d.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lightposition(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Numeric vector, representing the X coordinate for each vertex. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Numeric vector, representing the Y coordinate for each vertex. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Numeric vector, representing the Z coordinate for each vertex. - - The 'z' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Lightposition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.Lightposition` - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - - Returns - ------- - Lightposition - """ - super(Lightposition, self).__init__("lightposition") - - # Validate arg - # ------------ - 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.mesh3d.Lightposition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.Lightposition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d import lightposition as v_lightposition - - # Initialize validators - # --------------------- - self._validators["x"] = v_lightposition.XValidator() - self._validators["y"] = v_lightposition.YValidator() - self._validators["z"] = v_lightposition.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lighting(_BaseTraceHierarchyType): - - # ambient - # ------- - @property - def ambient(self): - """ - Ambient light increases overall color visibility but can wash - out the image. - - The 'ambient' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ambient"] - - @ambient.setter - def ambient(self, val): - self["ambient"] = val - - # diffuse - # ------- - @property - def diffuse(self): - """ - Represents the extent that incident rays are reflected in a - range of angles. - - The 'diffuse' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["diffuse"] - - @diffuse.setter - def diffuse(self, val): - self["diffuse"] = val - - # facenormalsepsilon - # ------------------ - @property - def facenormalsepsilon(self): - """ - Epsilon for face normals calculation avoids math issues arising - from degenerate geometry. - - The 'facenormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["facenormalsepsilon"] - - @facenormalsepsilon.setter - def facenormalsepsilon(self, val): - self["facenormalsepsilon"] = val - - # fresnel - # ------- - @property - def fresnel(self): - """ - Represents the reflectance as a dependency of the viewing - angle; e.g. paper is reflective when viewing it from the edge - of the paper (almost 90 degrees), causing shine. - - The 'fresnel' property is a number and may be specified as: - - An int or float in the interval [0, 5] - - Returns - ------- - int|float - """ - return self["fresnel"] - - @fresnel.setter - def fresnel(self, val): - self["fresnel"] = val - - # roughness - # --------- - @property - def roughness(self): - """ - Alters specular reflection; the rougher the surface, the wider - and less contrasty the shine. - - The 'roughness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["roughness"] - - @roughness.setter - def roughness(self, val): - self["roughness"] = val - - # specular - # -------- - @property - def specular(self): - """ - Represents the level that incident rays are reflected in a - single direction, causing shine. - - The 'specular' property is a number and may be specified as: - - An int or float in the interval [0, 2] - - Returns - ------- - int|float - """ - return self["specular"] - - @specular.setter - def specular(self, val): - self["specular"] = val - - # vertexnormalsepsilon - # -------------------- - @property - def vertexnormalsepsilon(self): - """ - Epsilon for vertex normals calculation avoids math issues - arising from degenerate geometry. - - The 'vertexnormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["vertexnormalsepsilon"] - - @vertexnormalsepsilon.setter - def vertexnormalsepsilon(self, val): - self["vertexnormalsepsilon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - """ - - def __init__( - self, - arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, - **kwargs - ): - """ - Construct a new Lighting object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.Lighting` - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - - Returns - ------- - Lighting - """ - super(Lighting, self).__init__("lighting") - - # Validate arg - # ------------ - 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.mesh3d.Lighting -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.Lighting`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d import lighting as v_lighting - - # Initialize validators - # --------------------- - self._validators["ambient"] = v_lighting.AmbientValidator() - self._validators["diffuse"] = v_lighting.DiffuseValidator() - self._validators[ - "facenormalsepsilon" - ] = v_lighting.FacenormalsepsilonValidator() - self._validators["fresnel"] = v_lighting.FresnelValidator() - self._validators["roughness"] = v_lighting.RoughnessValidator() - self._validators["specular"] = v_lighting.SpecularValidator() - self._validators[ - "vertexnormalsepsilon" - ] = v_lighting.VertexnormalsepsilonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - self["ambient"] = ambient if ambient is not None else _v - _v = arg.pop("diffuse", None) - self["diffuse"] = diffuse if diffuse is not None else _v - _v = arg.pop("facenormalsepsilon", None) - self["facenormalsepsilon"] = ( - facenormalsepsilon if facenormalsepsilon is not None else _v - ) - _v = arg.pop("fresnel", None) - self["fresnel"] = fresnel if fresnel is not None else _v - _v = arg.pop("roughness", None) - self["roughness"] = roughness if roughness is not None else _v - _v = arg.pop("specular", None) - self["specular"] = specular if specular is not None else _v - _v = arg.pop("vertexnormalsepsilon", None) - self["vertexnormalsepsilon"] = ( - vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - ) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.mesh3d.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.mesh3d.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contour(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour lines. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # show - # ---- - @property - def show(self): - """ - Sets whether or not dynamic contours are shown on hover - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the contour lines. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown on hover - width - Sets the width of the contour lines. - """ - - def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): - """ - Construct a new Contour object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.Contour` - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown on hover - width - Sets the width of the contour lines. - - Returns - ------- - Contour - """ - super(Contour, self).__init__("contour") - - # Validate arg - # ------------ - 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.mesh3d.Contour -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.Contour`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d import contour as v_contour - - # Initialize validators - # --------------------- - self._validators["color"] = v_contour.ColorValidator() - self._validators["show"] = v_contour.ShowValidator() - self._validators["width"] = v_contour.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.mesh3d.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.mesh3d.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.mesh3d.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.mesh3d.colorbar.tickformatstopdefaults), - sets the default property values to use for elements of - mesh3d.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.mesh3d.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.mesh3d.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use mesh3d.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use mesh3d.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.mesh3d.colorbar - .Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.mesh3d - .colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - mesh3d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.mesh3d.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use mesh3d.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use mesh3d.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.mesh3d.colorbar - .Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.mesh3d - .colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - mesh3d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.mesh3d.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use mesh3d.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use mesh3d.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.mesh3d.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Contour", - "Hoverlabel", - "Lighting", - "Lightposition", - "Stream", - "colorbar", - "hoverlabel", -] - -from plotly.graph_objs.mesh3d import hoverlabel -from plotly.graph_objs.mesh3d import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._lightposition import Lightposition + from ._lighting import Lighting + from ._hoverlabel import Hoverlabel + from ._contour import Contour + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + [ + "._stream.Stream", + "._lightposition.Lightposition", + "._lighting.Lighting", + "._hoverlabel.Hoverlabel", + "._contour.Contour", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py new file mode 100644 index 00000000000..8634ce1b5aa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py @@ -0,0 +1,1940 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d" + _path_str = "mesh3d.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.mesh3d.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.mesh3d.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.mesh3d.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.mesh3d.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + mesh3d.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.mesh3d.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.mesh3d.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use mesh3d.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use mesh3d.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.mesh3d.colorbar + .Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.mesh3d + .colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + mesh3d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.mesh3d.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use mesh3d.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use mesh3d.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.mesh3d.colorbar + .Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.mesh3d + .colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + mesh3d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.mesh3d.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use mesh3d.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use mesh3d.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_contour.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_contour.py new file mode 100644 index 00000000000..ea15c4c4125 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_contour.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contour(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d" + _path_str = "mesh3d.contour" + _valid_props = {"color", "show", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour lines. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # show + # ---- + @property + def show(self): + """ + Sets whether or not dynamic contours are shown on hover + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the contour lines. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown on hover + width + Sets the width of the contour lines. + """ + + def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): + """ + Construct a new Contour object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.Contour` + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown on hover + width + Sets the width of the contour lines. + + Returns + ------- + Contour + """ + super(Contour, self).__init__("contour") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.Contour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.Contour`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_hoverlabel.py new file mode 100644 index 00000000000..3a2ffbff098 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d" + _path_str = "mesh3d.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.mesh3d.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_lighting.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_lighting.py new file mode 100644 index 00000000000..d142adc983a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_lighting.py @@ -0,0 +1,311 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d" + _path_str = "mesh3d.lighting" + _valid_props = { + "ambient", + "diffuse", + "facenormalsepsilon", + "fresnel", + "roughness", + "specular", + "vertexnormalsepsilon", + } + + # ambient + # ------- + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + # diffuse + # ------- + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + # facenormalsepsilon + # ------------------ + @property + def facenormalsepsilon(self): + """ + Epsilon for face normals calculation avoids math issues arising + from degenerate geometry. + + The 'facenormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["facenormalsepsilon"] + + @facenormalsepsilon.setter + def facenormalsepsilon(self, val): + self["facenormalsepsilon"] = val + + # fresnel + # ------- + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + # roughness + # --------- + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + # specular + # -------- + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + # vertexnormalsepsilon + # -------------------- + @property + def vertexnormalsepsilon(self): + """ + Epsilon for vertex normals calculation avoids math issues + arising from degenerate geometry. + + The 'vertexnormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["vertexnormalsepsilon"] + + @vertexnormalsepsilon.setter + def vertexnormalsepsilon(self, val): + self["vertexnormalsepsilon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + facenormalsepsilon=None, + fresnel=None, + roughness=None, + specular=None, + vertexnormalsepsilon=None, + **kwargs + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + + Returns + ------- + Lighting + """ + super(Lighting, self).__init__("lighting") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.Lighting`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("ambient", None) + _v = ambient if ambient is not None else _v + if _v is not None: + self["ambient"] = _v + _v = arg.pop("diffuse", None) + _v = diffuse if diffuse is not None else _v + if _v is not None: + self["diffuse"] = _v + _v = arg.pop("facenormalsepsilon", None) + _v = facenormalsepsilon if facenormalsepsilon is not None else _v + if _v is not None: + self["facenormalsepsilon"] = _v + _v = arg.pop("fresnel", None) + _v = fresnel if fresnel is not None else _v + if _v is not None: + self["fresnel"] = _v + _v = arg.pop("roughness", None) + _v = roughness if roughness is not None else _v + if _v is not None: + self["roughness"] = _v + _v = arg.pop("specular", None) + _v = specular if specular is not None else _v + if _v is not None: + self["specular"] = _v + _v = arg.pop("vertexnormalsepsilon", None) + _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v + if _v is not None: + self["vertexnormalsepsilon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_lightposition.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_lightposition.py new file mode 100644 index 00000000000..941874eebac --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_lightposition.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d" + _path_str = "mesh3d.lightposition" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super(Lightposition, self).__init__("lightposition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.Lightposition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_stream.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_stream.py new file mode 100644 index 00000000000..4fa2669dd18 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d" + _path_str = "mesh3d.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.mesh3d.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py index af309f38ff0..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py @@ -1,722 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.mesh3d.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.mesh3d.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.mesh3d.colorba - r.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.mesh3d.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d.colorbar import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.mesh3d.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.mesh3d.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_tickfont.py new file mode 100644 index 00000000000..b4d1c334b98 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d.colorbar" + _path_str = "mesh3d.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..31af9b9f23c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d.colorbar" + _path_str = "mesh3d.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.mesh3d.colorba + r.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_title.py new file mode 100644 index 00000000000..82f0117678a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d.colorbar" + _path_str = "mesh3d.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.mesh3d.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py index 9d2b9470e13..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.mesh3d.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/_font.py new file mode 100644 index 00000000000..2888848d997 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d.colorbar.title" + _path_str = "mesh3d.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py index 13a81572f68..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "mesh3d.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.mesh3d.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.mesh3d.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.mesh3d.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.mesh3d.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/_font.py new file mode 100644 index 00000000000..e199461dd22 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "mesh3d.hoverlabel" + _path_str = "mesh3d.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.mesh3d.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.mesh3d.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.mesh3d.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py index 860c6444a67..12b1a76d937 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py @@ -1,1061 +1,25 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.ohlc.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.ohlc.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). Note that this style setting can also be - set per direction via `increasing.line.dash` and - `decreasing.line.dash`. - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - [object Object] Note that this style setting can also be set - per direction via `increasing.line.width` and - `decreasing.line.width`. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). Note that this style setting can - also be set per direction via `increasing.line.dash` - and `decreasing.line.dash`. - width - [object Object] Note that this style setting can also - be set per direction via `increasing.line.width` and - `decreasing.line.width`. - """ - - def __init__(self, arg=None, dash=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.ohlc.Line` - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). Note that this style setting can - also be set per direction via `increasing.line.dash` - and `decreasing.line.dash`. - width - [object Object] Note that this style setting can also - be set per direction via `increasing.line.width` and - `decreasing.line.width`. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.ohlc.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc import line as v_line - - # Initialize validators - # --------------------- - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Increasing(_BaseTraceHierarchyType): - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.increasing.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.ohlc.increasing.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - line - :class:`plotly.graph_objects.ohlc.increasing.Line` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, line=None, **kwargs): - """ - Construct a new Increasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.ohlc.Increasing` - line - :class:`plotly.graph_objects.ohlc.increasing.Line` - instance or dict with compatible properties - - Returns - ------- - Increasing - """ - super(Increasing, self).__init__("increasing") - - # Validate arg - # ------------ - 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.ohlc.Increasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.Increasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc import increasing as v_increasing - - # Initialize validators - # --------------------- - self._validators["line"] = v_increasing.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.ohlc.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # split - # ----- - @property - def split(self): - """ - Show hover information (open, close, high, low) in separate - labels. - - The 'split' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["split"] - - @split.setter - def split(self, val): - self["split"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - split - Show hover information (open, close, high, low) in - separate labels. - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - split=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.ohlc.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - split - Show hover information (open, close, high, low) in - separate labels. - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.ohlc.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - self._validators["split"] = v_hoverlabel.SplitValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - _v = arg.pop("split", None) - self["split"] = split if split is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Decreasing(_BaseTraceHierarchyType): - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.ohlc.decreasing.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.ohlc.decreasing.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - line - :class:`plotly.graph_objects.ohlc.decreasing.Line` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, line=None, **kwargs): - """ - Construct a new Decreasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.ohlc.Decreasing` - line - :class:`plotly.graph_objects.ohlc.decreasing.Line` - instance or dict with compatible properties - - Returns - ------- - Decreasing - """ - super(Decreasing, self).__init__("decreasing") - - # Validate arg - # ------------ - 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.ohlc.Decreasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.Decreasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc import decreasing as v_decreasing - - # Initialize validators - # --------------------- - self._validators["line"] = v_decreasing.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Decreasing", - "Hoverlabel", - "Increasing", - "Line", - "Stream", - "decreasing", - "hoverlabel", - "increasing", -] - -from plotly.graph_objs.ohlc import increasing -from plotly.graph_objs.ohlc import hoverlabel -from plotly.graph_objs.ohlc import decreasing +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._line import Line + from ._increasing import Increasing + from ._hoverlabel import Hoverlabel + from ._decreasing import Decreasing + from . import increasing + from . import hoverlabel + from . import decreasing +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".increasing", ".hoverlabel", ".decreasing"], + [ + "._stream.Stream", + "._line.Line", + "._increasing.Increasing", + "._hoverlabel.Hoverlabel", + "._decreasing.Decreasing", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/_decreasing.py b/packages/python/plotly/plotly/graph_objs/ohlc/_decreasing.py new file mode 100644 index 00000000000..d548376e037 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/_decreasing.py @@ -0,0 +1,113 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Decreasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc" + _path_str = "ohlc.decreasing" + _valid_props = {"line"} + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.decreasing.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.ohlc.decreasing.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.ohlc.decreasing.Line` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, line=None, **kwargs): + """ + Construct a new Decreasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.ohlc.Decreasing` + line + :class:`plotly.graph_objects.ohlc.decreasing.Line` + instance or dict with compatible properties + + Returns + ------- + Decreasing + """ + super(Decreasing, self).__init__("decreasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.Decreasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.Decreasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/ohlc/_hoverlabel.py new file mode 100644 index 00000000000..8f545bb9475 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/_hoverlabel.py @@ -0,0 +1,535 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc" + _path_str = "ohlc.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "split", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.ohlc.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # split + # ----- + @property + def split(self): + """ + Show hover information (open, close, high, low) in separate + labels. + + The 'split' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["split"] + + @split.setter + def split(self, val): + self["split"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + split + Show hover information (open, close, high, low) in + separate labels. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + split=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.ohlc.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + split + Show hover information (open, close, high, low) in + separate labels. + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + _v = arg.pop("split", None) + _v = split if split is not None else _v + if _v is not None: + self["split"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/_increasing.py b/packages/python/plotly/plotly/graph_objs/ohlc/_increasing.py new file mode 100644 index 00000000000..258d343e81b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/_increasing.py @@ -0,0 +1,113 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Increasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc" + _path_str = "ohlc.increasing" + _valid_props = {"line"} + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.increasing.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.ohlc.increasing.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.ohlc.increasing.Line` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, line=None, **kwargs): + """ + Construct a new Increasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.ohlc.Increasing` + line + :class:`plotly.graph_objects.ohlc.increasing.Line` + instance or dict with compatible properties + + Returns + ------- + Increasing + """ + super(Increasing, self).__init__("increasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.Increasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.Increasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/_line.py b/packages/python/plotly/plotly/graph_objs/ohlc/_line.py new file mode 100644 index 00000000000..078970508c7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/_line.py @@ -0,0 +1,149 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc" + _path_str = "ohlc.line" + _valid_props = {"dash", "width"} + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). Note that this style setting can also be + set per direction via `increasing.line.dash` and + `decreasing.line.dash`. + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + [object Object] Note that this style setting can also be set + per direction via `increasing.line.width` and + `decreasing.line.width`. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). Note that this style setting can + also be set per direction via `increasing.line.dash` + and `decreasing.line.dash`. + width + [object Object] Note that this style setting can also + be set per direction via `increasing.line.width` and + `decreasing.line.width`. + """ + + def __init__(self, arg=None, dash=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.ohlc.Line` + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). Note that this style setting can + also be set per direction via `increasing.line.dash` + and `decreasing.line.dash`. + width + [object Object] Note that this style setting can also + be set per direction via `increasing.line.width` and + `decreasing.line.width`. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/_stream.py b/packages/python/plotly/plotly/graph_objs/ohlc/_stream.py new file mode 100644 index 00000000000..fb36c806c02 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc" + _path_str = "ohlc.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.ohlc.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py index 7cb9de8d09b..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py @@ -1,208 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc.decreasing" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=None, dash=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.ohlc.decreasing.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.ohlc.decreasing.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.decreasing.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc.decreasing import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/_line.py b/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/_line.py new file mode 100644 index 00000000000..210468e854f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/_line.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc.decreasing" + _path_str = "ohlc.decreasing.line" + _valid_props = {"color", "dash", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=None, dash=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.ohlc.decreasing.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.decreasing.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.decreasing.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py index 172f15e824a..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.ohlc.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.ohlc.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/_font.py new file mode 100644 index 00000000000..2d5b21ba7a1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc.hoverlabel" + _path_str = "ohlc.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.ohlc.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py index 7c6f96aba4a..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py @@ -1,208 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "ohlc.increasing" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=None, dash=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.ohlc.increasing.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.ohlc.increasing.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.ohlc.increasing.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.ohlc.increasing import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/increasing/_line.py b/packages/python/plotly/plotly/graph_objs/ohlc/increasing/_line.py new file mode 100644 index 00000000000..ae8754a06f7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/ohlc/increasing/_line.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "ohlc.increasing" + _path_str = "ohlc.increasing.line" + _valid_props = {"color", "dash", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=None, dash=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.ohlc.increasing.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.ohlc.increasing.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.ohlc.increasing.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/__init__.py index eeef55d5edc..f4b9625c676 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/__init__.py @@ -1,2224 +1,25 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the font for the `category` labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.parcats.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.parcats.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in `line.color`is set - to a numerical array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `line.color`) or the bounds - set in `line.cmin` and `line.cmax` Has an effect only if in - `line.color`is set to a numerical array. Defaults to `false` - when `line.cmin` and `line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `line.color`is set to a numerical array. Value should have - the same units as in `line.color` and if set, `line.cmin` must - be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `line.cmin` - and/or `line.cmax` to be equidistant to this point. Has an - effect only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color`. Has no - effect when `line.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `line.color`is set to a numerical array. Value should have - the same units as in `line.color` and if set, `line.cmax` must - be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets thelinecolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to `line.cmin` - and `line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to parcats.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.line.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcats - .line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcats.line.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - parcats.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcats.line.color - bar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - parcats.line.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - parcats.line.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.parcats.line.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `line.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`line.cmin` and `line.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: Greys,YlGnBu,Gr - eens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet - ,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `count` and `probability`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `line.color`is set to a numerical array. If true, `line.cmin` - will correspond to the last color in the array and `line.cmax` - will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # shape - # ----- - @property - def shape(self): - """ - Sets the shape of the paths. If `linear`, paths are composed of - straight lines. If `hspline`, paths are composed of horizontal - curved splines - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'hspline'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `line.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in - `line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `line.color`) - or the bounds set in `line.cmin` and `line.cmax` Has - an effect only if in `line.color`is set to a numerical - array. Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `line.cmin` and/or `line.cmax` to be equidistant to - this point. Has an effect only if in `line.color`is set - to a numerical array. Value should have the same units - as in `line.color`. Has no effect when `line.cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `line.cmin` and `line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.parcats.line.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, `[[0, - 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`line.cmin` - and `line.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `count` and `probability`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - reversescale - Reverses the color mapping if true. Has an effect only - if in `line.color`is set to a numerical array. If true, - `line.cmin` will correspond to the last color in the - array and `line.cmax` will correspond to the first - color. - shape - Sets the shape of the paths. If `linear`, paths are - composed of straight lines. If `hspline`, paths are - composed of horizontal curved splines - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `line.color`is set - to a numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - hovertemplate=None, - reversescale=None, - shape=None, - showscale=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcats.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in - `line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `line.color`) - or the bounds set in `line.cmin` and `line.cmax` Has - an effect only if in `line.color`is set to a numerical - array. Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `line.cmin` and/or `line.cmax` to be equidistant to - this point. Has an effect only if in `line.color`is set - to a numerical array. Value should have the same units - as in `line.color`. Has no effect when `line.cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `line.cmin` and `line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.parcats.line.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, `[[0, - 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`line.cmin` - and `line.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `count` and `probability`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - reversescale - Reverses the color mapping if true. Has an effect only - if in `line.color`is set to a numerical array. If true, - `line.cmin` will correspond to the last color in the - array and `line.cmax` will correspond to the first - color. - shape - Sets the shape of the paths. If `linear`, paths are - composed of straight lines. If `hspline`, paths are - composed of horizontal curved splines - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `line.color`is set - to a numerical array. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.parcats.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorbar"] = v_line.ColorBarValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["hovertemplate"] = v_line.HovertemplateValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["showscale"] = v_line.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Labelfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Labelfont object - - Sets the font for the `dimension` labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.Labelfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Labelfont - """ - super(Labelfont, self).__init__("labelfont") - - # Validate arg - # ------------ - 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.parcats.Labelfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.Labelfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats import labelfont as v_labelfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_labelfont.ColorValidator() - self._validators["family"] = v_labelfont.FamilyValidator() - self._validators["size"] = v_labelfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this parcats trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this parcats trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this parcats trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this parcats trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this parcats trace . - row - If there is a layout grid, use the domain for this row - in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats trace (in - plot fraction). - y - Sets the vertical domain of this parcats trace (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this parcats trace . - row - If there is a layout grid, use the domain for this row - in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats trace (in - plot fraction). - y - Sets the vertical domain of this parcats trace (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.parcats.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Dimension(_BaseTraceHierarchyType): - - # categoryarray - # ------------- - @property - def categoryarray(self): - """ - Sets the order in which categories in this dimension appear. - Only has an effect if `categoryorder` is set to "array". Used - with `categoryorder`. - - The 'categoryarray' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["categoryarray"] - - @categoryarray.setter - def categoryarray(self, val): - self["categoryarray"] = val - - # categoryarraysrc - # ---------------- - @property - def categoryarraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for - categoryarray . - - The 'categoryarraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["categoryarraysrc"] - - @categoryarraysrc.setter - def categoryarraysrc(self, val): - self["categoryarraysrc"] = val - - # categoryorder - # ------------- - @property - def categoryorder(self): - """ - Specifies the ordering logic for the categories in the - dimension. By default, plotly uses "trace", which specifies the - order that is present in the data supplied. Set `categoryorder` - to *category ascending* or *category descending* if order - should be determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" to derive the - ordering from the attribute `categoryarray`. If a category is - not found in the `categoryarray` array, the sorting behavior - for that attribute will be identical to the "trace" mode. The - unspecified categories will follow the categories in - `categoryarray`. - - The 'categoryorder' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['trace', 'category ascending', 'category descending', - 'array'] - - Returns - ------- - Any - """ - return self["categoryorder"] - - @categoryorder.setter - def categoryorder(self, val): - self["categoryorder"] = val - - # displayindex - # ------------ - @property - def displayindex(self): - """ - The display index of dimension, from left to right, zero - indexed, defaults to dimension index. - - The 'displayindex' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - - Returns - ------- - int - """ - return self["displayindex"] - - @displayindex.setter - def displayindex(self, val): - self["displayindex"] = val - - # label - # ----- - @property - def label(self): - """ - The shown name of the dimension. - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets alternative tick labels for the categories in this - dimension. Only has an effect if `categoryorder` is set to - "array". Should be an array the same length as `categoryarray` - Used with `categoryorder`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # values - # ------ - @property - def values(self): - """ - Dimension values. `values[n]` represents the category value of - the `n`th point in the dataset, therefore the `values` vector - for all dimensions must be the same (longer vectors will be - truncated). - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Shows the dimension when set to `true` (the default). Hides the - dimension for `false`. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - categoryarray - Sets the order in which categories in this dimension - appear. Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the categories in the - dimension. By default, plotly uses "trace", which - specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. - displayindex - The display index of dimension, from left to right, - zero indexed, defaults to dimension index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories in this - dimension. Only has an effect if `categoryorder` is set - to "array". Should be an array the same length as - `categoryarray` Used with `categoryorder`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - values - Dimension values. `values[n]` represents the category - value of the `n`th point in the dataset, therefore the - `values` vector for all dimensions must be the same - (longer vectors will be truncated). - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Shows the dimension when set to `true` (the default). - Hides the dimension for `false`. - """ - - def __init__( - self, - arg=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - displayindex=None, - label=None, - ticktext=None, - ticktextsrc=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Dimension object - - The dimensions (variables) of the parallel categories diagram. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.Dimension` - categoryarray - Sets the order in which categories in this dimension - appear. Only has an effect if `categoryorder` is set to - "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud for - categoryarray . - categoryorder - Specifies the ordering logic for the categories in the - dimension. By default, plotly uses "trace", which - specifies the order that is present in the data - supplied. Set `categoryorder` to *category ascending* - or *category descending* if order should be determined - by the alphanumerical order of the category names. Set - `categoryorder` to "array" to derive the ordering from - the attribute `categoryarray`. If a category is not - found in the `categoryarray` array, the sorting - behavior for that attribute will be identical to the - "trace" mode. The unspecified categories will follow - the categories in `categoryarray`. - displayindex - The display index of dimension, from left to right, - zero indexed, defaults to dimension index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories in this - dimension. Only has an effect if `categoryorder` is set - to "array". Should be an array the same length as - `categoryarray` Used with `categoryorder`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - values - Dimension values. `values[n]` represents the category - value of the `n`th point in the dataset, therefore the - `values` vector for all dimensions must be the same - (longer vectors will be truncated). - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Shows the dimension when set to `true` (the default). - Hides the dimension for `false`. - - Returns - ------- - Dimension - """ - super(Dimension, self).__init__("dimensions") - - # Validate arg - # ------------ - 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.parcats.Dimension -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.Dimension`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats import dimension as v_dimension - - # Initialize validators - # --------------------- - self._validators["categoryarray"] = v_dimension.CategoryarrayValidator() - self._validators["categoryarraysrc"] = v_dimension.CategoryarraysrcValidator() - self._validators["categoryorder"] = v_dimension.CategoryorderValidator() - self._validators["displayindex"] = v_dimension.DisplayindexValidator() - self._validators["label"] = v_dimension.LabelValidator() - self._validators["ticktext"] = v_dimension.TicktextValidator() - self._validators["ticktextsrc"] = v_dimension.TicktextsrcValidator() - self._validators["values"] = v_dimension.ValuesValidator() - self._validators["valuessrc"] = v_dimension.ValuessrcValidator() - self._validators["visible"] = v_dimension.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("categoryarray", None) - self["categoryarray"] = categoryarray if categoryarray is not None else _v - _v = arg.pop("categoryarraysrc", None) - self["categoryarraysrc"] = ( - categoryarraysrc if categoryarraysrc is not None else _v - ) - _v = arg.pop("categoryorder", None) - self["categoryorder"] = categoryorder if categoryorder is not None else _v - _v = arg.pop("displayindex", None) - self["displayindex"] = displayindex if displayindex is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Dimension", - "Dimension", - "Domain", - "Labelfont", - "Line", - "Stream", - "Tickfont", - "line", -] - -from plotly.graph_objs.parcats import line +import sys + +if sys.version_info < (3, 7): + from ._tickfont import Tickfont + from ._stream import Stream + from ._line import Line + from ._labelfont import Labelfont + from ._domain import Domain + from ._dimension import Dimension + from . import line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".line"], + [ + "._tickfont.Tickfont", + "._stream.Stream", + "._line.Line", + "._labelfont.Labelfont", + "._domain.Domain", + "._dimension.Dimension", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/parcats/_dimension.py b/packages/python/plotly/plotly/graph_objs/parcats/_dimension.py new file mode 100644 index 00000000000..07e396c4088 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/_dimension.py @@ -0,0 +1,449 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Dimension(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats" + _path_str = "parcats.dimension" + _valid_props = { + "categoryarray", + "categoryarraysrc", + "categoryorder", + "displayindex", + "label", + "ticktext", + "ticktextsrc", + "values", + "valuessrc", + "visible", + } + + # categoryarray + # ------------- + @property + def categoryarray(self): + """ + Sets the order in which categories in this dimension appear. + Only has an effect if `categoryorder` is set to "array". Used + with `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + # categoryarraysrc + # ---------------- + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + categoryarray . + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + # categoryorder + # ------------- + @property + def categoryorder(self): + """ + Specifies the ordering logic for the categories in the + dimension. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + # displayindex + # ------------ + @property + def displayindex(self): + """ + The display index of dimension, from left to right, zero + indexed, defaults to dimension index. + + The 'displayindex' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["displayindex"] + + @displayindex.setter + def displayindex(self, val): + self["displayindex"] = val + + # label + # ----- + @property + def label(self): + """ + The shown name of the dimension. + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets alternative tick labels for the categories in this + dimension. Only has an effect if `categoryorder` is set to + "array". Should be an array the same length as `categoryarray` + Used with `categoryorder`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # values + # ------ + @property + def values(self): + """ + Dimension values. `values[n]` represents the category value of + the `n`th point in the dataset, therefore the `values` vector + for all dimensions must be the same (longer vectors will be + truncated). + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Shows the dimension when set to `true` (the default). Hides the + dimension for `false`. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + categoryarray + Sets the order in which categories in this dimension + appear. Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the categories in the + dimension. By default, plotly uses "trace", which + specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + displayindex + The display index of dimension, from left to right, + zero indexed, defaults to dimension index. + label + The shown name of the dimension. + ticktext + Sets alternative tick labels for the categories in this + dimension. Only has an effect if `categoryorder` is set + to "array". Should be an array the same length as + `categoryarray` Used with `categoryorder`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + values + Dimension values. `values[n]` represents the category + value of the `n`th point in the dataset, therefore the + `values` vector for all dimensions must be the same + (longer vectors will be truncated). + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Shows the dimension when set to `true` (the default). + Hides the dimension for `false`. + """ + + def __init__( + self, + arg=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + displayindex=None, + label=None, + ticktext=None, + ticktextsrc=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Dimension object + + The dimensions (variables) of the parallel categories diagram. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.Dimension` + categoryarray + Sets the order in which categories in this dimension + appear. Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + categoryarray . + categoryorder + Specifies the ordering logic for the categories in the + dimension. By default, plotly uses "trace", which + specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + displayindex + The display index of dimension, from left to right, + zero indexed, defaults to dimension index. + label + The shown name of the dimension. + ticktext + Sets alternative tick labels for the categories in this + dimension. Only has an effect if `categoryorder` is set + to "array". Should be an array the same length as + `categoryarray` Used with `categoryorder`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + values + Dimension values. `values[n]` represents the category + value of the `n`th point in the dataset, therefore the + `values` vector for all dimensions must be the same + (longer vectors will be truncated). + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Shows the dimension when set to `true` (the default). + Hides the dimension for `false`. + + Returns + ------- + Dimension + """ + super(Dimension, self).__init__("dimensions") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.Dimension +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.Dimension`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("categoryarray", None) + _v = categoryarray if categoryarray is not None else _v + if _v is not None: + self["categoryarray"] = _v + _v = arg.pop("categoryarraysrc", None) + _v = categoryarraysrc if categoryarraysrc is not None else _v + if _v is not None: + self["categoryarraysrc"] = _v + _v = arg.pop("categoryorder", None) + _v = categoryorder if categoryorder is not None else _v + if _v is not None: + self["categoryorder"] = _v + _v = arg.pop("displayindex", None) + _v = displayindex if displayindex is not None else _v + if _v is not None: + self["displayindex"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/_domain.py b/packages/python/plotly/plotly/graph_objs/parcats/_domain.py new file mode 100644 index 00000000000..0f73cf1b164 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats" + _path_str = "parcats.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this parcats trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this parcats trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this parcats trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this parcats trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this parcats trace . + row + If there is a layout grid, use the domain for this row + in the grid for this parcats trace . + x + Sets the horizontal domain of this parcats trace (in + plot fraction). + y + Sets the vertical domain of this parcats trace (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this parcats trace . + row + If there is a layout grid, use the domain for this row + in the grid for this parcats trace . + x + Sets the horizontal domain of this parcats trace (in + plot fraction). + y + Sets the vertical domain of this parcats trace (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/_labelfont.py b/packages/python/plotly/plotly/graph_objs/parcats/_labelfont.py new file mode 100644 index 00000000000..c756b8f67a4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/_labelfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats" + _path_str = "parcats.labelfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Labelfont object + + Sets the font for the `dimension` labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Labelfont + """ + super(Labelfont, self).__init__("labelfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.Labelfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/_line.py b/packages/python/plotly/plotly/graph_objs/parcats/_line.py new file mode 100644 index 00000000000..45af6482dc5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/_line.py @@ -0,0 +1,995 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats" + _path_str = "parcats.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "hovertemplate", + "reversescale", + "shape", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in `line.color`is set + to a numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `line.color`) or the bounds + set in `line.cmin` and `line.cmax` Has an effect only if in + `line.color`is set to a numerical array. Defaults to `false` + when `line.cmin` and `line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `line.color`is set to a numerical array. Value should have + the same units as in `line.color` and if set, `line.cmin` must + be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `line.cmin` + and/or `line.cmax` to be equidistant to this point. Has an + effect only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color`. Has no + effect when `line.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `line.color`is set to a numerical array. Value should have + the same units as in `line.color` and if set, `line.cmax` must + be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets thelinecolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to `line.cmin` + and `line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to parcats.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.line.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcats + .line.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.parcats.line.colorbar.tickformatstopdefaults) + , sets the default property values to use for + elements of + parcats.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcats.line.color + bar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + parcats.line.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + parcats.line.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.parcats.line.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `line.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`line.cmin` and `line.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: Greys,YlGnBu,Gr + eens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet + ,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `count` and `probability`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `line.color`is set to a numerical array. If true, `line.cmin` + will correspond to the last color in the array and `line.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # shape + # ----- + @property + def shape(self): + """ + Sets the shape of the paths. If `linear`, paths are composed of + straight lines. If `hspline`, paths are composed of horizontal + curved splines + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'hspline'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `line.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in + `line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `line.color`) + or the bounds set in `line.cmin` and `line.cmax` Has + an effect only if in `line.color`is set to a numerical + array. Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `line.cmin` and/or `line.cmax` to be equidistant to + this point. Has an effect only if in `line.color`is set + to a numerical array. Value should have the same units + as in `line.color`. Has no effect when `line.cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `line.cmin` and `line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.parcats.line.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named color + string. At minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, `[[0, + 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`line.cmin` + and `line.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `count` and `probability`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + reversescale + Reverses the color mapping if true. Has an effect only + if in `line.color`is set to a numerical array. If true, + `line.cmin` will correspond to the last color in the + array and `line.cmax` will correspond to the first + color. + shape + Sets the shape of the paths. If `linear`, paths are + composed of straight lines. If `hspline`, paths are + composed of horizontal curved splines + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `line.color`is set + to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + hovertemplate=None, + reversescale=None, + shape=None, + showscale=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcats.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in + `line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `line.color`) + or the bounds set in `line.cmin` and `line.cmax` Has + an effect only if in `line.color`is set to a numerical + array. Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `line.cmin` and/or `line.cmax` to be equidistant to + this point. Has an effect only if in `line.color`is set + to a numerical array. Value should have the same units + as in `line.color`. Has no effect when `line.cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `line.cmin` and `line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.parcats.line.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named color + string. At minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, `[[0, + 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`line.cmin` + and `line.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `count` and `probability`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + reversescale + Reverses the color mapping if true. Has an effect only + if in `line.color`is set to a numerical array. If true, + `line.cmin` will correspond to the last color in the + array and `line.cmax` will correspond to the first + color. + shape + Sets the shape of the paths. If `linear`, paths are + composed of straight lines. If `hspline`, paths are + composed of horizontal curved splines + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `line.color`is set + to a numerical array. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/_stream.py b/packages/python/plotly/plotly/graph_objs/parcats/_stream.py new file mode 100644 index 00000000000..e7bc0d9a18c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats" + _path_str = "parcats.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/_tickfont.py b/packages/python/plotly/plotly/graph_objs/parcats/_tickfont.py new file mode 100644 index 00000000000..35fa8fab33a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats" + _path_str = "parcats.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the font for the `category` labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py index f0ee1b41cc3..48d0fee5e0d 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py @@ -1,1870 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcats.line.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.parcats.line.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.parcats.line.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.parcats.line.c - olorbar.tickformatstopdefaults), sets the default property - values to use for elements of - parcats.line.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.parcats.line.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.parcats.line.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use parcats.line.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use parcats.line.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats.line" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcats.line.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.parcat - s.line.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - parcats.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcats.line.colorbar.Titl - e` instance or dict with compatible properties - titlefont - Deprecated: Please use parcats.line.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use parcats.line.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.line.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcats.line.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.parcat - s.line.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - parcats.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcats.line.colorbar.Titl - e` instance or dict with compatible properties - titlefont - Deprecated: Please use parcats.line.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use parcats.line.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.parcats.line.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.line.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats.line import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "colorbar"] - -from plotly.graph_objs.parcats.line import colorbar + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py b/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py new file mode 100644 index 00000000000..751af5aa31e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats.line" + _path_str = "parcats.line.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcats.line.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcats.line.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.parcats.line.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.parcats.line.c + olorbar.tickformatstopdefaults), sets the default property + values to use for elements of + parcats.line.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.parcats.line.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.parcats.line.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use parcats.line.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use parcats.line.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcats.line.co + lorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.parcat + s.line.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + parcats.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcats.line.colorbar.Titl + e` instance or dict with compatible properties + titlefont + Deprecated: Please use parcats.line.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use parcats.line.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.line.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcats.line.co + lorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.parcat + s.line.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + parcats.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcats.line.colorbar.Titl + e` instance or dict with compatible properties + titlefont + Deprecated: Please use parcats.line.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use parcats.line.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.line.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.line.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py index d2663739b76..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcats.line.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcats.line.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.parcats.line.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats.line.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcats.line.c - olorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.parcats.line.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats.line.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcats.line.c - olorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.parcats.line.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats.line.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.parcats.line.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_tickfont.py new file mode 100644 index 00000000000..47d4e7282a5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats.line.colorbar" + _path_str = "parcats.line.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcats.line.c + olorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.line.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..4f635c7e8cf --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats.line.colorbar" + _path_str = "parcats.line.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcats.line.c + olorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.line.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_title.py new file mode 100644 index 00000000000..70a63fcebb3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats.line.colorbar" + _path_str = "parcats.line.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcats.line.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcats.line.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.line.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py index 10068de5ee0..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcats.line.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcats.line.c - olorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.parcats.line.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcats.line.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/_font.py new file mode 100644 index 00000000000..e14fe84b94c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcats.line.colorbar.title" + _path_str = "parcats.line.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcats.line.c + olorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcats.line.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py index 37f2de5fdd0..2aeef166af7 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py @@ -1,2505 +1,27 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the font for the `dimension` tick values. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.parcoords.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.parcoords.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Rangefont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Rangefont object - - Sets the font for the `dimension` range values. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Rangefont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Rangefont - """ - super(Rangefont, self).__init__("rangefont") - - # Validate arg - # ------------ - 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.parcoords.Rangefont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Rangefont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import rangefont as v_rangefont - - # Initialize validators - # --------------------- - self._validators["color"] = v_rangefont.ColorValidator() - self._validators["family"] = v_rangefont.FamilyValidator() - self._validators["size"] = v_rangefont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in `line.color`is set - to a numerical array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `line.color`) or the bounds - set in `line.cmin` and `line.cmax` Has an effect only if in - `line.color`is set to a numerical array. Defaults to `false` - when `line.cmin` and `line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `line.color`is set to a numerical array. Value should have - the same units as in `line.color` and if set, `line.cmin` must - be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `line.cmin` - and/or `line.cmax` to be equidistant to this point. Has an - effect only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color`. Has no - effect when `line.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `line.color`is set to a numerical array. Value should have - the same units as in `line.color` and if set, `line.cmax` must - be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets thelinecolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to `line.cmin` - and `line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to parcoords.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.line.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcoor - ds.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcoords.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - parcoords.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcoords.line.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - parcoords.line.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - parcoords.line.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.parcoords.line.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `line.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`line.cmin` and `line.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: Greys,YlGnBu,Gr - eens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet - ,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `line.color`is set to a numerical array. If true, `line.cmin` - will correspond to the last color in the array and `line.cmax` - will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `line.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in - `line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `line.color`) - or the bounds set in `line.cmin` and `line.cmax` Has - an effect only if in `line.color`is set to a numerical - array. Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `line.cmin` and/or `line.cmax` to be equidistant to - this point. Has an effect only if in `line.color`is set - to a numerical array. Value should have the same units - as in `line.color`. Has no effect when `line.cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `line.cmin` and `line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.parcoords.line.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, `[[0, - 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`line.cmin` - and `line.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `line.color`is set to a numerical array. If true, - `line.cmin` will correspond to the last color in the - array and `line.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `line.color`is set - to a numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in - `line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `line.color`) - or the bounds set in `line.cmin` and `line.cmax` Has - an effect only if in `line.color`is set to a numerical - array. Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `line.cmin` and/or `line.cmax` to be equidistant to - this point. Has an effect only if in `line.color`is set - to a numerical array. Value should have the same units - as in `line.color`. Has no effect when `line.cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `line.cmin` and `line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.parcoords.line.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, `[[0, - 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`line.cmin` - and `line.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `line.color`is set to a numerical array. If true, - `line.cmin` will correspond to the last color in the - array and `line.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `line.color`is set - to a numerical array. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.parcoords.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorbar"] = v_line.ColorBarValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["showscale"] = v_line.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Labelfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Labelfont object - - Sets the font for the `dimension` labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Labelfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Labelfont - """ - super(Labelfont, self).__init__("labelfont") - - # Validate arg - # ------------ - 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.parcoords.Labelfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Labelfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import labelfont as v_labelfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_labelfont.ColorValidator() - self._validators["family"] = v_labelfont.FamilyValidator() - self._validators["size"] = v_labelfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this parcoords trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this parcoords trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this parcoords trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this parcoords trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this parcoords trace . - row - If there is a layout grid, use the domain for this row - in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords trace (in - plot fraction). - y - Sets the vertical domain of this parcoords trace (in - plot fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this parcoords trace . - row - If there is a layout grid, use the domain for this row - in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords trace (in - plot fraction). - y - Sets the vertical domain of this parcoords trace (in - plot fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.parcoords.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Dimension(_BaseTraceHierarchyType): - - # constraintrange - # --------------- - @property - def constraintrange(self): - """ - The domain range to which the filter on the dimension is - constrained. Must be an array of `[fromValue, toValue]` with - `fromValue <= toValue`, or if `multiselect` is not disabled, - you may give an array of arrays, where each inner array is - `[fromValue, toValue]`. - - The 'constraintrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'constraintrange[0]' property is a number and may be specified as: - - An int or float - (1) The 'constraintrange[1]' property is a number and may be specified as: - - An int or float - - * a 2D list where: - (0) The 'constraintrange[i][0]' property is a number and may be specified as: - - An int or float - (1) The 'constraintrange[i][1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["constraintrange"] - - @constraintrange.setter - def constraintrange(self, val): - self["constraintrange"] = val - - # label - # ----- - @property - def label(self): - """ - The shown name of the dimension. - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # multiselect - # ----------- - @property - def multiselect(self): - """ - Do we allow multiple selection ranges or just a single range? - - The 'multiselect' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["multiselect"] - - @multiselect.setter - def multiselect(self, val): - self["multiselect"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # range - # ----- - @property - def range(self): - """ - The domain range that represents the full, shown axis extent. - Defaults to the `values` extent. Must be an array of - `[fromValue, toValue]` with finite numbers as elements. - - The 'range' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'range[0]' property is a number and may be specified as: - - An int or float - (1) The 'range[1]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["range"] - - @range.setter - def range(self, val): - self["range"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # values - # ------ - @property - def values(self): - """ - Dimension values. `values[n]` represents the value of the `n`th - point in the dataset, therefore the `values` vector for all - dimensions must be the same (longer vectors will be truncated). - Each value must be a finite number. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Shows the dimension when set to `true` (the default). Hides the - dimension for `false`. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - constraintrange - The domain range to which the filter on the dimension - is constrained. Must be an array of `[fromValue, - toValue]` with `fromValue <= toValue`, or if - `multiselect` is not disabled, you may give an array of - arrays, where each inner array is `[fromValue, - toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a single - range? - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - range - The domain range that represents the full, shown axis - extent. Defaults to the `values` extent. Must be an - array of `[fromValue, toValue]` with finite numbers as - elements. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - ticktext - Sets the text displayed at the ticks position via - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - values - Dimension values. `values[n]` represents the value of - the `n`th point in the dataset, therefore the `values` - vector for all dimensions must be the same (longer - vectors will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Shows the dimension when set to `true` (the default). - Hides the dimension for `false`. - """ - - def __init__( - self, - arg=None, - constraintrange=None, - label=None, - multiselect=None, - name=None, - range=None, - templateitemname=None, - tickformat=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Dimension object - - The dimensions (variables) of the parallel coordinates chart. - 2..60 dimensions are supported. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.Dimension` - constraintrange - The domain range to which the filter on the dimension - is constrained. Must be an array of `[fromValue, - toValue]` with `fromValue <= toValue`, or if - `multiselect` is not disabled, you may give an array of - arrays, where each inner array is `[fromValue, - toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a single - range? - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - range - The domain range that represents the full, shown axis - extent. Defaults to the `values` extent. Must be an - array of `[fromValue, toValue]` with finite numbers as - elements. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - ticktext - Sets the text displayed at the ticks position via - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - values - Dimension values. `values[n]` represents the value of - the `n`th point in the dataset, therefore the `values` - vector for all dimensions must be the same (longer - vectors will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Shows the dimension when set to `true` (the default). - Hides the dimension for `false`. - - Returns - ------- - Dimension - """ - super(Dimension, self).__init__("dimensions") - - # Validate arg - # ------------ - 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.parcoords.Dimension -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.Dimension`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords import dimension as v_dimension - - # Initialize validators - # --------------------- - self._validators["constraintrange"] = v_dimension.ConstraintrangeValidator() - self._validators["label"] = v_dimension.LabelValidator() - self._validators["multiselect"] = v_dimension.MultiselectValidator() - self._validators["name"] = v_dimension.NameValidator() - self._validators["range"] = v_dimension.RangeValidator() - self._validators["templateitemname"] = v_dimension.TemplateitemnameValidator() - self._validators["tickformat"] = v_dimension.TickformatValidator() - self._validators["ticktext"] = v_dimension.TicktextValidator() - self._validators["ticktextsrc"] = v_dimension.TicktextsrcValidator() - self._validators["tickvals"] = v_dimension.TickvalsValidator() - self._validators["tickvalssrc"] = v_dimension.TickvalssrcValidator() - self._validators["values"] = v_dimension.ValuesValidator() - self._validators["valuessrc"] = v_dimension.ValuessrcValidator() - self._validators["visible"] = v_dimension.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("constraintrange", None) - self["constraintrange"] = constraintrange if constraintrange is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("multiselect", None) - self["multiselect"] = multiselect if multiselect is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("range", None) - self["range"] = range if range is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Dimension", - "Dimension", - "Domain", - "Labelfont", - "Line", - "Rangefont", - "Stream", - "Tickfont", - "line", -] - -from plotly.graph_objs.parcoords import line +import sys + +if sys.version_info < (3, 7): + from ._tickfont import Tickfont + from ._stream import Stream + from ._rangefont import Rangefont + from ._line import Line + from ._labelfont import Labelfont + from ._domain import Domain + from ._dimension import Dimension + from . import line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".line"], + [ + "._tickfont.Tickfont", + "._stream.Stream", + "._rangefont.Rangefont", + "._line.Line", + "._labelfont.Labelfont", + "._domain.Domain", + "._dimension.Dimension", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_dimension.py b/packages/python/plotly/plotly/graph_objs/parcoords/_dimension.py new file mode 100644 index 00000000000..75d074832c4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_dimension.py @@ -0,0 +1,635 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Dimension(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.dimension" + _valid_props = { + "constraintrange", + "label", + "multiselect", + "name", + "range", + "templateitemname", + "tickformat", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "values", + "valuessrc", + "visible", + } + + # constraintrange + # --------------- + @property + def constraintrange(self): + """ + The domain range to which the filter on the dimension is + constrained. Must be an array of `[fromValue, toValue]` with + `fromValue <= toValue`, or if `multiselect` is not disabled, + you may give an array of arrays, where each inner array is + `[fromValue, toValue]`. + + The 'constraintrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'constraintrange[0]' property is a number and may be specified as: + - An int or float + (1) The 'constraintrange[1]' property is a number and may be specified as: + - An int or float + + * a 2D list where: + (0) The 'constraintrange[i][0]' property is a number and may be specified as: + - An int or float + (1) The 'constraintrange[i][1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["constraintrange"] + + @constraintrange.setter + def constraintrange(self, val): + self["constraintrange"] = val + + # label + # ----- + @property + def label(self): + """ + The shown name of the dimension. + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # multiselect + # ----------- + @property + def multiselect(self): + """ + Do we allow multiple selection ranges or just a single range? + + The 'multiselect' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["multiselect"] + + @multiselect.setter + def multiselect(self, val): + self["multiselect"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # range + # ----- + @property + def range(self): + """ + The domain range that represents the full, shown axis extent. + Defaults to the `values` extent. Must be an array of + `[fromValue, toValue]` with finite numbers as elements. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property is a number and may be specified as: + - An int or float + (1) The 'range[1]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # values + # ------ + @property + def values(self): + """ + Dimension values. `values[n]` represents the value of the `n`th + point in the dataset, therefore the `values` vector for all + dimensions must be the same (longer vectors will be truncated). + Each value must be a finite number. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Shows the dimension when set to `true` (the default). Hides the + dimension for `false`. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + constraintrange + The domain range to which the filter on the dimension + is constrained. Must be an array of `[fromValue, + toValue]` with `fromValue <= toValue`, or if + `multiselect` is not disabled, you may give an array of + arrays, where each inner array is `[fromValue, + toValue]`. + label + The shown name of the dimension. + multiselect + Do we allow multiple selection ranges or just a single + range? + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + range + The domain range that represents the full, shown axis + extent. Defaults to the `values` extent. Must be an + array of `[fromValue, toValue]` with finite numbers as + elements. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + ticktext + Sets the text displayed at the ticks position via + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + values + Dimension values. `values[n]` represents the value of + the `n`th point in the dataset, therefore the `values` + vector for all dimensions must be the same (longer + vectors will be truncated). Each value must be a finite + number. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Shows the dimension when set to `true` (the default). + Hides the dimension for `false`. + """ + + def __init__( + self, + arg=None, + constraintrange=None, + label=None, + multiselect=None, + name=None, + range=None, + templateitemname=None, + tickformat=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Dimension object + + The dimensions (variables) of the parallel coordinates chart. + 2..60 dimensions are supported. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Dimension` + constraintrange + The domain range to which the filter on the dimension + is constrained. Must be an array of `[fromValue, + toValue]` with `fromValue <= toValue`, or if + `multiselect` is not disabled, you may give an array of + arrays, where each inner array is `[fromValue, + toValue]`. + label + The shown name of the dimension. + multiselect + Do we allow multiple selection ranges or just a single + range? + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + range + The domain range that represents the full, shown axis + extent. Defaults to the `values` extent. Must be an + array of `[fromValue, toValue]` with finite numbers as + elements. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + ticktext + Sets the text displayed at the ticks position via + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + values + Dimension values. `values[n]` represents the value of + the `n`th point in the dataset, therefore the `values` + vector for all dimensions must be the same (longer + vectors will be truncated). Each value must be a finite + number. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Shows the dimension when set to `true` (the default). + Hides the dimension for `false`. + + Returns + ------- + Dimension + """ + super(Dimension, self).__init__("dimensions") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Dimension +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Dimension`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("constraintrange", None) + _v = constraintrange if constraintrange is not None else _v + if _v is not None: + self["constraintrange"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("multiselect", None) + _v = multiselect if multiselect is not None else _v + if _v is not None: + self["multiselect"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("range", None) + _v = range if range is not None else _v + if _v is not None: + self["range"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_domain.py b/packages/python/plotly/plotly/graph_objs/parcoords/_domain.py new file mode 100644 index 00000000000..f6dc02abbdc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this parcoords trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this parcoords trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this parcoords trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this parcoords trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this parcoords trace . + row + If there is a layout grid, use the domain for this row + in the grid for this parcoords trace . + x + Sets the horizontal domain of this parcoords trace (in + plot fraction). + y + Sets the vertical domain of this parcoords trace (in + plot fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this parcoords trace . + row + If there is a layout grid, use the domain for this row + in the grid for this parcoords trace . + x + Sets the horizontal domain of this parcoords trace (in + plot fraction). + y + Sets the vertical domain of this parcoords trace (in + plot fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_labelfont.py b/packages/python/plotly/plotly/graph_objs/parcoords/_labelfont.py new file mode 100644 index 00000000000..10849ed112c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_labelfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.labelfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Labelfont object + + Sets the font for the `dimension` labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Labelfont + """ + super(Labelfont, self).__init__("labelfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Labelfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_line.py b/packages/python/plotly/plotly/graph_objs/parcoords/_line.py new file mode 100644 index 00000000000..fb37d149091 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_line.py @@ -0,0 +1,865 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in `line.color`is set + to a numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `line.color`) or the bounds + set in `line.cmin` and `line.cmax` Has an effect only if in + `line.color`is set to a numerical array. Defaults to `false` + when `line.cmin` and `line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `line.color`is set to a numerical array. Value should have + the same units as in `line.color` and if set, `line.cmin` must + be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `line.cmin` + and/or `line.cmax` to be equidistant to this point. Has an + effect only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color`. Has no + effect when `line.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `line.color`is set to a numerical array. Value should have + the same units as in `line.color` and if set, `line.cmax` must + be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets thelinecolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to `line.cmin` + and `line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to parcoords.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.line.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcoor + ds.line.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.parcoords.line.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + parcoords.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcoords.line.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + parcoords.line.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + parcoords.line.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.parcoords.line.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `line.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`line.cmin` and `line.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: Greys,YlGnBu,Gr + eens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet + ,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `line.color`is set to a numerical array. If true, `line.cmin` + will correspond to the last color in the array and `line.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `line.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in + `line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `line.color`) + or the bounds set in `line.cmin` and `line.cmax` Has + an effect only if in `line.color`is set to a numerical + array. Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `line.cmin` and/or `line.cmax` to be equidistant to + this point. Has an effect only if in `line.color`is set + to a numerical array. Value should have the same units + as in `line.color`. Has no effect when `line.cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `line.cmin` and `line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.parcoords.line.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named color + string. At minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, `[[0, + 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`line.cmin` + and `line.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `line.color`is set to a numerical array. If true, + `line.cmin` will correspond to the last color in the + array and `line.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `line.color`is set + to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in + `line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `line.color`) + or the bounds set in `line.cmin` and `line.cmax` Has + an effect only if in `line.color`is set to a numerical + array. Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `line.cmin` and/or `line.cmax` to be equidistant to + this point. Has an effect only if in `line.color`is set + to a numerical array. Value should have the same units + as in `line.color`. Has no effect when `line.cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `line.cmin` and `line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.parcoords.line.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named color + string. At minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, `[[0, + 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`line.cmin` + and `line.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `line.color`is set to a numerical array. If true, + `line.cmin` will correspond to the last color in the + array and `line.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `line.color`is set + to a numerical array. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_rangefont.py b/packages/python/plotly/plotly/graph_objs/parcoords/_rangefont.py new file mode 100644 index 00000000000..d15495fd955 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_rangefont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Rangefont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.rangefont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Rangefont object + + Sets the font for the `dimension` range values. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Rangefont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Rangefont + """ + super(Rangefont, self).__init__("rangefont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Rangefont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Rangefont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_stream.py b/packages/python/plotly/plotly/graph_objs/parcoords/_stream.py new file mode 100644 index 00000000000..b98563342d8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/_tickfont.py b/packages/python/plotly/plotly/graph_objs/parcoords/_tickfont.py new file mode 100644 index 00000000000..63214d8bc90 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords" + _path_str = "parcoords.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the font for the `dimension` tick values. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py index 2eabfa8c273..48d0fee5e0d 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py @@ -1,1870 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcoords.line.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.parcoords.line.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.parcoords.line.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.parcoords.line - .colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - parcoords.line.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.parcoords.line.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.parcoords.line.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use parcoords.line.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use parcoords.line.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords.line" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcoords.line. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.parcoo - rds.line.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - parcoords.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcoords.line.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - parcoords.line.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - parcoords.line.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.parcoords.line.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcoords.line. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.parcoo - rds.line.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - parcoords.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcoords.line.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - parcoords.line.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - parcoords.line.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.parcoords.line.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.line.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords.line import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "colorbar"] - -from plotly.graph_objs.parcoords.line import colorbar + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py new file mode 100644 index 00000000000..5cad55b6d99 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords.line" + _path_str = "parcoords.line.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcoords.line.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcoords.line.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.parcoords.line.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.parcoords.line + .colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + parcoords.line.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.parcoords.line.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.parcoords.line.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use parcoords.line.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use parcoords.line.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcoords.line. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.parcoo + rds.line.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + parcoords.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcoords.line.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + parcoords.line.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + parcoords.line.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.parcoords.line.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcoords.line. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.parcoo + rds.line.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + parcoords.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcoords.line.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + parcoords.line.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + parcoords.line.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.line.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.line.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py index 14bb2bcf70d..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcoords.line.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcoords.line - .colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.parcoords.line.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords.line.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcoords.line - .colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.parcoords.line.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords.line.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcoords.line - .colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.parcoords.line.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords.line.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.parcoords.line.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py new file mode 100644 index 00000000000..5c2fb2c8fd0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords.line.colorbar" + _path_str = "parcoords.line.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcoords.line + .colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.line.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..77ebb917c1a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords.line.colorbar" + _path_str = "parcoords.line.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcoords.line + .colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.line.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_title.py new file mode 100644 index 00000000000..9cf699afc59 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords.line.colorbar" + _path_str = "parcoords.line.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcoords.line.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcoords.line + .colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.line.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py index 225a9e59039..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "parcoords.line.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.parcoords.line - .colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.parcoords.line.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.parcoords.line.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/_font.py new file mode 100644 index 00000000000..42bc2cf6c29 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "parcoords.line.colorbar.title" + _path_str = "parcoords.line.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.parcoords.line + .colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.parcoords.line.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/__init__.py index 4be7cde8699..e0b2e80816f 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/__init__.py @@ -1,2231 +1,31 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets the font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.pie.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # position - # -------- - @property - def position(self): - """ - Specifies the location of the `title`. Note that the title's - position used to be set by the now deprecated `titleposition` - attribute. - - The 'position' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top left', 'top center', 'top right', 'middle center', - 'bottom left', 'bottom center', 'bottom right'] - - Returns - ------- - Any - """ - return self["position"] - - @position.setter - def position(self, val): - self["position"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the chart. If it is empty, no title is - displayed. Note that before the existence of `title.text`, the - title's contents used to be defined as the `title` attribute - itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets the font used for `title`. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - position - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no title - is displayed. Note that before the existence of - `title.text`, the title's contents used to be defined - as the `title` attribute itself. This behavior has been - deprecated. - """ - - def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.pie.Title` - font - Sets the font used for `title`. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - position - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no title - is displayed. Note that before the existence of - `title.text`, the title's contents used to be defined - as the `title` attribute itself. This behavior has been - deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.pie.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["position"] = v_title.PositionValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("position", None) - self["position"] = position if position is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `textinfo`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.pie.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.pie.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.pie.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.pie.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Outsidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Outsidetextfont object - - Sets the font used for `textinfo` lying outside the sector. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pie.Outsidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Outsidetextfont - """ - super(Outsidetextfont, self).__init__("outsidetextfont") - - # Validate arg - # ------------ - 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.pie.Outsidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Outsidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import outsidetextfont as v_outsidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_outsidetextfont.ColorValidator() - self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() - self._validators["family"] = v_outsidetextfont.FamilyValidator() - self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() - self._validators["size"] = v_outsidetextfont.SizeValidator() - self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # colors - # ------ - @property - def colors(self): - """ - Sets the color of each sector. If not specified, the default - trace color set is used to pick the sector colors. - - The 'colors' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["colors"] - - @colors.setter - def colors(self, val): - self["colors"] = val - - # colorssrc - # --------- - @property - def colorssrc(self): - """ - Sets the source reference on Chart Studio Cloud for colors . - - The 'colorssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorssrc"] - - @colorssrc.setter - def colorssrc(self, val): - self["colorssrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.pie.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - colors - Sets the color of each sector. If not specified, the - default trace color set is used to pick the sector - colors. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - line - :class:`plotly.graph_objects.pie.marker.Line` instance - or dict with compatible properties - """ - - def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.pie.Marker` - colors - Sets the color of each sector. If not specified, the - default trace color set is used to pick the sector - colors. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - line - :class:`plotly.graph_objects.pie.marker.Line` instance - or dict with compatible properties - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.pie.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["colors"] = v_marker.ColorsValidator() - self._validators["colorssrc"] = v_marker.ColorssrcValidator() - self._validators["line"] = v_marker.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colors", None) - self["colors"] = colors if colors is not None else _v - _v = arg.pop("colorssrc", None) - self["colorssrc"] = colorssrc if colorssrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `textinfo` lying inside the sector. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pie.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.pie.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.pie.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.pie.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pie.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.pie.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this pie trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this pie trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this pie trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this pie trace (in plot fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this pie trace . - row - If there is a layout grid, use the domain for this row - in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace (in plot - fraction). - y - Sets the vertical domain of this pie trace (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.pie.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this pie trace . - row - If there is a layout grid, use the domain for this row - in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace (in plot - fraction). - y - Sets the vertical domain of this pie trace (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.pie.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Domain", - "Hoverlabel", - "Insidetextfont", - "Marker", - "Outsidetextfont", - "Stream", - "Textfont", - "Title", - "hoverlabel", - "marker", - "title", -] - -from plotly.graph_objs.pie import title -from plotly.graph_objs.pie import marker -from plotly.graph_objs.pie import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._textfont import Textfont + from ._stream import Stream + from ._outsidetextfont import Outsidetextfont + from ._marker import Marker + from ._insidetextfont import Insidetextfont + from ._hoverlabel import Hoverlabel + from ._domain import Domain + from . import title + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title", ".marker", ".hoverlabel"], + [ + "._title.Title", + "._textfont.Textfont", + "._stream.Stream", + "._outsidetextfont.Outsidetextfont", + "._marker.Marker", + "._insidetextfont.Insidetextfont", + "._hoverlabel.Hoverlabel", + "._domain.Domain", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/pie/_domain.py b/packages/python/plotly/plotly/graph_objs/pie/_domain.py new file mode 100644 index 00000000000..ba1eb789690 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_domain.py @@ -0,0 +1,204 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this pie trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this pie trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this pie trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this pie trace (in plot fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this pie trace . + row + If there is a layout grid, use the domain for this row + in the grid for this pie trace . + x + Sets the horizontal domain of this pie trace (in plot + fraction). + y + Sets the vertical domain of this pie trace (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.pie.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this pie trace . + row + If there is a layout grid, use the domain for this row + in the grid for this pie trace . + x + Sets the horizontal domain of this pie trace (in plot + fraction). + y + Sets the vertical domain of this pie trace (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/pie/_hoverlabel.py new file mode 100644 index 00000000000..d355805019b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.pie.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pie.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/pie/_insidetextfont.py new file mode 100644 index 00000000000..4f9833f3c4b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `textinfo` lying inside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pie.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_marker.py b/packages/python/plotly/plotly/graph_objs/pie/_marker.py new file mode 100644 index 00000000000..2fb72eacdec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_marker.py @@ -0,0 +1,178 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.marker" + _valid_props = {"colors", "colorssrc", "line"} + + # colors + # ------ + @property + def colors(self): + """ + Sets the color of each sector. If not specified, the default + trace color set is used to pick the sector colors. + + The 'colors' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["colors"] + + @colors.setter + def colors(self, val): + self["colors"] = val + + # colorssrc + # --------- + @property + def colorssrc(self): + """ + Sets the source reference on Chart Studio Cloud for colors . + + The 'colorssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorssrc"] + + @colorssrc.setter + def colorssrc(self, val): + self["colorssrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.pie.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + colors + Sets the color of each sector. If not specified, the + default trace color set is used to pick the sector + colors. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + line + :class:`plotly.graph_objects.pie.marker.Line` instance + or dict with compatible properties + """ + + def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.pie.Marker` + colors + Sets the color of each sector. If not specified, the + default trace color set is used to pick the sector + colors. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + line + :class:`plotly.graph_objects.pie.marker.Line` instance + or dict with compatible properties + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("colors", None) + _v = colors if colors is not None else _v + if _v is not None: + self["colors"] = _v + _v = arg.pop("colorssrc", None) + _v = colorssrc if colorssrc is not None else _v + if _v is not None: + self["colorssrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_outsidetextfont.py b/packages/python/plotly/plotly/graph_objs/pie/_outsidetextfont.py new file mode 100644 index 00000000000..cf77b7b9b98 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_outsidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.outsidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `textinfo` lying outside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pie.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Outsidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_stream.py b/packages/python/plotly/plotly/graph_objs/pie/_stream.py new file mode 100644 index 00000000000..fa74fd26b76 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.pie.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_textfont.py b/packages/python/plotly/plotly/graph_objs/pie/_textfont.py new file mode 100644 index 00000000000..9b01f915ec8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_textfont.py @@ -0,0 +1,328 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `textinfo`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.pie.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/_title.py b/packages/python/plotly/plotly/graph_objs/pie/_title.py new file mode 100644 index 00000000000..43daeb4baad --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/_title.py @@ -0,0 +1,214 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie" + _path_str = "pie.title" + _valid_props = {"font", "position", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets the font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.pie.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # position + # -------- + @property + def position(self): + """ + Specifies the location of the `title`. Note that the title's + position used to be set by the now deprecated `titleposition` + attribute. + + The 'position' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle center', + 'bottom left', 'bottom center', 'bottom right'] + + Returns + ------- + Any + """ + return self["position"] + + @position.setter + def position(self, val): + self["position"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the chart. If it is empty, no title is + displayed. Note that before the existence of `title.text`, the + title's contents used to be defined as the `title` attribute + itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets the font used for `title`. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + position + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no title + is displayed. Note that before the existence of + `title.text`, the title's contents used to be defined + as the `title` attribute itself. This behavior has been + deprecated. + """ + + def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.pie.Title` + font + Sets the font used for `title`. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + position + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no title + is displayed. Note that before the existence of + `title.text`, the title's contents used to be defined + as the `title` attribute itself. This behavior has been + deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("position", None) + _v = position if position is not None else _v + if _v is not None: + self["position"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py index d8974a71452..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pie.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.pie.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/_font.py new file mode 100644 index 00000000000..a6ce008c762 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie.hoverlabel" + _path_str = "pie.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pie.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py index ed1d7586d8f..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py @@ -1,233 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the line enclosing each sector. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the line enclosing each sector. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the line enclosing each sector. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pie.marker.Line` - color - Sets the color of the line enclosing each sector. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.pie.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/pie/marker/_line.py b/packages/python/plotly/plotly/graph_objs/pie/marker/_line.py new file mode 100644 index 00000000000..cfccb1d9bdd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/marker/_line.py @@ -0,0 +1,231 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie.marker" + _path_str = "pie.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pie.marker.Line` + color + Sets the color of the line enclosing each sector. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py index 889b784903a..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py @@ -1,330 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pie.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pie.title.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.pie.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pie.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pie.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/pie/title/_font.py b/packages/python/plotly/plotly/graph_objs/pie/title/_font.py new file mode 100644 index 00000000000..d972003e8e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pie/title/_font.py @@ -0,0 +1,330 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pie.title" + _path_str = "pie.title.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pie.title.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pie.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pie.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py b/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py index 1d83b15ef12..78b3f6f35a6 100644 --- a/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py @@ -1,976 +1,16 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pointcloud" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pointcloud.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.pointcloud.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pointcloud.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pointcloud import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # blend - # ----- - @property - def blend(self): - """ - Determines if colors are blended together for a translucency - effect in case `opacity` is specified as a value less then `1`. - Setting `blend` to `true` reduces zoom/pan speed if used with - large numbers of points. - - The 'blend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["blend"] - - @blend.setter - def blend(self, val): - self["blend"] = val - - # border - # ------ - @property - def border(self): - """ - The 'border' property is an instance of Border - that may be specified as: - - An instance of :class:`plotly.graph_objs.pointcloud.marker.Border` - - A dict of string/value properties that will be passed - to the Border constructor - - Supported dict properties: - - arearatio - Specifies what fraction of the marker area is - covered with the border. - color - Sets the stroke color. It accepts a specific - color. If the color is not fully opaque and - there are hundreds of thousands of points, it - may cause slower zooming and panning. - - Returns - ------- - plotly.graph_objs.pointcloud.marker.Border - """ - return self["border"] - - @border.setter - def border(self, val): - self["border"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the marker fill color. It accepts a specific color.If the - color is not fully opaque and there are hundreds of thousandsof - points, it may cause slower zooming and panning. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. The default value is `1` (fully - opaque). If the markers are not fully opaque and there are - hundreds of thousands of points, it may cause slower zooming - and panning. Opacity fades the color even if `blend` is left on - `false` even if there is no translucency effect in that case. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # sizemax - # ------- - @property - def sizemax(self): - """ - Sets the maximum size (in px) of the rendered marker points. - Effective when the `pointcloud` shows only few points. - - The 'sizemax' property is a number and may be specified as: - - An int or float in the interval [0.1, inf] - - Returns - ------- - int|float - """ - return self["sizemax"] - - @sizemax.setter - def sizemax(self, val): - self["sizemax"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Sets the minimum size (in px) of the rendered marker points, - effective when the `pointcloud` shows a million or more points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0.1, 2] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pointcloud" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - blend - Determines if colors are blended together for a - translucency effect in case `opacity` is specified as a - value less then `1`. Setting `blend` to `true` reduces - zoom/pan speed if used with large numbers of points. - border - :class:`plotly.graph_objects.pointcloud.marker.Border` - instance or dict with compatible properties - color - Sets the marker fill color. It accepts a specific - color.If the color is not fully opaque and there are - hundreds of thousandsof points, it may cause slower - zooming and panning. - opacity - Sets the marker opacity. The default value is `1` - (fully opaque). If the markers are not fully opaque and - there are hundreds of thousands of points, it may cause - slower zooming and panning. Opacity fades the color - even if `blend` is left on `false` even if there is no - translucency effect in that case. - sizemax - Sets the maximum size (in px) of the rendered marker - points. Effective when the `pointcloud` shows only few - points. - sizemin - Sets the minimum size (in px) of the rendered marker - points, effective when the `pointcloud` shows a million - or more points. - """ - - def __init__( - self, - arg=None, - blend=None, - border=None, - color=None, - opacity=None, - sizemax=None, - sizemin=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pointcloud.Marker` - blend - Determines if colors are blended together for a - translucency effect in case `opacity` is specified as a - value less then `1`. Setting `blend` to `true` reduces - zoom/pan speed if used with large numbers of points. - border - :class:`plotly.graph_objects.pointcloud.marker.Border` - instance or dict with compatible properties - color - Sets the marker fill color. It accepts a specific - color.If the color is not fully opaque and there are - hundreds of thousandsof points, it may cause slower - zooming and panning. - opacity - Sets the marker opacity. The default value is `1` - (fully opaque). If the markers are not fully opaque and - there are hundreds of thousands of points, it may cause - slower zooming and panning. Opacity fades the color - even if `blend` is left on `false` even if there is no - translucency effect in that case. - sizemax - Sets the maximum size (in px) of the rendered marker - points. Effective when the `pointcloud` shows only few - points. - sizemin - Sets the minimum size (in px) of the rendered marker - points, effective when the `pointcloud` shows a million - or more points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.pointcloud.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pointcloud.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pointcloud import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["blend"] = v_marker.BlendValidator() - self._validators["border"] = v_marker.BorderValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["sizemax"] = v_marker.SizemaxValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("blend", None) - self["blend"] = blend if blend is not None else _v - _v = arg.pop("border", None) - self["border"] = border if border is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("sizemax", None) - self["sizemax"] = sizemax if sizemax is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.pointcloud.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.pointcloud.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pointcloud" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pointcloud.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.pointcloud.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pointcloud import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Hoverlabel", "Marker", "Stream", "hoverlabel", "marker"] - -from plotly.graph_objs.pointcloud import marker -from plotly.graph_objs.pointcloud import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".marker", ".hoverlabel"], + ["._stream.Stream", "._marker.Marker", "._hoverlabel.Hoverlabel"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/pointcloud/_hoverlabel.py new file mode 100644 index 00000000000..ddf1b0eb7df --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pointcloud" + _path_str = "pointcloud.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.pointcloud.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.pointcloud.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pointcloud.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pointcloud.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/_marker.py b/packages/python/plotly/plotly/graph_objs/pointcloud/_marker.py new file mode 100644 index 00000000000..37a26443841 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/_marker.py @@ -0,0 +1,342 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pointcloud" + _path_str = "pointcloud.marker" + _valid_props = {"blend", "border", "color", "opacity", "sizemax", "sizemin"} + + # blend + # ----- + @property + def blend(self): + """ + Determines if colors are blended together for a translucency + effect in case `opacity` is specified as a value less then `1`. + Setting `blend` to `true` reduces zoom/pan speed if used with + large numbers of points. + + The 'blend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["blend"] + + @blend.setter + def blend(self, val): + self["blend"] = val + + # border + # ------ + @property + def border(self): + """ + The 'border' property is an instance of Border + that may be specified as: + - An instance of :class:`plotly.graph_objs.pointcloud.marker.Border` + - A dict of string/value properties that will be passed + to the Border constructor + + Supported dict properties: + + arearatio + Specifies what fraction of the marker area is + covered with the border. + color + Sets the stroke color. It accepts a specific + color. If the color is not fully opaque and + there are hundreds of thousands of points, it + may cause slower zooming and panning. + + Returns + ------- + plotly.graph_objs.pointcloud.marker.Border + """ + return self["border"] + + @border.setter + def border(self, val): + self["border"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the marker fill color. It accepts a specific color.If the + color is not fully opaque and there are hundreds of thousandsof + points, it may cause slower zooming and panning. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. The default value is `1` (fully + opaque). If the markers are not fully opaque and there are + hundreds of thousands of points, it may cause slower zooming + and panning. Opacity fades the color even if `blend` is left on + `false` even if there is no translucency effect in that case. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # sizemax + # ------- + @property + def sizemax(self): + """ + Sets the maximum size (in px) of the rendered marker points. + Effective when the `pointcloud` shows only few points. + + The 'sizemax' property is a number and may be specified as: + - An int or float in the interval [0.1, inf] + + Returns + ------- + int|float + """ + return self["sizemax"] + + @sizemax.setter + def sizemax(self, val): + self["sizemax"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Sets the minimum size (in px) of the rendered marker points, + effective when the `pointcloud` shows a million or more points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0.1, 2] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + blend + Determines if colors are blended together for a + translucency effect in case `opacity` is specified as a + value less then `1`. Setting `blend` to `true` reduces + zoom/pan speed if used with large numbers of points. + border + :class:`plotly.graph_objects.pointcloud.marker.Border` + instance or dict with compatible properties + color + Sets the marker fill color. It accepts a specific + color.If the color is not fully opaque and there are + hundreds of thousandsof points, it may cause slower + zooming and panning. + opacity + Sets the marker opacity. The default value is `1` + (fully opaque). If the markers are not fully opaque and + there are hundreds of thousands of points, it may cause + slower zooming and panning. Opacity fades the color + even if `blend` is left on `false` even if there is no + translucency effect in that case. + sizemax + Sets the maximum size (in px) of the rendered marker + points. Effective when the `pointcloud` shows only few + points. + sizemin + Sets the minimum size (in px) of the rendered marker + points, effective when the `pointcloud` shows a million + or more points. + """ + + def __init__( + self, + arg=None, + blend=None, + border=None, + color=None, + opacity=None, + sizemax=None, + sizemin=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pointcloud.Marker` + blend + Determines if colors are blended together for a + translucency effect in case `opacity` is specified as a + value less then `1`. Setting `blend` to `true` reduces + zoom/pan speed if used with large numbers of points. + border + :class:`plotly.graph_objects.pointcloud.marker.Border` + instance or dict with compatible properties + color + Sets the marker fill color. It accepts a specific + color.If the color is not fully opaque and there are + hundreds of thousandsof points, it may cause slower + zooming and panning. + opacity + Sets the marker opacity. The default value is `1` + (fully opaque). If the markers are not fully opaque and + there are hundreds of thousands of points, it may cause + slower zooming and panning. Opacity fades the color + even if `blend` is left on `false` even if there is no + translucency effect in that case. + sizemax + Sets the maximum size (in px) of the rendered marker + points. Effective when the `pointcloud` shows only few + points. + sizemin + Sets the minimum size (in px) of the rendered marker + points, effective when the `pointcloud` shows a million + or more points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pointcloud.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pointcloud.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("blend", None) + _v = blend if blend is not None else _v + if _v is not None: + self["blend"] = _v + _v = arg.pop("border", None) + _v = border if border is not None else _v + if _v is not None: + self["border"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("sizemax", None) + _v = sizemax if sizemax is not None else _v + if _v is not None: + self["sizemax"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/_stream.py b/packages/python/plotly/plotly/graph_objs/pointcloud/_stream.py new file mode 100644 index 00000000000..5ecbca157aa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pointcloud" + _path_str = "pointcloud.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pointcloud.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pointcloud.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pointcloud.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py index a797d5ce724..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pointcloud.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pointcloud.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.pointcloud.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pointcloud.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pointcloud.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/_font.py new file mode 100644 index 00000000000..146c1ff4734 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pointcloud.hoverlabel" + _path_str = "pointcloud.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pointcloud.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pointcloud.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pointcloud.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py index 9f34c3a462e..f08e014ad65 100644 --- a/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py @@ -1,180 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._border import Border +else: + from _plotly_utils.importers import relative_import -class Border(_BaseTraceHierarchyType): - - # arearatio - # --------- - @property - def arearatio(self): - """ - Specifies what fraction of the marker area is covered with the - border. - - The 'arearatio' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["arearatio"] - - @arearatio.setter - def arearatio(self, val): - self["arearatio"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stroke color. It accepts a specific color. If the - color is not fully opaque and there are hundreds of thousands - of points, it may cause slower zooming and panning. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "pointcloud.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - arearatio - Specifies what fraction of the marker area is covered - with the border. - color - Sets the stroke color. It accepts a specific color. If - the color is not fully opaque and there are hundreds of - thousands of points, it may cause slower zooming and - panning. - """ - - def __init__(self, arg=None, arearatio=None, color=None, **kwargs): - """ - Construct a new Border object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.pointcloud.marker.Border` - arearatio - Specifies what fraction of the marker area is covered - with the border. - color - Sets the stroke color. It accepts a specific color. If - the color is not fully opaque and there are hundreds of - thousands of points, it may cause slower zooming and - panning. - - Returns - ------- - Border - """ - super(Border, self).__init__("border") - - # Validate arg - # ------------ - 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.pointcloud.marker.Border -constructor must be a dict or -an instance of :class:`plotly.graph_objs.pointcloud.marker.Border`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.pointcloud.marker import border as v_border - - # Initialize validators - # --------------------- - self._validators["arearatio"] = v_border.ArearatioValidator() - self._validators["color"] = v_border.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arearatio", None) - self["arearatio"] = arearatio if arearatio is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Border"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._border.Border"]) diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/marker/_border.py b/packages/python/plotly/plotly/graph_objs/pointcloud/marker/_border.py new file mode 100644 index 00000000000..b729b6cd2b7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/marker/_border.py @@ -0,0 +1,176 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Border(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "pointcloud.marker" + _path_str = "pointcloud.marker.border" + _valid_props = {"arearatio", "color"} + + # arearatio + # --------- + @property + def arearatio(self): + """ + Specifies what fraction of the marker area is covered with the + border. + + The 'arearatio' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["arearatio"] + + @arearatio.setter + def arearatio(self, val): + self["arearatio"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stroke color. It accepts a specific color. If the + color is not fully opaque and there are hundreds of thousands + of points, it may cause slower zooming and panning. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + arearatio + Specifies what fraction of the marker area is covered + with the border. + color + Sets the stroke color. It accepts a specific color. If + the color is not fully opaque and there are hundreds of + thousands of points, it may cause slower zooming and + panning. + """ + + def __init__(self, arg=None, arearatio=None, color=None, **kwargs): + """ + Construct a new Border object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.pointcloud.marker.Border` + arearatio + Specifies what fraction of the marker area is covered + with the border. + color + Sets the stroke color. It accepts a specific color. If + the color is not fully opaque and there are hundreds of + thousands of points, it may cause slower zooming and + panning. + + Returns + ------- + Border + """ + super(Border, self).__init__("border") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.pointcloud.marker.Border +constructor must be a dict or +an instance of :class:`plotly.graph_objs.pointcloud.marker.Border`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("arearatio", None) + _v = arearatio if arearatio is not None else _v + if _v is not None: + self["arearatio"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/__init__.py index 951083a2bed..68290cba307 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/__init__.py @@ -1,2760 +1,27 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Textfont object - - Sets the font for node labels - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.Textfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.sankey.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["size"] = v_textfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sankey.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.sankey.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Node(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the `node` color. It can be a single value, or an array - for specifying color for each `node`. If `node.color` is - omitted, then the default `Plotly` color palette will be cycled - through to have a variety of colors. These defaults are not - fully opaque, to allow some visibility of what is beneath the - node. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data to each node. - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # groups - # ------ - @property - def groups(self): - """ - Groups of nodes. Each group is defined by an array with the - indices of the nodes it contains. Multiple groups can be - specified. - - The 'groups' property is an info array that may be specified as: - * a 2D list where: - The 'groups[i][j]' property is a number and may be specified as: - - An int or float - - Returns - ------- - list - """ - return self["groups"] - - @groups.setter - def groups(self, val): - self["groups"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear when hovering nodes. - If `none` or `skip` are set, no information is displayed upon - hovering. But, if `none` is set, click and hover events are - still fired. - - The 'hoverinfo' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'none', 'skip'] - - Returns - ------- - Any - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.node.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.sankey.node.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # label - # ----- - @property - def label(self): - """ - The shown name of the node. - - The 'label' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # labelsrc - # -------- - @property - def labelsrc(self): - """ - Sets the source reference on Chart Studio Cloud for label . - - The 'labelsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["labelsrc"] - - @labelsrc.setter - def labelsrc(self, val): - self["labelsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.node.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the `line` around each - `node`. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the `line` around - each `node`. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.sankey.node.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # pad - # --- - @property - def pad(self): - """ - Sets the padding (in px) between the `nodes`. - - The 'pad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the `nodes`. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # x - # - - @property - def x(self): - """ - The normalized horizontal position of the node. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - The normalized vertical position of the node. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the `node` color. It can be a single value, or an - array for specifying color for each `node`. If - `node.color` is omitted, then the default `Plotly` - color palette will be cycled through to have a variety - of colors. These defaults are not fully opaque, to - allow some visibility of what is beneath the node. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - customdata - Assigns extra data to each node. - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - groups - Groups of nodes. Each group is defined by an array with - the indices of the nodes it contains. Multiple groups - can be specified. - hoverinfo - Determines which trace information appear when hovering - nodes. If `none` or `skip` are set, no information is - displayed upon hovering. But, if `none` is set, click - and hover events are still fired. - hoverlabel - :class:`plotly.graph_objects.sankey.node.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - label - The shown name of the node. - labelsrc - Sets the source reference on Chart Studio Cloud for - label . - line - :class:`plotly.graph_objects.sankey.node.Line` instance - or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - The normalized vertical position of the node. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - customdata=None, - customdatasrc=None, - groups=None, - hoverinfo=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - label=None, - labelsrc=None, - line=None, - pad=None, - thickness=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - **kwargs - ): - """ - Construct a new Node object - - The nodes of the Sankey plot. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sankey.Node` - color - Sets the `node` color. It can be a single value, or an - array for specifying color for each `node`. If - `node.color` is omitted, then the default `Plotly` - color palette will be cycled through to have a variety - of colors. These defaults are not fully opaque, to - allow some visibility of what is beneath the node. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - customdata - Assigns extra data to each node. - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - groups - Groups of nodes. Each group is defined by an array with - the indices of the nodes it contains. Multiple groups - can be specified. - hoverinfo - Determines which trace information appear when hovering - nodes. If `none` or `skip` are set, no information is - displayed upon hovering. But, if `none` is set, click - and hover events are still fired. - hoverlabel - :class:`plotly.graph_objects.sankey.node.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - label - The shown name of the node. - labelsrc - Sets the source reference on Chart Studio Cloud for - label . - line - :class:`plotly.graph_objects.sankey.node.Line` instance - or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - The normalized vertical position of the node. - ysrc - Sets the source reference on Chart Studio Cloud for y - . - - Returns - ------- - Node - """ - super(Node, self).__init__("node") - - # Validate arg - # ------------ - 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.sankey.Node -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.Node`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey import node as v_node - - # Initialize validators - # --------------------- - self._validators["color"] = v_node.ColorValidator() - self._validators["colorsrc"] = v_node.ColorsrcValidator() - self._validators["customdata"] = v_node.CustomdataValidator() - self._validators["customdatasrc"] = v_node.CustomdatasrcValidator() - self._validators["groups"] = v_node.GroupsValidator() - self._validators["hoverinfo"] = v_node.HoverinfoValidator() - self._validators["hoverlabel"] = v_node.HoverlabelValidator() - self._validators["hovertemplate"] = v_node.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_node.HovertemplatesrcValidator() - self._validators["label"] = v_node.LabelValidator() - self._validators["labelsrc"] = v_node.LabelsrcValidator() - self._validators["line"] = v_node.LineValidator() - self._validators["pad"] = v_node.PadValidator() - self._validators["thickness"] = v_node.ThicknessValidator() - self._validators["x"] = v_node.XValidator() - self._validators["xsrc"] = v_node.XsrcValidator() - self._validators["y"] = v_node.YValidator() - self._validators["ysrc"] = v_node.YsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("groups", None) - self["groups"] = groups if groups is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("labelsrc", None) - self["labelsrc"] = labelsrc if labelsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Link(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the `link` color. It can be a single value, or an array - for specifying color for each `link`. If `link.color` is - omitted, then by default, a translucent grey link will be used. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorscales - # ----------- - @property - def colorscales(self): - """ - The 'colorscales' property is a tuple of instances of - Colorscale that may be specified as: - - A list or tuple of instances of plotly.graph_objs.sankey.link.Colorscale - - A list or tuple of dicts of string/value properties that - will be passed to the Colorscale constructor - - Supported dict properties: - - cmax - Sets the upper bound of the color domain. - cmin - Sets the lower bound of the color domain. - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - label - The label of the links to color based on their - concentration within a flow. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - - Returns - ------- - tuple[plotly.graph_objs.sankey.link.Colorscale] - """ - return self["colorscales"] - - @colorscales.setter - def colorscales(self, val): - self["colorscales"] = val - - # colorscaledefaults - # ------------------ - @property - def colorscaledefaults(self): - """ - When used in a template (as - layout.template.data.sankey.link.colorscaledefaults), sets the - default property values to use for elements of - sankey.link.colorscales - - The 'colorscaledefaults' property is an instance of Colorscale - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.link.Colorscale` - - A dict of string/value properties that will be passed - to the Colorscale constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.sankey.link.Colorscale - """ - return self["colorscaledefaults"] - - @colorscaledefaults.setter - def colorscaledefaults(self, val): - self["colorscaledefaults"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data to each link. - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on Chart Studio Cloud for customdata - . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # hoverinfo - # --------- - @property - def hoverinfo(self): - """ - Determines which trace information appear when hovering links. - If `none` or `skip` are set, no information is displayed upon - hovering. But, if `none` is set, click and hover events are - still fired. - - The 'hoverinfo' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'none', 'skip'] - - Returns - ------- - Any - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.link.Hoverlabel` - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - - Returns - ------- - plotly.graph_objs.sankey.link.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. Dates are formatted using d3-time- - format's syntax %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for details on - the date formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on Chart Studio Cloud for - hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # label - # ----- - @property - def label(self): - """ - The shown name of the link. - - The 'label' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # labelsrc - # -------- - @property - def labelsrc(self): - """ - Sets the source reference on Chart Studio Cloud for label . - - The 'labelsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["labelsrc"] - - @labelsrc.setter - def labelsrc(self, val): - self["labelsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.link.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the `line` around each - `link`. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the `line` around - each `link`. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.sankey.link.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # source - # ------ - @property - def source(self): - """ - An integer number `[0..nodes.length - 1]` that represents the - source node. - - The 'source' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["source"] - - @source.setter - def source(self, val): - self["source"] = val - - # sourcesrc - # --------- - @property - def sourcesrc(self): - """ - Sets the source reference on Chart Studio Cloud for source . - - The 'sourcesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sourcesrc"] - - @sourcesrc.setter - def sourcesrc(self, val): - self["sourcesrc"] = val - - # target - # ------ - @property - def target(self): - """ - An integer number `[0..nodes.length - 1]` that represents the - target node. - - The 'target' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["target"] - - @target.setter - def target(self, val): - self["target"] = val - - # targetsrc - # --------- - @property - def targetsrc(self): - """ - Sets the source reference on Chart Studio Cloud for target . - - The 'targetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["targetsrc"] - - @targetsrc.setter - def targetsrc(self, val): - self["targetsrc"] = val - - # value - # ----- - @property - def value(self): - """ - A numeric value representing the flow volume value. - - The 'value' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valuesrc - # -------- - @property - def valuesrc(self): - """ - Sets the source reference on Chart Studio Cloud for value . - - The 'valuesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuesrc"] - - @valuesrc.setter - def valuesrc(self, val): - self["valuesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the `link` color. It can be a single value, or an - array for specifying color for each `link`. If - `link.color` is omitted, then by default, a translucent - grey link will be used. - colorscales - A tuple of - :class:`plotly.graph_objects.sankey.link.Colorscale` - instances or dicts with compatible properties - colorscaledefaults - When used in a template (as - layout.template.data.sankey.link.colorscaledefaults), - sets the default property values to use for elements of - sankey.link.colorscales - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - customdata - Assigns extra data to each link. - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear when hovering - links. If `none` or `skip` are set, no information is - displayed upon hovering. But, if `none` is set, click - and hover events are still fired. - hoverlabel - :class:`plotly.graph_objects.sankey.link.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - label - The shown name of the link. - labelsrc - Sets the source reference on Chart Studio Cloud for - label . - line - :class:`plotly.graph_objects.sankey.link.Line` instance - or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on Chart Studio Cloud for - source . - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on Chart Studio Cloud for - target . - value - A numeric value representing the flow volume value. - valuesrc - Sets the source reference on Chart Studio Cloud for - value . - """ - - def __init__( - self, - arg=None, - color=None, - colorscales=None, - colorscaledefaults=None, - colorsrc=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - label=None, - labelsrc=None, - line=None, - source=None, - sourcesrc=None, - target=None, - targetsrc=None, - value=None, - valuesrc=None, - **kwargs - ): - """ - Construct a new Link object - - The links of the Sankey plot. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sankey.Link` - color - Sets the `link` color. It can be a single value, or an - array for specifying color for each `link`. If - `link.color` is omitted, then by default, a translucent - grey link will be used. - colorscales - A tuple of - :class:`plotly.graph_objects.sankey.link.Colorscale` - instances or dicts with compatible properties - colorscaledefaults - When used in a template (as - layout.template.data.sankey.link.colorscaledefaults), - sets the default property values to use for elements of - sankey.link.colorscales - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - customdata - Assigns extra data to each link. - customdatasrc - Sets the source reference on Chart Studio Cloud for - customdata . - hoverinfo - Determines which trace information appear when hovering - links. If `none` or `skip` are set, no information is - displayed upon hovering. But, if `none` is set, click - and hover events are still fired. - hoverlabel - :class:`plotly.graph_objects.sankey.link.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. Dates are formatted - using d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format for - details on the date formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plotly.com/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be - specified per-point (the ones that are `arrayOk: true`) - are available. variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud for - hovertemplate . - label - The shown name of the link. - labelsrc - Sets the source reference on Chart Studio Cloud for - label . - line - :class:`plotly.graph_objects.sankey.link.Line` instance - or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on Chart Studio Cloud for - source . - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on Chart Studio Cloud for - target . - value - A numeric value representing the flow volume value. - valuesrc - Sets the source reference on Chart Studio Cloud for - value . - - Returns - ------- - Link - """ - super(Link, self).__init__("link") - - # Validate arg - # ------------ - 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.sankey.Link -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.Link`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey import link as v_link - - # Initialize validators - # --------------------- - self._validators["color"] = v_link.ColorValidator() - self._validators["colorscales"] = v_link.ColorscalesValidator() - self._validators["colorscaledefaults"] = v_link.ColorscaleValidator() - self._validators["colorsrc"] = v_link.ColorsrcValidator() - self._validators["customdata"] = v_link.CustomdataValidator() - self._validators["customdatasrc"] = v_link.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_link.HoverinfoValidator() - self._validators["hoverlabel"] = v_link.HoverlabelValidator() - self._validators["hovertemplate"] = v_link.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_link.HovertemplatesrcValidator() - self._validators["label"] = v_link.LabelValidator() - self._validators["labelsrc"] = v_link.LabelsrcValidator() - self._validators["line"] = v_link.LineValidator() - self._validators["source"] = v_link.SourceValidator() - self._validators["sourcesrc"] = v_link.SourcesrcValidator() - self._validators["target"] = v_link.TargetValidator() - self._validators["targetsrc"] = v_link.TargetsrcValidator() - self._validators["value"] = v_link.ValueValidator() - self._validators["valuesrc"] = v_link.ValuesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorscales", None) - self["colorscales"] = colorscales if colorscales is not None else _v - _v = arg.pop("colorscaledefaults", None) - self["colorscaledefaults"] = ( - colorscaledefaults if colorscaledefaults is not None else _v - ) - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("labelsrc", None) - self["labelsrc"] = labelsrc if labelsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("source", None) - self["source"] = source if source is not None else _v - _v = arg.pop("sourcesrc", None) - self["sourcesrc"] = sourcesrc if sourcesrc is not None else _v - _v = arg.pop("target", None) - self["target"] = target if target is not None else _v - _v = arg.pop("targetsrc", None) - self["targetsrc"] = targetsrc if targetsrc is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valuesrc", None) - self["valuesrc"] = valuesrc if valuesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sankey.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.sankey.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this sankey trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this sankey trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this sankey trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this sankey trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for this row - in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace (in - plot fraction). - y - Sets the vertical domain of this sankey trace (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sankey.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for this row - in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace (in - plot fraction). - y - Sets the vertical domain of this sankey trace (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.sankey.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Domain", - "Hoverlabel", - "Link", - "Node", - "Stream", - "Textfont", - "hoverlabel", - "link", - "node", -] - -from plotly.graph_objs.sankey import node -from plotly.graph_objs.sankey import link -from plotly.graph_objs.sankey import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._stream import Stream + from ._node import Node + from ._link import Link + from ._hoverlabel import Hoverlabel + from ._domain import Domain + from . import node + from . import link + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".node", ".link", ".hoverlabel"], + [ + "._textfont.Textfont", + "._stream.Stream", + "._node.Node", + "._link.Link", + "._hoverlabel.Hoverlabel", + "._domain.Domain", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/sankey/_domain.py b/packages/python/plotly/plotly/graph_objs/sankey/_domain.py new file mode 100644 index 00000000000..4215b50eb8f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/_domain.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey" + _path_str = "sankey.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this sankey trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this sankey trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this sankey trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this sankey trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this sankey trace . + row + If there is a layout grid, use the domain for this row + in the grid for this sankey trace . + x + Sets the horizontal domain of this sankey trace (in + plot fraction). + y + Sets the vertical domain of this sankey trace (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sankey.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this sankey trace . + row + If there is a layout grid, use the domain for this row + in the grid for this sankey trace . + x + Sets the horizontal domain of this sankey trace (in + plot fraction). + y + Sets the vertical domain of this sankey trace (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/sankey/_hoverlabel.py new file mode 100644 index 00000000000..96c1b2db7ba --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey" + _path_str = "sankey.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sankey.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/_link.py b/packages/python/plotly/plotly/graph_objs/sankey/_link.py new file mode 100644 index 00000000000..1f17480a50b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/_link.py @@ -0,0 +1,914 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Link(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey" + _path_str = "sankey.link" + _valid_props = { + "color", + "colorscaledefaults", + "colorscales", + "colorsrc", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "label", + "labelsrc", + "line", + "source", + "sourcesrc", + "target", + "targetsrc", + "value", + "valuesrc", + } + + # color + # ----- + @property + def color(self): + """ + Sets the `link` color. It can be a single value, or an array + for specifying color for each `link`. If `link.color` is + omitted, then by default, a translucent grey link will be used. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorscales + # ----------- + @property + def colorscales(self): + """ + The 'colorscales' property is a tuple of instances of + Colorscale that may be specified as: + - A list or tuple of instances of plotly.graph_objs.sankey.link.Colorscale + - A list or tuple of dicts of string/value properties that + will be passed to the Colorscale constructor + + Supported dict properties: + + cmax + Sets the upper bound of the color domain. + cmin + Sets the lower bound of the color domain. + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + label + The label of the links to color based on their + concentration within a flow. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + + Returns + ------- + tuple[plotly.graph_objs.sankey.link.Colorscale] + """ + return self["colorscales"] + + @colorscales.setter + def colorscales(self, val): + self["colorscales"] = val + + # colorscaledefaults + # ------------------ + @property + def colorscaledefaults(self): + """ + When used in a template (as + layout.template.data.sankey.link.colorscaledefaults), sets the + default property values to use for elements of + sankey.link.colorscales + + The 'colorscaledefaults' property is an instance of Colorscale + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.link.Colorscale` + - A dict of string/value properties that will be passed + to the Colorscale constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.sankey.link.Colorscale + """ + return self["colorscaledefaults"] + + @colorscaledefaults.setter + def colorscaledefaults(self, val): + self["colorscaledefaults"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data to each link. + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear when hovering links. + If `none` or `skip` are set, no information is displayed upon + hovering. But, if `none` is set, click and hover events are + still fired. + + The 'hoverinfo' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'none', 'skip'] + + Returns + ------- + Any + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.link.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.sankey.link.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # label + # ----- + @property + def label(self): + """ + The shown name of the link. + + The 'label' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # labelsrc + # -------- + @property + def labelsrc(self): + """ + Sets the source reference on Chart Studio Cloud for label . + + The 'labelsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelsrc"] + + @labelsrc.setter + def labelsrc(self, val): + self["labelsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.link.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the `line` around each + `link`. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the `line` around + each `link`. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.sankey.link.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # source + # ------ + @property + def source(self): + """ + An integer number `[0..nodes.length - 1]` that represents the + source node. + + The 'source' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["source"] + + @source.setter + def source(self, val): + self["source"] = val + + # sourcesrc + # --------- + @property + def sourcesrc(self): + """ + Sets the source reference on Chart Studio Cloud for source . + + The 'sourcesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sourcesrc"] + + @sourcesrc.setter + def sourcesrc(self, val): + self["sourcesrc"] = val + + # target + # ------ + @property + def target(self): + """ + An integer number `[0..nodes.length - 1]` that represents the + target node. + + The 'target' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["target"] + + @target.setter + def target(self, val): + self["target"] = val + + # targetsrc + # --------- + @property + def targetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for target . + + The 'targetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["targetsrc"] + + @targetsrc.setter + def targetsrc(self, val): + self["targetsrc"] = val + + # value + # ----- + @property + def value(self): + """ + A numeric value representing the flow volume value. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valuesrc + # -------- + @property + def valuesrc(self): + """ + Sets the source reference on Chart Studio Cloud for value . + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the `link` color. It can be a single value, or an + array for specifying color for each `link`. If + `link.color` is omitted, then by default, a translucent + grey link will be used. + colorscales + A tuple of + :class:`plotly.graph_objects.sankey.link.Colorscale` + instances or dicts with compatible properties + colorscaledefaults + When used in a template (as + layout.template.data.sankey.link.colorscaledefaults), + sets the default property values to use for elements of + sankey.link.colorscales + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + customdata + Assigns extra data to each link. + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear when hovering + links. If `none` or `skip` are set, no information is + displayed upon hovering. But, if `none` is set, click + and hover events are still fired. + hoverlabel + :class:`plotly.graph_objects.sankey.link.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + label + The shown name of the link. + labelsrc + Sets the source reference on Chart Studio Cloud for + label . + line + :class:`plotly.graph_objects.sankey.link.Line` instance + or dict with compatible properties + source + An integer number `[0..nodes.length - 1]` that + represents the source node. + sourcesrc + Sets the source reference on Chart Studio Cloud for + source . + target + An integer number `[0..nodes.length - 1]` that + represents the target node. + targetsrc + Sets the source reference on Chart Studio Cloud for + target . + value + A numeric value representing the flow volume value. + valuesrc + Sets the source reference on Chart Studio Cloud for + value . + """ + + def __init__( + self, + arg=None, + color=None, + colorscales=None, + colorscaledefaults=None, + colorsrc=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + label=None, + labelsrc=None, + line=None, + source=None, + sourcesrc=None, + target=None, + targetsrc=None, + value=None, + valuesrc=None, + **kwargs + ): + """ + Construct a new Link object + + The links of the Sankey plot. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sankey.Link` + color + Sets the `link` color. It can be a single value, or an + array for specifying color for each `link`. If + `link.color` is omitted, then by default, a translucent + grey link will be used. + colorscales + A tuple of + :class:`plotly.graph_objects.sankey.link.Colorscale` + instances or dicts with compatible properties + colorscaledefaults + When used in a template (as + layout.template.data.sankey.link.colorscaledefaults), + sets the default property values to use for elements of + sankey.link.colorscales + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + customdata + Assigns extra data to each link. + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + hoverinfo + Determines which trace information appear when hovering + links. If `none` or `skip` are set, no information is + displayed upon hovering. But, if `none` is set, click + and hover events are still fired. + hoverlabel + :class:`plotly.graph_objects.sankey.link.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + label + The shown name of the link. + labelsrc + Sets the source reference on Chart Studio Cloud for + label . + line + :class:`plotly.graph_objects.sankey.link.Line` instance + or dict with compatible properties + source + An integer number `[0..nodes.length - 1]` that + represents the source node. + sourcesrc + Sets the source reference on Chart Studio Cloud for + source . + target + An integer number `[0..nodes.length - 1]` that + represents the target node. + targetsrc + Sets the source reference on Chart Studio Cloud for + target . + value + A numeric value representing the flow volume value. + valuesrc + Sets the source reference on Chart Studio Cloud for + value . + + Returns + ------- + Link + """ + super(Link, self).__init__("link") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.Link +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.Link`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorscales", None) + _v = colorscales if colorscales is not None else _v + if _v is not None: + self["colorscales"] = _v + _v = arg.pop("colorscaledefaults", None) + _v = colorscaledefaults if colorscaledefaults is not None else _v + if _v is not None: + self["colorscaledefaults"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("labelsrc", None) + _v = labelsrc if labelsrc is not None else _v + if _v is not None: + self["labelsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("source", None) + _v = source if source is not None else _v + if _v is not None: + self["source"] = _v + _v = arg.pop("sourcesrc", None) + _v = sourcesrc if sourcesrc is not None else _v + if _v is not None: + self["sourcesrc"] = _v + _v = arg.pop("target", None) + _v = target if target is not None else _v + if _v is not None: + self["target"] = _v + _v = arg.pop("targetsrc", None) + _v = targetsrc if targetsrc is not None else _v + if _v is not None: + self["targetsrc"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valuesrc", None) + _v = valuesrc if valuesrc is not None else _v + if _v is not None: + self["valuesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/_node.py b/packages/python/plotly/plotly/graph_objs/sankey/_node.py new file mode 100644 index 00000000000..4154435c693 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/_node.py @@ -0,0 +1,827 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Node(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey" + _path_str = "sankey.node" + _valid_props = { + "color", + "colorsrc", + "customdata", + "customdatasrc", + "groups", + "hoverinfo", + "hoverlabel", + "hovertemplate", + "hovertemplatesrc", + "label", + "labelsrc", + "line", + "pad", + "thickness", + "x", + "xsrc", + "y", + "ysrc", + } + + # color + # ----- + @property + def color(self): + """ + Sets the `node` color. It can be a single value, or an array + for specifying color for each `node`. If `node.color` is + omitted, then the default `Plotly` color palette will be cycled + through to have a variety of colors. These defaults are not + fully opaque, to allow some visibility of what is beneath the + node. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data to each node. + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for customdata + . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # groups + # ------ + @property + def groups(self): + """ + Groups of nodes. Each group is defined by an array with the + indices of the nodes it contains. Multiple groups can be + specified. + + The 'groups' property is an info array that may be specified as: + * a 2D list where: + The 'groups[i][j]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["groups"] + + @groups.setter + def groups(self, val): + self["groups"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear when hovering nodes. + If `none` or `skip` are set, no information is displayed upon + hovering. But, if `none` is set, click and hover events are + still fired. + + The 'hoverinfo' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'none', 'skip'] + + Returns + ------- + Any + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.node.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + + Returns + ------- + plotly.graph_objs.sankey.node.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # label + # ----- + @property + def label(self): + """ + The shown name of the node. + + The 'label' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # labelsrc + # -------- + @property + def labelsrc(self): + """ + Sets the source reference on Chart Studio Cloud for label . + + The 'labelsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelsrc"] + + @labelsrc.setter + def labelsrc(self, val): + self["labelsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.node.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the `line` around each + `node`. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the `line` around + each `node`. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.sankey.node.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # pad + # --- + @property + def pad(self): + """ + Sets the padding (in px) between the `nodes`. + + The 'pad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the `nodes`. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # x + # - + @property + def x(self): + """ + The normalized horizontal position of the node. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + The normalized vertical position of the node. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the `node` color. It can be a single value, or an + array for specifying color for each `node`. If + `node.color` is omitted, then the default `Plotly` + color palette will be cycled through to have a variety + of colors. These defaults are not fully opaque, to + allow some visibility of what is beneath the node. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + customdata + Assigns extra data to each node. + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + groups + Groups of nodes. Each group is defined by an array with + the indices of the nodes it contains. Multiple groups + can be specified. + hoverinfo + Determines which trace information appear when hovering + nodes. If `none` or `skip` are set, no information is + displayed upon hovering. But, if `none` is set, click + and hover events are still fired. + hoverlabel + :class:`plotly.graph_objects.sankey.node.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + label + The shown name of the node. + labelsrc + Sets the source reference on Chart Studio Cloud for + label . + line + :class:`plotly.graph_objects.sankey.node.Line` instance + or dict with compatible properties + pad + Sets the padding (in px) between the `nodes`. + thickness + Sets the thickness (in px) of the `nodes`. + x + The normalized horizontal position of the node. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + The normalized vertical position of the node. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + customdata=None, + customdatasrc=None, + groups=None, + hoverinfo=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + label=None, + labelsrc=None, + line=None, + pad=None, + thickness=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Node object + + The nodes of the Sankey plot. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sankey.Node` + color + Sets the `node` color. It can be a single value, or an + array for specifying color for each `node`. If + `node.color` is omitted, then the default `Plotly` + color palette will be cycled through to have a variety + of colors. These defaults are not fully opaque, to + allow some visibility of what is beneath the node. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + customdata + Assigns extra data to each node. + customdatasrc + Sets the source reference on Chart Studio Cloud for + customdata . + groups + Groups of nodes. Each group is defined by an array with + the indices of the nodes it contains. Multiple groups + can be specified. + hoverinfo + Determines which trace information appear when hovering + nodes. If `none` or `skip` are set, no information is + displayed upon hovering. But, if `none` is set, click + and hover events are still fired. + hoverlabel + :class:`plotly.graph_objects.sankey.node.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + hovertemplate . + label + The shown name of the node. + labelsrc + Sets the source reference on Chart Studio Cloud for + label . + line + :class:`plotly.graph_objects.sankey.node.Line` instance + or dict with compatible properties + pad + Sets the padding (in px) between the `nodes`. + thickness + Sets the thickness (in px) of the `nodes`. + x + The normalized horizontal position of the node. + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + The normalized vertical position of the node. + ysrc + Sets the source reference on Chart Studio Cloud for y + . + + Returns + ------- + Node + """ + super(Node, self).__init__("node") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.Node +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.Node`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("customdata", None) + _v = customdata if customdata is not None else _v + if _v is not None: + self["customdata"] = _v + _v = arg.pop("customdatasrc", None) + _v = customdatasrc if customdatasrc is not None else _v + if _v is not None: + self["customdatasrc"] = _v + _v = arg.pop("groups", None) + _v = groups if groups is not None else _v + if _v is not None: + self["groups"] = _v + _v = arg.pop("hoverinfo", None) + _v = hoverinfo if hoverinfo is not None else _v + if _v is not None: + self["hoverinfo"] = _v + _v = arg.pop("hoverlabel", None) + _v = hoverlabel if hoverlabel is not None else _v + if _v is not None: + self["hoverlabel"] = _v + _v = arg.pop("hovertemplate", None) + _v = hovertemplate if hovertemplate is not None else _v + if _v is not None: + self["hovertemplate"] = _v + _v = arg.pop("hovertemplatesrc", None) + _v = hovertemplatesrc if hovertemplatesrc is not None else _v + if _v is not None: + self["hovertemplatesrc"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("labelsrc", None) + _v = labelsrc if labelsrc is not None else _v + if _v is not None: + self["labelsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/_stream.py b/packages/python/plotly/plotly/graph_objs/sankey/_stream.py new file mode 100644 index 00000000000..322d8c50ffb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey" + _path_str = "sankey.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sankey.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/_textfont.py b/packages/python/plotly/plotly/graph_objs/sankey/_textfont.py new file mode 100644 index 00000000000..f6a55a11f2a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/_textfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey" + _path_str = "sankey.textfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Textfont object + + Sets the font for node labels + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.Textfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py index 344956bb259..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.sankey.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/_font.py new file mode 100644 index 00000000000..c79b67a2f19 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.hoverlabel" + _path_str = "sankey.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py index 3702aa3950b..cd3fe4f180a 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py @@ -1,1073 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the `line` around each `link`. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the `line` around each `link`. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.link" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the `line` around each `link`. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the `line` around each - `link`. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.link.Line` - color - Sets the color of the `line` around each `link`. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the `line` around each - `link`. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.sankey.link.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.link.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.link import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.link.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sankey.link.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.link" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.link.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.sankey.link.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.link.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.link import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Colorscale(_BaseTraceHierarchyType): - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # label - # ----- - @property - def label(self): - """ - The label of the links to color based on their concentration - within a flow. - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.link" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - cmax - Sets the upper bound of the color domain. - cmin - Sets the lower bound of the color domain. - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - label - The label of the links to color based on their - concentration within a flow. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - """ - - def __init__( - self, - arg=None, - cmax=None, - cmin=None, - colorscale=None, - label=None, - name=None, - templateitemname=None, - **kwargs - ): - """ - Construct a new Colorscale object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.link.Colorscale` - cmax - Sets the upper bound of the color domain. - cmin - Sets the lower bound of the color domain. - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - label - The label of the links to color based on their - concentration within a flow. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - - Returns - ------- - Colorscale - """ - super(Colorscale, self).__init__("colorscales") - - # Validate arg - # ------------ - 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.sankey.link.Colorscale -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.link.Colorscale`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.link import colorscale as v_colorscale - - # Initialize validators - # --------------------- - self._validators["cmax"] = v_colorscale.CmaxValidator() - self._validators["cmin"] = v_colorscale.CminValidator() - self._validators["colorscale"] = v_colorscale.ColorscaleValidator() - self._validators["label"] = v_colorscale.LabelValidator() - self._validators["name"] = v_colorscale.NameValidator() - self._validators["templateitemname"] = v_colorscale.TemplateitemnameValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Colorscale", "Colorscale", "Hoverlabel", "Line", "hoverlabel"] - -from plotly.graph_objs.sankey.link import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._colorscale import Colorscale + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel"], + ["._line.Line", "._hoverlabel.Hoverlabel", "._colorscale.Colorscale"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/_colorscale.py b/packages/python/plotly/plotly/graph_objs/sankey/link/_colorscale.py new file mode 100644 index 00000000000..911d79a1779 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/_colorscale.py @@ -0,0 +1,349 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Colorscale(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.link" + _path_str = "sankey.link.colorscale" + _valid_props = {"cmax", "cmin", "colorscale", "label", "name", "templateitemname"} + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # label + # ----- + @property + def label(self): + """ + The label of the links to color based on their concentration + within a flow. + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + cmax + Sets the upper bound of the color domain. + cmin + Sets the lower bound of the color domain. + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + label + The label of the links to color based on their + concentration within a flow. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + """ + + def __init__( + self, + arg=None, + cmax=None, + cmin=None, + colorscale=None, + label=None, + name=None, + templateitemname=None, + **kwargs + ): + """ + Construct a new Colorscale object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.link.Colorscale` + cmax + Sets the upper bound of the color domain. + cmin + Sets the lower bound of the color domain. + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + label + The label of the links to color based on their + concentration within a flow. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + + Returns + ------- + Colorscale + """ + super(Colorscale, self).__init__("colorscales") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.link.Colorscale +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.link.Colorscale`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/sankey/link/_hoverlabel.py new file mode 100644 index 00000000000..a9f2ea5be92 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.link" + _path_str = "sankey.link.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.link.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sankey.link.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.link.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.link.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.link.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/_line.py b/packages/python/plotly/plotly/graph_objs/sankey/link/_line.py new file mode 100644 index 00000000000..85c6545866e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/_line.py @@ -0,0 +1,231 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.link" + _path_str = "sankey.link.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the `line` around each `link`. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the `line` around each `link`. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the `line` around each `link`. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the `line` around each + `link`. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.link.Line` + color + Sets the color of the `line` around each `link`. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the `line` around each + `link`. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.link.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.link.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py index 8d7c7fdc2bb..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.link.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.link.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.sankey.link.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.link.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.link.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/_font.py new file mode 100644 index 00000000000..573d02b96e9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.link.hoverlabel" + _path_str = "sankey.link.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.link.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.link.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.link.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py index 48a7489daba..0bb4075bebb 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py @@ -1,723 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the `line` around each `node`. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the `line` around each `node`. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.node" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the `line` around each `node`. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the `line` around each - `node`. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.node.Line` - color - Sets the color of the `line` around each `node`. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the `line` around each - `node`. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.sankey.node.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.node.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.node import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.sankey.node.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sankey.node.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.node" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.node.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.sankey.node.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.node.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.node import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Hoverlabel", "Line", "hoverlabel"] - -from plotly.graph_objs.sankey.node import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._line.Line", "._hoverlabel.Hoverlabel"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/sankey/node/_hoverlabel.py new file mode 100644 index 00000000000..fe15043696a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.node" + _path_str = "sankey.node.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.node.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sankey.node.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.node.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.node.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.node.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/_line.py b/packages/python/plotly/plotly/graph_objs/sankey/node/_line.py new file mode 100644 index 00000000000..c6d284f2c89 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/_line.py @@ -0,0 +1,231 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.node" + _path_str = "sankey.node.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the `line` around each `node`. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the `line` around each `node`. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the `line` around each `node`. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the `line` around each + `node`. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.node.Line` + color + Sets the color of the `line` around each `node`. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the `line` around each + `node`. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.node.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.node.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py index f216b8863b1..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sankey.node.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sankey.node.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.sankey.node.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sankey.node.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sankey.node.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/_font.py new file mode 100644 index 00000000000..2b8dc67655f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sankey.node.hoverlabel" + _path_str = "sankey.node.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sankey.node.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sankey.node.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sankey.node.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/__init__.py index 87d57327189..c833d06cf97 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/__init__.py @@ -1,4180 +1,34 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatter.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatter.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatter.unselected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatter.unselected.Textfon - t` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.Unselected` - marker - :class:`plotly.graph_objects.scatter.unselected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatter.unselected.Textfon - t` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scatter.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatter.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scatter.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scatter.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scatter.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatter.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatter.selected.Textfont` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.Selected` - marker - :class:`plotly.graph_objects.scatter.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatter.selected.Textfont` - instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scatter.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatter.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter.marker.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scatter.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scatter.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # gradient - # -------- - @property - def gradient(self): - """ - The 'gradient' property is an instance of Gradient - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.Gradient` - - A dict of string/value properties that will be passed - to the Gradient constructor - - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . - - Returns - ------- - plotly.graph_objs.scatter.marker.Gradient - """ - return self["gradient"] - - @gradient.setter - def gradient(self, val): - self["gradient"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scatter.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # maxdisplayed - # ------------ - @property - def maxdisplayed(self): - """ - Sets a maximum number of points to be drawn on the graph. 0 - corresponds to no limit. - - The 'maxdisplayed' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["maxdisplayed"] - - @maxdisplayed.setter - def maxdisplayed(self, val): - self["maxdisplayed"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatter.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scatter.marker.Gradient` - instance or dict with compatible properties - line - :class:`plotly.graph_objects.scatter.marker.Line` - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatter.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scatter.marker.Gradient` - instance or dict with compatible properties - line - :class:`plotly.graph_objects.scatter.marker.Line` - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatter.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["gradient"] = v_marker.GradientValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["maxdisplayed"] = v_marker.MaxdisplayedValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("gradient", None) - self["gradient"] = gradient if gradient is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("maxdisplayed", None) - self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # shape - # ----- - @property - def shape(self): - """ - Determines the line shape. With "spline" the lines are drawn - using spline interpolation. The other available values - correspond to step-wise line shapes. - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'spline', 'hv', 'vh', 'hvh', 'vhv'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # simplify - # -------- - @property - def simplify(self): - """ - Simplifies lines by removing nearly-collinear points. When - transitioning lines, it may be desirable to disable this so - that the number of points along the resulting SVG path is - unaffected. - - The 'simplify' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["simplify"] - - @simplify.setter - def simplify(self, val): - self["simplify"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Has an effect only if `shape` is set to "spline" Sets the - amount of smoothing. 0 corresponds to no smoothing (equivalent - to a "linear" shape). - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - simplify - Simplifies lines by removing nearly-collinear points. - When transitioning lines, it may be desirable to - disable this so that the number of points along the - resulting SVG path is unaffected. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - """ - - def __init__( - self, - arg=None, - color=None, - dash=None, - shape=None, - simplify=None, - smoothing=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.scatter.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - simplify - Simplifies lines by removing nearly-collinear points. - When transitioning lines, it may be desirable to - disable this so that the number of points along the - resulting SVG path is unaffected. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatter.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["simplify"] = v_line.SimplifyValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("simplify", None) - self["simplify"] = simplify if simplify is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatter.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scatter.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorY(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorY object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.ErrorY` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorY - """ - super(ErrorY, self).__init__("error_y") - - # Validate arg - # ------------ - 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.scatter.ErrorY -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.ErrorY`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import error_y as v_error_y - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_y.ArrayValidator() - self._validators["arrayminus"] = v_error_y.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_y.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_y.ArraysrcValidator() - self._validators["color"] = v_error_y.ColorValidator() - self._validators["symmetric"] = v_error_y.SymmetricValidator() - self._validators["thickness"] = v_error_y.ThicknessValidator() - self._validators["traceref"] = v_error_y.TracerefValidator() - self._validators["tracerefminus"] = v_error_y.TracerefminusValidator() - self._validators["type"] = v_error_y.TypeValidator() - self._validators["value"] = v_error_y.ValueValidator() - self._validators["valueminus"] = v_error_y.ValueminusValidator() - self._validators["visible"] = v_error_y.VisibleValidator() - self._validators["width"] = v_error_y.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorX(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # copy_ystyle - # ----------- - @property - def copy_ystyle(self): - """ - The 'copy_ystyle' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["copy_ystyle"] - - @copy_ystyle.setter - def copy_ystyle(self, val): - self["copy_ystyle"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorX object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.ErrorX` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorX - """ - super(ErrorX, self).__init__("error_x") - - # Validate arg - # ------------ - 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.scatter.ErrorX -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.ErrorX`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter import error_x as v_error_x - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_x.ArrayValidator() - self._validators["arrayminus"] = v_error_x.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_x.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_x.ArraysrcValidator() - self._validators["color"] = v_error_x.ColorValidator() - self._validators["copy_ystyle"] = v_error_x.CopyYstyleValidator() - self._validators["symmetric"] = v_error_x.SymmetricValidator() - self._validators["thickness"] = v_error_x.ThicknessValidator() - self._validators["traceref"] = v_error_x.TracerefValidator() - self._validators["tracerefminus"] = v_error_x.TracerefminusValidator() - self._validators["type"] = v_error_x.TypeValidator() - self._validators["value"] = v_error_x.ValueValidator() - self._validators["valueminus"] = v_error_x.ValueminusValidator() - self._validators["visible"] = v_error_x.VisibleValidator() - self._validators["width"] = v_error_x.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("copy_ystyle", None) - self["copy_ystyle"] = copy_ystyle if copy_ystyle is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ErrorX", - "ErrorY", - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scatter import unselected -from plotly.graph_objs.scatter import selected -from plotly.graph_objs.scatter import marker -from plotly.graph_objs.scatter import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._error_y import ErrorY + from ._error_x import ErrorX + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + "._error_y.ErrorY", + "._error_x.ErrorX", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_error_x.py b/packages/python/plotly/plotly/graph_objs/scatter/_error_x.py new file mode 100644 index 00000000000..e7378f84afc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_error_x.py @@ -0,0 +1,629 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorX(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.error_x" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_ystyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # copy_ystyle + # ----------- + @property + def copy_ystyle(self): + """ + The 'copy_ystyle' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["copy_ystyle"] + + @copy_ystyle.setter + def copy_ystyle(self, val): + self["copy_ystyle"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_ystyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorX object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.ErrorX` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorX + """ + super(ErrorX, self).__init__("error_x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.ErrorX +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.ErrorX`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("copy_ystyle", None) + _v = copy_ystyle if copy_ystyle is not None else _v + if _v is not None: + self["copy_ystyle"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_error_y.py b/packages/python/plotly/plotly/graph_objs/scatter/_error_y.py new file mode 100644 index 00000000000..375a920fbfa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_error_y.py @@ -0,0 +1,601 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorY(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.error_y" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorY object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.ErrorY` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorY + """ + super(ErrorY, self).__init__("error_y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.ErrorY +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.ErrorY`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scatter/_hoverlabel.py new file mode 100644 index 00000000000..a38f6126e67 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatter.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_line.py b/packages/python/plotly/plotly/graph_objs/scatter/_line.py new file mode 100644 index 00000000000..8de3b595c42 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_line.py @@ -0,0 +1,320 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.line" + _valid_props = {"color", "dash", "shape", "simplify", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # shape + # ----- + @property + def shape(self): + """ + Determines the line shape. With "spline" the lines are drawn + using spline interpolation. The other available values + correspond to step-wise line shapes. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'spline', 'hv', 'vh', 'hvh', 'vhv'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # simplify + # -------- + @property + def simplify(self): + """ + Simplifies lines by removing nearly-collinear points. When + transitioning lines, it may be desirable to disable this so + that the number of points along the resulting SVG path is + unaffected. + + The 'simplify' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["simplify"] + + @simplify.setter + def simplify(self, val): + self["simplify"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Has an effect only if `shape` is set to "spline" Sets the + amount of smoothing. 0 corresponds to no smoothing (equivalent + to a "linear" shape). + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + simplify + Simplifies lines by removing nearly-collinear points. + When transitioning lines, it may be desirable to + disable this so that the number of points along the + resulting SVG path is unaffected. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + """ + + def __init__( + self, + arg=None, + color=None, + dash=None, + shape=None, + simplify=None, + smoothing=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.scatter.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + simplify + Simplifies lines by removing nearly-collinear points. + When transitioning lines, it may be desirable to + disable this so that the number of points along the + resulting SVG path is unaffected. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("simplify", None) + _v = simplify if simplify is not None else _v + if _v is not None: + self["simplify"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_marker.py b/packages/python/plotly/plotly/graph_objs/scatter/_marker.py new file mode 100644 index 00000000000..1d48a240cbe --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_marker.py @@ -0,0 +1,1444 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "gradient", + "line", + "maxdisplayed", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatter.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + .marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatter.marker.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + scatter.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter.marker.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scatter.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scatter.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # gradient + # -------- + @property + def gradient(self): + """ + The 'gradient' property is an instance of Gradient + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.Gradient` + - A dict of string/value properties that will be passed + to the Gradient constructor + + Supported dict properties: + + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . + + Returns + ------- + plotly.graph_objs.scatter.marker.Gradient + """ + return self["gradient"] + + @gradient.setter + def gradient(self, val): + self["gradient"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scatter.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # maxdisplayed + # ------------ + @property + def maxdisplayed(self): + """ + Sets a maximum number of points to be drawn on the graph. 0 + corresponds to no limit. + + The 'maxdisplayed' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["maxdisplayed"] + + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatter.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scatter.marker.Gradient` + instance or dict with compatible properties + line + :class:`plotly.graph_objects.scatter.marker.Line` + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + gradient=None, + line=None, + maxdisplayed=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatter.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scatter.marker.Gradient` + instance or dict with compatible properties + line + :class:`plotly.graph_objects.scatter.marker.Line` + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("gradient", None) + _v = gradient if gradient is not None else _v + if _v is not None: + self["gradient"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("maxdisplayed", None) + _v = maxdisplayed if maxdisplayed is not None else _v + if _v is not None: + self["maxdisplayed"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_selected.py b/packages/python/plotly/plotly/graph_objs/scatter/_selected.py new file mode 100644 index 00000000000..3b3a8834378 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scatter.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scatter.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatter.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatter.selected.Textfont` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.Selected` + marker + :class:`plotly.graph_objects.scatter.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatter.selected.Textfont` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_stream.py b/packages/python/plotly/plotly/graph_objs/scatter/_stream.py new file mode 100644 index 00000000000..d6db07a42eb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatter/_textfont.py new file mode 100644 index 00000000000..af2a878b3e3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_unselected.py b/packages/python/plotly/plotly/graph_objs/scatter/_unselected.py new file mode 100644 index 00000000000..d1286d19c9e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter" + _path_str = "scatter.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatter.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatter.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatter.unselected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatter.unselected.Textfon + t` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.Unselected` + marker + :class:`plotly.graph_objects.scatter.unselected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatter.unselected.Textfon + t` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py index fe823136eb2..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatter.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/_font.py new file mode 100644 index 00000000000..85f21feb9f5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.hoverlabel" + _path_str = "scatter.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py index 6ebab20ab8d..6c5711d6c09 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py @@ -1,2744 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatter.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatter.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Gradient(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the final color of the gradient fill: the center color for - radial, the right for horizontal, or the bottom for vertical. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the type of gradient used to fill the markers - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radial', 'horizontal', 'vertical', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # typesrc - # ------- - @property - def typesrc(self): - """ - Sets the source reference on Chart Studio Cloud for type . - - The 'typesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["typesrc"] - - @typesrc.setter - def typesrc(self, val): - self["typesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs - ): - """ - Construct a new Gradient object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.marker.Gradient` - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - - Returns - ------- - Gradient - """ - super(Gradient, self).__init__("gradient") - - # Validate arg - # ------------ - 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.scatter.marker.Gradient -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.Gradient`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker import gradient as v_gradient - - # Initialize validators - # --------------------- - self._validators["color"] = v_gradient.ColorValidator() - self._validators["colorsrc"] = v_gradient.ColorsrcValidator() - self._validators["type"] = v_gradient.TypeValidator() - self._validators["typesrc"] = v_gradient.TypesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("typesrc", None) - self["typesrc"] = typesrc if typesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatter.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scatter.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scatter.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scatter.marker - .colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - scatter.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scatter.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scatter.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scatter.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scatter.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter.marker. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - r.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scatter.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter.marker.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatter.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter.marker. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - r.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scatter.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter.marker.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatter.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scatter.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] - -from plotly.graph_objs.scatter.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._gradient import Gradient + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._line.Line", "._gradient.Gradient", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py new file mode 100644 index 00000000000..dbd64a36229 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker" + _path_str = "scatter.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatter.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scatter.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scatter.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scatter.marker + .colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + scatter.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scatter.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scatter.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scatter.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scatter.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter.marker. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + r.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scatter.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter.marker.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatter.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter.marker. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + r.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scatter.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter.marker.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatter.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/_gradient.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/_gradient.py new file mode 100644 index 00000000000..398176fedfd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/_gradient.py @@ -0,0 +1,235 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Gradient(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker" + _path_str = "scatter.marker.gradient" + _valid_props = {"color", "colorsrc", "type", "typesrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the final color of the gradient fill: the center color for + radial, the right for horizontal, or the bottom for vertical. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the type of gradient used to fill the markers + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radial', 'horizontal', 'vertical', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # typesrc + # ------- + @property + def typesrc(self): + """ + Sets the source reference on Chart Studio Cloud for type . + + The 'typesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["typesrc"] + + @typesrc.setter + def typesrc(self, val): + self["typesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + ): + """ + Construct a new Gradient object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.marker.Gradient` + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + + Returns + ------- + Gradient + """ + super(Gradient, self).__init__("gradient") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.Gradient +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.Gradient`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("typesrc", None) + _v = typesrc if typesrc is not None else _v + if _v is not None: + self["typesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/_line.py new file mode 100644 index 00000000000..183c867750a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker" + _path_str = "scatter.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatter.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py index 73c0afaabb7..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatter.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter.marker - .colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scatter.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter.marker - .colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scatter.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter.marker - .colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scatter.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scatter.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..b094f077005 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker.colorbar" + _path_str = "scatter.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter.marker + .colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..b5cb82b9247 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker.colorbar" + _path_str = "scatter.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter.marker + .colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_title.py new file mode 100644 index 00000000000..26ffceae85a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker.colorbar" + _path_str = "scatter.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatter.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter.marker + .colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py index 54d85881940..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter.marker - .colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatter.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..ff07681f725 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.marker.colorbar.title" + _path_str = "scatter.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter.marker + .colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py index efeaf0ee29f..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatter.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatter.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatter/selected/_marker.py new file mode 100644 index 00000000000..d08f342c64b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.selected" + _path_str = "scatter.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatter/selected/_textfont.py new file mode 100644 index 00000000000..43c416b4b30 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.selected" + _path_str = "scatter.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py index c9de8c025a0..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.unselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatter.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatter.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatter/unselected/_marker.py new file mode 100644 index 00000000000..fb6a9110a8e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.unselected" + _path_str = "scatter.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatter/unselected/_textfont.py new file mode 100644 index 00000000000..4967a839592 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter.unselected" + _path_str = "scatter.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter.unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py index 832d5b74db2..eef0c408d91 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py @@ -1,5060 +1,34 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatter3d.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scatter3d.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Projection(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is an instance of X - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.projection.X` - - A dict of string/value properties that will be passed - to the X constructor - - Supported dict properties: - - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the x axis. - - Returns - ------- - plotly.graph_objs.scatter3d.projection.X - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is an instance of Y - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.projection.Y` - - A dict of string/value properties that will be passed - to the Y constructor - - Supported dict properties: - - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the y axis. - - Returns - ------- - plotly.graph_objs.scatter3d.projection.Y - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is an instance of Z - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.projection.Z` - - A dict of string/value properties that will be passed - to the Z constructor - - Supported dict properties: - - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the z axis. - - Returns - ------- - plotly.graph_objs.scatter3d.projection.Z - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - :class:`plotly.graph_objects.scatter3d.projection.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.scatter3d.projection.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.scatter3d.projection.Z` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Projection object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.Projection` - x - :class:`plotly.graph_objects.scatter3d.projection.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.scatter3d.projection.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.scatter3d.projection.Z` - instance or dict with compatible properties - - Returns - ------- - Projection - """ - super(Projection, self).__init__("projection") - - # Validate arg - # ------------ - 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.scatter3d.Projection -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.Projection`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import projection as v_projection - - # Initialize validators - # --------------------- - self._validators["x"] = v_projection.XValidator() - self._validators["y"] = v_projection.YValidator() - self._validators["z"] = v_projection.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatter3d.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scatter3d.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.marker.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scatter3d.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scatter3d.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - - Returns - ------- - plotly.graph_objs.scatter3d.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. Note that the marker opacity for - scatter3d traces must be a scalar value for performance - reasons. To set a blending opacity value (i.e. which is not - transparent), set "marker.color" to an rgba color and use its - alpha channel. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['circle', 'circle-open', 'square', 'square-open', - 'diamond', 'diamond-open', 'cross', 'x'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatter3d.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.scatter3d.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. Note that the marker opacity - for scatter3d traces must be a scalar value for - performance reasons. To set a blending opacity value - (i.e. which is not transparent), set "marker.color" to - an rgba color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatter3d.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.scatter3d.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. Note that the marker opacity - for scatter3d traces must be a scalar value for - performance reasons. To set a blending opacity value - (i.e. which is not transparent), set "marker.color" to - an rgba color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatter3d.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in `line.color`is set - to a numerical array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `line.color`) or the bounds - set in `line.cmin` and `line.cmax` Has an effect only if in - `line.color`is set to a numerical array. Defaults to `false` - when `line.cmin` and `line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `line.color`is set to a numerical array. Value should have - the same units as in `line.color` and if set, `line.cmin` must - be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `line.cmin` - and/or `line.cmax` to be equidistant to this point. Has an - effect only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color`. Has no - effect when `line.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `line.color`is set to a numerical array. Value should have - the same units as in `line.color` and if set, `line.cmax` must - be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets thelinecolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to `line.cmin` - and `line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatter3d.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter3d.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.line.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scatter3d.line.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.line.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scatter3d.line.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `line.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`line.cmin` and `line.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: Greys,YlGnBu,Gr - eens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet - ,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of the lines. - - The 'dash' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - Returns - ------- - Any - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `line.color`is set to a numerical array. If true, `line.cmin` - will correspond to the last color in the array and `line.cmax` - will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `line.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in - `line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `line.color`) - or the bounds set in `line.cmin` and `line.cmax` Has - an effect only if in `line.color`is set to a numerical - array. Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `line.cmin` and/or `line.cmax` to be equidistant to - this point. Has an effect only if in `line.color`is set - to a numerical array. Value should have the same units - as in `line.color`. Has no effect when `line.cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `line.cmin` and `line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatter3d.line.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, `[[0, - 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`line.cmin` - and `line.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an effect only - if in `line.color`is set to a numerical array. If true, - `line.cmin` will correspond to the last color in the - array and `line.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `line.color`is set - to a numerical array. - width - Sets the line width (in px). - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - dash=None, - reversescale=None, - showscale=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.scatter3d.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `line.colorscale`. Has an effect only if in - `line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `line.color`) - or the bounds set in `line.cmin` and `line.cmax` Has - an effect only if in `line.color`is set to a numerical - array. Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `line.cmin` and/or `line.cmax` to be equidistant to - this point. Has an effect only if in `line.color`is set - to a numerical array. Value should have the same units - as in `line.color`. Has no effect when `line.cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `line.color`is set to a numerical array. - Value should have the same units as in `line.color` and - if set, `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `line.cmin` and `line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatter3d.line.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, `[[0, - 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`line.cmin` - and `line.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an effect only - if in `line.color`is set to a numerical array. If true, - `line.cmin` will correspond to the last color in the - array and `line.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `line.color`is set - to a numerical array. - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatter3d.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorbar"] = v_line.ColorBarValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["showscale"] = v_line.ShowscaleValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatter3d.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scatter3d.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorZ(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorZ object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.ErrorZ` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorZ - """ - super(ErrorZ, self).__init__("error_z") - - # Validate arg - # ------------ - 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.scatter3d.ErrorZ -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.ErrorZ`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import error_z as v_error_z - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_z.ArrayValidator() - self._validators["arrayminus"] = v_error_z.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_z.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_z.ArraysrcValidator() - self._validators["color"] = v_error_z.ColorValidator() - self._validators["symmetric"] = v_error_z.SymmetricValidator() - self._validators["thickness"] = v_error_z.ThicknessValidator() - self._validators["traceref"] = v_error_z.TracerefValidator() - self._validators["tracerefminus"] = v_error_z.TracerefminusValidator() - self._validators["type"] = v_error_z.TypeValidator() - self._validators["value"] = v_error_z.ValueValidator() - self._validators["valueminus"] = v_error_z.ValueminusValidator() - self._validators["visible"] = v_error_z.VisibleValidator() - self._validators["width"] = v_error_z.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorY(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # copy_zstyle - # ----------- - @property - def copy_zstyle(self): - """ - The 'copy_zstyle' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["copy_zstyle"] - - @copy_zstyle.setter - def copy_zstyle(self, val): - self["copy_zstyle"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_zstyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorY object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.ErrorY` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorY - """ - super(ErrorY, self).__init__("error_y") - - # Validate arg - # ------------ - 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.scatter3d.ErrorY -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.ErrorY`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import error_y as v_error_y - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_y.ArrayValidator() - self._validators["arrayminus"] = v_error_y.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_y.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_y.ArraysrcValidator() - self._validators["color"] = v_error_y.ColorValidator() - self._validators["copy_zstyle"] = v_error_y.CopyZstyleValidator() - self._validators["symmetric"] = v_error_y.SymmetricValidator() - self._validators["thickness"] = v_error_y.ThicknessValidator() - self._validators["traceref"] = v_error_y.TracerefValidator() - self._validators["tracerefminus"] = v_error_y.TracerefminusValidator() - self._validators["type"] = v_error_y.TypeValidator() - self._validators["value"] = v_error_y.ValueValidator() - self._validators["valueminus"] = v_error_y.ValueminusValidator() - self._validators["visible"] = v_error_y.VisibleValidator() - self._validators["width"] = v_error_y.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("copy_zstyle", None) - self["copy_zstyle"] = copy_zstyle if copy_zstyle is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorX(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # copy_zstyle - # ----------- - @property - def copy_zstyle(self): - """ - The 'copy_zstyle' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["copy_zstyle"] - - @copy_zstyle.setter - def copy_zstyle(self, val): - self["copy_zstyle"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_zstyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorX object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.ErrorX` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorX - """ - super(ErrorX, self).__init__("error_x") - - # Validate arg - # ------------ - 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.scatter3d.ErrorX -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.ErrorX`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d import error_x as v_error_x - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_x.ArrayValidator() - self._validators["arrayminus"] = v_error_x.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_x.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_x.ArraysrcValidator() - self._validators["color"] = v_error_x.ColorValidator() - self._validators["copy_zstyle"] = v_error_x.CopyZstyleValidator() - self._validators["symmetric"] = v_error_x.SymmetricValidator() - self._validators["thickness"] = v_error_x.ThicknessValidator() - self._validators["traceref"] = v_error_x.TracerefValidator() - self._validators["tracerefminus"] = v_error_x.TracerefminusValidator() - self._validators["type"] = v_error_x.TypeValidator() - self._validators["value"] = v_error_x.ValueValidator() - self._validators["valueminus"] = v_error_x.ValueminusValidator() - self._validators["visible"] = v_error_x.VisibleValidator() - self._validators["width"] = v_error_x.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("copy_zstyle", None) - self["copy_zstyle"] = copy_zstyle if copy_zstyle is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ErrorX", - "ErrorY", - "ErrorZ", - "Hoverlabel", - "Line", - "Marker", - "Projection", - "Stream", - "Textfont", - "hoverlabel", - "line", - "marker", - "projection", -] - -from plotly.graph_objs.scatter3d import projection -from plotly.graph_objs.scatter3d import marker -from plotly.graph_objs.scatter3d import line -from plotly.graph_objs.scatter3d import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._stream import Stream + from ._projection import Projection + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._error_z import ErrorZ + from ._error_y import ErrorY + from ._error_x import ErrorX + from . import projection + from . import marker + from . import line + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".projection", ".marker", ".line", ".hoverlabel"], + [ + "._textfont.Textfont", + "._stream.Stream", + "._projection.Projection", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + "._error_z.ErrorZ", + "._error_y.ErrorY", + "._error_x.ErrorX", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_error_x.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_error_x.py new file mode 100644 index 00000000000..128973ee244 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_error_x.py @@ -0,0 +1,629 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorX(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.error_x" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_zstyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # copy_zstyle + # ----------- + @property + def copy_zstyle(self): + """ + The 'copy_zstyle' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["copy_zstyle"] + + @copy_zstyle.setter + def copy_zstyle(self, val): + self["copy_zstyle"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_zstyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorX object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.ErrorX` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorX + """ + super(ErrorX, self).__init__("error_x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.ErrorX +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.ErrorX`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("copy_zstyle", None) + _v = copy_zstyle if copy_zstyle is not None else _v + if _v is not None: + self["copy_zstyle"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_error_y.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_error_y.py new file mode 100644 index 00000000000..5641a2de8a8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_error_y.py @@ -0,0 +1,629 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorY(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.error_y" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_zstyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # copy_zstyle + # ----------- + @property + def copy_zstyle(self): + """ + The 'copy_zstyle' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["copy_zstyle"] + + @copy_zstyle.setter + def copy_zstyle(self, val): + self["copy_zstyle"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_zstyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorY object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.ErrorY` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorY + """ + super(ErrorY, self).__init__("error_y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.ErrorY +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.ErrorY`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("copy_zstyle", None) + _v = copy_zstyle if copy_zstyle is not None else _v + if _v is not None: + self["copy_zstyle"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_error_z.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_error_z.py new file mode 100644 index 00000000000..4a65a096829 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_error_z.py @@ -0,0 +1,601 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorZ(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.error_z" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorZ object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.ErrorZ` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorZ + """ + super(ErrorZ, self).__init__("error_z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.ErrorZ +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.ErrorZ`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_hoverlabel.py new file mode 100644 index 00000000000..f3693c69607 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatter3d.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_line.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_line.py new file mode 100644 index 00000000000..c26538782af --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_line.py @@ -0,0 +1,927 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "dash", + "reversescale", + "showscale", + "width", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in `line.color`is set + to a numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `line.color`) or the bounds + set in `line.cmin` and `line.cmax` Has an effect only if in + `line.color`is set to a numerical array. Defaults to `false` + when `line.cmin` and `line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `line.color`is set to a numerical array. Value should have + the same units as in `line.color` and if set, `line.cmin` must + be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `line.cmin` + and/or `line.cmax` to be equidistant to this point. Has an + effect only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color`. Has no + effect when `line.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `line.color`is set to a numerical array. Value should have + the same units as in `line.color` and if set, `line.cmax` must + be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets thelinecolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to `line.cmin` + and `line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatter3d.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + 3d.line.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatter3d.line.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + scatter3d.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.line.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scatter3d.line.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.line.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scatter3d.line.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `line.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`line.cmin` and `line.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: Greys,YlGnBu,Gr + eens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet + ,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of the lines. + + The 'dash' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + + Returns + ------- + Any + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `line.color`is set to a numerical array. If true, `line.cmin` + will correspond to the last color in the array and `line.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `line.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in + `line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `line.color`) + or the bounds set in `line.cmin` and `line.cmax` Has + an effect only if in `line.color`is set to a numerical + array. Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `line.cmin` and/or `line.cmax` to be equidistant to + this point. Has an effect only if in `line.color`is set + to a numerical array. Value should have the same units + as in `line.color`. Has no effect when `line.cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `line.cmin` and `line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatter3d.line.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named color + string. At minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, `[[0, + 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`line.cmin` + and `line.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + dash + Sets the dash style of the lines. + reversescale + Reverses the color mapping if true. Has an effect only + if in `line.color`is set to a numerical array. If true, + `line.cmin` will correspond to the last color in the + array and `line.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `line.color`is set + to a numerical array. + width + Sets the line width (in px). + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + dash=None, + reversescale=None, + showscale=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.scatter3d.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `line.colorscale`. Has an effect only if in + `line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `line.color`) + or the bounds set in `line.cmin` and `line.cmax` Has + an effect only if in `line.color`is set to a numerical + array. Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `line.cmin` and/or `line.cmax` to be equidistant to + this point. Has an effect only if in `line.color`is set + to a numerical array. Value should have the same units + as in `line.color`. Has no effect when `line.cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `line.color`is set to a numerical array. + Value should have the same units as in `line.color` and + if set, `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `line.cmin` and `line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatter3d.line.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named color + string. At minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, `[[0, + 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`line.cmin` + and `line.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + dash + Sets the dash style of the lines. + reversescale + Reverses the color mapping if true. Has an effect only + if in `line.color`is set to a numerical array. If true, + `line.cmin` will correspond to the last color in the + array and `line.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `line.color`is set + to a numerical array. + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_marker.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_marker.py new file mode 100644 index 00000000000..1fe5b98b4ea --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_marker.py @@ -0,0 +1,1268 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatter3d.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + 3d.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatter3d.marker.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + scatter3d.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.marker.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scatter3d.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scatter3d.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + + Returns + ------- + plotly.graph_objs.scatter3d.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. Note that the marker opacity for + scatter3d traces must be a scalar value for performance + reasons. To set a blending opacity value (i.e. which is not + transparent), set "marker.color" to an rgba color and use its + alpha channel. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['circle', 'circle-open', 'square', 'square-open', + 'diamond', 'diamond-open', 'cross', 'x'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatter3d.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.scatter3d.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. Note that the marker opacity + for scatter3d traces must be a scalar value for + performance reasons. To set a blending opacity value + (i.e. which is not transparent), set "marker.color" to + an rgba color and use its alpha channel. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatter3d.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.scatter3d.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. Note that the marker opacity + for scatter3d traces must be a scalar value for + performance reasons. To set a blending opacity value + (i.e. which is not transparent), set "marker.color" to + an rgba color and use its alpha channel. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_projection.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_projection.py new file mode 100644 index 00000000000..1b28e6949c4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_projection.py @@ -0,0 +1,196 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Projection(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.projection" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is an instance of X + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.projection.X` + - A dict of string/value properties that will be passed + to the X constructor + + Supported dict properties: + + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of + the projection marker points. + show + Sets whether or not projections are shown along + the x axis. + + Returns + ------- + plotly.graph_objs.scatter3d.projection.X + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is an instance of Y + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.projection.Y` + - A dict of string/value properties that will be passed + to the Y constructor + + Supported dict properties: + + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of + the projection marker points. + show + Sets whether or not projections are shown along + the y axis. + + Returns + ------- + plotly.graph_objs.scatter3d.projection.Y + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is an instance of Z + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.projection.Z` + - A dict of string/value properties that will be passed + to the Z constructor + + Supported dict properties: + + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of + the projection marker points. + show + Sets whether or not projections are shown along + the z axis. + + Returns + ------- + plotly.graph_objs.scatter3d.projection.Z + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + :class:`plotly.graph_objects.scatter3d.projection.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.scatter3d.projection.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.scatter3d.projection.Z` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Projection object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.Projection` + x + :class:`plotly.graph_objects.scatter3d.projection.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.scatter3d.projection.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.scatter3d.projection.Z` + instance or dict with compatible properties + + Returns + ------- + Projection + """ + super(Projection, self).__init__("projection") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.Projection +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.Projection`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_stream.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_stream.py new file mode 100644 index 00000000000..afb36948fb5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatter3d/_textfont.py new file mode 100644 index 00000000000..9196340efd0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/_textfont.py @@ -0,0 +1,295 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d" + _path_str = "scatter3d.textfont" + _valid_props = {"color", "colorsrc", "family", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py index 1019641f2c8..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatter3d.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/_font.py new file mode 100644 index 00000000000..ee691dd78ca --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.hoverlabel" + _path_str = "scatter3d.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py index fbad1669545..48d0fee5e0d 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py @@ -1,1870 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatter3d.line.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scatter3d.line - .colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - scatter3d.line.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scatter3d.line.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scatter3d.line.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scatter3d.line.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.line" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter3d.line. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - r3d.line.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scatter3d.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatter3d.line.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.line.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.line.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter3d.line. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - r3d.line.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scatter3d.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatter3d.line.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.line.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scatter3d.line.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.line import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "colorbar"] - -from plotly.graph_objs.scatter3d.line import colorbar + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py new file mode 100644 index 00000000000..652075e416a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.line" + _path_str = "scatter3d.line.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatter3d.line.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scatter3d.line + .colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + scatter3d.line.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scatter3d.line.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scatter3d.line.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scatter3d.line.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter3d.line. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + r3d.line.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scatter3d.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatter3d.line.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.line.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.line.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter3d.line. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + r3d.line.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scatter3d.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatter3d.line.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.line.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.line.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py index 928ee589912..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatter3d.line.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.line - .colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scatter3d.line.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.line.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.line - .colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scatter3d.line.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.line.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.line.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.line - .colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scatter3d.line.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.line.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scatter3d.line.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py new file mode 100644 index 00000000000..561ca46dea3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.line.colorbar" + _path_str = "scatter3d.line.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.line + .colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.line.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..49ffca16e01 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.line.colorbar" + _path_str = "scatter3d.line.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.line + .colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.line.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_title.py new file mode 100644 index 00000000000..d5c24c0abb8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.line.colorbar" + _path_str = "scatter3d.line.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatter3d.line.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.line + .colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.line.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py index 7db9e8eeb96..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.line.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.line - .colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatter3d.line.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.line.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py new file mode 100644 index 00000000000..ff6145d42f3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.line.colorbar.title" + _path_str = "scatter3d.line.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.line + .colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.line.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py index 8df21ee425d..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py @@ -1,2479 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatter3d.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=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.scatter3d.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatter3d.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatter3d.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scatter3d.mark - er.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - scatter3d.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scatter3d.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scatter3d.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scatter3d.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter3d.marke - r.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - r3d.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scatter3d.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.marker.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatter3d.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter3d.marke - r.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - r3d.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scatter3d.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.marker.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatter3d.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scatter3d.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.scatter3d.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py new file mode 100644 index 00000000000..3d1a30c1dcc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py @@ -0,0 +1,1943 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.marker" + _path_str = "scatter3d.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatter3d.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scatter3d.mark + er.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + scatter3d.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scatter3d.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scatter3d.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scatter3d.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter3d.marke + r.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + r3d.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scatter3d.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.marker.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatter3d.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter3d.marke + r.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + r3d.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scatter3d.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.marker.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatter3d.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_line.py new file mode 100644 index 00000000000..479e2c16b4b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_line.py @@ -0,0 +1,625 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.marker" + _path_str = "scatter3d.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatter3d.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=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.scatter3d.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py index f9cc6dd4511..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatter3d.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.mark - er.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scatter3d.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.mark - er.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scatter3d.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.mark - er.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scatter3d.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scatter3d.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..7e5302659d4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.marker.colorbar" + _path_str = "scatter3d.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.mark + er.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..97481bbb243 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.marker.colorbar" + _path_str = "scatter3d.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.mark + er.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_title.py new file mode 100644 index 00000000000..5dcc3bbd0ec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.marker.colorbar" + _path_str = "scatter3d.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatter3d.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.mark + er.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py index 2a24d688922..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatter3d.mark - er.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatter3d.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..0d080961c82 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.marker.colorbar.title" + _path_str = "scatter3d.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatter3d.mark + er.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py index 9c4eca13cd9..3e3a4f570cc 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py @@ -1,484 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Z(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the projection color. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # scale - # ----- - @property - def scale(self): - """ - Sets the scale factor determining the size of the projection - marker points. - - The 'scale' property is a number and may be specified as: - - An int or float in the interval [0, 10] - - Returns - ------- - int|float - """ - return self["scale"] - - @scale.setter - def scale(self, val): - self["scale"] = val - - # show - # ---- - @property - def show(self): - """ - Sets whether or not projections are shown along the z axis. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.projection" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of the - projection marker points. - show - Sets whether or not projections are shown along the z - axis. - """ - - def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): - """ - Construct a new Z object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.projection.Z` - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of the - projection marker points. - show - Sets whether or not projections are shown along the z - axis. - - Returns - ------- - Z - """ - super(Z, self).__init__("z") - - # Validate arg - # ------------ - 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.scatter3d.projection.Z -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.projection.Z`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.projection import z as v_z - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_z.OpacityValidator() - self._validators["scale"] = v_z.ScaleValidator() - self._validators["show"] = v_z.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("scale", None) - self["scale"] = scale if scale is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Y(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the projection color. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # scale - # ----- - @property - def scale(self): - """ - Sets the scale factor determining the size of the projection - marker points. - - The 'scale' property is a number and may be specified as: - - An int or float in the interval [0, 10] - - Returns - ------- - int|float - """ - return self["scale"] - - @scale.setter - def scale(self, val): - self["scale"] = val - - # show - # ---- - @property - def show(self): - """ - Sets whether or not projections are shown along the y axis. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.projection" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of the - projection marker points. - show - Sets whether or not projections are shown along the y - axis. - """ - - def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): - """ - Construct a new Y object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.projection.Y` - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of the - projection marker points. - show - Sets whether or not projections are shown along the y - axis. - - Returns - ------- - Y - """ - super(Y, self).__init__("y") - - # Validate arg - # ------------ - 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.scatter3d.projection.Y -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.projection.Y`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.projection import y as v_y - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_y.OpacityValidator() - self._validators["scale"] = v_y.ScaleValidator() - self._validators["show"] = v_y.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("scale", None) - self["scale"] = scale if scale is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class X(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the projection color. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # scale - # ----- - @property - def scale(self): - """ - Sets the scale factor determining the size of the projection - marker points. - - The 'scale' property is a number and may be specified as: - - An int or float in the interval [0, 10] - - Returns - ------- - int|float - """ - return self["scale"] - - @scale.setter - def scale(self, val): - self["scale"] = val - - # show - # ---- - @property - def show(self): - """ - Sets whether or not projections are shown along the x axis. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatter3d.projection" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of the - projection marker points. - show - Sets whether or not projections are shown along the x - axis. - """ - - def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): - """ - Construct a new X object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatter3d.projection.X` - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of the - projection marker points. - show - Sets whether or not projections are shown along the x - axis. - - Returns - ------- - X - """ - super(X, self).__init__("x") - - # Validate arg - # ------------ - 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.scatter3d.projection.X -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatter3d.projection.X`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatter3d.projection import x as v_x - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_x.OpacityValidator() - self._validators["scale"] = v_x.ScaleValidator() - self._validators["show"] = v_x.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("scale", None) - self["scale"] = scale if scale is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["X", "Y", "Z"] +import sys + +if sys.version_info < (3, 7): + from ._z import Z + from ._y import Y + from ._x import X +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.Z", "._y.Y", "._x.X"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_x.py b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_x.py new file mode 100644 index 00000000000..273635f1e3b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_x.py @@ -0,0 +1,159 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class X(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.projection" + _path_str = "scatter3d.projection.x" + _valid_props = {"opacity", "scale", "show"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the projection color. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # scale + # ----- + @property + def scale(self): + """ + Sets the scale factor determining the size of the projection + marker points. + + The 'scale' property is a number and may be specified as: + - An int or float in the interval [0, 10] + + Returns + ------- + int|float + """ + return self["scale"] + + @scale.setter + def scale(self, val): + self["scale"] = val + + # show + # ---- + @property + def show(self): + """ + Sets whether or not projections are shown along the x axis. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of the + projection marker points. + show + Sets whether or not projections are shown along the x + axis. + """ + + def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): + """ + Construct a new X object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.projection.X` + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of the + projection marker points. + show + Sets whether or not projections are shown along the x + axis. + + Returns + ------- + X + """ + super(X, self).__init__("x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.projection.X +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.projection.X`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("scale", None) + _v = scale if scale is not None else _v + if _v is not None: + self["scale"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_y.py b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_y.py new file mode 100644 index 00000000000..8ccb3617026 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_y.py @@ -0,0 +1,159 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Y(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.projection" + _path_str = "scatter3d.projection.y" + _valid_props = {"opacity", "scale", "show"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the projection color. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # scale + # ----- + @property + def scale(self): + """ + Sets the scale factor determining the size of the projection + marker points. + + The 'scale' property is a number and may be specified as: + - An int or float in the interval [0, 10] + + Returns + ------- + int|float + """ + return self["scale"] + + @scale.setter + def scale(self, val): + self["scale"] = val + + # show + # ---- + @property + def show(self): + """ + Sets whether or not projections are shown along the y axis. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of the + projection marker points. + show + Sets whether or not projections are shown along the y + axis. + """ + + def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): + """ + Construct a new Y object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.projection.Y` + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of the + projection marker points. + show + Sets whether or not projections are shown along the y + axis. + + Returns + ------- + Y + """ + super(Y, self).__init__("y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.projection.Y +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.projection.Y`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("scale", None) + _v = scale if scale is not None else _v + if _v is not None: + self["scale"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_z.py b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_z.py new file mode 100644 index 00000000000..0d0614aec0e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_z.py @@ -0,0 +1,159 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Z(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatter3d.projection" + _path_str = "scatter3d.projection.z" + _valid_props = {"opacity", "scale", "show"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the projection color. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # scale + # ----- + @property + def scale(self): + """ + Sets the scale factor determining the size of the projection + marker points. + + The 'scale' property is a number and may be specified as: + - An int or float in the interval [0, 10] + + Returns + ------- + int|float + """ + return self["scale"] + + @scale.setter + def scale(self, val): + self["scale"] = val + + # show + # ---- + @property + def show(self): + """ + Sets whether or not projections are shown along the z axis. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of the + projection marker points. + show + Sets whether or not projections are shown along the z + axis. + """ + + def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): + """ + Construct a new Z object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatter3d.projection.Z` + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of the + projection marker points. + show + Sets whether or not projections are shown along the z + axis. + + Returns + ------- + Z + """ + super(Z, self).__init__("z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatter3d.projection.Z +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatter3d.projection.Z`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("scale", None) + _v = scale if scale is not None else _v + if _v is not None: + self["scale"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py index 6919b75e501..70cc13d3d61 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py @@ -1,2962 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattercarpet.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattercarpet.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattercarpet.unselected.M - arker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattercarpet.unselected.T - extfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.Unselected` - marker - :class:`plotly.graph_objects.scattercarpet.unselected.M - arker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattercarpet.unselected.T - extfont` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scattercarpet.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattercarpet.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scattercarpet.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scattercarpet.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scattercarpet.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattercarpet.selected.Mar - ker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattercarpet.selected.Tex - tfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.Selected` - marker - :class:`plotly.graph_objects.scattercarpet.selected.Mar - ker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattercarpet.selected.Tex - tfont` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scattercarpet.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattercarpet.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - carpet.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattercarpet.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattercarpet.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattercarpet.mark - er.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scattercarpet.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattercarpet.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # gradient - # -------- - @property - def gradient(self): - """ - The 'gradient' property is an instance of Gradient - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.Gradient` - - A dict of string/value properties that will be passed - to the Gradient constructor - - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.Gradient - """ - return self["gradient"] - - @gradient.setter - def gradient(self, val): - self["gradient"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # maxdisplayed - # ------------ - @property - def maxdisplayed(self): - """ - Sets a maximum number of points to be drawn on the graph. 0 - corresponds to no limit. - - The 'maxdisplayed' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["maxdisplayed"] - - @maxdisplayed.setter - def maxdisplayed(self, val): - self["maxdisplayed"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattercarpet.marker.Color - Bar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scattercarpet.marker.Gradi - ent` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scattercarpet.marker.Line` - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattercarpet.marker.Color - Bar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scattercarpet.marker.Gradi - ent` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scattercarpet.marker.Line` - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattercarpet.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["gradient"] = v_marker.GradientValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["maxdisplayed"] = v_marker.MaxdisplayedValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("gradient", None) - self["gradient"] = gradient if gradient is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("maxdisplayed", None) - self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # shape - # ----- - @property - def shape(self): - """ - Determines the line shape. With "spline" the lines are drawn - using spline interpolation. The other available values - correspond to step-wise line shapes. - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'spline'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Has an effect only if `shape` is set to "spline" Sets the - amount of smoothing. 0 corresponds to no smoothing (equivalent - to a "linear" shape). - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - """ - - def __init__( - self, - arg=None, - color=None, - dash=None, - shape=None, - smoothing=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.scattercarpet.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattercarpet.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattercarpet.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scattercarpet.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scattercarpet import unselected -from plotly.graph_objs.scattercarpet import selected -from plotly.graph_objs.scattercarpet import marker -from plotly.graph_objs.scattercarpet import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_hoverlabel.py new file mode 100644 index 00000000000..583fbd2c74d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattercarpet.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_line.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_line.py new file mode 100644 index 00000000000..917be3ffaa2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_line.py @@ -0,0 +1,283 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.line" + _valid_props = {"color", "dash", "shape", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # shape + # ----- + @property + def shape(self): + """ + Determines the line shape. With "spline" the lines are drawn + using spline interpolation. The other available values + correspond to step-wise line shapes. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'spline'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Has an effect only if `shape` is set to "spline" Sets the + amount of smoothing. 0 corresponds to no smoothing (equivalent + to a "linear" shape). + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + """ + + def __init__( + self, + arg=None, + color=None, + dash=None, + shape=None, + smoothing=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.scattercarpet.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py new file mode 100644 index 00000000000..99b16d3399c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py @@ -0,0 +1,1444 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "gradient", + "line", + "maxdisplayed", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattercarpet.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + carpet.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattercarpet.marker.colorbar.tickformatstopd + efaults), sets the default property values to + use for elements of + scattercarpet.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattercarpet.mark + er.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scattercarpet.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattercarpet.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # gradient + # -------- + @property + def gradient(self): + """ + The 'gradient' property is an instance of Gradient + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.Gradient` + - A dict of string/value properties that will be passed + to the Gradient constructor + + Supported dict properties: + + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.Gradient + """ + return self["gradient"] + + @gradient.setter + def gradient(self, val): + self["gradient"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # maxdisplayed + # ------------ + @property + def maxdisplayed(self): + """ + Sets a maximum number of points to be drawn on the graph. 0 + corresponds to no limit. + + The 'maxdisplayed' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["maxdisplayed"] + + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattercarpet.marker.Color + Bar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scattercarpet.marker.Gradi + ent` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scattercarpet.marker.Line` + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + gradient=None, + line=None, + maxdisplayed=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattercarpet.marker.Color + Bar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scattercarpet.marker.Gradi + ent` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scattercarpet.marker.Line` + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("gradient", None) + _v = gradient if gradient is not None else _v + if _v is not None: + self["gradient"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("maxdisplayed", None) + _v = maxdisplayed if maxdisplayed is not None else _v + if _v is not None: + self["maxdisplayed"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_selected.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_selected.py new file mode 100644 index 00000000000..9163980bf39 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scattercarpet.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scattercarpet.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattercarpet.selected.Mar + ker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattercarpet.selected.Tex + tfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.Selected` + marker + :class:`plotly.graph_objects.scattercarpet.selected.Mar + ker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattercarpet.selected.Tex + tfont` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_stream.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_stream.py new file mode 100644 index 00000000000..53ddace2f6a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_textfont.py new file mode 100644 index 00000000000..f898848ee9d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_unselected.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_unselected.py new file mode 100644 index 00000000000..cc08d1193b5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet" + _path_str = "scattercarpet.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattercarpet.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattercarpet.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattercarpet.unselected.M + arker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattercarpet.unselected.T + extfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.Unselected` + marker + :class:`plotly.graph_objects.scattercarpet.unselected.M + arker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattercarpet.unselected.T + extfont` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py index fc008a134be..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattercarpet.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/_font.py new file mode 100644 index 00000000000..218c7a93942 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.hoverlabel" + _path_str = "scattercarpet.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py index e51479b977b..6c5711d6c09 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py @@ -1,2748 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattercarpet.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattercarpet.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattercarpet.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Gradient(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the final color of the gradient fill: the center color for - radial, the right for horizontal, or the bottom for vertical. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the type of gradient used to fill the markers - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radial', 'horizontal', 'vertical', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # typesrc - # ------- - @property - def typesrc(self): - """ - Sets the source reference on Chart Studio Cloud for type . - - The 'typesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["typesrc"] - - @typesrc.setter - def typesrc(self, val): - self["typesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs - ): - """ - Construct a new Gradient object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - marker.Gradient` - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - - Returns - ------- - Gradient - """ - super(Gradient, self).__init__("gradient") - - # Validate arg - # ------------ - 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.scattercarpet.marker.Gradient -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.Gradient`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker import gradient as v_gradient - - # Initialize validators - # --------------------- - self._validators["color"] = v_gradient.ColorValidator() - self._validators["colorsrc"] = v_gradient.ColorsrcValidator() - self._validators["type"] = v_gradient.TypeValidator() - self._validators["typesrc"] = v_gradient.TypesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("typesrc", None) - self["typesrc"] = typesrc if typesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scattercarpet. - marker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - scattercarpet.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scattercarpet.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scattercarpet.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattercarpet.m - arker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rcarpet.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scattercarpet.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattercarpet.marker.color - bar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattercarpet.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scattercarpet.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattercarpet.m - arker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rcarpet.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scattercarpet.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattercarpet.marker.color - bar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattercarpet.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scattercarpet.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scattercarpet.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] - -from plotly.graph_objs.scattercarpet.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._gradient import Gradient + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._line.Line", "._gradient.Gradient", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py new file mode 100644 index 00000000000..69e92327863 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py @@ -0,0 +1,1945 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker" + _path_str = "scattercarpet.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scattercarpet. + marker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + scattercarpet.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scattercarpet.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scattercarpet.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattercarpet.m + arker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rcarpet.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scattercarpet.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattercarpet.marker.color + bar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattercarpet.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scattercarpet.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattercarpet.m + arker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rcarpet.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scattercarpet.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattercarpet.marker.color + bar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattercarpet.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scattercarpet.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_gradient.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_gradient.py new file mode 100644 index 00000000000..92f49b68484 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_gradient.py @@ -0,0 +1,235 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Gradient(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker" + _path_str = "scattercarpet.marker.gradient" + _valid_props = {"color", "colorsrc", "type", "typesrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the final color of the gradient fill: the center color for + radial, the right for horizontal, or the bottom for vertical. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the type of gradient used to fill the markers + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radial', 'horizontal', 'vertical', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # typesrc + # ------- + @property + def typesrc(self): + """ + Sets the source reference on Chart Studio Cloud for type . + + The 'typesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["typesrc"] + + @typesrc.setter + def typesrc(self, val): + self["typesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + ): + """ + Construct a new Gradient object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + marker.Gradient` + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + + Returns + ------- + Gradient + """ + super(Gradient, self).__init__("gradient") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.Gradient +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.Gradient`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("typesrc", None) + _v = typesrc if typesrc is not None else _v + if _v is not None: + self["typesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_line.py new file mode 100644 index 00000000000..29dcd87f1c0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker" + _path_str = "scattercarpet.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattercarpet.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattercarpet.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py index 27f91a75aab..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py @@ -1,726 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattercarpet.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scattercarpet.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - marker.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scattercarpet.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - marker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scattercarpet.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker.colorbar import ( - tickfont as v_tickfont, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scattercarpet.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..d171bc693dc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker.colorbar" + _path_str = "scattercarpet.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + marker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..32a25fff81a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker.colorbar" + _path_str = "scattercarpet.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + marker.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py new file mode 100644 index 00000000000..f96d6a2aa06 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker.colorbar" + _path_str = "scattercarpet.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattercarpet.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py index 69516ac12dc..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - marker.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattercarpet.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..a97ca031874 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.marker.colorbar.title" + _path_str = "scattercarpet.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + marker.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py index 8749098959c..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattercarpet.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattercarpet.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/_marker.py new file mode 100644 index 00000000000..0c36415ff40 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.selected" + _path_str = "scattercarpet.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/_textfont.py new file mode 100644 index 00000000000..817da8d956e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.selected" + _path_str = "scattercarpet.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py index 96c4a9730a2..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - unselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattercarpet.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattercarpet.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattercarpet. - unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattercarpet.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattercarpet.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/_marker.py new file mode 100644 index 00000000000..58caaac0db5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.unselected" + _path_str = "scattercarpet.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/_textfont.py new file mode 100644 index 00000000000..39b8b78784a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattercarpet.unselected" + _path_str = "scattercarpet.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattercarpet. + unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattercarpet.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py index efede65e7af..70cc13d3d61 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py @@ -1,2855 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattergeo.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattergeo.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattergeo.unselected.Mark - er` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergeo.unselected.Text - font` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.Unselected` - marker - :class:`plotly.graph_objects.scattergeo.unselected.Mark - er` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergeo.unselected.Text - font` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scattergeo.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattergeo.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scattergeo.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scattergeo.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scattergeo.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattergeo.selected.Marker - ` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergeo.selected.Textfo - nt` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.Selected` - marker - :class:`plotly.graph_objects.scattergeo.selected.Marker - ` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergeo.selected.Textfo - nt` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scattergeo.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattergeo.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - geo.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergeo.marker.colorbar.tickformatstopdefa - ults), sets the default property values to use - for elements of - scattergeo.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergeo.marker. - colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scattergeo.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattergeo.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scattergeo.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # gradient - # -------- - @property - def gradient(self): - """ - The 'gradient' property is an instance of Gradient - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient` - - A dict of string/value properties that will be passed - to the Gradient constructor - - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . - - Returns - ------- - plotly.graph_objs.scattergeo.marker.Gradient - """ - return self["gradient"] - - @gradient.setter - def gradient(self, val): - self["gradient"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scattergeo.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattergeo.marker.ColorBar - ` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scattergeo.marker.Gradient - ` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scattergeo.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattergeo.marker.ColorBar - ` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scattergeo.marker.Gradient - ` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scattergeo.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattergeo.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["gradient"] = v_marker.GradientValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("gradient", None) - self["gradient"] = gradient if gradient is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=None, dash=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.scattergeo.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattergeo.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattergeo.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scattergeo.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scattergeo import unselected -from plotly.graph_objs.scattergeo import selected -from plotly.graph_objs.scattergeo import marker -from plotly.graph_objs.scattergeo import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_hoverlabel.py new file mode 100644 index 00000000000..034e2b5c6ee --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattergeo.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_line.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_line.py new file mode 100644 index 00000000000..d09d211f4e3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_line.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.line" + _valid_props = {"color", "dash", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=None, dash=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.scattergeo.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py new file mode 100644 index 00000000000..2e2a2d78d87 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py @@ -0,0 +1,1411 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "gradient", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattergeo.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + geo.marker.colorbar.Tickformatstop` instances + or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattergeo.marker.colorbar.tickformatstopdefa + ults), sets the default property values to use + for elements of + scattergeo.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergeo.marker. + colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scattergeo.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattergeo.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scattergeo.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # gradient + # -------- + @property + def gradient(self): + """ + The 'gradient' property is an instance of Gradient + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient` + - A dict of string/value properties that will be passed + to the Gradient constructor + + Supported dict properties: + + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . + + Returns + ------- + plotly.graph_objs.scattergeo.marker.Gradient + """ + return self["gradient"] + + @gradient.setter + def gradient(self, val): + self["gradient"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scattergeo.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattergeo.marker.ColorBar + ` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scattergeo.marker.Gradient + ` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scattergeo.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + gradient=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattergeo.marker.ColorBar + ` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scattergeo.marker.Gradient + ` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scattergeo.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("gradient", None) + _v = gradient if gradient is not None else _v + if _v is not None: + self["gradient"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_selected.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_selected.py new file mode 100644 index 00000000000..251f0de2664 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scattergeo.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scattergeo.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattergeo.selected.Marker + ` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergeo.selected.Textfo + nt` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.Selected` + marker + :class:`plotly.graph_objects.scattergeo.selected.Marker + ` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergeo.selected.Textfo + nt` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_stream.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_stream.py new file mode 100644 index 00000000000..6e65d54da36 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_textfont.py new file mode 100644 index 00000000000..9b4dbea19eb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_unselected.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_unselected.py new file mode 100644 index 00000000000..dc956ed9815 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo" + _path_str = "scattergeo.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattergeo.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattergeo.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattergeo.unselected.Mark + er` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergeo.unselected.Text + font` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.Unselected` + marker + :class:`plotly.graph_objects.scattergeo.unselected.Mark + er` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergeo.unselected.Text + font` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py index 73b7dc188a9..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattergeo.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/_font.py new file mode 100644 index 00000000000..ea959fc5559 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.hoverlabel" + _path_str = "scattergeo.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py index f4239f0b1fb..6c5711d6c09 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py @@ -1,2748 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattergeo.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattergeo.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Gradient(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the final color of the gradient fill: the center color for - radial, the right for horizontal, or the bottom for vertical. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the type of gradient used to fill the markers - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radial', 'horizontal', 'vertical', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # typesrc - # ------- - @property - def typesrc(self): - """ - Sets the source reference on Chart Studio Cloud for type . - - The 'typesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["typesrc"] - - @typesrc.setter - def typesrc(self, val): - self["typesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs - ): - """ - Construct a new Gradient object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.marker.Gradient` - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - - Returns - ------- - Gradient - """ - super(Gradient, self).__init__("gradient") - - # Validate arg - # ------------ - 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.scattergeo.marker.Gradient -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker import gradient as v_gradient - - # Initialize validators - # --------------------- - self._validators["color"] = v_gradient.ColorValidator() - self._validators["colorsrc"] = v_gradient.ColorsrcValidator() - self._validators["type"] = v_gradient.TypeValidator() - self._validators["typesrc"] = v_gradient.TypesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("typesrc", None) - self["typesrc"] = typesrc if typesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattergeo.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scattergeo.mar - ker.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - scattergeo.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scattergeo.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scattergeo.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scattergeo.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattergeo.mark - er.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rgeo.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scattergeo.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergeo.marker.colorbar - .Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattergeo.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scattergeo.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattergeo.mark - er.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rgeo.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scattergeo.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergeo.marker.colorbar - .Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattergeo.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scattergeo.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scattergeo.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] - -from plotly.graph_objs.scattergeo.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._gradient import Gradient + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._line.Line", "._gradient.Gradient", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py new file mode 100644 index 00000000000..06599d476d7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py @@ -0,0 +1,1945 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker" + _path_str = "scattergeo.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattergeo.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scattergeo.mar + ker.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + scattergeo.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scattergeo.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scattergeo.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scattergeo.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattergeo.mark + er.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rgeo.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scattergeo.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergeo.marker.colorbar + .Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattergeo.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scattergeo.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattergeo.mark + er.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rgeo.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scattergeo.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergeo.marker.colorbar + .Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattergeo.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scattergeo.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_gradient.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_gradient.py new file mode 100644 index 00000000000..3e14885297c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_gradient.py @@ -0,0 +1,235 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Gradient(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker" + _path_str = "scattergeo.marker.gradient" + _valid_props = {"color", "colorsrc", "type", "typesrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the final color of the gradient fill: the center color for + radial, the right for horizontal, or the bottom for vertical. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the type of gradient used to fill the markers + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radial', 'horizontal', 'vertical', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # typesrc + # ------- + @property + def typesrc(self): + """ + Sets the source reference on Chart Studio Cloud for type . + + The 'typesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["typesrc"] + + @typesrc.setter + def typesrc(self, val): + self["typesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + ): + """ + Construct a new Gradient object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.marker.Gradient` + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + + Returns + ------- + Gradient + """ + super(Gradient, self).__init__("gradient") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.Gradient +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("typesrc", None) + _v = typesrc if typesrc is not None else _v + if _v is not None: + self["typesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_line.py new file mode 100644 index 00000000000..5c7fafc8d26 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker" + _path_str = "scattergeo.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattergeo.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py index a519b749287..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattergeo.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergeo.mar - ker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scattergeo.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergeo.mar - ker.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scattergeo.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergeo.mar - ker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scattergeo.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scattergeo.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..2eeb1c36316 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker.colorbar" + _path_str = "scattergeo.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergeo.mar + ker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..9ddb21159e1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker.colorbar" + _path_str = "scattergeo.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergeo.mar + ker.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_title.py new file mode 100644 index 00000000000..f6f4e4d895f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker.colorbar" + _path_str = "scattergeo.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattergeo.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergeo.mar + ker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py index 4da74e5732a..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergeo.mar - ker.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattergeo.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..eec3551e792 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.marker.colorbar.title" + _path_str = "scattergeo.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergeo.mar + ker.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py index f76aabb038a..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattergeo.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattergeo.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_marker.py new file mode 100644 index 00000000000..5e713206ed7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.selected" + _path_str = "scattergeo.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_textfont.py new file mode 100644 index 00000000000..693c43d36e2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.selected" + _path_str = "scattergeo.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py index 76c502e425e..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergeo.uns - elected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattergeo.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergeo.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergeo.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattergeo.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergeo.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergeo.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_marker.py new file mode 100644 index 00000000000..3cdb074d0df --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.unselected" + _path_str = "scattergeo.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergeo.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_textfont.py new file mode 100644 index 00000000000..8d0122e5eec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergeo.unselected" + _path_str = "scattergeo.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergeo.uns + elected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergeo.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergeo.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py index f9ce0028ffc..c833d06cf97 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py @@ -1,4013 +1,34 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattergl.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattergl.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattergl.unselected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergl.unselected.Textf - ont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.Unselected` - marker - :class:`plotly.graph_objects.scattergl.unselected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergl.unselected.Textf - ont` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scattergl.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattergl.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scattergl.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scattergl.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scattergl.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattergl.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergl.selected.Textfon - t` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.Selected` - marker - :class:`plotly.graph_objects.scattergl.selected.Marker` - instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scattergl.selected.Textfon - t` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scattergl.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattergl.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - gl.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergl.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scattergl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergl.marker.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scattergl.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattergl.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scattergl.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scattergl.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattergl.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.scattergl.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattergl.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.scattergl.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattergl.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the style of the lines. - - The 'dash' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - Returns - ------- - Any - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # shape - # ----- - @property - def shape(self): - """ - Determines the line shape. The values correspond to step-wise - line shapes. - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'hv', 'vh', 'hvh', 'vhv'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values correspond to - step-wise line shapes. - width - Sets the line width (in px). - """ - - def __init__( - self, arg=None, color=None, dash=None, shape=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.scattergl.Line` - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values correspond to - step-wise line shapes. - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattergl.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattergl.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scattergl.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorY(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorY object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.ErrorY` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorY - """ - super(ErrorY, self).__init__("error_y") - - # Validate arg - # ------------ - 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.scattergl.ErrorY -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.ErrorY`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import error_y as v_error_y - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_y.ArrayValidator() - self._validators["arrayminus"] = v_error_y.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_y.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_y.ArraysrcValidator() - self._validators["color"] = v_error_y.ColorValidator() - self._validators["symmetric"] = v_error_y.SymmetricValidator() - self._validators["thickness"] = v_error_y.ThicknessValidator() - self._validators["traceref"] = v_error_y.TracerefValidator() - self._validators["tracerefminus"] = v_error_y.TracerefminusValidator() - self._validators["type"] = v_error_y.TypeValidator() - self._validators["value"] = v_error_y.ValueValidator() - self._validators["valueminus"] = v_error_y.ValueminusValidator() - self._validators["visible"] = v_error_y.VisibleValidator() - self._validators["width"] = v_error_y.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ErrorX(_BaseTraceHierarchyType): - - # array - # ----- - @property - def array(self): - """ - Sets the data corresponding the length of each error bar. - Values are plotted relative to the underlying data. - - The 'array' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["array"] - - @array.setter - def array(self, val): - self["array"] = val - - # arrayminus - # ---------- - @property - def arrayminus(self): - """ - Sets the data corresponding the length of each error bar in the - bottom (left) direction for vertical (horizontal) bars Values - are plotted relative to the underlying data. - - The 'arrayminus' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["arrayminus"] - - @arrayminus.setter - def arrayminus(self, val): - self["arrayminus"] = val - - # arrayminussrc - # ------------- - @property - def arrayminussrc(self): - """ - Sets the source reference on Chart Studio Cloud for arrayminus - . - - The 'arrayminussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arrayminussrc"] - - @arrayminussrc.setter - def arrayminussrc(self, val): - self["arrayminussrc"] = val - - # arraysrc - # -------- - @property - def arraysrc(self): - """ - Sets the source reference on Chart Studio Cloud for array . - - The 'arraysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["arraysrc"] - - @arraysrc.setter - def arraysrc(self, val): - self["arraysrc"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the stoke color of the error bars. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # copy_ystyle - # ----------- - @property - def copy_ystyle(self): - """ - The 'copy_ystyle' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["copy_ystyle"] - - @copy_ystyle.setter - def copy_ystyle(self, val): - self["copy_ystyle"] = val - - # symmetric - # --------- - @property - def symmetric(self): - """ - Determines whether or not the error bars have the same length - in both direction (top/bottom for vertical bars, left/right for - horizontal bars. - - The 'symmetric' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["symmetric"] - - @symmetric.setter - def symmetric(self, val): - self["symmetric"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness (in px) of the error bars. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # traceref - # -------- - @property - def traceref(self): - """ - The 'traceref' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["traceref"] - - @traceref.setter - def traceref(self, val): - self["traceref"] = val - - # tracerefminus - # ------------- - @property - def tracerefminus(self): - """ - The 'tracerefminus' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["tracerefminus"] - - @tracerefminus.setter - def tracerefminus(self, val): - self["tracerefminus"] = val - - # type - # ---- - @property - def type(self): - """ - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this - constant in `value`. If "percent", the bar lengths correspond - to a percentage of underlying data. Set this percentage in - `value`. If "sqrt", the bar lengths correspond to the sqaure of - the underlying data. If "data", the bar lengths are set with - data set `array`. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['percent', 'constant', 'sqrt', 'data'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars. - - The 'value' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valueminus - # ---------- - @property - def valueminus(self): - """ - Sets the value of either the percentage (if `type` is set to - "percent") or the constant (if `type` is set to "constant") - corresponding to the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - - The 'valueminus' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["valueminus"] - - @valueminus.setter - def valueminus(self, val): - self["valueminus"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this set of error bars is visible. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the cross-bar at both ends of the - error bars. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - """ - - def __init__( - self, - arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, - **kwargs - ): - """ - Construct a new ErrorX object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.ErrorX` - array - Sets the data corresponding the length of each error - bar. Values are plotted relative to the underlying - data. - arrayminus - Sets the data corresponding the length of each error - bar in the bottom (left) direction for vertical - (horizontal) bars Values are plotted relative to the - underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud for - arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud for - array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have the same - length in both direction (top/bottom for vertical bars, - left/right for horizontal bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. - Set this constant in `value`. If "percent", the bar - lengths correspond to a percentage of underlying data. - Set this percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the underlying - data. If "data", the bar lengths are set with data set - `array`. - value - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars. - valueminus - Sets the value of either the percentage (if `type` is - set to "percent") or the constant (if `type` is set to - "constant") corresponding to the lengths of the error - bars in the bottom (left) direction for vertical - (horizontal) bars - visible - Determines whether or not this set of error bars is - visible. - width - Sets the width (in px) of the cross-bar at both ends of - the error bars. - - Returns - ------- - ErrorX - """ - super(ErrorX, self).__init__("error_x") - - # Validate arg - # ------------ - 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.scattergl.ErrorX -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.ErrorX`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl import error_x as v_error_x - - # Initialize validators - # --------------------- - self._validators["array"] = v_error_x.ArrayValidator() - self._validators["arrayminus"] = v_error_x.ArrayminusValidator() - self._validators["arrayminussrc"] = v_error_x.ArrayminussrcValidator() - self._validators["arraysrc"] = v_error_x.ArraysrcValidator() - self._validators["color"] = v_error_x.ColorValidator() - self._validators["copy_ystyle"] = v_error_x.CopyYstyleValidator() - self._validators["symmetric"] = v_error_x.SymmetricValidator() - self._validators["thickness"] = v_error_x.ThicknessValidator() - self._validators["traceref"] = v_error_x.TracerefValidator() - self._validators["tracerefminus"] = v_error_x.TracerefminusValidator() - self._validators["type"] = v_error_x.TypeValidator() - self._validators["value"] = v_error_x.ValueValidator() - self._validators["valueminus"] = v_error_x.ValueminusValidator() - self._validators["visible"] = v_error_x.VisibleValidator() - self._validators["width"] = v_error_x.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - self["array"] = array if array is not None else _v - _v = arg.pop("arrayminus", None) - self["arrayminus"] = arrayminus if arrayminus is not None else _v - _v = arg.pop("arrayminussrc", None) - self["arrayminussrc"] = arrayminussrc if arrayminussrc is not None else _v - _v = arg.pop("arraysrc", None) - self["arraysrc"] = arraysrc if arraysrc is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("copy_ystyle", None) - self["copy_ystyle"] = copy_ystyle if copy_ystyle is not None else _v - _v = arg.pop("symmetric", None) - self["symmetric"] = symmetric if symmetric is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("traceref", None) - self["traceref"] = traceref if traceref is not None else _v - _v = arg.pop("tracerefminus", None) - self["tracerefminus"] = tracerefminus if tracerefminus is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valueminus", None) - self["valueminus"] = valueminus if valueminus is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ErrorX", - "ErrorY", - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scattergl import unselected -from plotly.graph_objs.scattergl import selected -from plotly.graph_objs.scattergl import marker -from plotly.graph_objs.scattergl import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._error_y import ErrorY + from ._error_x import ErrorX + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + "._error_y.ErrorY", + "._error_x.ErrorX", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_error_x.py b/packages/python/plotly/plotly/graph_objs/scattergl/_error_x.py new file mode 100644 index 00000000000..86b8c2cd4bd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_error_x.py @@ -0,0 +1,629 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorX(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.error_x" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_ystyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # copy_ystyle + # ----------- + @property + def copy_ystyle(self): + """ + The 'copy_ystyle' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["copy_ystyle"] + + @copy_ystyle.setter + def copy_ystyle(self, val): + self["copy_ystyle"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_ystyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorX object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.ErrorX` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorX + """ + super(ErrorX, self).__init__("error_x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.ErrorX +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.ErrorX`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("copy_ystyle", None) + _v = copy_ystyle if copy_ystyle is not None else _v + if _v is not None: + self["copy_ystyle"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_error_y.py b/packages/python/plotly/plotly/graph_objs/scattergl/_error_y.py new file mode 100644 index 00000000000..b4f90aa7a20 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_error_y.py @@ -0,0 +1,601 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorY(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.error_y" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + # array + # ----- + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + # arrayminus + # ---------- + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + # arrayminussrc + # ------------- + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for arrayminus + . + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + # arraysrc + # -------- + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for array . + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + # color + # ----- + @property + def color(self): + """ + Sets the stoke color of the error bars. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # symmetric + # --------- + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # traceref + # -------- + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + # tracerefminus + # ------------- + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + # type + # ---- + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the sqaure of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valueminus + # ---------- + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs + ): + """ + Construct a new ErrorY object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.ErrorY` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud for + array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + *constant`, the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorY + """ + super(ErrorY, self).__init__("error_y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.ErrorY +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.ErrorY`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("array", None) + _v = array if array is not None else _v + if _v is not None: + self["array"] = _v + _v = arg.pop("arrayminus", None) + _v = arrayminus if arrayminus is not None else _v + if _v is not None: + self["arrayminus"] = _v + _v = arg.pop("arrayminussrc", None) + _v = arrayminussrc if arrayminussrc is not None else _v + if _v is not None: + self["arrayminussrc"] = _v + _v = arg.pop("arraysrc", None) + _v = arraysrc if arraysrc is not None else _v + if _v is not None: + self["arraysrc"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("symmetric", None) + _v = symmetric if symmetric is not None else _v + if _v is not None: + self["symmetric"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("traceref", None) + _v = traceref if traceref is not None else _v + if _v is not None: + self["traceref"] = _v + _v = arg.pop("tracerefminus", None) + _v = tracerefminus if tracerefminus is not None else _v + if _v is not None: + self["tracerefminus"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + _v = arg.pop("valueminus", None) + _v = valueminus if valueminus is not None else _v + if _v is not None: + self["valueminus"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scattergl/_hoverlabel.py new file mode 100644 index 00000000000..77fd1542c2a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattergl.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_line.py b/packages/python/plotly/plotly/graph_objs/scattergl/_line.py new file mode 100644 index 00000000000..4a1b9ff8969 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_line.py @@ -0,0 +1,229 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.line" + _valid_props = {"color", "dash", "shape", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the style of the lines. + + The 'dash' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + + Returns + ------- + Any + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # shape + # ----- + @property + def shape(self): + """ + Determines the line shape. The values correspond to step-wise + line shapes. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'hv', 'vh', 'hvh', 'vhv'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values correspond to + step-wise line shapes. + width + Sets the line width (in px). + """ + + def __init__( + self, arg=None, color=None, dash=None, shape=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.scattergl.Line` + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values correspond to + step-wise line shapes. + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py new file mode 100644 index 00000000000..43b1220e65f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py @@ -0,0 +1,1362 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattergl.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + gl.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattergl.marker.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + scattergl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergl.marker.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scattergl.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattergl.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scattergl.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scattergl.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattergl.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.scattergl.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattergl.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.scattergl.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_selected.py b/packages/python/plotly/plotly/graph_objs/scattergl/_selected.py new file mode 100644 index 00000000000..d825045c721 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scattergl.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scattergl.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattergl.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergl.selected.Textfon + t` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.Selected` + marker + :class:`plotly.graph_objects.scattergl.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergl.selected.Textfon + t` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_stream.py b/packages/python/plotly/plotly/graph_objs/scattergl/_stream.py new file mode 100644 index 00000000000..0cbe4f9830c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattergl/_textfont.py new file mode 100644 index 00000000000..a7c10277234 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_unselected.py b/packages/python/plotly/plotly/graph_objs/scattergl/_unselected.py new file mode 100644 index 00000000000..7b0e920a13a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl" + _path_str = "scattergl.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattergl.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattergl.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattergl.unselected.Marke + r` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergl.unselected.Textf + ont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.Unselected` + marker + :class:`plotly.graph_objects.scattergl.unselected.Marke + r` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scattergl.unselected.Textf + ont` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py index 106cd136de7..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattergl.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/_font.py new file mode 100644 index 00000000000..bdab242bc24 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.hoverlabel" + _path_str = "scattergl.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py index 84256bfd685..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py @@ -1,2510 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattergl.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattergl.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattergl.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scattergl.mark - er.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - scattergl.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scattergl.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scattergl.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scattergl.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattergl.marke - r.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rgl.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scattergl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergl.marker.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattergl.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattergl.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattergl.marke - r.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rgl.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - scattergl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergl.marker.colorbar. - Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattergl.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattergl.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scattergl.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.scattergl.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py new file mode 100644 index 00000000000..040c7ab1e47 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py @@ -0,0 +1,1943 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.marker" + _path_str = "scattergl.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattergl.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scattergl.mark + er.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + scattergl.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scattergl.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scattergl.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scattergl.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattergl.marke + r.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rgl.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scattergl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergl.marker.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattergl.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattergl.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattergl.marke + r.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rgl.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + scattergl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergl.marker.colorbar. + Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattergl.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattergl.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/_line.py new file mode 100644 index 00000000000..90a6051174f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.marker" + _path_str = "scattergl.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattergl.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py index 541a871a3c9..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattergl.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergl.mark - er.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scattergl.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergl.mark - er.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scattergl.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergl.mark - er.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scattergl.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scattergl.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..264a3aae0b4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.marker.colorbar" + _path_str = "scattergl.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergl.mark + er.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..906e54799b6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.marker.colorbar" + _path_str = "scattergl.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergl.mark + er.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_title.py new file mode 100644 index 00000000000..ba9dec6f8c7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.marker.colorbar" + _path_str = "scattergl.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattergl.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergl.mark + er.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py index 3d0a8a88831..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergl.mark - er.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattergl.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..2106c84dde7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.marker.colorbar.title" + _path_str = "scattergl.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergl.mark + er.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py index 88c32f8d500..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattergl.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattergl.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergl/selected/_marker.py new file mode 100644 index 00000000000..bfa609ee9ee --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.selected" + _path_str = "scattergl.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattergl/selected/_textfont.py new file mode 100644 index 00000000000..16da6833364 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.selected" + _path_str = "scattergl.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py index 81ece2ac027..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattergl.unse - lected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattergl.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattergl.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattergl.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattergl.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattergl.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattergl.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/_marker.py new file mode 100644 index 00000000000..c26b8843e0e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.unselected" + _path_str = "scattergl.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattergl.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/_textfont.py new file mode 100644 index 00000000000..cff3b07df7b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattergl.unselected" + _path_str = "scattergl.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattergl.unse + lected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattergl.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattergl.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py index 93115b4b011..70cc13d3d61 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py @@ -1,2415 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scattermapbox.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattermapbox.unselected.M - arker` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattermapbox.Unselected` - marker - :class:`plotly.graph_objects.scattermapbox.unselected.M - arker` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scattermapbox.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=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.scattermapbox.Textfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scattermapbox.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["size"] = v_textfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattermapbox.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scattermapbox.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scattermapbox.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scattermapbox.selected.Mar - ker` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattermapbox.Selected` - marker - :class:`plotly.graph_objects.scattermapbox.selected.Mar - ker` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scattermapbox.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scattermapbox.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - mapbox.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattermapbox.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattermapbox.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermapbox.mark - er.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scattermapbox.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattermapbox.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scattermapbox.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol. Full list: https://www.mapbox.com/maki- - icons/ Note that the array `marker.color` and `marker.size` are - only available for "circle" symbols. - - The 'symbol' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattermapbox.marker.Color - Bar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that the array - `marker.color` and `marker.size` are only available for - "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattermapbox.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scattermapbox.marker.Color - Bar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that the array - `marker.color` and `marker.size` are only available for - "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattermapbox.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=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.scattermapbox.Line` - color - Sets the line color. - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scattermapbox.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scattermapbox.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scattermapbox.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scattermapbox.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scattermapbox import unselected -from plotly.graph_objs.scattermapbox import selected -from plotly.graph_objs.scattermapbox import marker -from plotly.graph_objs.scattermapbox import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_hoverlabel.py new file mode 100644 index 00000000000..f4f989976da --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scattermapbox.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattermapbox.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_line.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_line.py new file mode 100644 index 00000000000..eda64498827 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=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.scattermapbox.Line` + color + Sets the line color. + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_marker.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_marker.py new file mode 100644 index 00000000000..de5edc696f5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_marker.py @@ -0,0 +1,1175 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scattermapbox.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + mapbox.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattermapbox.marker.colorbar.tickformatstopd + efaults), sets the default property values to + use for elements of + scattermapbox.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattermapbox.mark + er.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scattermapbox.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattermapbox.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scattermapbox.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol. Full list: https://www.mapbox.com/maki- + icons/ Note that the array `marker.color` and `marker.size` are + only available for "circle" symbols. + + The 'symbol' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattermapbox.marker.Color + Bar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol. Full list: + https://www.mapbox.com/maki-icons/ Note that the array + `marker.color` and `marker.size` are only available for + "circle" symbols. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattermapbox.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scattermapbox.marker.Color + Bar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol. Full list: + https://www.mapbox.com/maki-icons/ Note that the array + `marker.color` and `marker.size` are only available for + "circle" symbols. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_selected.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_selected.py new file mode 100644 index 00000000000..2c47d66fd17 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_selected.py @@ -0,0 +1,110 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.selected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scattermapbox.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattermapbox.selected.Mar + ker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattermapbox.Selected` + marker + :class:`plotly.graph_objects.scattermapbox.selected.Mar + ker` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_stream.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_stream.py new file mode 100644 index 00000000000..50ba16adc42 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattermapbox.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_textfont.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_textfont.py new file mode 100644 index 00000000000..b7cfe9e931e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_textfont.py @@ -0,0 +1,228 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.textfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=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.scattermapbox.Textfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/_unselected.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/_unselected.py new file mode 100644 index 00000000000..9e515026e87 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/_unselected.py @@ -0,0 +1,113 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox" + _path_str = "scattermapbox.unselected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scattermapbox.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scattermapbox.unselected.M + arker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scattermapbox.Unselected` + marker + :class:`plotly.graph_objects.scattermapbox.unselected.M + arker` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py index ac02f8269d4..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattermapbox.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/_font.py new file mode 100644 index 00000000000..281e2da1ca5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.hoverlabel" + _path_str = "scattermapbox.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py index 663a167d8a0..48d0fee5e0d 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py @@ -1,1874 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scattermapbox. - marker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - scattermapbox.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scattermapbox.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scattermapbox.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scattermapbox.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattermapbox.m - arker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rmapbox.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scattermapbox.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermapbox.marker.color - bar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattermapbox.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scattermapbox.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scattermapbox.m - arker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rmapbox.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scattermapbox.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermapbox.marker.color - bar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scattermapbox.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scattermapbox.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scattermapbox.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "colorbar"] - -from plotly.graph_objs.scattermapbox.marker import colorbar + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py new file mode 100644 index 00000000000..40c2f9dbeff --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py @@ -0,0 +1,1945 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.marker" + _path_str = "scattermapbox.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scattermapbox. + marker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + scattermapbox.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scattermapbox.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scattermapbox.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scattermapbox.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattermapbox.m + arker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rmapbox.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scattermapbox.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattermapbox.marker.color + bar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattermapbox.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scattermapbox.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scattermapbox.m + arker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rmapbox.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scattermapbox.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattermapbox.marker.color + bar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scattermapbox.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scattermapbox.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py index a5daf11790a..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py @@ -1,726 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scattermapbox.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scattermapbox.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - marker.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scattermapbox.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - marker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scattermapbox.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.marker.colorbar import ( - tickfont as v_tickfont, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scattermapbox.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..0abd4c09016 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.marker.colorbar" + _path_str = "scattermapbox.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + marker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..867745e51d3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.marker.colorbar" + _path_str = "scattermapbox.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + marker.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py new file mode 100644 index 00000000000..83a497c931f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.marker.colorbar" + _path_str = "scattermapbox.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scattermapbox.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py index 4388485df16..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - marker.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scattermapbox.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..e7546b03e1a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.marker.colorbar.title" + _path_str = "scattermapbox.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + marker.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py index e10667bcbc6..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py @@ -1,196 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattermapbox.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/_marker.py new file mode 100644 index 00000000000..0ebb77d2ff6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.selected" + _path_str = "scattermapbox.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py index b1b5488f9f1..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py @@ -1,205 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scattermapbox.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scattermapbox. - unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scattermapbox.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scattermapbox.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scattermapbox.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/_marker.py new file mode 100644 index 00000000000..f5c2f75bfda --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scattermapbox.unselected" + _path_str = "scattermapbox.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scattermapbox. + unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scattermapbox.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scattermapbox.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py index 8c43793ae69..70cc13d3d61 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py @@ -1,2962 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatterpolar.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatterpolar.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatterpolar.unselected.Ma - rker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolar.unselected.Te - xtfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.Unselected` - marker - :class:`plotly.graph_objects.scatterpolar.unselected.Ma - rker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolar.unselected.Te - xtfont` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scatterpolar.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterpolar.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scatterpolar.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scatterpolar.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scatterpolar.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatterpolar.selected.Mark - er` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolar.selected.Text - font` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.Selected` - marker - :class:`plotly.graph_objects.scatterpolar.selected.Mark - er` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolar.selected.Text - font` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scatterpolar.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatterpolar.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polar.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolar.marker.colorbar.tickformatstopde - faults), sets the default property values to - use for elements of - scatterpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolar.marke - r.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scatterpolar.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatterpolar.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # gradient - # -------- - @property - def gradient(self): - """ - The 'gradient' property is an instance of Gradient - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.Gradient` - - A dict of string/value properties that will be passed - to the Gradient constructor - - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.Gradient - """ - return self["gradient"] - - @gradient.setter - def gradient(self, val): - self["gradient"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # maxdisplayed - # ------------ - @property - def maxdisplayed(self): - """ - Sets a maximum number of points to be drawn on the graph. 0 - corresponds to no limit. - - The 'maxdisplayed' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["maxdisplayed"] - - @maxdisplayed.setter - def maxdisplayed(self, val): - self["maxdisplayed"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatterpolar.marker.ColorB - ar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scatterpolar.marker.Gradie - nt` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scatterpolar.marker.Line` - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatterpolar.marker.ColorB - ar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scatterpolar.marker.Gradie - nt` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scatterpolar.marker.Line` - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterpolar.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["gradient"] = v_marker.GradientValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["maxdisplayed"] = v_marker.MaxdisplayedValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("gradient", None) - self["gradient"] = gradient if gradient is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("maxdisplayed", None) - self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # shape - # ----- - @property - def shape(self): - """ - Determines the line shape. With "spline" the lines are drawn - using spline interpolation. The other available values - correspond to step-wise line shapes. - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'spline'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Has an effect only if `shape` is set to "spline" Sets the - amount of smoothing. 0 corresponds to no smoothing (equivalent - to a "linear" shape). - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - """ - - def __init__( - self, - arg=None, - color=None, - dash=None, - shape=None, - smoothing=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.scatterpolar.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatterpolar.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatterpolar.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scatterpolar.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scatterpolar import unselected -from plotly.graph_objs.scatterpolar import selected -from plotly.graph_objs.scatterpolar import marker -from plotly.graph_objs.scatterpolar import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_hoverlabel.py new file mode 100644 index 00000000000..525c4ecac67 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatterpolar.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_line.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_line.py new file mode 100644 index 00000000000..1072766e959 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_line.py @@ -0,0 +1,283 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.line" + _valid_props = {"color", "dash", "shape", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # shape + # ----- + @property + def shape(self): + """ + Determines the line shape. With "spline" the lines are drawn + using spline interpolation. The other available values + correspond to step-wise line shapes. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'spline'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Has an effect only if `shape` is set to "spline" Sets the + amount of smoothing. 0 corresponds to no smoothing (equivalent + to a "linear" shape). + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + """ + + def __init__( + self, + arg=None, + color=None, + dash=None, + shape=None, + smoothing=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.scatterpolar.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py new file mode 100644 index 00000000000..d82606e079d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py @@ -0,0 +1,1444 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "gradient", + "line", + "maxdisplayed", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatterpolar.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + polar.marker.colorbar.Tickformatstop` instances + or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatterpolar.marker.colorbar.tickformatstopde + faults), sets the default property values to + use for elements of + scatterpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolar.marke + r.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scatterpolar.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatterpolar.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # gradient + # -------- + @property + def gradient(self): + """ + The 'gradient' property is an instance of Gradient + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.Gradient` + - A dict of string/value properties that will be passed + to the Gradient constructor + + Supported dict properties: + + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.Gradient + """ + return self["gradient"] + + @gradient.setter + def gradient(self, val): + self["gradient"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # maxdisplayed + # ------------ + @property + def maxdisplayed(self): + """ + Sets a maximum number of points to be drawn on the graph. 0 + corresponds to no limit. + + The 'maxdisplayed' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["maxdisplayed"] + + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatterpolar.marker.ColorB + ar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scatterpolar.marker.Gradie + nt` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scatterpolar.marker.Line` + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + gradient=None, + line=None, + maxdisplayed=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatterpolar.marker.ColorB + ar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scatterpolar.marker.Gradie + nt` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scatterpolar.marker.Line` + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("gradient", None) + _v = gradient if gradient is not None else _v + if _v is not None: + self["gradient"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("maxdisplayed", None) + _v = maxdisplayed if maxdisplayed is not None else _v + if _v is not None: + self["maxdisplayed"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_selected.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_selected.py new file mode 100644 index 00000000000..67e88740c07 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scatterpolar.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scatterpolar.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatterpolar.selected.Mark + er` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolar.selected.Text + font` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.Selected` + marker + :class:`plotly.graph_objects.scatterpolar.selected.Mark + er` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolar.selected.Text + font` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_stream.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_stream.py new file mode 100644 index 00000000000..573e4ce7512 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_textfont.py new file mode 100644 index 00000000000..7ef676c7d87 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_unselected.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_unselected.py new file mode 100644 index 00000000000..9de1f7ee542 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar" + _path_str = "scatterpolar.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatterpolar.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatterpolar.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatterpolar.unselected.Ma + rker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolar.unselected.Te + xtfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.Unselected` + marker + :class:`plotly.graph_objects.scatterpolar.unselected.Ma + rker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolar.unselected.Te + xtfont` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py index eb2802b6c2d..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatterpolar.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/_font.py new file mode 100644 index 00000000000..75740c601c6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.hoverlabel" + _path_str = "scatterpolar.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py index c9a6d2049c0..6c5711d6c09 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py @@ -1,2748 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatterpolar.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatterpolar.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Gradient(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the final color of the gradient fill: the center color for - radial, the right for horizontal, or the bottom for vertical. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the type of gradient used to fill the markers - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radial', 'horizontal', 'vertical', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # typesrc - # ------- - @property - def typesrc(self): - """ - Sets the source reference on Chart Studio Cloud for type . - - The 'typesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["typesrc"] - - @typesrc.setter - def typesrc(self, val): - self["typesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs - ): - """ - Construct a new Gradient object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.marker.Gradient` - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - - Returns - ------- - Gradient - """ - super(Gradient, self).__init__("gradient") - - # Validate arg - # ------------ - 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.scatterpolar.marker.Gradient -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.Gradient`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker import gradient as v_gradient - - # Initialize validators - # --------------------- - self._validators["color"] = v_gradient.ColorValidator() - self._validators["colorsrc"] = v_gradient.ColorsrcValidator() - self._validators["type"] = v_gradient.TypeValidator() - self._validators["typesrc"] = v_gradient.TypesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("typesrc", None) - self["typesrc"] = typesrc if typesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scatterpolar.m - arker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - scatterpolar.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use scatterpolar.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use scatterpolar.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatterpolar.ma - rker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rpolar.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scatterpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolar.marker.colorb - ar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatterpolar.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scatterpolar.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatterpolar.ma - rker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rpolar.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scatterpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolar.marker.colorb - ar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatterpolar.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scatterpolar.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scatterpolar.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] - -from plotly.graph_objs.scatterpolar.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._gradient import Gradient + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._line.Line", "._gradient.Gradient", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py new file mode 100644 index 00000000000..05cb2334280 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py @@ -0,0 +1,1945 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker" + _path_str = "scatterpolar.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scatterpolar.m + arker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + scatterpolar.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use scatterpolar.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use scatterpolar.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatterpolar.ma + rker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rpolar.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scatterpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolar.marker.colorb + ar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatterpolar.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scatterpolar.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatterpolar.ma + rker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rpolar.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scatterpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolar.marker.colorb + ar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatterpolar.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scatterpolar.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_gradient.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_gradient.py new file mode 100644 index 00000000000..a4c55884378 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_gradient.py @@ -0,0 +1,235 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Gradient(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker" + _path_str = "scatterpolar.marker.gradient" + _valid_props = {"color", "colorsrc", "type", "typesrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the final color of the gradient fill: the center color for + radial, the right for horizontal, or the bottom for vertical. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the type of gradient used to fill the markers + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radial', 'horizontal', 'vertical', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # typesrc + # ------- + @property + def typesrc(self): + """ + Sets the source reference on Chart Studio Cloud for type . + + The 'typesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["typesrc"] + + @typesrc.setter + def typesrc(self, val): + self["typesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + ): + """ + Construct a new Gradient object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.marker.Gradient` + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + + Returns + ------- + Gradient + """ + super(Gradient, self).__init__("gradient") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.Gradient +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.Gradient`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("typesrc", None) + _v = typesrc if typesrc is not None else _v + if _v is not None: + self["typesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_line.py new file mode 100644 index 00000000000..f12d4c21230 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker" + _path_str = "scatterpolar.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatterpolar.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py index d6f53546596..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py @@ -1,726 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatterpolar.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.m - arker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scatterpolar.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.m - arker.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scatterpolar.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.m - arker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scatterpolar.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker.colorbar import ( - tickfont as v_tickfont, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scatterpolar.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..bb4c40fada2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker.colorbar" + _path_str = "scatterpolar.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.m + arker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..47a82c384ff --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker.colorbar" + _path_str = "scatterpolar.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.m + arker.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py new file mode 100644 index 00000000000..9e4e94f0bf6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker.colorbar" + _path_str = "scatterpolar.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatterpolar.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.m + arker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py index ab5c44e5453..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.m - arker.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatterpolar.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..45975b85298 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.marker.colorbar.title" + _path_str = "scatterpolar.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.m + arker.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py index c7318d84a16..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.s - elected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterpolar.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolar.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterpolar.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/_marker.py new file mode 100644 index 00000000000..008a6a4b3ea --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.selected" + _path_str = "scatterpolar.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolar.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/_textfont.py new file mode 100644 index 00000000000..832f2663969 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.selected" + _path_str = "scatterpolar.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.s + elected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py index 67b17c7513c..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.u - nselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterpolar.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolar.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolar.u - nselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterpolar.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolar.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolar.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/_marker.py new file mode 100644 index 00000000000..40bd6c952ab --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.unselected" + _path_str = "scatterpolar.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.u + nselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/_textfont.py new file mode 100644 index 00000000000..4728cf042de --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolar.unselected" + _path_str = "scatterpolar.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolar.u + nselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolar.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolar.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py index 559f48004d0..70cc13d3d61 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py @@ -1,2831 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatterpolargl.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatterpolargl.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatterpolargl.unselected. - Marker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.unselected. - Textfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.Unselected` - marker - :class:`plotly.graph_objects.scatterpolargl.unselected. - Marker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.unselected. - Textfont` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scatterpolargl.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterpolargl.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scatterpolargl.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scatterpolargl.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scatterpolargl.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatterpolargl.selected.Ma - rker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.selected.Te - xtfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.Selected` - marker - :class:`plotly.graph_objects.scatterpolargl.selected.Ma - rker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.selected.Te - xtfont` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scatterpolargl.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatterpolargl.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polargl.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolargl.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterpolargl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolargl.mar - ker.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scatterpolargl.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatterpolargl.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scatterpolargl.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scatterpolargl.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatterpolargl.marker.Colo - rBar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.scatterpolargl.marker.Line - ` instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatterpolargl.marker.Colo - rBar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.scatterpolargl.marker.Line - ` instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterpolargl.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the style of the lines. - - The 'dash' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - Returns - ------- - Any - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # shape - # ----- - @property - def shape(self): - """ - Determines the line shape. The values correspond to step-wise - line shapes. - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'hv', 'vh', 'hvh', 'vhv'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values correspond to - step-wise line shapes. - width - Sets the line width (in px). - """ - - def __init__( - self, arg=None, color=None, dash=None, shape=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.scatterpolargl.Line` - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values correspond to - step-wise line shapes. - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatterpolargl.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatterpolargl.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scatterpolargl.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scatterpolargl import unselected -from plotly.graph_objs.scatterpolargl import selected -from plotly.graph_objs.scatterpolargl import marker -from plotly.graph_objs.scatterpolargl import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_hoverlabel.py new file mode 100644 index 00000000000..df02614b7ce --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatterpolargl.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_line.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_line.py new file mode 100644 index 00000000000..35cac7f03ad --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_line.py @@ -0,0 +1,229 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.line" + _valid_props = {"color", "dash", "shape", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the style of the lines. + + The 'dash' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + + Returns + ------- + Any + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # shape + # ----- + @property + def shape(self): + """ + Determines the line shape. The values correspond to step-wise + line shapes. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'hv', 'vh', 'hvh', 'vhv'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values correspond to + step-wise line shapes. + width + Sets the line width (in px). + """ + + def __init__( + self, arg=None, color=None, dash=None, shape=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.scatterpolargl.Line` + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values correspond to + step-wise line shapes. + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py new file mode 100644 index 00000000000..4740989ae79 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py @@ -0,0 +1,1362 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatterpolargl.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + polargl.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatterpolargl.marker.colorbar.tickformatstop + defaults), sets the default property values to + use for elements of + scatterpolargl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolargl.mar + ker.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scatterpolargl.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatterpolargl.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scatterpolargl.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scatterpolargl.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatterpolargl.marker.Colo + rBar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.scatterpolargl.marker.Line + ` instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatterpolargl.marker.Colo + rBar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.scatterpolargl.marker.Line + ` instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_selected.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_selected.py new file mode 100644 index 00000000000..e9dc6cb9149 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scatterpolargl.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scatterpolargl.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatterpolargl.selected.Ma + rker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolargl.selected.Te + xtfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.Selected` + marker + :class:`plotly.graph_objects.scatterpolargl.selected.Ma + rker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolargl.selected.Te + xtfont` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_stream.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_stream.py new file mode 100644 index 00000000000..23f0b4f2184 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_textfont.py new file mode 100644 index 00000000000..5a296ad0814 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_unselected.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_unselected.py new file mode 100644 index 00000000000..e4d9809a8d0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl" + _path_str = "scatterpolargl.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatterpolargl.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatterpolargl.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatterpolargl.unselected. + Marker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolargl.unselected. + Textfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.Unselected` + marker + :class:`plotly.graph_objects.scatterpolargl.unselected. + Marker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterpolargl.unselected. + Textfont` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py index 510db3444f4..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatterpolargl.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py new file mode 100644 index 00000000000..c9da3e7b6e3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.hoverlabel" + _path_str = "scatterpolargl.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py index c1cf415eff0..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py @@ -1,2513 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatterpolargl.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterpolargl.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatterpolargl.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scatterpolargl - .marker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - scatterpolargl.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scatterpolargl.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use - scatterpolargl.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used to be - set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use - scatterpolargl.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the color - bar. Note that the title's location used to be set by the now - deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatterpolargl. - marker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rpolargl.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scatterpolargl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolargl.marker.colo - rbar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatterpolargl.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scatterpolargl.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatterpolargl. - marker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rpolargl.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scatterpolargl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolargl.marker.colo - rbar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatterpolargl.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scatterpolargl.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scatterpolargl.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.scatterpolargl.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py new file mode 100644 index 00000000000..7a5b103fa78 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py @@ -0,0 +1,1946 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.marker" + _path_str = "scatterpolargl.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scatterpolargl + .marker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + scatterpolargl.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scatterpolargl.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use + scatterpolargl.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used to be + set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use + scatterpolargl.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the color + bar. Note that the title's location used to be set by the now + deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatterpolargl. + marker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rpolargl.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scatterpolargl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolargl.marker.colo + rbar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatterpolargl.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scatterpolargl.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatterpolargl. + marker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rpolargl.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scatterpolargl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolargl.marker.colo + rbar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatterpolargl.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scatterpolargl.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_line.py new file mode 100644 index 00000000000..0922add40c7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.marker" + _path_str = "scatterpolargl.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatterpolargl.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterpolargl.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py index 2118cf63ca5..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py @@ -1,726 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scatterpolargl.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .marker.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scatterpolargl.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .marker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scatterpolargl.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.marker.colorbar import ( - tickfont as v_tickfont, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scatterpolargl.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..61595b553c0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.marker.colorbar" + _path_str = "scatterpolargl.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .marker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..bf390bd5594 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.marker.colorbar" + _path_str = "scatterpolargl.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .marker.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py new file mode 100644 index 00000000000..ce5fa57d4ea --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.marker.colorbar" + _path_str = "scatterpolargl.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py index 69dc2913076..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py @@ -1,232 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .marker.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatterpolargl.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.marker.colorbar.title import ( - font as v_font, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..4dc2d2ea98a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.marker.colorbar.title" + _path_str = "scatterpolargl.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .marker.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py index 1e774cac3ba..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterpolargl.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterpolargl.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/_marker.py new file mode 100644 index 00000000000..482f00ebb08 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.selected" + _path_str = "scatterpolargl.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/_textfont.py new file mode 100644 index 00000000000..b59c0d33d2f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.selected" + _path_str = "scatterpolargl.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py index fd7cd672cb2..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .unselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterpolargl.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterpolargl.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterpolargl - .unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterpolargl.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterpolargl.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/_marker.py new file mode 100644 index 00000000000..385285586ed --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.unselected" + _path_str = "scatterpolargl.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/_textfont.py new file mode 100644 index 00000000000..de714351065 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterpolargl.unselected" + _path_str = "scatterpolargl.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterpolargl + .unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterpolargl.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py index e1c0235b808..70cc13d3d61 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py @@ -1,2962 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatterternary.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.unselected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.scatterternary.unselected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatterternary.unselected. - Marker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.unselected. - Textfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.Unselected` - marker - :class:`plotly.graph_objects.scatterternary.unselected. - Marker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.unselected. - Textfont` instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.scatterternary.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - self._validators["textfont"] = v_unselected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the text font. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterternary.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.scatterternary.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.scatterternary.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.selected.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - Sets the text font color of selected points. - - Returns - ------- - plotly.graph_objs.scatterternary.selected.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.scatterternary.selected.Ma - rker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.selected.Te - xtfont` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.Selected` - marker - :class:`plotly.graph_objects.scatterternary.selected.Ma - rker` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.selected.Te - xtfont` instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.scatterternary.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - self._validators["textfont"] = v_selected.TextfontValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatterternary.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - ternary.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterternary.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterternary.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterternary.mar - ker.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scatterternary.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatterternary.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.scatterternary.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # gradient - # -------- - @property - def gradient(self): - """ - The 'gradient' property is an instance of Gradient - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient` - - A dict of string/value properties that will be passed - to the Gradient constructor - - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . - - Returns - ------- - plotly.graph_objs.scatterternary.marker.Gradient - """ - return self["gradient"] - - @gradient.setter - def gradient(self, val): - self["gradient"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.scatterternary.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # maxdisplayed - # ------------ - @property - def maxdisplayed(self): - """ - Sets a maximum number of points to be drawn on the graph. 0 - corresponds to no limit. - - The 'maxdisplayed' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["maxdisplayed"] - - @maxdisplayed.setter - def maxdisplayed(self, val): - self["maxdisplayed"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatterternary.marker.Colo - rBar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scatterternary.marker.Grad - ient` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scatterternary.marker.Line - ` instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.scatterternary.marker.Colo - rBar` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - gradient - :class:`plotly.graph_objects.scatterternary.marker.Grad - ient` instance or dict with compatible properties - line - :class:`plotly.graph_objects.scatterternary.marker.Line - ` instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on the - graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterternary.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["gradient"] = v_marker.GradientValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["maxdisplayed"] = v_marker.MaxdisplayedValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("gradient", None) - self["gradient"] = gradient if gradient is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("maxdisplayed", None) - self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is an enumeration that may be specified as: - - One of the following dash styles: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - - A string containing a dash length list in pixels or percentages - (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # shape - # ----- - @property - def shape(self): - """ - Determines the line shape. With "spline" the lines are drawn - using spline interpolation. The other available values - correspond to step-wise line shapes. - - The 'shape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'spline'] - - Returns - ------- - Any - """ - return self["shape"] - - @shape.setter - def shape(self, val): - self["shape"] = val - - # smoothing - # --------- - @property - def smoothing(self): - """ - Has an effect only if `shape` is set to "spline" Sets the - amount of smoothing. 0 corresponds to no smoothing (equivalent - to a "linear" shape). - - The 'smoothing' property is a number and may be specified as: - - An int or float in the interval [0, 1.3] - - Returns - ------- - int|float - """ - return self["smoothing"] - - @smoothing.setter - def smoothing(self, val): - self["smoothing"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - """ - - def __init__( - self, - arg=None, - color=None, - dash=None, - shape=None, - smoothing=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.scatterternary.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatterternary.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["shape"] = v_line.ShapeValidator() - self._validators["smoothing"] = v_line.SmoothingValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("shape", None) - self["shape"] = shape if shape is not None else _v - _v = arg.pop("smoothing", None) - self["smoothing"] = smoothing if smoothing is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.scatterternary.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.scatterternary.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Hoverlabel", - "Line", - "Marker", - "Selected", - "Stream", - "Textfont", - "Unselected", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.scatterternary import unselected -from plotly.graph_objs.scatterternary import selected -from plotly.graph_objs.scatterternary import marker -from plotly.graph_objs.scatterternary import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._textfont import Textfont + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from . import unselected + from . import selected + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel"], + [ + "._unselected.Unselected", + "._textfont.Textfont", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_hoverlabel.py new file mode 100644 index 00000000000..792b7e98c3e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.scatterternary.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_line.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_line.py new file mode 100644 index 00000000000..abb1248bb7c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_line.py @@ -0,0 +1,283 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.line" + _valid_props = {"color", "dash", "shape", "smoothing", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # shape + # ----- + @property + def shape(self): + """ + Determines the line shape. With "spline" the lines are drawn + using spline interpolation. The other available values + correspond to step-wise line shapes. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'spline'] + + Returns + ------- + Any + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + # smoothing + # --------- + @property + def smoothing(self): + """ + Has an effect only if `shape` is set to "spline" Sets the + amount of smoothing. 0 corresponds to no smoothing (equivalent + to a "linear" shape). + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + """ + + def __init__( + self, + arg=None, + color=None, + dash=None, + shape=None, + smoothing=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.scatterternary.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the lines are + drawn using spline interpolation. The other available + values correspond to step-wise line shapes. + smoothing + Has an effect only if `shape` is set to "spline" Sets + the amount of smoothing. 0 corresponds to no smoothing + (equivalent to a "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("shape", None) + _v = shape if shape is not None else _v + if _v is not None: + self["shape"] = _v + _v = arg.pop("smoothing", None) + _v = smoothing if smoothing is not None else _v + if _v is not None: + self["smoothing"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py new file mode 100644 index 00000000000..90c1f461807 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py @@ -0,0 +1,1444 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "gradient", + "line", + "maxdisplayed", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatterternary.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + ternary.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatterternary.marker.colorbar.tickformatstop + defaults), sets the default property values to + use for elements of + scatterternary.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterternary.mar + ker.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scatterternary.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatterternary.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.scatterternary.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # gradient + # -------- + @property + def gradient(self): + """ + The 'gradient' property is an instance of Gradient + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient` + - A dict of string/value properties that will be passed + to the Gradient constructor + + Supported dict properties: + + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . + + Returns + ------- + plotly.graph_objs.scatterternary.marker.Gradient + """ + return self["gradient"] + + @gradient.setter + def gradient(self, val): + self["gradient"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.scatterternary.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # maxdisplayed + # ------------ + @property + def maxdisplayed(self): + """ + Sets a maximum number of points to be drawn on the graph. 0 + corresponds to no limit. + + The 'maxdisplayed' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["maxdisplayed"] + + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatterternary.marker.Colo + rBar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scatterternary.marker.Grad + ient` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scatterternary.marker.Line + ` instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + gradient=None, + line=None, + maxdisplayed=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.scatterternary.marker.Colo + rBar` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + gradient + :class:`plotly.graph_objects.scatterternary.marker.Grad + ient` instance or dict with compatible properties + line + :class:`plotly.graph_objects.scatterternary.marker.Line + ` instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on the + graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("gradient", None) + _v = gradient if gradient is not None else _v + if _v is not None: + self["gradient"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("maxdisplayed", None) + _v = maxdisplayed if maxdisplayed is not None else _v + if _v is not None: + self["maxdisplayed"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_selected.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_selected.py new file mode 100644 index 00000000000..0fb84a30430 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_selected.py @@ -0,0 +1,146 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.selected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.scatterternary.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of selected points. + + Returns + ------- + plotly.graph_objs.scatterternary.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatterternary.selected.Ma + rker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterternary.selected.Te + xtfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.Selected` + marker + :class:`plotly.graph_objects.scatterternary.selected.Ma + rker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterternary.selected.Te + xtfont` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_stream.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_stream.py new file mode 100644 index 00000000000..32864046c52 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_textfont.py new file mode 100644 index 00000000000..de98218616c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_unselected.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_unselected.py new file mode 100644 index 00000000000..ecabb6599f7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_unselected.py @@ -0,0 +1,150 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary" + _path_str = "scatterternary.unselected" + _valid_props = {"marker", "textfont"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatterternary.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + Sets the text font color of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.scatterternary.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.scatterternary.unselected. + Marker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterternary.unselected. + Textfont` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.Unselected` + marker + :class:`plotly.graph_objects.scatterternary.unselected. + Marker` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.scatterternary.unselected. + Textfont` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py index 9225aadd0b0..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatterternary.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/_font.py new file mode 100644 index 00000000000..4274bd40ba2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.hoverlabel" + _path_str = "scatterternary.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py index 2a1ebc0fff1..6c5711d6c09 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py @@ -1,2749 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to scatterternary.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.scatterternary.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.scatterternary.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Gradient(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the final color of the gradient fill: the center color for - radial, the right for horizontal, or the bottom for vertical. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the type of gradient used to fill the markers - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radial', 'horizontal', 'vertical', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # typesrc - # ------- - @property - def typesrc(self): - """ - Sets the source reference on Chart Studio Cloud for type . - - The 'typesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["typesrc"] - - @typesrc.setter - def typesrc(self, val): - self["typesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs - ): - """ - Construct a new Gradient object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .marker.Gradient` - color - Sets the final color of the gradient fill: the center - color for radial, the right for horizontal, or the - bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - type - Sets the type of gradient used to fill the markers - typesrc - Sets the source reference on Chart Studio Cloud for - type . - - Returns - ------- - Gradient - """ - super(Gradient, self).__init__("gradient") - - # Validate arg - # ------------ - 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.scatterternary.marker.Gradient -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker import gradient as v_gradient - - # Initialize validators - # --------------------- - self._validators["color"] = v_gradient.ColorValidator() - self._validators["colorsrc"] = v_gradient.ColorsrcValidator() - self._validators["type"] = v_gradient.TypeValidator() - self._validators["typesrc"] = v_gradient.TypesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - _v = arg.pop("typesrc", None) - self["typesrc"] = typesrc if typesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatterternary.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.scatterternary - .marker.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - scatterternary.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.scatterternary.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use - scatterternary.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used to be - set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use - scatterternary.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the color - bar. Note that the title's location used to be set by the now - deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatterternary. - marker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rternary.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scatterternary.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterternary.marker.colo - rbar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatterternary.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scatterternary.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatterternary. - marker.colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.scatte - rternary.marker.colorbar.tickformatstopdefaults), sets - the default property values to use for elements of - scatterternary.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterternary.marker.colo - rbar.Title` instance or dict with compatible properties - titlefont - Deprecated: Please use - scatterternary.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` - attribute. - titleside - Deprecated: Please use - scatterternary.marker.colorbar.title.side instead. - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.scatterternary.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] - -from plotly.graph_objs.scatterternary.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._gradient import Gradient + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._line.Line", "._gradient.Gradient", "._colorbar.ColorBar"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py new file mode 100644 index 00000000000..cf2328f8d8b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py @@ -0,0 +1,1946 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker" + _path_str = "scatterternary.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatterternary.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.scatterternary + .marker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + scatterternary.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.scatterternary.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use + scatterternary.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used to be + set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use + scatterternary.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the color + bar. Note that the title's location used to be set by the now + deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatterternary. + marker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rternary.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scatterternary.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterternary.marker.colo + rbar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatterternary.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scatterternary.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatterternary. + marker.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.scatte + rternary.marker.colorbar.tickformatstopdefaults), sets + the default property values to use for elements of + scatterternary.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterternary.marker.colo + rbar.Title` instance or dict with compatible properties + titlefont + Deprecated: Please use + scatterternary.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` + attribute. + titleside + Deprecated: Please use + scatterternary.marker.colorbar.title.side instead. + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_gradient.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_gradient.py new file mode 100644 index 00000000000..1784ca458a0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_gradient.py @@ -0,0 +1,235 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Gradient(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker" + _path_str = "scatterternary.marker.gradient" + _valid_props = {"color", "colorsrc", "type", "typesrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the final color of the gradient fill: the center color for + radial, the right for horizontal, or the bottom for vertical. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the type of gradient used to fill the markers + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radial', 'horizontal', 'vertical', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # typesrc + # ------- + @property + def typesrc(self): + """ + Sets the source reference on Chart Studio Cloud for type . + + The 'typesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["typesrc"] + + @typesrc.setter + def typesrc(self, val): + self["typesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + ): + """ + Construct a new Gradient object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .marker.Gradient` + color + Sets the final color of the gradient fill: the center + color for radial, the right for horizontal, or the + bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + type + Sets the type of gradient used to fill the markers + typesrc + Sets the source reference on Chart Studio Cloud for + type . + + Returns + ------- + Gradient + """ + super(Gradient, self).__init__("gradient") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.Gradient +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + _v = arg.pop("typesrc", None) + _v = typesrc if typesrc is not None else _v + if _v is not None: + self["typesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_line.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_line.py new file mode 100644 index 00000000000..e40672d22c6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker" + _path_str = "scatterternary.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to scatterternary.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.scatterternary.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py index 508893f95f9..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py @@ -1,726 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.scatterternary.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.scatterternary.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .marker.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.scatterternary.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .marker.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.scatterternary.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker.colorbar import ( - tickfont as v_tickfont, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.scatterternary.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..48b3505cd77 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker.colorbar" + _path_str = "scatterternary.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .marker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..b60629137d9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker.colorbar" + _path_str = "scatterternary.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .marker.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_title.py new file mode 100644 index 00000000000..f0dea443848 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker.colorbar" + _path_str = "scatterternary.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.scatterternary.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py index 291b00284ac..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py @@ -1,232 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .marker.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.scatterternary.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.marker.colorbar.title import ( - font as v_font, - ) - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..2c9bdb3e412 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.marker.colorbar.title" + _path_str = "scatterternary.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .marker.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py index a594966057a..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py @@ -1,337 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of selected points. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .selected.Textfont` - color - Sets the text font color of selected points. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterternary.selected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.selected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.selected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterternary.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/_marker.py new file mode 100644 index 00000000000..25cdd97bf97 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.selected" + _path_str = "scatterternary.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/selected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/_textfont.py new file mode 100644 index 00000000000..c47cab5aa5c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/_textfont.py @@ -0,0 +1,137 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.selected" + _path_str = "scatterternary.selected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.selected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py index 6457e1ca2d9..f34bc485acb 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py @@ -1,349 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the text font color of unselected points, applied only - when a selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the text font color of unselected points, applied - only when a selection exists. - """ - - def __init__(self, arg=None, color=None, **kwargs): - """ - Construct a new Textfont object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .unselected.Textfont` - color - Sets the text font color of unselected points, applied - only when a selection exists. - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.scatterternary.unselected.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.unselected.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.unselected import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "scatterternary.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.scatterternary - .unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.scatterternary.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.scatterternary.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.scatterternary.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont", "._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_marker.py new file mode 100644 index 00000000000..6ffa0cd3244 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.unselected" + _path_str = "scatterternary.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_textfont.py b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_textfont.py new file mode 100644 index 00000000000..d778de1eb31 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/_textfont.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "scatterternary.unselected" + _path_str = "scatterternary.unselected.textfont" + _valid_props = {"color"} + + # color + # ----- + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.scatterternary + .unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.scatterternary.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.scatterternary.unselected.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/__init__.py index 5550dd57508..076bc061c71 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/__init__.py @@ -1,2657 +1,31 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.splom.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.splom.unselected.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.Unselected` - marker - :class:`plotly.graph_objects.splom.unselected.Marker` - instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.splom.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.splom.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.splom.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.splom.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.splom.selected.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.Selected` - marker - :class:`plotly.graph_objects.splom.selected.Marker` - instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.splom.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in `marker.color`is - set to a numerical array. In case `colorscale` is unspecified - or `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` array are - all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.color`) or the - bounds set in `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical array. Defaults - to `false` when `marker.cmin` and `marker.cmax` are set by the - user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmin` - must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color`. Has no - effect when `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.color`is set to a numerical array. Value should have - the same units as in `marker.color` and if set, `marker.cmax` - must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to splom.marker.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.splom.m - arker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.splom.marker.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - splom.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.splom.marker.color - bar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - splom.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - splom.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.splom.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in `marker.color`is - set to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At minimum, a mapping for - the lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To - control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` - may be a palette name string of the following list: Greys,YlGnB - u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland - ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.splom.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # opacitysrc - # ---------- - @property - def opacitysrc(self): - """ - Sets the source reference on Chart Studio Cloud for opacity . - - The 'opacitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["opacitysrc"] - - @opacitysrc.setter - def opacitysrc(self, val): - self["opacitysrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.color`is set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the array - and `marker.cmax` will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if in `marker.color`is set to a - numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizemin - # ------- - @property - def sizemin(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the minimum size (in px) of the rendered marker - points. - - The 'sizemin' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizemin"] - - @sizemin.setter - def sizemin(self, val): - self["sizemin"] = val - - # sizemode - # -------- - @property - def sizemode(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the rule for which the data in `size` is converted - to pixels. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['diameter', 'area'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Has an effect only if `marker.size` is set to a numerical - array. Sets the scale factor used to determine the rendered - size of marker points. Use with `sizemin` and `sizemode`. - - The 'sizeref' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # symbolsrc - # --------- - @property - def symbolsrc(self): - """ - Sets the source reference on Chart Studio Cloud for symbol . - - The 'symbolsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["symbolsrc"] - - @symbolsrc.setter - def symbolsrc(self, val): - self["symbolsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.splom.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.splom.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.splom.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if in - `marker.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in `marker.color`) - or the bounds set in `marker.cmin` and `marker.cmax` - Has an effect only if in `marker.color`is set to a - numerical array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if in `marker.color`is - set to a numerical array. Value should have the same - units as in `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.color`is set to a numerical array. - Value should have the same units as in `marker.color` - and if set, `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.splom.marker.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.cmin` and `marker.cmax`. Alternatively, - `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu - ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - line - :class:`plotly.graph_objects.splom.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud for - opacity . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.color`is set to a numerical array. If - true, `marker.cmin` will correspond to the last color - in the array and `marker.cmax` will correspond to the - first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if in `marker.color`is - set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) of the - rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the data in - `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. Use with - `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud for - symbol . - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.splom.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["color"] = v_marker.ColorValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorsrc"] = v_marker.ColorsrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["opacitysrc"] = v_marker.OpacitysrcValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["sizemin"] = v_marker.SizeminValidator() - self._validators["sizemode"] = v_marker.SizemodeValidator() - self._validators["sizeref"] = v_marker.SizerefValidator() - self._validators["sizesrc"] = v_marker.SizesrcValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - self._validators["symbolsrc"] = v_marker.SymbolsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacitysrc", None) - self["opacitysrc"] = opacitysrc if opacitysrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizemin", None) - self["sizemin"] = sizemin if sizemin is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - _v = arg.pop("symbolsrc", None) - self["symbolsrc"] = symbolsrc if symbolsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.splom.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.splom.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Dimension(_BaseTraceHierarchyType): - - # axis - # ---- - @property - def axis(self): - """ - The 'axis' property is an instance of Axis - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.dimension.Axis` - - A dict of string/value properties that will be passed - to the Axis constructor - - Supported dict properties: - - matches - Determines whether or not the x & y axes - generated by this dimension match. Equivalent - to setting the `matches` axis attribute in the - layout with the correct axis id. - type - Sets the axis type for this dimension's - generated x and y axes. Note that the axis - `type` values set in layout take precedence - over this attribute. - - Returns - ------- - plotly.graph_objs.splom.dimension.Axis - """ - return self["axis"] - - @axis.setter - def axis(self, val): - self["axis"] = val - - # label - # ----- - @property - def label(self): - """ - Sets the label corresponding to this splom dimension. - - The 'label' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["label"] - - @label.setter - def label(self, val): - self["label"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # values - # ------ - @property - def values(self): - """ - Sets the dimension values to be plotted. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this dimension is shown on the graph. - Note that even visible false dimension contribute to the - default grid generate by this splom trace. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - axis - :class:`plotly.graph_objects.splom.dimension.Axis` - instance or dict with compatible properties - label - Sets the label corresponding to this splom dimension. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this dimension is shown on - the graph. Note that even visible false dimension - contribute to the default grid generate by this splom - trace. - """ - - def __init__( - self, - arg=None, - axis=None, - label=None, - name=None, - templateitemname=None, - values=None, - valuessrc=None, - visible=None, - **kwargs - ): - """ - Construct a new Dimension object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.Dimension` - axis - :class:`plotly.graph_objects.splom.dimension.Axis` - instance or dict with compatible properties - label - Sets the label corresponding to this splom dimension. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - visible - Determines whether or not this dimension is shown on - the graph. Note that even visible false dimension - contribute to the default grid generate by this splom - trace. - - Returns - ------- - Dimension - """ - super(Dimension, self).__init__("dimensions") - - # Validate arg - # ------------ - 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.splom.Dimension -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Dimension`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import dimension as v_dimension - - # Initialize validators - # --------------------- - self._validators["axis"] = v_dimension.AxisValidator() - self._validators["label"] = v_dimension.LabelValidator() - self._validators["name"] = v_dimension.NameValidator() - self._validators["templateitemname"] = v_dimension.TemplateitemnameValidator() - self._validators["values"] = v_dimension.ValuesValidator() - self._validators["valuessrc"] = v_dimension.ValuessrcValidator() - self._validators["visible"] = v_dimension.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("axis", None) - self["axis"] = axis if axis is not None else _v - _v = arg.pop("label", None) - self["label"] = label if label is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Diagonal(_BaseTraceHierarchyType): - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not subplots on the diagonal are - displayed. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - visible - Determines whether or not subplots on the diagonal are - displayed. - """ - - def __init__(self, arg=None, visible=None, **kwargs): - """ - Construct a new Diagonal object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.Diagonal` - visible - Determines whether or not subplots on the diagonal are - displayed. - - Returns - ------- - Diagonal - """ - super(Diagonal, self).__init__("diagonal") - - # Validate arg - # ------------ - 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.splom.Diagonal -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.Diagonal`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom import diagonal as v_diagonal - - # Initialize validators - # --------------------- - self._validators["visible"] = v_diagonal.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Diagonal", - "Dimension", - "Dimension", - "Hoverlabel", - "Marker", - "Selected", - "Stream", - "Unselected", - "dimension", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.splom import unselected -from plotly.graph_objs.splom import selected -from plotly.graph_objs.splom import marker -from plotly.graph_objs.splom import hoverlabel -from plotly.graph_objs.splom import dimension +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._marker import Marker + from ._hoverlabel import Hoverlabel + from ._dimension import Dimension + from ._diagonal import Diagonal + from . import unselected + from . import selected + from . import marker + from . import hoverlabel + from . import dimension +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel", ".dimension"], + [ + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._marker.Marker", + "._hoverlabel.Hoverlabel", + "._dimension.Dimension", + "._diagonal.Diagonal", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/splom/_diagonal.py b/packages/python/plotly/plotly/graph_objs/splom/_diagonal.py new file mode 100644 index 00000000000..1590f789453 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_diagonal.py @@ -0,0 +1,101 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Diagonal(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.diagonal" + _valid_props = {"visible"} + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not subplots on the diagonal are + displayed. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + visible + Determines whether or not subplots on the diagonal are + displayed. + """ + + def __init__(self, arg=None, visible=None, **kwargs): + """ + Construct a new Diagonal object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.Diagonal` + visible + Determines whether or not subplots on the diagonal are + displayed. + + Returns + ------- + Diagonal + """ + super(Diagonal, self).__init__("diagonal") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Diagonal +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Diagonal`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/_dimension.py b/packages/python/plotly/plotly/graph_objs/splom/_dimension.py new file mode 100644 index 00000000000..aca99e28408 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_dimension.py @@ -0,0 +1,357 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Dimension(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.dimension" + _valid_props = { + "axis", + "label", + "name", + "templateitemname", + "values", + "valuessrc", + "visible", + } + + # axis + # ---- + @property + def axis(self): + """ + The 'axis' property is an instance of Axis + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.dimension.Axis` + - A dict of string/value properties that will be passed + to the Axis constructor + + Supported dict properties: + + matches + Determines whether or not the x & y axes + generated by this dimension match. Equivalent + to setting the `matches` axis attribute in the + layout with the correct axis id. + type + Sets the axis type for this dimension's + generated x and y axes. Note that the axis + `type` values set in layout take precedence + over this attribute. + + Returns + ------- + plotly.graph_objs.splom.dimension.Axis + """ + return self["axis"] + + @axis.setter + def axis(self, val): + self["axis"] = val + + # label + # ----- + @property + def label(self): + """ + Sets the label corresponding to this splom dimension. + + The 'label' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["label"] + + @label.setter + def label(self, val): + self["label"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # values + # ------ + @property + def values(self): + """ + Sets the dimension values to be plotted. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this dimension is shown on the graph. + Note that even visible false dimension contribute to the + default grid generate by this splom trace. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + axis + :class:`plotly.graph_objects.splom.dimension.Axis` + instance or dict with compatible properties + label + Sets the label corresponding to this splom dimension. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + values + Sets the dimension values to be plotted. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this dimension is shown on + the graph. Note that even visible false dimension + contribute to the default grid generate by this splom + trace. + """ + + def __init__( + self, + arg=None, + axis=None, + label=None, + name=None, + templateitemname=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Dimension object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.Dimension` + axis + :class:`plotly.graph_objects.splom.dimension.Axis` + instance or dict with compatible properties + label + Sets the label corresponding to this splom dimension. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + values + Sets the dimension values to be plotted. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + visible + Determines whether or not this dimension is shown on + the graph. Note that even visible false dimension + contribute to the default grid generate by this splom + trace. + + Returns + ------- + Dimension + """ + super(Dimension, self).__init__("dimensions") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Dimension +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Dimension`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("axis", None) + _v = axis if axis is not None else _v + if _v is not None: + self["axis"] = _v + _v = arg.pop("label", None) + _v = label if label is not None else _v + if _v is not None: + self["label"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/splom/_hoverlabel.py new file mode 100644 index 00000000000..43e113b1dcf --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.splom.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/_marker.py b/packages/python/plotly/plotly/graph_objs/splom/_marker.py new file mode 100644 index 00000000000..0deced99c80 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_marker.py @@ -0,0 +1,1361 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "reversescale", + "showscale", + "size", + "sizemin", + "sizemode", + "sizeref", + "sizesrc", + "symbol", + "symbolsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color`is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` array are + all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmin` + must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color`is set to a numerical array. Value should have + the same units as in `marker.color` and if set, `marker.cmax` + must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to splom.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.splom.m + arker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.splom.marker.colorbar.tickformatstopdefaults) + , sets the default property values to use for + elements of + splom.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.splom.marker.color + bar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + splom.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + splom.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.splom.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color`is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Greys,YlGnB + u,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland + ,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.splom.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacitysrc + # ---------- + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for opacity . + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color`is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color`is set to a + numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizemin + # ------- + @property + def sizemin(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the minimum size (in px) of the rendered marker + points. + + The 'sizemin' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizemin"] + + @sizemin.setter + def sizemin(self, val): + self["sizemin"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the rule for which the data in `size` is converted + to pixels. + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['diameter', 'area'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + Has an effect only if `marker.size` is set to a numerical + array. Sets the scale factor used to determine the rendered + size of marker points. Use with `sizemin` and `sizemode`. + + The 'sizeref' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # symbolsrc + # --------- + @property + def symbolsrc(self): + """ + Sets the source reference on Chart Studio Cloud for symbol . + + The 'symbolsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["symbolsrc"] + + @symbolsrc.setter + def symbolsrc(self, val): + self["symbolsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.splom.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.splom.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + reversescale=None, + showscale=None, + size=None, + sizemin=None, + sizemode=None, + sizeref=None, + sizesrc=None, + symbol=None, + symbolsrc=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.splom.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color`is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color`is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color`is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.splom.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu + ,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + line + :class:`plotly.graph_objects.splom.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud for + opacity . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color`is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color`is + set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) of the + rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the data in + `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. Use with + `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud for + symbol . + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("opacitysrc", None) + _v = opacitysrc if opacitysrc is not None else _v + if _v is not None: + self["opacitysrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizemin", None) + _v = sizemin if sizemin is not None else _v + if _v is not None: + self["sizemin"] = _v + _v = arg.pop("sizemode", None) + _v = sizemode if sizemode is not None else _v + if _v is not None: + self["sizemode"] = _v + _v = arg.pop("sizeref", None) + _v = sizeref if sizeref is not None else _v + if _v is not None: + self["sizeref"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + _v = arg.pop("symbolsrc", None) + _v = symbolsrc if symbolsrc is not None else _v + if _v is not None: + self["symbolsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/_selected.py b/packages/python/plotly/plotly/graph_objs/splom/_selected.py new file mode 100644 index 00000000000..5afc418a6c4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_selected.py @@ -0,0 +1,110 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.selected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.splom.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.splom.selected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.Selected` + marker + :class:`plotly.graph_objects.splom.selected.Marker` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/_stream.py b/packages/python/plotly/plotly/graph_objs/splom/_stream.py new file mode 100644 index 00000000000..ce598dcc9c7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.splom.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/_unselected.py b/packages/python/plotly/plotly/graph_objs/splom/_unselected.py new file mode 100644 index 00000000000..e08b44d5061 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/_unselected.py @@ -0,0 +1,113 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom" + _path_str = "splom.unselected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.splom.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.splom.unselected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.Unselected` + marker + :class:`plotly.graph_objects.splom.unselected.Marker` + instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py index a3ba38a226e..464038ba05b 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py @@ -1,145 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._axis import Axis +else: + from _plotly_utils.importers import relative_import -class Axis(_BaseTraceHierarchyType): - - # matches - # ------- - @property - def matches(self): - """ - Determines whether or not the x & y axes generated by this - dimension match. Equivalent to setting the `matches` axis - attribute in the layout with the correct axis id. - - The 'matches' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["matches"] - - @matches.setter - def matches(self, val): - self["matches"] = val - - # type - # ---- - @property - def type(self): - """ - Sets the axis type for this dimension's generated x and y axes. - Note that the axis `type` values set in layout take precedence - over this attribute. - - The 'type' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['linear', 'log', 'date', 'category'] - - Returns - ------- - Any - """ - return self["type"] - - @type.setter - def type(self, val): - self["type"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.dimension" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - matches - Determines whether or not the x & y axes generated by - this dimension match. Equivalent to setting the - `matches` axis attribute in the layout with the correct - axis id. - type - Sets the axis type for this dimension's generated x and - y axes. Note that the axis `type` values set in layout - take precedence over this attribute. - """ - - def __init__(self, arg=None, matches=None, type=None, **kwargs): - """ - Construct a new Axis object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.dimension.Axis` - matches - Determines whether or not the x & y axes generated by - this dimension match. Equivalent to setting the - `matches` axis attribute in the layout with the correct - axis id. - type - Sets the axis type for this dimension's generated x and - y axes. Note that the axis `type` values set in layout - take precedence over this attribute. - - Returns - ------- - Axis - """ - super(Axis, self).__init__("axis") - - # Validate arg - # ------------ - 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.splom.dimension.Axis -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.dimension.Axis`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.dimension import axis as v_axis - - # Initialize validators - # --------------------- - self._validators["matches"] = v_axis.MatchesValidator() - self._validators["type"] = v_axis.TypeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("matches", None) - self["matches"] = matches if matches is not None else _v - _v = arg.pop("type", None) - self["type"] = type if type is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Axis"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._axis.Axis"]) diff --git a/packages/python/plotly/plotly/graph_objs/splom/dimension/_axis.py b/packages/python/plotly/plotly/graph_objs/splom/dimension/_axis.py new file mode 100644 index 00000000000..bae8555d7d2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/dimension/_axis.py @@ -0,0 +1,141 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Axis(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.dimension" + _path_str = "splom.dimension.axis" + _valid_props = {"matches", "type"} + + # matches + # ------- + @property + def matches(self): + """ + Determines whether or not the x & y axes generated by this + dimension match. Equivalent to setting the `matches` axis + attribute in the layout with the correct axis id. + + The 'matches' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["matches"] + + @matches.setter + def matches(self, val): + self["matches"] = val + + # type + # ---- + @property + def type(self): + """ + Sets the axis type for this dimension's generated x and y axes. + Note that the axis `type` values set in layout take precedence + over this attribute. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'log', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + matches + Determines whether or not the x & y axes generated by + this dimension match. Equivalent to setting the + `matches` axis attribute in the layout with the correct + axis id. + type + Sets the axis type for this dimension's generated x and + y axes. Note that the axis `type` values set in layout + take precedence over this attribute. + """ + + def __init__(self, arg=None, matches=None, type=None, **kwargs): + """ + Construct a new Axis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.dimension.Axis` + matches + Determines whether or not the x & y axes generated by + this dimension match. Equivalent to setting the + `matches` axis attribute in the layout with the correct + axis id. + type + Sets the axis type for this dimension's generated x and + y axes. Note that the axis `type` values set in layout + take precedence over this attribute. + + Returns + ------- + Axis + """ + super(Axis, self).__init__("axis") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.dimension.Axis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.dimension.Axis`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("matches", None) + _v = matches if matches is not None else _v + if _v is not None: + self["matches"] = _v + _v = arg.pop("type", None) + _v = type if type is not None else _v + if _v is not None: + self["type"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py index 79ec4f09761..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.splom.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/_font.py new file mode 100644 index 00000000000..662fb349d3c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.hoverlabel" + _path_str = "splom.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py index 535665c4cf3..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py @@ -1,2508 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is true, the - default palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `marker.line.color`) or the - bounds set in `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a numerical - array. Defaults to `false` when `marker.line.cmin` and - `marker.line.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be equidistant - to this point. Has an effect only if in `marker.line.color`is - set to a numerical array. Value should have the same units as - in `marker.line.color`. Has no effect when `marker.line.cauto` - is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - in `marker.line.color`is set to a numerical array. Value should - have the same units as in `marker.line.color` and if set, - `marker.line.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to splom.marker.line.colorscale - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The colorscale - must be an array containing arrays mapping a normalized value - to an rgb, rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and highest (1) values - are required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the colorscale in - color space, use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if in - `marker.line.color`is set to a numerical array. If true, - `marker.line.cmin` will correspond to the last color in the - array and `marker.line.cmax` will correspond to the first - color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, - **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.marker.Line` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.line.colorscale`. Has an effect only if in - `marker.line.color`is set to a numerical array. In case - `colorscale` is unspecified or `autocolorscale` is - true, the default palette will be chosen according to - whether numbers in the `color` array are all positive, - all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here in - `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has an - effect only if in `marker.line.color`is set to a - numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.line.cmin` and/or `marker.line.cmax` to be - equidistant to this point. Has an effect only if in - `marker.line.color`is set to a numerical array. Value - should have the same units as in `marker.line.color`. - Has no effect when `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if in `marker.line.color`is set to a numerical - array. Value should have the same units as in - `marker.line.color` and if set, `marker.line.cmax` must - be set as well. - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. The - colorscale must be an array containing arrays mapping a - normalized value to an rgb, rgba, hex, hsl, hsv, or - named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in color space, - use`marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - reversescale - Reverses the color mapping if true. Has an effect only - if in `marker.line.color`is set to a numerical array. - If true, `marker.line.cmin` will correspond to the last - color in the array and `marker.line.cmax` will - correspond to the first color. - width - Sets the width (in px) of the lines bounding the marker - points. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.splom.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_line.AutocolorscaleValidator() - self._validators["cauto"] = v_line.CautoValidator() - self._validators["cmax"] = v_line.CmaxValidator() - self._validators["cmid"] = v_line.CmidValidator() - self._validators["cmin"] = v_line.CminValidator() - self._validators["color"] = v_line.ColorValidator() - self._validators["coloraxis"] = v_line.ColoraxisValidator() - self._validators["colorscale"] = v_line.ColorscaleValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["reversescale"] = v_line.ReversescaleValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.splom.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.splom.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.splom.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.splom.marker.c - olorbar.tickformatstopdefaults), sets the default property - values to use for elements of - splom.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.splom.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.splom.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use splom.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use splom.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.splom.marker.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.splom. - marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - splom.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.splom.marker.colorbar.Titl - e` instance or dict with compatible properties - titlefont - Deprecated: Please use splom.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use splom.marker.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.splom.marker.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.splom. - marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - splom.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.splom.marker.colorbar.Titl - e` instance or dict with compatible properties - titlefont - Deprecated: Please use splom.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use splom.marker.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.splom.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.splom.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py new file mode 100644 index 00000000000..7df3a255d7d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.marker" + _path_str = "splom.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.splom.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.splom.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.splom.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.splom.marker.c + olorbar.tickformatstopdefaults), sets the default property + values to use for elements of + splom.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.splom.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.splom.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use splom.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use splom.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.splom.marker.co + lorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.splom. + marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + splom.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.splom.marker.colorbar.Titl + e` instance or dict with compatible properties + titlefont + Deprecated: Please use splom.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use splom.marker.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.splom.marker.co + lorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.splom. + marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + splom.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.splom.marker.colorbar.Titl + e` instance or dict with compatible properties + titlefont + Deprecated: Please use splom.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use splom.marker.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/_line.py b/packages/python/plotly/plotly/graph_objs/splom/marker/_line.py new file mode 100644 index 00000000000..538bb567a47 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/_line.py @@ -0,0 +1,658 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.marker" + _path_str = "splom.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color`is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color`is set to a numerical array. Value should + have the same units as in `marker.line.color` and if set, + `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to splom.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color`is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color`is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color`is set to a + numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color`is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color`is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use`marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color`is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py index 6cfbbf722cf..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.splom.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.marker.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.splom.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.splom.marker.c - olorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.splom.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.splom.marker.c - olorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.splom.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.splom.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..2b4fb494bd4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.marker.colorbar" + _path_str = "splom.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.splom.marker.c + olorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..3ff7a2de642 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.marker.colorbar" + _path_str = "splom.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.splom.marker.c + olorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_title.py new file mode 100644 index 00000000000..89286b0bb9e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.marker.colorbar" + _path_str = "splom.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.splom.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.marker.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py index 8043e5a6c9d..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.splom.marker.c - olorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.splom.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..8cc4eeb26e9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.marker.colorbar.title" + _path_str = "splom.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.splom.marker.c + olorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py index 29135de23c4..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py @@ -1,196 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.splom.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/splom/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/splom/selected/_marker.py new file mode 100644 index 00000000000..5835486e236 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.selected" + _path_str = "splom.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py index 42f5efaff97..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py @@ -1,205 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "splom.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.splom.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.splom.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.splom.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.splom.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/splom/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/splom/unselected/_marker.py new file mode 100644 index 00000000000..b2d0e31dfbf --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/splom/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "splom.unselected" + _path_str = "splom.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.splom.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.splom.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.splom.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py index 38ae38860b8..c7659748402 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py @@ -1,3242 +1,26 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.streamtube.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Starts(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Sets the x components of the starting position of the - streamtubes - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on Chart Studio Cloud for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y components of the starting position of the - streamtubes - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on Chart Studio Cloud for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the z components of the starting position of the - streamtubes - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on Chart Studio Cloud for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Sets the x components of the starting position of the - streamtubes - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y components of the starting position of the - streamtubes - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z components of the starting position of the - streamtubes - zsrc - Sets the source reference on Chart Studio Cloud for z - . - """ - - def __init__( - self, - arg=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, - **kwargs - ): - """ - Construct a new Starts object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.Starts` - x - Sets the x components of the starting position of the - streamtubes - xsrc - Sets the source reference on Chart Studio Cloud for x - . - y - Sets the y components of the starting position of the - streamtubes - ysrc - Sets the source reference on Chart Studio Cloud for y - . - z - Sets the z components of the starting position of the - streamtubes - zsrc - Sets the source reference on Chart Studio Cloud for z - . - - Returns - ------- - Starts - """ - super(Starts, self).__init__("starts") - - # Validate arg - # ------------ - 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.streamtube.Starts -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.Starts`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube import starts as v_starts - - # Initialize validators - # --------------------- - self._validators["x"] = v_starts.XValidator() - self._validators["xsrc"] = v_starts.XsrcValidator() - self._validators["y"] = v_starts.YValidator() - self._validators["ysrc"] = v_starts.YsrcValidator() - self._validators["z"] = v_starts.ZValidator() - self._validators["zsrc"] = v_starts.ZsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lightposition(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Numeric vector, representing the X coordinate for each vertex. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Numeric vector, representing the Y coordinate for each vertex. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Numeric vector, representing the Z coordinate for each vertex. - - The 'z' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Lightposition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.Lightposition` - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - - Returns - ------- - Lightposition - """ - super(Lightposition, self).__init__("lightposition") - - # Validate arg - # ------------ - 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.streamtube.Lightposition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.Lightposition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube import lightposition as v_lightposition - - # Initialize validators - # --------------------- - self._validators["x"] = v_lightposition.XValidator() - self._validators["y"] = v_lightposition.YValidator() - self._validators["z"] = v_lightposition.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lighting(_BaseTraceHierarchyType): - - # ambient - # ------- - @property - def ambient(self): - """ - Ambient light increases overall color visibility but can wash - out the image. - - The 'ambient' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ambient"] - - @ambient.setter - def ambient(self, val): - self["ambient"] = val - - # diffuse - # ------- - @property - def diffuse(self): - """ - Represents the extent that incident rays are reflected in a - range of angles. - - The 'diffuse' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["diffuse"] - - @diffuse.setter - def diffuse(self, val): - self["diffuse"] = val - - # facenormalsepsilon - # ------------------ - @property - def facenormalsepsilon(self): - """ - Epsilon for face normals calculation avoids math issues arising - from degenerate geometry. - - The 'facenormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["facenormalsepsilon"] - - @facenormalsepsilon.setter - def facenormalsepsilon(self, val): - self["facenormalsepsilon"] = val - - # fresnel - # ------- - @property - def fresnel(self): - """ - Represents the reflectance as a dependency of the viewing - angle; e.g. paper is reflective when viewing it from the edge - of the paper (almost 90 degrees), causing shine. - - The 'fresnel' property is a number and may be specified as: - - An int or float in the interval [0, 5] - - Returns - ------- - int|float - """ - return self["fresnel"] - - @fresnel.setter - def fresnel(self, val): - self["fresnel"] = val - - # roughness - # --------- - @property - def roughness(self): - """ - Alters specular reflection; the rougher the surface, the wider - and less contrasty the shine. - - The 'roughness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["roughness"] - - @roughness.setter - def roughness(self, val): - self["roughness"] = val - - # specular - # -------- - @property - def specular(self): - """ - Represents the level that incident rays are reflected in a - single direction, causing shine. - - The 'specular' property is a number and may be specified as: - - An int or float in the interval [0, 2] - - Returns - ------- - int|float - """ - return self["specular"] - - @specular.setter - def specular(self, val): - self["specular"] = val - - # vertexnormalsepsilon - # -------------------- - @property - def vertexnormalsepsilon(self): - """ - Epsilon for vertex normals calculation avoids math issues - arising from degenerate geometry. - - The 'vertexnormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["vertexnormalsepsilon"] - - @vertexnormalsepsilon.setter - def vertexnormalsepsilon(self, val): - self["vertexnormalsepsilon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - """ - - def __init__( - self, - arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, - **kwargs - ): - """ - Construct a new Lighting object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.Lighting` - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - - Returns - ------- - Lighting - """ - super(Lighting, self).__init__("lighting") - - # Validate arg - # ------------ - 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.streamtube.Lighting -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.Lighting`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube import lighting as v_lighting - - # Initialize validators - # --------------------- - self._validators["ambient"] = v_lighting.AmbientValidator() - self._validators["diffuse"] = v_lighting.DiffuseValidator() - self._validators[ - "facenormalsepsilon" - ] = v_lighting.FacenormalsepsilonValidator() - self._validators["fresnel"] = v_lighting.FresnelValidator() - self._validators["roughness"] = v_lighting.RoughnessValidator() - self._validators["specular"] = v_lighting.SpecularValidator() - self._validators[ - "vertexnormalsepsilon" - ] = v_lighting.VertexnormalsepsilonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - self["ambient"] = ambient if ambient is not None else _v - _v = arg.pop("diffuse", None) - self["diffuse"] = diffuse if diffuse is not None else _v - _v = arg.pop("facenormalsepsilon", None) - self["facenormalsepsilon"] = ( - facenormalsepsilon if facenormalsepsilon is not None else _v - ) - _v = arg.pop("fresnel", None) - self["fresnel"] = fresnel if fresnel is not None else _v - _v = arg.pop("roughness", None) - self["roughness"] = roughness if roughness is not None else _v - _v = arg.pop("specular", None) - self["specular"] = specular if specular is not None else _v - _v = arg.pop("vertexnormalsepsilon", None) - self["vertexnormalsepsilon"] = ( - vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - ) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.streamtube.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.streamtube.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.streamtube.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.streamtube.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.streamtube.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.streamtube.col - orbar.tickformatstopdefaults), sets the default property values - to use for elements of streamtube.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.streamtube.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.streamtube.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use streamtube.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use streamtube.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.streamtube.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.stream - tube.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - streamtube.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.streamtube.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use streamtube.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use streamtube.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.streamtube.colo - rbar.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.stream - tube.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - streamtube.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.streamtube.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use streamtube.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use streamtube.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.streamtube.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Hoverlabel", - "Lighting", - "Lightposition", - "Starts", - "Stream", - "colorbar", - "hoverlabel", -] - -from plotly.graph_objs.streamtube import hoverlabel -from plotly.graph_objs.streamtube import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._starts import Starts + from ._lightposition import Lightposition + from ._lighting import Lighting + from ._hoverlabel import Hoverlabel + from ._colorbar import ColorBar + from . import hoverlabel + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".colorbar"], + [ + "._stream.Stream", + "._starts.Starts", + "._lightposition.Lightposition", + "._lighting.Lighting", + "._hoverlabel.Hoverlabel", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py b/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py new file mode 100644 index 00000000000..d5a2597a20f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py @@ -0,0 +1,1939 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube" + _path_str = "streamtube.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.streamtube.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.streamtube.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.streamtube.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.streamtube.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of streamtube.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.streamtube.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.streamtube.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use streamtube.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use streamtube.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.streamtube.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.stream + tube.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + streamtube.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.streamtube.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use streamtube.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use streamtube.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.streamtube.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.stream + tube.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + streamtube.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.streamtube.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use streamtube.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use streamtube.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/streamtube/_hoverlabel.py new file mode 100644 index 00000000000..a2ee816d6c3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube" + _path_str = "streamtube.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.streamtube.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_lighting.py b/packages/python/plotly/plotly/graph_objs/streamtube/_lighting.py new file mode 100644 index 00000000000..dc10b4d447b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_lighting.py @@ -0,0 +1,311 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube" + _path_str = "streamtube.lighting" + _valid_props = { + "ambient", + "diffuse", + "facenormalsepsilon", + "fresnel", + "roughness", + "specular", + "vertexnormalsepsilon", + } + + # ambient + # ------- + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + # diffuse + # ------- + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + # facenormalsepsilon + # ------------------ + @property + def facenormalsepsilon(self): + """ + Epsilon for face normals calculation avoids math issues arising + from degenerate geometry. + + The 'facenormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["facenormalsepsilon"] + + @facenormalsepsilon.setter + def facenormalsepsilon(self, val): + self["facenormalsepsilon"] = val + + # fresnel + # ------- + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + # roughness + # --------- + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + # specular + # -------- + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + # vertexnormalsepsilon + # -------------------- + @property + def vertexnormalsepsilon(self): + """ + Epsilon for vertex normals calculation avoids math issues + arising from degenerate geometry. + + The 'vertexnormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["vertexnormalsepsilon"] + + @vertexnormalsepsilon.setter + def vertexnormalsepsilon(self, val): + self["vertexnormalsepsilon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + facenormalsepsilon=None, + fresnel=None, + roughness=None, + specular=None, + vertexnormalsepsilon=None, + **kwargs + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + + Returns + ------- + Lighting + """ + super(Lighting, self).__init__("lighting") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.Lighting`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("ambient", None) + _v = ambient if ambient is not None else _v + if _v is not None: + self["ambient"] = _v + _v = arg.pop("diffuse", None) + _v = diffuse if diffuse is not None else _v + if _v is not None: + self["diffuse"] = _v + _v = arg.pop("facenormalsepsilon", None) + _v = facenormalsepsilon if facenormalsepsilon is not None else _v + if _v is not None: + self["facenormalsepsilon"] = _v + _v = arg.pop("fresnel", None) + _v = fresnel if fresnel is not None else _v + if _v is not None: + self["fresnel"] = _v + _v = arg.pop("roughness", None) + _v = roughness if roughness is not None else _v + if _v is not None: + self["roughness"] = _v + _v = arg.pop("specular", None) + _v = specular if specular is not None else _v + if _v is not None: + self["specular"] = _v + _v = arg.pop("vertexnormalsepsilon", None) + _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v + if _v is not None: + self["vertexnormalsepsilon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_lightposition.py b/packages/python/plotly/plotly/graph_objs/streamtube/_lightposition.py new file mode 100644 index 00000000000..fc928b241a7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_lightposition.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube" + _path_str = "streamtube.lightposition" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super(Lightposition, self).__init__("lightposition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.Lightposition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_starts.py b/packages/python/plotly/plotly/graph_objs/streamtube/_starts.py new file mode 100644 index 00000000000..26b33d1b6b5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_starts.py @@ -0,0 +1,263 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Starts(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube" + _path_str = "streamtube.starts" + _valid_props = {"x", "xsrc", "y", "ysrc", "z", "zsrc"} + + # x + # - + @property + def x(self): + """ + Sets the x components of the starting position of the + streamtubes + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y components of the starting position of the + streamtubes + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the z components of the starting position of the + streamtubes + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Sets the x components of the starting position of the + streamtubes + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y components of the starting position of the + streamtubes + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z components of the starting position of the + streamtubes + zsrc + Sets the source reference on Chart Studio Cloud for z + . + """ + + def __init__( + self, + arg=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Starts object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.Starts` + x + Sets the x components of the starting position of the + streamtubes + xsrc + Sets the source reference on Chart Studio Cloud for x + . + y + Sets the y components of the starting position of the + streamtubes + ysrc + Sets the source reference on Chart Studio Cloud for y + . + z + Sets the z components of the starting position of the + streamtubes + zsrc + Sets the source reference on Chart Studio Cloud for z + . + + Returns + ------- + Starts + """ + super(Starts, self).__init__("starts") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.Starts +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.Starts`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xsrc", None) + _v = xsrc if xsrc is not None else _v + if _v is not None: + self["xsrc"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("ysrc", None) + _v = ysrc if ysrc is not None else _v + if _v is not None: + self["ysrc"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + _v = arg.pop("zsrc", None) + _v = zsrc if zsrc is not None else _v + if _v is not None: + self["zsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_stream.py b/packages/python/plotly/plotly/graph_objs/streamtube/_stream.py new file mode 100644 index 00000000000..e1cc7751f36 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube" + _path_str = "streamtube.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py index 3a0d0fbfdb6..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.streamtube.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.streamtube.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.streamtube.col - orbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.streamtube.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.streamtube.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.streamtube.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_tickfont.py new file mode 100644 index 00000000000..fbbf719a430 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube.colorbar" + _path_str = "streamtube.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..0895d894eef --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube.colorbar" + _path_str = "streamtube.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.streamtube.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_title.py new file mode 100644 index 00000000000..0ff0a89c13a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube.colorbar" + _path_str = "streamtube.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.streamtube.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py index 87d590d4d79..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.streamtube.col - orbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.streamtube.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/_font.py new file mode 100644 index 00000000000..204ad815d95 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube.colorbar.title" + _path_str = "streamtube.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.streamtube.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py index 9874c5714b6..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "streamtube.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.streamtube.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.streamtube.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.streamtube.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.streamtube.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/_font.py new file mode 100644 index 00000000000..bcc9f33821f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "streamtube.hoverlabel" + _path_str = "streamtube.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.streamtube.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.streamtube.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.streamtube.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py index 1581c94c16f..130473ef6b3 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py @@ -1,2783 +1,30 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `textinfo`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.sunburst.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.sunburst.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Outsidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Outsidetextfont object - - Sets the font used for `textinfo` lying outside the sector. - This option refers to the root of the hierarchy presented at - the center of a sunburst graph. Please note that if a hierarchy - has multiple root nodes, this option won't have any effect and - `insidetextfont` would be used. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Outsidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Outsidetextfont - """ - super(Outsidetextfont, self).__init__("outsidetextfont") - - # Validate arg - # ------------ - 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.sunburst.Outsidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import outsidetextfont as v_outsidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_outsidetextfont.ColorValidator() - self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() - self._validators["family"] = v_outsidetextfont.FamilyValidator() - self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() - self._validators["size"] = v_outsidetextfont.SizeValidator() - self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if colorsis set to a - numerical array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here colors) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect only if colorsis - set to a numerical array. Defaults to `false` when - `marker.cmin` and `marker.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - colorsis set to a numerical array. Value should have the same - units as colors and if set, `marker.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if colorsis set to a numerical array. Value should - have the same units as colors. Has no effect when - `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - colorsis set to a numerical array. Value should have the same - units as colors and if set, `marker.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.sunburs - t.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.sunburst.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - sunburst.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.sunburst.marker.co - lorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - sunburst.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - sunburst.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.sunburst.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colors - # ------ - @property - def colors(self): - """ - Sets the color of each sector of this trace. If not specified, - the default trace color set is used to pick the sector colors. - - The 'colors' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["colors"] - - @colors.setter - def colors(self, val): - self["colors"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if colorsis set to a - numerical array. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu,Greens,YlOrRd,B - luered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbod - y,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorssrc - # --------- - @property - def colorssrc(self): - """ - Sets the source reference on Chart Studio Cloud for colors . - - The 'colorssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorssrc"] - - @colorssrc.setter - def colorssrc(self, val): - self["colorssrc"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.sunburst.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if - colorsis set to a numerical array. If true, `marker.cmin` will - correspond to the last color in the array and `marker.cmax` - will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if colorsis set to a numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if colorsis set - to a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the default - palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or - mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here colors) or the - bounds set in `marker.cmin` and `marker.cmax` Has an - effect only if colorsis set to a numerical array. - Defaults to `false` when `marker.cmin` and - `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if colorsis set to a - numerical array. Value should have the same units as - colors. Has no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.sunburst.marker.ColorBar` - instance or dict with compatible properties - colors - Sets the color of each sector of this trace. If not - specified, the default trace color set is used to pick - the sector colors. - colorscale - Sets the colorscale. Has an effect only if colorsis set - to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - line - :class:`plotly.graph_objects.sunburst.marker.Line` - instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an effect only - if colorsis set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the - array and `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if colorsis set to a - numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colors=None, - colorscale=None, - colorssrc=None, - line=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if colorsis set - to a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the default - palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or - mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here colors) or the - bounds set in `marker.cmin` and `marker.cmax` Has an - effect only if colorsis set to a numerical array. - Defaults to `false` when `marker.cmin` and - `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if colorsis set to a - numerical array. Value should have the same units as - colors. Has no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.sunburst.marker.ColorBar` - instance or dict with compatible properties - colors - Sets the color of each sector of this trace. If not - specified, the default trace color set is used to pick - the sector colors. - colorscale - Sets the colorscale. Has an effect only if colorsis set - to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - line - :class:`plotly.graph_objects.sunburst.marker.Line` - instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an effect only - if colorsis set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the - array and `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if colorsis set to a - numerical array. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.sunburst.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colors"] = v_marker.ColorsValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorssrc"] = v_marker.ColorssrcValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colors", None) - self["colors"] = colors if colors is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorssrc", None) - self["colorssrc"] = colorssrc if colorssrc is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Leaf(_BaseTraceHierarchyType): - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the leaves. With colorscale it is defaulted - to 1; otherwise it is defaulted to 0.7 - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - opacity - Sets the opacity of the leaves. With colorscale it is - defaulted to 1; otherwise it is defaulted to 0.7 - """ - - def __init__(self, arg=None, opacity=None, **kwargs): - """ - Construct a new Leaf object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sunburst.Leaf` - opacity - Sets the opacity of the leaves. With colorscale it is - defaulted to 1; otherwise it is defaulted to 0.7 - - Returns - ------- - Leaf - """ - super(Leaf, self).__init__("leaf") - - # Validate arg - # ------------ - 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.sunburst.Leaf -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Leaf`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import leaf as v_leaf - - # Initialize validators - # --------------------- - self._validators["opacity"] = v_leaf.OpacityValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `textinfo` lying inside the sector. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.sunburst.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.sunburst.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.sunburst.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this sunburst trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this sunburst trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this sunburst trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this sunburst trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this sunburst trace . - row - If there is a layout grid, use the domain for this row - in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst trace (in - plot fraction). - y - Sets the vertical domain of this sunburst trace (in - plot fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this sunburst trace . - row - If there is a layout grid, use the domain for this row - in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst trace (in - plot fraction). - y - Sets the vertical domain of this sunburst trace (in - plot fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.sunburst.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Domain", - "Hoverlabel", - "Insidetextfont", - "Leaf", - "Marker", - "Outsidetextfont", - "Stream", - "Textfont", - "hoverlabel", - "marker", -] - -from plotly.graph_objs.sunburst import marker -from plotly.graph_objs.sunburst import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._textfont import Textfont + from ._stream import Stream + from ._outsidetextfont import Outsidetextfont + from ._marker import Marker + from ._leaf import Leaf + from ._insidetextfont import Insidetextfont + from ._hoverlabel import Hoverlabel + from ._domain import Domain + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".marker", ".hoverlabel"], + [ + "._textfont.Textfont", + "._stream.Stream", + "._outsidetextfont.Outsidetextfont", + "._marker.Marker", + "._leaf.Leaf", + "._insidetextfont.Insidetextfont", + "._hoverlabel.Hoverlabel", + "._domain.Domain", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_domain.py b/packages/python/plotly/plotly/graph_objs/sunburst/_domain.py new file mode 100644 index 00000000000..b811b5673f9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this sunburst trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this sunburst trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this sunburst trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this sunburst trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this sunburst trace . + row + If there is a layout grid, use the domain for this row + in the grid for this sunburst trace . + x + Sets the horizontal domain of this sunburst trace (in + plot fraction). + y + Sets the vertical domain of this sunburst trace (in + plot fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this sunburst trace . + row + If there is a layout grid, use the domain for this row + in the grid for this sunburst trace . + x + Sets the horizontal domain of this sunburst trace (in + plot fraction). + y + Sets the vertical domain of this sunburst trace (in + plot fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/sunburst/_hoverlabel.py new file mode 100644 index 00000000000..8b46d605611 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.sunburst.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/sunburst/_insidetextfont.py new file mode 100644 index 00000000000..a380226fc21 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `textinfo` lying inside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_leaf.py b/packages/python/plotly/plotly/graph_objs/sunburst/_leaf.py new file mode 100644 index 00000000000..369e37316bd --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_leaf.py @@ -0,0 +1,100 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Leaf(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.leaf" + _valid_props = {"opacity"} + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the leaves. With colorscale it is defaulted + to 1; otherwise it is defaulted to 0.7 + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the opacity of the leaves. With colorscale it is + defaulted to 1; otherwise it is defaulted to 0.7 + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Leaf object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sunburst.Leaf` + opacity + Sets the opacity of the leaves. With colorscale it is + defaulted to 1; otherwise it is defaulted to 0.7 + + Returns + ------- + Leaf + """ + super(Leaf, self).__init__("leaf") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Leaf +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Leaf`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_marker.py b/packages/python/plotly/plotly/graph_objs/sunburst/_marker.py new file mode 100644 index 00000000000..be3bfa0a60d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_marker.py @@ -0,0 +1,860 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colors", + "colorscale", + "colorssrc", + "line", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set to a + numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here colors) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` when + `marker.cmin` and `marker.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if colorsis set to a numerical array. Value should + have the same units as colors. Has no effect when + `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.sunburs + t.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.sunburst.marker.colorbar.tickformatstopdefaul + ts), sets the default property values to use + for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.sunburst.marker.co + lorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.sunburst.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colors + # ------ + @property + def colors(self): + """ + Sets the color of each sector of this trace. If not specified, + the default trace color set is used to pick the sector colors. + + The 'colors' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["colors"] + + @colors.setter + def colors(self, val): + self["colors"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if colorsis set to a + numerical array. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu,Greens,YlOrRd,B + luered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbod + y,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorssrc + # --------- + @property + def colorssrc(self): + """ + Sets the source reference on Chart Studio Cloud for colors . + + The 'colorssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorssrc"] + + @colorssrc.setter + def colorssrc(self, val): + self["colorssrc"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.sunburst.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if + colorsis set to a numerical array. If true, `marker.cmin` will + correspond to the last color in the array and `marker.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if colorsis set to a numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.sunburst.marker.ColorBar` + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + line + :class:`plotly.graph_objects.sunburst.marker.Line` + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colors=None, + colorscale=None, + colorssrc=None, + line=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.sunburst.marker.ColorBar` + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + line + :class:`plotly.graph_objects.sunburst.marker.Line` + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colors", None) + _v = colors if colors is not None else _v + if _v is not None: + self["colors"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorssrc", None) + _v = colorssrc if colorssrc is not None else _v + if _v is not None: + self["colorssrc"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_outsidetextfont.py b/packages/python/plotly/plotly/graph_objs/sunburst/_outsidetextfont.py new file mode 100644 index 00000000000..672b16170e2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_outsidetextfont.py @@ -0,0 +1,333 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.outsidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented at + the center of a sunburst graph. Please note that if a hierarchy + has multiple root nodes, this option won't have any effect and + `insidetextfont` would be used. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_stream.py b/packages/python/plotly/plotly/graph_objs/sunburst/_stream.py new file mode 100644 index 00000000000..151383d6b5b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/_textfont.py b/packages/python/plotly/plotly/graph_objs/sunburst/_textfont.py new file mode 100644 index 00000000000..10820fe6342 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst" + _path_str = "sunburst.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `textinfo`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py index 0c94fff55c4..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.sunburst.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/_font.py new file mode 100644 index 00000000000..131979c3087 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.hoverlabel" + _path_str = "sunburst.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py index 548f41d6cbc..b69db177a67 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py @@ -1,2105 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the line enclosing each sector. Defaults to - the `paper_bgcolor` value. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the line enclosing each sector. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the line enclosing each sector. - Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.marker.Line` - color - Sets the color of the line enclosing each sector. - Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.sunburst.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.sunburst.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.sunburst.marke - r.colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - sunburst.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.sunburst.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use sunburst.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use sunburst.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.sunburst.marker - .colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.sunbur - st.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - sunburst.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.sunburst.marker.colorbar.T - itle` instance or dict with compatible properties - titlefont - Deprecated: Please use - sunburst.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - sunburst.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.sunburst.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.sunburst.marker - .colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.sunbur - st.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - sunburst.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.sunburst.marker.colorbar.T - itle` instance or dict with compatible properties - titlefont - Deprecated: Please use - sunburst.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - sunburst.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.sunburst.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "colorbar"] - -from plotly.graph_objs.sunburst.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py new file mode 100644 index 00000000000..e7e4b740235 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.marker" + _path_str = "sunburst.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.sunburst.marke + r.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + sunburst.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use sunburst.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use sunburst.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.sunburst.marker + .colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.sunbur + st.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.sunburst.marker.colorbar.T + itle` instance or dict with compatible properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.sunburst.marker + .colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.sunbur + st.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.sunburst.marker.colorbar.T + itle` instance or dict with compatible properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/_line.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/_line.py new file mode 100644 index 00000000000..1ccbf8e6471 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/_line.py @@ -0,0 +1,234 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.marker" + _path_str = "sunburst.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. Defaults to + the `paper_bgcolor` value. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.sunburst.marker.Line` + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py index 6869e5153b6..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.sunburst.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sunburst.marke - r.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.sunburst.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sunburst.marke - r.colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.sunburst.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sunburst.marke - r.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.sunburst.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.sunburst.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..3a7469434e6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.marker.colorbar" + _path_str = "sunburst.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sunburst.marke + r.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..ea42f6106aa --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.marker.colorbar" + _path_str = "sunburst.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sunburst.marke + r.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_title.py new file mode 100644 index 00000000000..67e3da40841 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.marker.colorbar" + _path_str = "sunburst.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sunburst.marke + r.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py index 3eb70fcb079..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "sunburst.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.sunburst.marke - r.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.sunburst.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.sunburst.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..a3814b17371 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "sunburst.marker.colorbar.title" + _path_str = "sunburst.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.sunburst.marke + r.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.sunburst.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/__init__.py index 57f60128d88..c5746494a6e 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/__init__.py @@ -1,3186 +1,27 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.surface.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lightposition(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Numeric vector, representing the X coordinate for each vertex. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Numeric vector, representing the Y coordinate for each vertex. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Numeric vector, representing the Z coordinate for each vertex. - - The 'z' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Lightposition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.Lightposition` - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - - Returns - ------- - Lightposition - """ - super(Lightposition, self).__init__("lightposition") - - # Validate arg - # ------------ - 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.surface.Lightposition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.Lightposition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface import lightposition as v_lightposition - - # Initialize validators - # --------------------- - self._validators["x"] = v_lightposition.XValidator() - self._validators["y"] = v_lightposition.YValidator() - self._validators["z"] = v_lightposition.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lighting(_BaseTraceHierarchyType): - - # ambient - # ------- - @property - def ambient(self): - """ - Ambient light increases overall color visibility but can wash - out the image. - - The 'ambient' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ambient"] - - @ambient.setter - def ambient(self, val): - self["ambient"] = val - - # diffuse - # ------- - @property - def diffuse(self): - """ - Represents the extent that incident rays are reflected in a - range of angles. - - The 'diffuse' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["diffuse"] - - @diffuse.setter - def diffuse(self, val): - self["diffuse"] = val - - # fresnel - # ------- - @property - def fresnel(self): - """ - Represents the reflectance as a dependency of the viewing - angle; e.g. paper is reflective when viewing it from the edge - of the paper (almost 90 degrees), causing shine. - - The 'fresnel' property is a number and may be specified as: - - An int or float in the interval [0, 5] - - Returns - ------- - int|float - """ - return self["fresnel"] - - @fresnel.setter - def fresnel(self, val): - self["fresnel"] = val - - # roughness - # --------- - @property - def roughness(self): - """ - Alters specular reflection; the rougher the surface, the wider - and less contrasty the shine. - - The 'roughness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["roughness"] - - @roughness.setter - def roughness(self, val): - self["roughness"] = val - - # specular - # -------- - @property - def specular(self): - """ - Represents the level that incident rays are reflected in a - single direction, causing shine. - - The 'specular' property is a number and may be specified as: - - An int or float in the interval [0, 2] - - Returns - ------- - int|float - """ - return self["specular"] - - @specular.setter - def specular(self, val): - self["specular"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - """ - - def __init__( - self, - arg=None, - ambient=None, - diffuse=None, - fresnel=None, - roughness=None, - specular=None, - **kwargs - ): - """ - Construct a new Lighting object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.Lighting` - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - - Returns - ------- - Lighting - """ - super(Lighting, self).__init__("lighting") - - # Validate arg - # ------------ - 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.surface.Lighting -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.Lighting`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface import lighting as v_lighting - - # Initialize validators - # --------------------- - self._validators["ambient"] = v_lighting.AmbientValidator() - self._validators["diffuse"] = v_lighting.DiffuseValidator() - self._validators["fresnel"] = v_lighting.FresnelValidator() - self._validators["roughness"] = v_lighting.RoughnessValidator() - self._validators["specular"] = v_lighting.SpecularValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - self["ambient"] = ambient if ambient is not None else _v - _v = arg.pop("diffuse", None) - self["diffuse"] = diffuse if diffuse is not None else _v - _v = arg.pop("fresnel", None) - self["fresnel"] = fresnel if fresnel is not None else _v - _v = arg.pop("roughness", None) - self["roughness"] = roughness if roughness is not None else _v - _v = arg.pop("specular", None) - self["specular"] = specular if specular is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.surface.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.surface.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contours(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is an instance of X - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.contours.X` - - A dict of string/value properties that will be passed - to the X constructor - - Supported dict properties: - - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the x dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.x - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the x dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. - - Returns - ------- - plotly.graph_objs.surface.contours.X - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is an instance of Y - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.contours.Y` - - A dict of string/value properties that will be passed - to the Y constructor - - Supported dict properties: - - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the y dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.y - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the y dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. - - Returns - ------- - plotly.graph_objs.surface.contours.Y - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is an instance of Z - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.contours.Z` - - A dict of string/value properties that will be passed - to the Z constructor - - Supported dict properties: - - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the z dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.z - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the z dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. - - Returns - ------- - plotly.graph_objs.surface.contours.Z - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - :class:`plotly.graph_objects.surface.contours.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.surface.contours.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.surface.contours.Z` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Contours object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.Contours` - x - :class:`plotly.graph_objects.surface.contours.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.surface.contours.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.surface.contours.Z` - instance or dict with compatible properties - - Returns - ------- - Contours - """ - super(Contours, self).__init__("contours") - - # Validate arg - # ------------ - 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.surface.Contours -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.Contours`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface import contours as v_contours - - # Initialize validators - # --------------------- - self._validators["x"] = v_contours.XValidator() - self._validators["y"] = v_contours.YValidator() - self._validators["z"] = v_contours.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.surface.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.surface.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.surface.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.surface.colorbar.tickformatstopdefaults), - sets the default property values to use for elements of - surface.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.surface.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.surface.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use surface.colorbar.title.font instead. - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use surface.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.surface.colorba - r.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.surfac - e.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - surface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.surface.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use surface.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use surface.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.surface.colorba - r.Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.surfac - e.colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - surface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.surface.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use surface.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use surface.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.surface.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "ColorBar", - "Contours", - "Hoverlabel", - "Lighting", - "Lightposition", - "Stream", - "colorbar", - "contours", - "hoverlabel", -] - -from plotly.graph_objs.surface import hoverlabel -from plotly.graph_objs.surface import contours -from plotly.graph_objs.surface import colorbar +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._lightposition import Lightposition + from ._lighting import Lighting + from ._hoverlabel import Hoverlabel + from ._contours import Contours + from ._colorbar import ColorBar + from . import hoverlabel + from . import contours + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".contours", ".colorbar"], + [ + "._stream.Stream", + "._lightposition.Lightposition", + "._lighting.Lighting", + "._hoverlabel.Hoverlabel", + "._contours.Contours", + "._colorbar.ColorBar", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py b/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py new file mode 100644 index 00000000000..5e9c9c1474e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py @@ -0,0 +1,1940 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface" + _path_str = "surface.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.surface.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.surface.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.surface.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.surface.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + surface.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.surface.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.surface.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use surface.colorbar.title.font instead. + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use surface.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.surface.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.surfac + e.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + surface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.surface.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use surface.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use surface.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.surface.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.surfac + e.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + surface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.surface.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use surface.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use surface.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/_contours.py b/packages/python/plotly/plotly/graph_objs/surface/_contours.py new file mode 100644 index 00000000000..6e1df17a350 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/_contours.py @@ -0,0 +1,271 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contours(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface" + _path_str = "surface.contours" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is an instance of X + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.contours.X` + - A dict of string/value properties that will be passed + to the X constructor + + Supported dict properties: + + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more + than `contours.start` + highlight + Determines whether or not contour lines about + the x dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour + lines. + highlightwidth + Sets the width of the highlighted contour + lines. + project + :class:`plotly.graph_objects.surface.contours.x + .Project` instance or dict with compatible + properties + show + Determines whether or not contour lines about + the x dimension are drawn. + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + usecolormap + An alternate to "color". Determines whether or + not the contour lines are colored using the + trace "colorscale". + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.surface.contours.X + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is an instance of Y + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.contours.Y` + - A dict of string/value properties that will be passed + to the Y constructor + + Supported dict properties: + + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more + than `contours.start` + highlight + Determines whether or not contour lines about + the y dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour + lines. + highlightwidth + Sets the width of the highlighted contour + lines. + project + :class:`plotly.graph_objects.surface.contours.y + .Project` instance or dict with compatible + properties + show + Determines whether or not contour lines about + the y dimension are drawn. + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + usecolormap + An alternate to "color". Determines whether or + not the contour lines are colored using the + trace "colorscale". + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.surface.contours.Y + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is an instance of Z + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.contours.Z` + - A dict of string/value properties that will be passed + to the Z constructor + + Supported dict properties: + + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more + than `contours.start` + highlight + Determines whether or not contour lines about + the z dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour + lines. + highlightwidth + Sets the width of the highlighted contour + lines. + project + :class:`plotly.graph_objects.surface.contours.z + .Project` instance or dict with compatible + properties + show + Determines whether or not contour lines about + the z dimension are drawn. + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + usecolormap + An alternate to "color". Determines whether or + not the contour lines are colored using the + trace "colorscale". + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.surface.contours.Z + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + :class:`plotly.graph_objects.surface.contours.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.surface.contours.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.surface.contours.Z` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Contours object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.Contours` + x + :class:`plotly.graph_objects.surface.contours.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.surface.contours.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.surface.contours.Z` + instance or dict with compatible properties + + Returns + ------- + Contours + """ + super(Contours, self).__init__("contours") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.Contours +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.Contours`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/surface/_hoverlabel.py new file mode 100644 index 00000000000..88951ff190e --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface" + _path_str = "surface.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.surface.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/_lighting.py b/packages/python/plotly/plotly/graph_objs/surface/_lighting.py new file mode 100644 index 00000000000..06c2d925508 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/_lighting.py @@ -0,0 +1,239 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface" + _path_str = "surface.lighting" + _valid_props = {"ambient", "diffuse", "fresnel", "roughness", "specular"} + + # ambient + # ------- + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + # diffuse + # ------- + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + # fresnel + # ------- + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + # roughness + # --------- + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + # specular + # -------- + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + fresnel=None, + roughness=None, + specular=None, + **kwargs + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + + Returns + ------- + Lighting + """ + super(Lighting, self).__init__("lighting") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.Lighting`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("ambient", None) + _v = ambient if ambient is not None else _v + if _v is not None: + self["ambient"] = _v + _v = arg.pop("diffuse", None) + _v = diffuse if diffuse is not None else _v + if _v is not None: + self["diffuse"] = _v + _v = arg.pop("fresnel", None) + _v = fresnel if fresnel is not None else _v + if _v is not None: + self["fresnel"] = _v + _v = arg.pop("roughness", None) + _v = roughness if roughness is not None else _v + if _v is not None: + self["roughness"] = _v + _v = arg.pop("specular", None) + _v = specular if specular is not None else _v + if _v is not None: + self["specular"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/_lightposition.py b/packages/python/plotly/plotly/graph_objs/surface/_lightposition.py new file mode 100644 index 00000000000..a270cc2d547 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/_lightposition.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface" + _path_str = "surface.lightposition" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super(Lightposition, self).__init__("lightposition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.Lightposition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/_stream.py b/packages/python/plotly/plotly/graph_objs/surface/_stream.py new file mode 100644 index 00000000000..2af0c6d30f0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface" + _path_str = "surface.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py index 9440e3307f5..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.surface.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.surface.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.surface.colorb - ar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.surface.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.surface.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.surface.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickfont.py new file mode 100644 index 00000000000..61b9854c1ab --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.colorbar" + _path_str = "surface.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..fc2ca00fcdb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.colorbar" + _path_str = "surface.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.surface.colorb + ar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/_title.py new file mode 100644 index 00000000000..f8e3538eb46 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.colorbar" + _path_str = "surface.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.surface.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py index 72a1e4101e3..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.surface.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/_font.py new file mode 100644 index 00000000000..de7880fe0ff --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.colorbar.title" + _path_str = "surface.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py index 3a03f1aa555..b9b5ad2c3f8 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py @@ -1,1523 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Z(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour lines. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # end - # --- - @property - def end(self): - """ - Sets the end contour level value. Must be more than - `contours.start` - - The 'end' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # highlight - # --------- - @property - def highlight(self): - """ - Determines whether or not contour lines about the z dimension - are highlighted on hover. - - The 'highlight' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["highlight"] - - @highlight.setter - def highlight(self, val): - self["highlight"] = val - - # highlightcolor - # -------------- - @property - def highlightcolor(self): - """ - Sets the color of the highlighted contour lines. - - The 'highlightcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["highlightcolor"] - - @highlightcolor.setter - def highlightcolor(self, val): - self["highlightcolor"] = val - - # highlightwidth - # -------------- - @property - def highlightwidth(self): - """ - Sets the width of the highlighted contour lines. - - The 'highlightwidth' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["highlightwidth"] - - @highlightwidth.setter - def highlightwidth(self, val): - self["highlightwidth"] = val - - # project - # ------- - @property - def project(self): - """ - The 'project' property is an instance of Project - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.contours.z.Project` - - A dict of string/value properties that will be passed - to the Project constructor - - Supported dict properties: - - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - Returns - ------- - plotly.graph_objs.surface.contours.z.Project - """ - return self["project"] - - @project.setter - def project(self, val): - self["project"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not contour lines about the z dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the step between each contour level. Must be positive. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting contour level value. Must be less than - `contours.end` - - The 'start' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # usecolormap - # ----------- - @property - def usecolormap(self): - """ - An alternate to "color". Determines whether or not the contour - lines are colored using the trace "colorscale". - - The 'usecolormap' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["usecolormap"] - - @usecolormap.setter - def usecolormap(self, val): - self["usecolormap"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the contour lines. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.contours" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more than - `contours.start` - highlight - Determines whether or not contour lines about the z - dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour lines. - highlightwidth - Sets the width of the highlighted contour lines. - project - :class:`plotly.graph_objects.surface.contours.z.Project - ` instance or dict with compatible properties - show - Determines whether or not contour lines about the z - dimension are drawn. - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - usecolormap - An alternate to "color". Determines whether or not the - contour lines are colored using the trace "colorscale". - width - Sets the width of the contour lines. - """ - - def __init__( - self, - arg=None, - color=None, - end=None, - highlight=None, - highlightcolor=None, - highlightwidth=None, - project=None, - show=None, - size=None, - start=None, - usecolormap=None, - width=None, - **kwargs - ): - """ - Construct a new Z object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.contours.Z` - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more than - `contours.start` - highlight - Determines whether or not contour lines about the z - dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour lines. - highlightwidth - Sets the width of the highlighted contour lines. - project - :class:`plotly.graph_objects.surface.contours.z.Project - ` instance or dict with compatible properties - show - Determines whether or not contour lines about the z - dimension are drawn. - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - usecolormap - An alternate to "color". Determines whether or not the - contour lines are colored using the trace "colorscale". - width - Sets the width of the contour lines. - - Returns - ------- - Z - """ - super(Z, self).__init__("z") - - # Validate arg - # ------------ - 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.surface.contours.Z -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.contours.Z`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.contours import z as v_z - - # Initialize validators - # --------------------- - self._validators["color"] = v_z.ColorValidator() - self._validators["end"] = v_z.EndValidator() - self._validators["highlight"] = v_z.HighlightValidator() - self._validators["highlightcolor"] = v_z.HighlightcolorValidator() - self._validators["highlightwidth"] = v_z.HighlightwidthValidator() - self._validators["project"] = v_z.ProjectValidator() - self._validators["show"] = v_z.ShowValidator() - self._validators["size"] = v_z.SizeValidator() - self._validators["start"] = v_z.StartValidator() - self._validators["usecolormap"] = v_z.UsecolormapValidator() - self._validators["width"] = v_z.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("highlight", None) - self["highlight"] = highlight if highlight is not None else _v - _v = arg.pop("highlightcolor", None) - self["highlightcolor"] = highlightcolor if highlightcolor is not None else _v - _v = arg.pop("highlightwidth", None) - self["highlightwidth"] = highlightwidth if highlightwidth is not None else _v - _v = arg.pop("project", None) - self["project"] = project if project is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - _v = arg.pop("usecolormap", None) - self["usecolormap"] = usecolormap if usecolormap is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Y(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour lines. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # end - # --- - @property - def end(self): - """ - Sets the end contour level value. Must be more than - `contours.start` - - The 'end' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # highlight - # --------- - @property - def highlight(self): - """ - Determines whether or not contour lines about the y dimension - are highlighted on hover. - - The 'highlight' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["highlight"] - - @highlight.setter - def highlight(self, val): - self["highlight"] = val - - # highlightcolor - # -------------- - @property - def highlightcolor(self): - """ - Sets the color of the highlighted contour lines. - - The 'highlightcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["highlightcolor"] - - @highlightcolor.setter - def highlightcolor(self, val): - self["highlightcolor"] = val - - # highlightwidth - # -------------- - @property - def highlightwidth(self): - """ - Sets the width of the highlighted contour lines. - - The 'highlightwidth' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["highlightwidth"] - - @highlightwidth.setter - def highlightwidth(self, val): - self["highlightwidth"] = val - - # project - # ------- - @property - def project(self): - """ - The 'project' property is an instance of Project - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.contours.y.Project` - - A dict of string/value properties that will be passed - to the Project constructor - - Supported dict properties: - - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - Returns - ------- - plotly.graph_objs.surface.contours.y.Project - """ - return self["project"] - - @project.setter - def project(self, val): - self["project"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not contour lines about the y dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the step between each contour level. Must be positive. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting contour level value. Must be less than - `contours.end` - - The 'start' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # usecolormap - # ----------- - @property - def usecolormap(self): - """ - An alternate to "color". Determines whether or not the contour - lines are colored using the trace "colorscale". - - The 'usecolormap' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["usecolormap"] - - @usecolormap.setter - def usecolormap(self, val): - self["usecolormap"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the contour lines. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.contours" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more than - `contours.start` - highlight - Determines whether or not contour lines about the y - dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour lines. - highlightwidth - Sets the width of the highlighted contour lines. - project - :class:`plotly.graph_objects.surface.contours.y.Project - ` instance or dict with compatible properties - show - Determines whether or not contour lines about the y - dimension are drawn. - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - usecolormap - An alternate to "color". Determines whether or not the - contour lines are colored using the trace "colorscale". - width - Sets the width of the contour lines. - """ - - def __init__( - self, - arg=None, - color=None, - end=None, - highlight=None, - highlightcolor=None, - highlightwidth=None, - project=None, - show=None, - size=None, - start=None, - usecolormap=None, - width=None, - **kwargs - ): - """ - Construct a new Y object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.contours.Y` - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more than - `contours.start` - highlight - Determines whether or not contour lines about the y - dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour lines. - highlightwidth - Sets the width of the highlighted contour lines. - project - :class:`plotly.graph_objects.surface.contours.y.Project - ` instance or dict with compatible properties - show - Determines whether or not contour lines about the y - dimension are drawn. - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - usecolormap - An alternate to "color". Determines whether or not the - contour lines are colored using the trace "colorscale". - width - Sets the width of the contour lines. - - Returns - ------- - Y - """ - super(Y, self).__init__("y") - - # Validate arg - # ------------ - 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.surface.contours.Y -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.contours.Y`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.contours import y as v_y - - # Initialize validators - # --------------------- - self._validators["color"] = v_y.ColorValidator() - self._validators["end"] = v_y.EndValidator() - self._validators["highlight"] = v_y.HighlightValidator() - self._validators["highlightcolor"] = v_y.HighlightcolorValidator() - self._validators["highlightwidth"] = v_y.HighlightwidthValidator() - self._validators["project"] = v_y.ProjectValidator() - self._validators["show"] = v_y.ShowValidator() - self._validators["size"] = v_y.SizeValidator() - self._validators["start"] = v_y.StartValidator() - self._validators["usecolormap"] = v_y.UsecolormapValidator() - self._validators["width"] = v_y.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("highlight", None) - self["highlight"] = highlight if highlight is not None else _v - _v = arg.pop("highlightcolor", None) - self["highlightcolor"] = highlightcolor if highlightcolor is not None else _v - _v = arg.pop("highlightwidth", None) - self["highlightwidth"] = highlightwidth if highlightwidth is not None else _v - _v = arg.pop("project", None) - self["project"] = project if project is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - _v = arg.pop("usecolormap", None) - self["usecolormap"] = usecolormap if usecolormap is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class X(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour lines. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # end - # --- - @property - def end(self): - """ - Sets the end contour level value. Must be more than - `contours.start` - - The 'end' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["end"] - - @end.setter - def end(self, val): - self["end"] = val - - # highlight - # --------- - @property - def highlight(self): - """ - Determines whether or not contour lines about the x dimension - are highlighted on hover. - - The 'highlight' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["highlight"] - - @highlight.setter - def highlight(self, val): - self["highlight"] = val - - # highlightcolor - # -------------- - @property - def highlightcolor(self): - """ - Sets the color of the highlighted contour lines. - - The 'highlightcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["highlightcolor"] - - @highlightcolor.setter - def highlightcolor(self, val): - self["highlightcolor"] = val - - # highlightwidth - # -------------- - @property - def highlightwidth(self): - """ - Sets the width of the highlighted contour lines. - - The 'highlightwidth' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["highlightwidth"] - - @highlightwidth.setter - def highlightwidth(self, val): - self["highlightwidth"] = val - - # project - # ------- - @property - def project(self): - """ - The 'project' property is an instance of Project - that may be specified as: - - An instance of :class:`plotly.graph_objs.surface.contours.x.Project` - - A dict of string/value properties that will be passed - to the Project constructor - - Supported dict properties: - - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - Returns - ------- - plotly.graph_objs.surface.contours.x.Project - """ - return self["project"] - - @project.setter - def project(self, val): - self["project"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not contour lines about the x dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the step between each contour level. Must be positive. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # start - # ----- - @property - def start(self): - """ - Sets the starting contour level value. Must be less than - `contours.end` - - The 'start' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["start"] - - @start.setter - def start(self, val): - self["start"] = val - - # usecolormap - # ----------- - @property - def usecolormap(self): - """ - An alternate to "color". Determines whether or not the contour - lines are colored using the trace "colorscale". - - The 'usecolormap' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["usecolormap"] - - @usecolormap.setter - def usecolormap(self, val): - self["usecolormap"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the contour lines. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.contours" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more than - `contours.start` - highlight - Determines whether or not contour lines about the x - dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour lines. - highlightwidth - Sets the width of the highlighted contour lines. - project - :class:`plotly.graph_objects.surface.contours.x.Project - ` instance or dict with compatible properties - show - Determines whether or not contour lines about the x - dimension are drawn. - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - usecolormap - An alternate to "color". Determines whether or not the - contour lines are colored using the trace "colorscale". - width - Sets the width of the contour lines. - """ - - def __init__( - self, - arg=None, - color=None, - end=None, - highlight=None, - highlightcolor=None, - highlightwidth=None, - project=None, - show=None, - size=None, - start=None, - usecolormap=None, - width=None, - **kwargs - ): - """ - Construct a new X object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.contours.X` - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more than - `contours.start` - highlight - Determines whether or not contour lines about the x - dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour lines. - highlightwidth - Sets the width of the highlighted contour lines. - project - :class:`plotly.graph_objects.surface.contours.x.Project - ` instance or dict with compatible properties - show - Determines whether or not contour lines about the x - dimension are drawn. - size - Sets the step between each contour level. Must be - positive. - start - Sets the starting contour level value. Must be less - than `contours.end` - usecolormap - An alternate to "color". Determines whether or not the - contour lines are colored using the trace "colorscale". - width - Sets the width of the contour lines. - - Returns - ------- - X - """ - super(X, self).__init__("x") - - # Validate arg - # ------------ - 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.surface.contours.X -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.contours.X`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.contours import x as v_x - - # Initialize validators - # --------------------- - self._validators["color"] = v_x.ColorValidator() - self._validators["end"] = v_x.EndValidator() - self._validators["highlight"] = v_x.HighlightValidator() - self._validators["highlightcolor"] = v_x.HighlightcolorValidator() - self._validators["highlightwidth"] = v_x.HighlightwidthValidator() - self._validators["project"] = v_x.ProjectValidator() - self._validators["show"] = v_x.ShowValidator() - self._validators["size"] = v_x.SizeValidator() - self._validators["start"] = v_x.StartValidator() - self._validators["usecolormap"] = v_x.UsecolormapValidator() - self._validators["width"] = v_x.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("end", None) - self["end"] = end if end is not None else _v - _v = arg.pop("highlight", None) - self["highlight"] = highlight if highlight is not None else _v - _v = arg.pop("highlightcolor", None) - self["highlightcolor"] = highlightcolor if highlightcolor is not None else _v - _v = arg.pop("highlightwidth", None) - self["highlightwidth"] = highlightwidth if highlightwidth is not None else _v - _v = arg.pop("project", None) - self["project"] = project if project is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("start", None) - self["start"] = start if start is not None else _v - _v = arg.pop("usecolormap", None) - self["usecolormap"] = usecolormap if usecolormap is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["X", "Y", "Z", "x", "y", "z"] - -from plotly.graph_objs.surface.contours import z -from plotly.graph_objs.surface.contours import y -from plotly.graph_objs.surface.contours import x +import sys + +if sys.version_info < (3, 7): + from ._z import Z + from ._y import Y + from ._x import X + from . import z + from . import y + from . import x +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".z", ".y", ".x"], ["._z.Z", "._y.Y", "._x.X"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/_x.py b/packages/python/plotly/plotly/graph_objs/surface/contours/_x.py new file mode 100644 index 00000000000..6eae7c8b947 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/_x.py @@ -0,0 +1,524 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class X(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.contours" + _path_str = "surface.contours.x" + _valid_props = { + "color", + "end", + "highlight", + "highlightcolor", + "highlightwidth", + "project", + "show", + "size", + "start", + "usecolormap", + "width", + } + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour lines. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # end + # --- + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # highlight + # --------- + @property + def highlight(self): + """ + Determines whether or not contour lines about the x dimension + are highlighted on hover. + + The 'highlight' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["highlight"] + + @highlight.setter + def highlight(self, val): + self["highlight"] = val + + # highlightcolor + # -------------- + @property + def highlightcolor(self): + """ + Sets the color of the highlighted contour lines. + + The 'highlightcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["highlightcolor"] + + @highlightcolor.setter + def highlightcolor(self, val): + self["highlightcolor"] = val + + # highlightwidth + # -------------- + @property + def highlightwidth(self): + """ + Sets the width of the highlighted contour lines. + + The 'highlightwidth' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["highlightwidth"] + + @highlightwidth.setter + def highlightwidth(self, val): + self["highlightwidth"] = val + + # project + # ------- + @property + def project(self): + """ + The 'project' property is an instance of Project + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.contours.x.Project` + - A dict of string/value properties that will be passed + to the Project constructor + + Supported dict properties: + + x + Determines whether or not these contour lines + are projected on the x plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + y + Determines whether or not these contour lines + are projected on the y plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + z + Determines whether or not these contour lines + are projected on the z plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + Returns + ------- + plotly.graph_objs.surface.contours.x.Project + """ + return self["project"] + + @project.setter + def project(self, val): + self["project"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not contour lines about the x dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # usecolormap + # ----------- + @property + def usecolormap(self): + """ + An alternate to "color". Determines whether or not the contour + lines are colored using the trace "colorscale". + + The 'usecolormap' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["usecolormap"] + + @usecolormap.setter + def usecolormap(self, val): + self["usecolormap"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the contour lines. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more than + `contours.start` + highlight + Determines whether or not contour lines about the x + dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour lines. + highlightwidth + Sets the width of the highlighted contour lines. + project + :class:`plotly.graph_objects.surface.contours.x.Project + ` instance or dict with compatible properties + show + Determines whether or not contour lines about the x + dimension are drawn. + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + usecolormap + An alternate to "color". Determines whether or not the + contour lines are colored using the trace "colorscale". + width + Sets the width of the contour lines. + """ + + def __init__( + self, + arg=None, + color=None, + end=None, + highlight=None, + highlightcolor=None, + highlightwidth=None, + project=None, + show=None, + size=None, + start=None, + usecolormap=None, + width=None, + **kwargs + ): + """ + Construct a new X object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.contours.X` + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more than + `contours.start` + highlight + Determines whether or not contour lines about the x + dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour lines. + highlightwidth + Sets the width of the highlighted contour lines. + project + :class:`plotly.graph_objects.surface.contours.x.Project + ` instance or dict with compatible properties + show + Determines whether or not contour lines about the x + dimension are drawn. + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + usecolormap + An alternate to "color". Determines whether or not the + contour lines are colored using the trace "colorscale". + width + Sets the width of the contour lines. + + Returns + ------- + X + """ + super(X, self).__init__("x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.contours.X +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.contours.X`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("highlight", None) + _v = highlight if highlight is not None else _v + if _v is not None: + self["highlight"] = _v + _v = arg.pop("highlightcolor", None) + _v = highlightcolor if highlightcolor is not None else _v + if _v is not None: + self["highlightcolor"] = _v + _v = arg.pop("highlightwidth", None) + _v = highlightwidth if highlightwidth is not None else _v + if _v is not None: + self["highlightwidth"] = _v + _v = arg.pop("project", None) + _v = project if project is not None else _v + if _v is not None: + self["project"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + _v = arg.pop("usecolormap", None) + _v = usecolormap if usecolormap is not None else _v + if _v is not None: + self["usecolormap"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/_y.py b/packages/python/plotly/plotly/graph_objs/surface/contours/_y.py new file mode 100644 index 00000000000..ee549e47bef --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/_y.py @@ -0,0 +1,524 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Y(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.contours" + _path_str = "surface.contours.y" + _valid_props = { + "color", + "end", + "highlight", + "highlightcolor", + "highlightwidth", + "project", + "show", + "size", + "start", + "usecolormap", + "width", + } + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour lines. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # end + # --- + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # highlight + # --------- + @property + def highlight(self): + """ + Determines whether or not contour lines about the y dimension + are highlighted on hover. + + The 'highlight' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["highlight"] + + @highlight.setter + def highlight(self, val): + self["highlight"] = val + + # highlightcolor + # -------------- + @property + def highlightcolor(self): + """ + Sets the color of the highlighted contour lines. + + The 'highlightcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["highlightcolor"] + + @highlightcolor.setter + def highlightcolor(self, val): + self["highlightcolor"] = val + + # highlightwidth + # -------------- + @property + def highlightwidth(self): + """ + Sets the width of the highlighted contour lines. + + The 'highlightwidth' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["highlightwidth"] + + @highlightwidth.setter + def highlightwidth(self, val): + self["highlightwidth"] = val + + # project + # ------- + @property + def project(self): + """ + The 'project' property is an instance of Project + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.contours.y.Project` + - A dict of string/value properties that will be passed + to the Project constructor + + Supported dict properties: + + x + Determines whether or not these contour lines + are projected on the x plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + y + Determines whether or not these contour lines + are projected on the y plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + z + Determines whether or not these contour lines + are projected on the z plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + Returns + ------- + plotly.graph_objs.surface.contours.y.Project + """ + return self["project"] + + @project.setter + def project(self, val): + self["project"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not contour lines about the y dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # usecolormap + # ----------- + @property + def usecolormap(self): + """ + An alternate to "color". Determines whether or not the contour + lines are colored using the trace "colorscale". + + The 'usecolormap' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["usecolormap"] + + @usecolormap.setter + def usecolormap(self, val): + self["usecolormap"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the contour lines. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more than + `contours.start` + highlight + Determines whether or not contour lines about the y + dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour lines. + highlightwidth + Sets the width of the highlighted contour lines. + project + :class:`plotly.graph_objects.surface.contours.y.Project + ` instance or dict with compatible properties + show + Determines whether or not contour lines about the y + dimension are drawn. + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + usecolormap + An alternate to "color". Determines whether or not the + contour lines are colored using the trace "colorscale". + width + Sets the width of the contour lines. + """ + + def __init__( + self, + arg=None, + color=None, + end=None, + highlight=None, + highlightcolor=None, + highlightwidth=None, + project=None, + show=None, + size=None, + start=None, + usecolormap=None, + width=None, + **kwargs + ): + """ + Construct a new Y object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.contours.Y` + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more than + `contours.start` + highlight + Determines whether or not contour lines about the y + dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour lines. + highlightwidth + Sets the width of the highlighted contour lines. + project + :class:`plotly.graph_objects.surface.contours.y.Project + ` instance or dict with compatible properties + show + Determines whether or not contour lines about the y + dimension are drawn. + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + usecolormap + An alternate to "color". Determines whether or not the + contour lines are colored using the trace "colorscale". + width + Sets the width of the contour lines. + + Returns + ------- + Y + """ + super(Y, self).__init__("y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.contours.Y +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.contours.Y`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("highlight", None) + _v = highlight if highlight is not None else _v + if _v is not None: + self["highlight"] = _v + _v = arg.pop("highlightcolor", None) + _v = highlightcolor if highlightcolor is not None else _v + if _v is not None: + self["highlightcolor"] = _v + _v = arg.pop("highlightwidth", None) + _v = highlightwidth if highlightwidth is not None else _v + if _v is not None: + self["highlightwidth"] = _v + _v = arg.pop("project", None) + _v = project if project is not None else _v + if _v is not None: + self["project"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + _v = arg.pop("usecolormap", None) + _v = usecolormap if usecolormap is not None else _v + if _v is not None: + self["usecolormap"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/_z.py b/packages/python/plotly/plotly/graph_objs/surface/contours/_z.py new file mode 100644 index 00000000000..f7702c30598 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/_z.py @@ -0,0 +1,524 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Z(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.contours" + _path_str = "surface.contours.z" + _valid_props = { + "color", + "end", + "highlight", + "highlightcolor", + "highlightwidth", + "project", + "show", + "size", + "start", + "usecolormap", + "width", + } + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour lines. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # end + # --- + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + # highlight + # --------- + @property + def highlight(self): + """ + Determines whether or not contour lines about the z dimension + are highlighted on hover. + + The 'highlight' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["highlight"] + + @highlight.setter + def highlight(self, val): + self["highlight"] = val + + # highlightcolor + # -------------- + @property + def highlightcolor(self): + """ + Sets the color of the highlighted contour lines. + + The 'highlightcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["highlightcolor"] + + @highlightcolor.setter + def highlightcolor(self, val): + self["highlightcolor"] = val + + # highlightwidth + # -------------- + @property + def highlightwidth(self): + """ + Sets the width of the highlighted contour lines. + + The 'highlightwidth' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["highlightwidth"] + + @highlightwidth.setter + def highlightwidth(self, val): + self["highlightwidth"] = val + + # project + # ------- + @property + def project(self): + """ + The 'project' property is an instance of Project + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.contours.z.Project` + - A dict of string/value properties that will be passed + to the Project constructor + + Supported dict properties: + + x + Determines whether or not these contour lines + are projected on the x plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + y + Determines whether or not these contour lines + are projected on the y plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + z + Determines whether or not these contour lines + are projected on the z plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + Returns + ------- + plotly.graph_objs.surface.contours.z.Project + """ + return self["project"] + + @project.setter + def project(self, val): + self["project"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not contour lines about the z dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # start + # ----- + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + # usecolormap + # ----------- + @property + def usecolormap(self): + """ + An alternate to "color". Determines whether or not the contour + lines are colored using the trace "colorscale". + + The 'usecolormap' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["usecolormap"] + + @usecolormap.setter + def usecolormap(self, val): + self["usecolormap"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the contour lines. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more than + `contours.start` + highlight + Determines whether or not contour lines about the z + dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour lines. + highlightwidth + Sets the width of the highlighted contour lines. + project + :class:`plotly.graph_objects.surface.contours.z.Project + ` instance or dict with compatible properties + show + Determines whether or not contour lines about the z + dimension are drawn. + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + usecolormap + An alternate to "color". Determines whether or not the + contour lines are colored using the trace "colorscale". + width + Sets the width of the contour lines. + """ + + def __init__( + self, + arg=None, + color=None, + end=None, + highlight=None, + highlightcolor=None, + highlightwidth=None, + project=None, + show=None, + size=None, + start=None, + usecolormap=None, + width=None, + **kwargs + ): + """ + Construct a new Z object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.contours.Z` + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more than + `contours.start` + highlight + Determines whether or not contour lines about the z + dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour lines. + highlightwidth + Sets the width of the highlighted contour lines. + project + :class:`plotly.graph_objects.surface.contours.z.Project + ` instance or dict with compatible properties + show + Determines whether or not contour lines about the z + dimension are drawn. + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + usecolormap + An alternate to "color". Determines whether or not the + contour lines are colored using the trace "colorscale". + width + Sets the width of the contour lines. + + Returns + ------- + Z + """ + super(Z, self).__init__("z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.contours.Z +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.contours.Z`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("end", None) + _v = end if end is not None else _v + if _v is not None: + self["end"] = _v + _v = arg.pop("highlight", None) + _v = highlight if highlight is not None else _v + if _v is not None: + self["highlight"] = _v + _v = arg.pop("highlightcolor", None) + _v = highlightcolor if highlightcolor is not None else _v + if _v is not None: + self["highlightcolor"] = _v + _v = arg.pop("highlightwidth", None) + _v = highlightwidth if highlightwidth is not None else _v + if _v is not None: + self["highlightwidth"] = _v + _v = arg.pop("project", None) + _v = project if project is not None else _v + if _v is not None: + self["project"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("start", None) + _v = start if start is not None else _v + if _v is not None: + self["start"] = _v + _v = arg.pop("usecolormap", None) + _v = usecolormap if usecolormap is not None else _v + if _v is not None: + self["usecolormap"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py index 62baff49d73..58c3e97f289 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py @@ -1,190 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._project import Project +else: + from _plotly_utils.importers import relative_import -class Project(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Determines whether or not these contour lines are projected on - the x plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'x' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Determines whether or not these contour lines are projected on - the y plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'y' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Determines whether or not these contour lines are projected on - the z plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'z' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.contours.x" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Determines whether or not these contour lines are - projected on the x plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - y - Determines whether or not these contour lines are - projected on the y plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - z - Determines whether or not these contour lines are - projected on the z plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Project object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.contours.x.Project` - x - Determines whether or not these contour lines are - projected on the x plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - y - Determines whether or not these contour lines are - projected on the y plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - z - Determines whether or not these contour lines are - projected on the z plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - - Returns - ------- - Project - """ - super(Project, self).__init__("project") - - # Validate arg - # ------------ - 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.surface.contours.x.Project -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.contours.x.Project`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.contours.x import project as v_project - - # Initialize validators - # --------------------- - self._validators["x"] = v_project.XValidator() - self._validators["y"] = v_project.YValidator() - self._validators["z"] = v_project.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Project"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/x/_project.py b/packages/python/plotly/plotly/graph_objs/surface/contours/x/_project.py new file mode 100644 index 00000000000..2208d85e9e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/x/_project.py @@ -0,0 +1,187 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Project(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.contours.x" + _path_str = "surface.contours.x.project" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Determines whether or not these contour lines are projected on + the x plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'x' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Determines whether or not these contour lines are projected on + the y plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'y' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Determines whether or not these contour lines are projected on + the z plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'z' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Determines whether or not these contour lines are + projected on the x plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + y + Determines whether or not these contour lines are + projected on the y plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + z + Determines whether or not these contour lines are + projected on the z plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Project object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.contours.x.Project` + x + Determines whether or not these contour lines are + projected on the x plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + y + Determines whether or not these contour lines are + projected on the y plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + z + Determines whether or not these contour lines are + projected on the z plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + + Returns + ------- + Project + """ + super(Project, self).__init__("project") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.contours.x.Project +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.contours.x.Project`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py index 92d07f22794..58c3e97f289 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py @@ -1,190 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._project import Project +else: + from _plotly_utils.importers import relative_import -class Project(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Determines whether or not these contour lines are projected on - the x plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'x' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Determines whether or not these contour lines are projected on - the y plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'y' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Determines whether or not these contour lines are projected on - the z plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'z' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.contours.y" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Determines whether or not these contour lines are - projected on the x plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - y - Determines whether or not these contour lines are - projected on the y plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - z - Determines whether or not these contour lines are - projected on the z plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Project object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.contours.y.Project` - x - Determines whether or not these contour lines are - projected on the x plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - y - Determines whether or not these contour lines are - projected on the y plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - z - Determines whether or not these contour lines are - projected on the z plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - - Returns - ------- - Project - """ - super(Project, self).__init__("project") - - # Validate arg - # ------------ - 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.surface.contours.y.Project -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.contours.y.Project`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.contours.y import project as v_project - - # Initialize validators - # --------------------- - self._validators["x"] = v_project.XValidator() - self._validators["y"] = v_project.YValidator() - self._validators["z"] = v_project.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Project"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/y/_project.py b/packages/python/plotly/plotly/graph_objs/surface/contours/y/_project.py new file mode 100644 index 00000000000..5c511c6573c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/y/_project.py @@ -0,0 +1,187 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Project(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.contours.y" + _path_str = "surface.contours.y.project" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Determines whether or not these contour lines are projected on + the x plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'x' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Determines whether or not these contour lines are projected on + the y plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'y' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Determines whether or not these contour lines are projected on + the z plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'z' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Determines whether or not these contour lines are + projected on the x plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + y + Determines whether or not these contour lines are + projected on the y plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + z + Determines whether or not these contour lines are + projected on the z plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Project object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.contours.y.Project` + x + Determines whether or not these contour lines are + projected on the x plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + y + Determines whether or not these contour lines are + projected on the y plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + z + Determines whether or not these contour lines are + projected on the z plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + + Returns + ------- + Project + """ + super(Project, self).__init__("project") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.contours.y.Project +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.contours.y.Project`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py index 491ca43ace3..58c3e97f289 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py @@ -1,190 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._project import Project +else: + from _plotly_utils.importers import relative_import -class Project(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Determines whether or not these contour lines are projected on - the x plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'x' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Determines whether or not these contour lines are projected on - the y plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'y' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Determines whether or not these contour lines are projected on - the z plane. If `highlight` is set to True (the default), the - projected lines are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - - The 'z' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.contours.z" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Determines whether or not these contour lines are - projected on the x plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - y - Determines whether or not these contour lines are - projected on the y plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - z - Determines whether or not these contour lines are - projected on the z plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Project object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.contours.z.Project` - x - Determines whether or not these contour lines are - projected on the x plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - y - Determines whether or not these contour lines are - projected on the y plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - z - Determines whether or not these contour lines are - projected on the z plane. If `highlight` is set to True - (the default), the projected lines are shown on hover. - If `show` is set to True, the projected lines are shown - in permanence. - - Returns - ------- - Project - """ - super(Project, self).__init__("project") - - # Validate arg - # ------------ - 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.surface.contours.z.Project -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.contours.z.Project`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.contours.z import project as v_project - - # Initialize validators - # --------------------- - self._validators["x"] = v_project.XValidator() - self._validators["y"] = v_project.YValidator() - self._validators["z"] = v_project.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Project"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/z/_project.py b/packages/python/plotly/plotly/graph_objs/surface/contours/z/_project.py new file mode 100644 index 00000000000..cc881d10fe2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/z/_project.py @@ -0,0 +1,187 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Project(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.contours.z" + _path_str = "surface.contours.z.project" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Determines whether or not these contour lines are projected on + the x plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'x' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Determines whether or not these contour lines are projected on + the y plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'y' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Determines whether or not these contour lines are projected on + the z plane. If `highlight` is set to True (the default), the + projected lines are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + + The 'z' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Determines whether or not these contour lines are + projected on the x plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + y + Determines whether or not these contour lines are + projected on the y plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + z + Determines whether or not these contour lines are + projected on the z plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Project object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.contours.z.Project` + x + Determines whether or not these contour lines are + projected on the x plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + y + Determines whether or not these contour lines are + projected on the y plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + z + Determines whether or not these contour lines are + projected on the z plane. If `highlight` is set to True + (the default), the projected lines are shown on hover. + If `show` is set to True, the projected lines are shown + in permanence. + + Returns + ------- + Project + """ + super(Project, self).__init__("project") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.contours.z.Project +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.contours.z.Project`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py index 82ef903a230..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "surface.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.surface.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.surface.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.surface.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.surface.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/_font.py new file mode 100644 index 00000000000..e8395128c70 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "surface.hoverlabel" + _path_str = "surface.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.surface.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.surface.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.surface.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/__init__.py b/packages/python/plotly/plotly/graph_objs/table/__init__.py index 3d9fbf68a48..3357b348013 100644 --- a/packages/python/plotly/plotly/graph_objs/table/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/__init__.py @@ -1,2014 +1,25 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.table.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.table.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.table.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.table.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Header(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the `text` within the box. Has - an effect only if `text` spans two or more lines (i.e. `text` - contains one or more
HTML tags) or if an explicit width is - set to override the text width. - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # fill - # ---- - @property - def fill(self): - """ - The 'fill' property is an instance of Fill - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.header.Fill` - - A dict of string/value properties that will be passed - to the Fill constructor - - Supported dict properties: - - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - - Returns - ------- - plotly.graph_objs.table.header.Fill - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # font - # ---- - @property - def font(self): - """ - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.header.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.table.header.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # format - # ------ - @property - def format(self): - """ - Sets the cell value formatting rule using d3 formatting mini- - language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'format' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["format"] - - @format.setter - def format(self, val): - self["format"] = val - - # formatsrc - # --------- - @property - def formatsrc(self): - """ - Sets the source reference on Chart Studio Cloud for format . - - The 'formatsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["formatsrc"] - - @formatsrc.setter - def formatsrc(self, val): - self["formatsrc"] = val - - # height - # ------ - @property - def height(self): - """ - The height of cells. - - The 'height' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["height"] - - @height.setter - def height(self, val): - self["height"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.header.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.table.header.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # prefix - # ------ - @property - def prefix(self): - """ - Prefix for cell values. - - The 'prefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["prefix"] - - @prefix.setter - def prefix(self, val): - self["prefix"] = val - - # prefixsrc - # --------- - @property - def prefixsrc(self): - """ - Sets the source reference on Chart Studio Cloud for prefix . - - The 'prefixsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["prefixsrc"] - - @prefixsrc.setter - def prefixsrc(self, val): - self["prefixsrc"] = val - - # suffix - # ------ - @property - def suffix(self): - """ - Suffix for cell values. - - The 'suffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["suffix"] - - @suffix.setter - def suffix(self, val): - self["suffix"] = val - - # suffixsrc - # --------- - @property - def suffixsrc(self): - """ - Sets the source reference on Chart Studio Cloud for suffix . - - The 'suffixsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["suffixsrc"] - - @suffixsrc.setter - def suffixsrc(self, val): - self["suffixsrc"] = val - - # values - # ------ - @property - def values(self): - """ - Header cell values. `values[m][n]` represents the value of the - `n`th point in column `m`, therefore the `values[m]` vector - length for all columns must be the same (longer vectors will be - truncated). Each value must be a finite number or a string. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - fill - :class:`plotly.graph_objects.table.header.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.header.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud for - format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.header.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud for - prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud for - suffix . - values - Header cell values. `values[m][n]` represents the value - of the `n`th point in column `m`, therefore the - `values[m]` vector length for all columns must be the - same (longer vectors will be truncated). Each value - must be a finite number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - fill=None, - font=None, - format=None, - formatsrc=None, - height=None, - line=None, - prefix=None, - prefixsrc=None, - suffix=None, - suffixsrc=None, - values=None, - valuessrc=None, - **kwargs - ): - """ - Construct a new Header object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.table.Header` - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - fill - :class:`plotly.graph_objects.table.header.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.header.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud for - format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.header.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud for - prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud for - suffix . - values - Header cell values. `values[m][n]` represents the value - of the `n`th point in column `m`, therefore the - `values[m]` vector length for all columns must be the - same (longer vectors will be truncated). Each value - must be a finite number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - - Returns - ------- - Header - """ - super(Header, self).__init__("header") - - # Validate arg - # ------------ - 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.table.Header -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.Header`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table import header as v_header - - # Initialize validators - # --------------------- - self._validators["align"] = v_header.AlignValidator() - self._validators["alignsrc"] = v_header.AlignsrcValidator() - self._validators["fill"] = v_header.FillValidator() - self._validators["font"] = v_header.FontValidator() - self._validators["format"] = v_header.FormatValidator() - self._validators["formatsrc"] = v_header.FormatsrcValidator() - self._validators["height"] = v_header.HeightValidator() - self._validators["line"] = v_header.LineValidator() - self._validators["prefix"] = v_header.PrefixValidator() - self._validators["prefixsrc"] = v_header.PrefixsrcValidator() - self._validators["suffix"] = v_header.SuffixValidator() - self._validators["suffixsrc"] = v_header.SuffixsrcValidator() - self._validators["values"] = v_header.ValuesValidator() - self._validators["valuessrc"] = v_header.ValuessrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("format", None) - self["format"] = format if format is not None else _v - _v = arg.pop("formatsrc", None) - self["formatsrc"] = formatsrc if formatsrc is not None else _v - _v = arg.pop("height", None) - self["height"] = height if height is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("prefix", None) - self["prefix"] = prefix if prefix is not None else _v - _v = arg.pop("prefixsrc", None) - self["prefixsrc"] = prefixsrc if prefixsrc is not None else _v - _v = arg.pop("suffix", None) - self["suffix"] = suffix if suffix is not None else _v - _v = arg.pop("suffixsrc", None) - self["suffixsrc"] = suffixsrc if suffixsrc is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this table trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this table trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this table trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this table trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this table trace . - row - If there is a layout grid, use the domain for this row - in the grid for this table trace . - x - Sets the horizontal domain of this table trace (in plot - fraction). - y - Sets the vertical domain of this table trace (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.table.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this table trace . - row - If there is a layout grid, use the domain for this row - in the grid for this table trace . - x - Sets the horizontal domain of this table trace (in plot - fraction). - y - Sets the vertical domain of this table trace (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.table.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Cells(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the `text` within the box. Has - an effect only if `text` spans two or more lines (i.e. `text` - contains one or more
HTML tags) or if an explicit width is - set to override the text width. - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # fill - # ---- - @property - def fill(self): - """ - The 'fill' property is an instance of Fill - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.cells.Fill` - - A dict of string/value properties that will be passed - to the Fill constructor - - Supported dict properties: - - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - - Returns - ------- - plotly.graph_objs.table.cells.Fill - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # font - # ---- - @property - def font(self): - """ - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.cells.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.table.cells.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # format - # ------ - @property - def format(self): - """ - Sets the cell value formatting rule using d3 formatting mini- - language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'format' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["format"] - - @format.setter - def format(self, val): - self["format"] = val - - # formatsrc - # --------- - @property - def formatsrc(self): - """ - Sets the source reference on Chart Studio Cloud for format . - - The 'formatsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["formatsrc"] - - @formatsrc.setter - def formatsrc(self, val): - self["formatsrc"] = val - - # height - # ------ - @property - def height(self): - """ - The height of cells. - - The 'height' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["height"] - - @height.setter - def height(self, val): - self["height"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.table.cells.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.table.cells.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # prefix - # ------ - @property - def prefix(self): - """ - Prefix for cell values. - - The 'prefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["prefix"] - - @prefix.setter - def prefix(self, val): - self["prefix"] = val - - # prefixsrc - # --------- - @property - def prefixsrc(self): - """ - Sets the source reference on Chart Studio Cloud for prefix . - - The 'prefixsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["prefixsrc"] - - @prefixsrc.setter - def prefixsrc(self, val): - self["prefixsrc"] = val - - # suffix - # ------ - @property - def suffix(self): - """ - Suffix for cell values. - - The 'suffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["suffix"] - - @suffix.setter - def suffix(self, val): - self["suffix"] = val - - # suffixsrc - # --------- - @property - def suffixsrc(self): - """ - Sets the source reference on Chart Studio Cloud for suffix . - - The 'suffixsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["suffixsrc"] - - @suffixsrc.setter - def suffixsrc(self, val): - self["suffixsrc"] = val - - # values - # ------ - @property - def values(self): - """ - Cell values. `values[m][n]` represents the value of the `n`th - point in column `m`, therefore the `values[m]` vector length - for all columns must be the same (longer vectors will be - truncated). Each value must be a finite number or a string. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- - @property - def valuessrc(self): - """ - Sets the source reference on Chart Studio Cloud for values . - - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuessrc"] - - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - fill - :class:`plotly.graph_objects.table.cells.Fill` instance - or dict with compatible properties - font - :class:`plotly.graph_objects.table.cells.Font` instance - or dict with compatible properties - format - Sets the cell value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud for - format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.cells.Line` instance - or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud for - prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud for - suffix . - values - Cell values. `values[m][n]` represents the value of the - `n`th point in column `m`, therefore the `values[m]` - vector length for all columns must be the same (longer - vectors will be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - fill=None, - font=None, - format=None, - formatsrc=None, - height=None, - line=None, - prefix=None, - prefixsrc=None, - suffix=None, - suffixsrc=None, - values=None, - valuessrc=None, - **kwargs - ): - """ - Construct a new Cells object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.table.Cells` - align - Sets the horizontal alignment of the `text` within the - box. Has an effect only if `text` spans two or more - lines (i.e. `text` contains one or more
HTML tags) - or if an explicit width is set to override the text - width. - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - fill - :class:`plotly.graph_objects.table.cells.Fill` instance - or dict with compatible properties - font - :class:`plotly.graph_objects.table.cells.Font` instance - or dict with compatible properties - format - Sets the cell value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud for - format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.cells.Line` instance - or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud for - prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud for - suffix . - values - Cell values. `values[m][n]` represents the value of the - `n`th point in column `m`, therefore the `values[m]` - vector length for all columns must be the same (longer - vectors will be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud for - values . - - Returns - ------- - Cells - """ - super(Cells, self).__init__("cells") - - # Validate arg - # ------------ - 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.table.Cells -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.Cells`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table import cells as v_cells - - # Initialize validators - # --------------------- - self._validators["align"] = v_cells.AlignValidator() - self._validators["alignsrc"] = v_cells.AlignsrcValidator() - self._validators["fill"] = v_cells.FillValidator() - self._validators["font"] = v_cells.FontValidator() - self._validators["format"] = v_cells.FormatValidator() - self._validators["formatsrc"] = v_cells.FormatsrcValidator() - self._validators["height"] = v_cells.HeightValidator() - self._validators["line"] = v_cells.LineValidator() - self._validators["prefix"] = v_cells.PrefixValidator() - self._validators["prefixsrc"] = v_cells.PrefixsrcValidator() - self._validators["suffix"] = v_cells.SuffixValidator() - self._validators["suffixsrc"] = v_cells.SuffixsrcValidator() - self._validators["values"] = v_cells.ValuesValidator() - self._validators["valuessrc"] = v_cells.ValuessrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("format", None) - self["format"] = format if format is not None else _v - _v = arg.pop("formatsrc", None) - self["formatsrc"] = formatsrc if formatsrc is not None else _v - _v = arg.pop("height", None) - self["height"] = height if height is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("prefix", None) - self["prefix"] = prefix if prefix is not None else _v - _v = arg.pop("prefixsrc", None) - self["prefixsrc"] = prefixsrc if prefixsrc is not None else _v - _v = arg.pop("suffix", None) - self["suffix"] = suffix if suffix is not None else _v - _v = arg.pop("suffixsrc", None) - self["suffixsrc"] = suffixsrc if suffixsrc is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Cells", - "Domain", - "Header", - "Hoverlabel", - "Stream", - "cells", - "header", - "hoverlabel", -] - -from plotly.graph_objs.table import hoverlabel -from plotly.graph_objs.table import header -from plotly.graph_objs.table import cells +import sys + +if sys.version_info < (3, 7): + from ._stream import Stream + from ._hoverlabel import Hoverlabel + from ._header import Header + from ._domain import Domain + from ._cells import Cells + from . import hoverlabel + from . import header + from . import cells +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".header", ".cells"], + [ + "._stream.Stream", + "._hoverlabel.Hoverlabel", + "._header.Header", + "._domain.Domain", + "._cells.Cells", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/table/_cells.py b/packages/python/plotly/plotly/graph_objs/table/_cells.py new file mode 100644 index 00000000000..6510687e390 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/_cells.py @@ -0,0 +1,606 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Cells(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table" + _path_str = "table.cells" + _valid_props = { + "align", + "alignsrc", + "fill", + "font", + "format", + "formatsrc", + "height", + "line", + "prefix", + "prefixsrc", + "suffix", + "suffixsrc", + "values", + "valuessrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the `text` within the box. Has + an effect only if `text` spans two or more lines (i.e. `text` + contains one or more
HTML tags) or if an explicit width is + set to override the text width. + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # fill + # ---- + @property + def fill(self): + """ + The 'fill' property is an instance of Fill + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.cells.Fill` + - A dict of string/value properties that will be passed + to the Fill constructor + + Supported dict properties: + + color + Sets the cell fill color. It accepts either a + specific color or an array of colors or a 2D + array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + + Returns + ------- + plotly.graph_objs.table.cells.Fill + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # font + # ---- + @property + def font(self): + """ + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.cells.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.table.cells.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # format + # ------ + @property + def format(self): + """ + Sets the cell value formatting rule using d3 formatting mini- + language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'format' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["format"] + + @format.setter + def format(self, val): + self["format"] = val + + # formatsrc + # --------- + @property + def formatsrc(self): + """ + Sets the source reference on Chart Studio Cloud for format . + + The 'formatsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["formatsrc"] + + @formatsrc.setter + def formatsrc(self, val): + self["formatsrc"] = val + + # height + # ------ + @property + def height(self): + """ + The height of cells. + + The 'height' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["height"] + + @height.setter + def height(self, val): + self["height"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.cells.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.table.cells.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # prefix + # ------ + @property + def prefix(self): + """ + Prefix for cell values. + + The 'prefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["prefix"] + + @prefix.setter + def prefix(self, val): + self["prefix"] = val + + # prefixsrc + # --------- + @property + def prefixsrc(self): + """ + Sets the source reference on Chart Studio Cloud for prefix . + + The 'prefixsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["prefixsrc"] + + @prefixsrc.setter + def prefixsrc(self, val): + self["prefixsrc"] = val + + # suffix + # ------ + @property + def suffix(self): + """ + Suffix for cell values. + + The 'suffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["suffix"] + + @suffix.setter + def suffix(self, val): + self["suffix"] = val + + # suffixsrc + # --------- + @property + def suffixsrc(self): + """ + Sets the source reference on Chart Studio Cloud for suffix . + + The 'suffixsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["suffixsrc"] + + @suffixsrc.setter + def suffixsrc(self, val): + self["suffixsrc"] = val + + # values + # ------ + @property + def values(self): + """ + Cell values. `values[m][n]` represents the value of the `n`th + point in column `m`, therefore the `values[m]` vector length + for all columns must be the same (longer vectors will be + truncated). Each value must be a finite number or a string. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + fill + :class:`plotly.graph_objects.table.cells.Fill` instance + or dict with compatible properties + font + :class:`plotly.graph_objects.table.cells.Font` instance + or dict with compatible properties + format + Sets the cell value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud for + format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.cells.Line` instance + or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud for + prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud for + suffix . + values + Cell values. `values[m][n]` represents the value of the + `n`th point in column `m`, therefore the `values[m]` + vector length for all columns must be the same (longer + vectors will be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + fill=None, + font=None, + format=None, + formatsrc=None, + height=None, + line=None, + prefix=None, + prefixsrc=None, + suffix=None, + suffixsrc=None, + values=None, + valuessrc=None, + **kwargs + ): + """ + Construct a new Cells object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.table.Cells` + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + fill + :class:`plotly.graph_objects.table.cells.Fill` instance + or dict with compatible properties + font + :class:`plotly.graph_objects.table.cells.Font` instance + or dict with compatible properties + format + Sets the cell value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud for + format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.cells.Line` instance + or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud for + prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud for + suffix . + values + Cell values. `values[m][n]` represents the value of the + `n`th point in column `m`, therefore the `values[m]` + vector length for all columns must be the same (longer + vectors will be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + + Returns + ------- + Cells + """ + super(Cells, self).__init__("cells") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.Cells +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.Cells`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("format", None) + _v = format if format is not None else _v + if _v is not None: + self["format"] = _v + _v = arg.pop("formatsrc", None) + _v = formatsrc if formatsrc is not None else _v + if _v is not None: + self["formatsrc"] = _v + _v = arg.pop("height", None) + _v = height if height is not None else _v + if _v is not None: + self["height"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("prefix", None) + _v = prefix if prefix is not None else _v + if _v is not None: + self["prefix"] = _v + _v = arg.pop("prefixsrc", None) + _v = prefixsrc if prefixsrc is not None else _v + if _v is not None: + self["prefixsrc"] = _v + _v = arg.pop("suffix", None) + _v = suffix if suffix is not None else _v + if _v is not None: + self["suffix"] = _v + _v = arg.pop("suffixsrc", None) + _v = suffixsrc if suffixsrc is not None else _v + if _v is not None: + self["suffixsrc"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/_domain.py b/packages/python/plotly/plotly/graph_objs/table/_domain.py new file mode 100644 index 00000000000..63ce6428901 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/_domain.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table" + _path_str = "table.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this table trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this table trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this table trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this table trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this table trace . + row + If there is a layout grid, use the domain for this row + in the grid for this table trace . + x + Sets the horizontal domain of this table trace (in plot + fraction). + y + Sets the vertical domain of this table trace (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.table.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this table trace . + row + If there is a layout grid, use the domain for this row + in the grid for this table trace . + x + Sets the horizontal domain of this table trace (in plot + fraction). + y + Sets the vertical domain of this table trace (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/_header.py b/packages/python/plotly/plotly/graph_objs/table/_header.py new file mode 100644 index 00000000000..706c93bdfad --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/_header.py @@ -0,0 +1,606 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Header(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table" + _path_str = "table.header" + _valid_props = { + "align", + "alignsrc", + "fill", + "font", + "format", + "formatsrc", + "height", + "line", + "prefix", + "prefixsrc", + "suffix", + "suffixsrc", + "values", + "valuessrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the `text` within the box. Has + an effect only if `text` spans two or more lines (i.e. `text` + contains one or more
HTML tags) or if an explicit width is + set to override the text width. + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # fill + # ---- + @property + def fill(self): + """ + The 'fill' property is an instance of Fill + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.header.Fill` + - A dict of string/value properties that will be passed + to the Fill constructor + + Supported dict properties: + + color + Sets the cell fill color. It accepts either a + specific color or an array of colors or a 2D + array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + + Returns + ------- + plotly.graph_objs.table.header.Fill + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # font + # ---- + @property + def font(self): + """ + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.header.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.table.header.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # format + # ------ + @property + def format(self): + """ + Sets the cell value formatting rule using d3 formatting mini- + language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'format' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["format"] + + @format.setter + def format(self, val): + self["format"] = val + + # formatsrc + # --------- + @property + def formatsrc(self): + """ + Sets the source reference on Chart Studio Cloud for format . + + The 'formatsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["formatsrc"] + + @formatsrc.setter + def formatsrc(self, val): + self["formatsrc"] = val + + # height + # ------ + @property + def height(self): + """ + The height of cells. + + The 'height' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["height"] + + @height.setter + def height(self, val): + self["height"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.header.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.table.header.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # prefix + # ------ + @property + def prefix(self): + """ + Prefix for cell values. + + The 'prefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["prefix"] + + @prefix.setter + def prefix(self, val): + self["prefix"] = val + + # prefixsrc + # --------- + @property + def prefixsrc(self): + """ + Sets the source reference on Chart Studio Cloud for prefix . + + The 'prefixsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["prefixsrc"] + + @prefixsrc.setter + def prefixsrc(self, val): + self["prefixsrc"] = val + + # suffix + # ------ + @property + def suffix(self): + """ + Suffix for cell values. + + The 'suffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["suffix"] + + @suffix.setter + def suffix(self, val): + self["suffix"] = val + + # suffixsrc + # --------- + @property + def suffixsrc(self): + """ + Sets the source reference on Chart Studio Cloud for suffix . + + The 'suffixsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["suffixsrc"] + + @suffixsrc.setter + def suffixsrc(self, val): + self["suffixsrc"] = val + + # values + # ------ + @property + def values(self): + """ + Header cell values. `values[m][n]` represents the value of the + `n`th point in column `m`, therefore the `values[m]` vector + length for all columns must be the same (longer vectors will be + truncated). Each value must be a finite number or a string. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + # valuessrc + # --------- + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for values . + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + fill + :class:`plotly.graph_objects.table.header.Fill` + instance or dict with compatible properties + font + :class:`plotly.graph_objects.table.header.Font` + instance or dict with compatible properties + format + Sets the cell value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud for + format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.header.Line` + instance or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud for + prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud for + suffix . + values + Header cell values. `values[m][n]` represents the value + of the `n`th point in column `m`, therefore the + `values[m]` vector length for all columns must be the + same (longer vectors will be truncated). Each value + must be a finite number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + fill=None, + font=None, + format=None, + formatsrc=None, + height=None, + line=None, + prefix=None, + prefixsrc=None, + suffix=None, + suffixsrc=None, + values=None, + valuessrc=None, + **kwargs + ): + """ + Construct a new Header object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.table.Header` + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + fill + :class:`plotly.graph_objects.table.header.Fill` + instance or dict with compatible properties + font + :class:`plotly.graph_objects.table.header.Font` + instance or dict with compatible properties + format + Sets the cell value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud for + format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.header.Line` + instance or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud for + prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud for + suffix . + values + Header cell values. `values[m][n]` represents the value + of the `n`th point in column `m`, therefore the + `values[m]` vector length for all columns must be the + same (longer vectors will be truncated). Each value + must be a finite number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud for + values . + + Returns + ------- + Header + """ + super(Header, self).__init__("header") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.Header +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.Header`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("format", None) + _v = format if format is not None else _v + if _v is not None: + self["format"] = _v + _v = arg.pop("formatsrc", None) + _v = formatsrc if formatsrc is not None else _v + if _v is not None: + self["formatsrc"] = _v + _v = arg.pop("height", None) + _v = height if height is not None else _v + if _v is not None: + self["height"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("prefix", None) + _v = prefix if prefix is not None else _v + if _v is not None: + self["prefix"] = _v + _v = arg.pop("prefixsrc", None) + _v = prefixsrc if prefixsrc is not None else _v + if _v is not None: + self["prefixsrc"] = _v + _v = arg.pop("suffix", None) + _v = suffix if suffix is not None else _v + if _v is not None: + self["suffix"] = _v + _v = arg.pop("suffixsrc", None) + _v = suffixsrc if suffixsrc is not None else _v + if _v is not None: + self["suffixsrc"] = _v + _v = arg.pop("values", None) + _v = values if values is not None else _v + if _v is not None: + self["values"] = _v + _v = arg.pop("valuessrc", None) + _v = valuessrc if valuessrc is not None else _v + if _v is not None: + self["valuessrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/table/_hoverlabel.py new file mode 100644 index 00000000000..855f17c3310 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table" + _path_str = "table.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.table.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/_stream.py b/packages/python/plotly/plotly/graph_objs/table/_stream.py new file mode 100644 index 00000000000..d90679aaece --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table" + _path_str = "table.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.table.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py b/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py index 2dda006c5a9..735d76cba9b 100644 --- a/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py @@ -1,727 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - The 'width' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.cells" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.cells.Line` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.table.cells.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.cells.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.cells import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.cells" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.cells.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.table.cells.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.cells.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.cells import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Fill(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the cell fill color. It accepts either a specific color or - an array of colors or a 2D array of colors. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.cells" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the cell fill color. It accepts either a specific - color or an array of colors or a 2D array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - """ - - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): - """ - Construct a new Fill object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.cells.Fill` - color - Sets the cell fill color. It accepts either a specific - color or an array of colors or a 2D array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - - Returns - ------- - Fill - """ - super(Fill, self).__init__("fill") - - # Validate arg - # ------------ - 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.table.cells.Fill -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.cells.Fill`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.cells import fill as v_fill - - # Initialize validators - # --------------------- - self._validators["color"] = v_fill.ColorValidator() - self._validators["colorsrc"] = v_fill.ColorsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Fill", "Font", "Line"] +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._font import Font + from ._fill import Fill +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.Line", "._font.Font", "._fill.Fill"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/table/cells/_fill.py b/packages/python/plotly/plotly/graph_objs/table/cells/_fill.py new file mode 100644 index 00000000000..3a155550d18 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/cells/_fill.py @@ -0,0 +1,171 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Fill(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.cells" + _path_str = "table.cells.fill" + _valid_props = {"color", "colorsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the cell fill color. It accepts either a specific color or + an array of colors or a 2D array of colors. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the cell fill color. It accepts either a specific + color or an array of colors or a 2D array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + """ + + def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + """ + Construct a new Fill object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.cells.Fill` + color + Sets the cell fill color. It accepts either a specific + color or an array of colors or a 2D array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + + Returns + ------- + Fill + """ + super(Fill, self).__init__("fill") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.cells.Fill +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.cells.Fill`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/cells/_font.py b/packages/python/plotly/plotly/graph_objs/table/cells/_font.py new file mode 100644 index 00000000000..ef09bb8b2e0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/cells/_font.py @@ -0,0 +1,327 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.cells" + _path_str = "table.cells.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.cells.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.cells.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.cells.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/cells/_line.py b/packages/python/plotly/plotly/graph_objs/table/cells/_line.py new file mode 100644 index 00000000000..dea3f3ecd60 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/cells/_line.py @@ -0,0 +1,225 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.cells" + _path_str = "table.cells.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + The 'width' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.cells.Line` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.cells.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.cells.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/header/__init__.py b/packages/python/plotly/plotly/graph_objs/table/header/__init__.py index e18b41781e1..735d76cba9b 100644 --- a/packages/python/plotly/plotly/graph_objs/table/header/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/header/__init__.py @@ -1,727 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - The 'width' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.header" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.header.Line` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.table.header.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.header.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.header import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.header" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.header.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.table.header.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.header.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.header import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Fill(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the cell fill color. It accepts either a specific color or - an array of colors or a 2D array of colors. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.header" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the cell fill color. It accepts either a specific - color or an array of colors or a 2D array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - """ - - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): - """ - Construct a new Fill object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.header.Fill` - color - Sets the cell fill color. It accepts either a specific - color or an array of colors or a 2D array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - - Returns - ------- - Fill - """ - super(Fill, self).__init__("fill") - - # Validate arg - # ------------ - 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.table.header.Fill -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.header.Fill`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.header import fill as v_fill - - # Initialize validators - # --------------------- - self._validators["color"] = v_fill.ColorValidator() - self._validators["colorsrc"] = v_fill.ColorsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Fill", "Font", "Line"] +import sys + +if sys.version_info < (3, 7): + from ._line import Line + from ._font import Font + from ._fill import Fill +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.Line", "._font.Font", "._fill.Fill"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/table/header/_fill.py b/packages/python/plotly/plotly/graph_objs/table/header/_fill.py new file mode 100644 index 00000000000..7aa8406b276 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/header/_fill.py @@ -0,0 +1,171 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Fill(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.header" + _path_str = "table.header.fill" + _valid_props = {"color", "colorsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the cell fill color. It accepts either a specific color or + an array of colors or a 2D array of colors. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the cell fill color. It accepts either a specific + color or an array of colors or a 2D array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + """ + + def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + """ + Construct a new Fill object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.header.Fill` + color + Sets the cell fill color. It accepts either a specific + color or an array of colors or a 2D array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + + Returns + ------- + Fill + """ + super(Fill, self).__init__("fill") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.header.Fill +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.header.Fill`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/header/_font.py b/packages/python/plotly/plotly/graph_objs/table/header/_font.py new file mode 100644 index 00000000000..47cfa3f0776 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/header/_font.py @@ -0,0 +1,327 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.header" + _path_str = "table.header.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.header.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.header.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.header.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/header/_line.py b/packages/python/plotly/plotly/graph_objs/table/header/_line.py new file mode 100644 index 00000000000..375ba5c4997 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/header/_line.py @@ -0,0 +1,225 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.header" + _path_str = "table.header.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + The 'width' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.header.Line` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.header.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.header.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py index dd733101d1f..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "table.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.table.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.table.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.table.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.table.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/table/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/table/hoverlabel/_font.py new file mode 100644 index 00000000000..e53df1d4d45 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/table/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "table.hoverlabel" + _path_str = "table.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.table.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.table.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.table.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/__init__.py index 0b4d7b254dd..3e6ca82508f 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/__init__.py @@ -1,3279 +1,33 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tiling(_BaseTraceHierarchyType): - - # flip - # ---- - @property - def flip(self): - """ - Determines if the positions obtained from solver are flipped on - each axis. - - The 'flip' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y'] joined with '+' characters - (e.g. 'x+y') - - Returns - ------- - Any - """ - return self["flip"] - - @flip.setter - def flip(self, val): - self["flip"] = val - - # packing - # ------- - @property - def packing(self): - """ - Determines d3 treemap solver. For more info please refer to - https://github.com/d3/d3-hierarchy#treemap-tiling - - The 'packing' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['squarify', 'binary', 'dice', 'slice', 'slice-dice', - 'dice-slice'] - - Returns - ------- - Any - """ - return self["packing"] - - @packing.setter - def packing(self, val): - self["packing"] = val - - # pad - # --- - @property - def pad(self): - """ - Sets the inner padding (in px). - - The 'pad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # squarifyratio - # ------------- - @property - def squarifyratio(self): - """ - When using "squarify" `packing` algorithm, according to https:/ - /github.com/d3/d3-hierarchy/blob/master/README.md#squarify_rati - o this option specifies the desired aspect ratio of the - generated rectangles. The ratio must be specified as a number - greater than or equal to one. Note that the orientation of the - generated rectangles (tall or wide) is not implied by the - ratio; for example, a ratio of two will attempt to produce a - mixture of rectangles whose width:height ratio is either 2:1 or - 1:2. When using "squarify", unlike d3 which uses the Golden - Ratio i.e. 1.618034, Plotly applies 1 to increase squares in - treemap layouts. - - The 'squarifyratio' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - Returns - ------- - int|float - """ - return self["squarifyratio"] - - @squarifyratio.setter - def squarifyratio(self, val): - self["squarifyratio"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - flip - Determines if the positions obtained from solver are - flipped on each axis. - packing - Determines d3 treemap solver. For more info please - refer to https://github.com/d3/d3-hierarchy#treemap- - tiling - pad - Sets the inner padding (in px). - squarifyratio - When using "squarify" `packing` algorithm, according to - https://github.com/d3/d3-hierarchy/blob/master/README.m - d#squarify_ratio this option specifies the desired - aspect ratio of the generated rectangles. The ratio - must be specified as a number greater than or equal to - one. Note that the orientation of the generated - rectangles (tall or wide) is not implied by the ratio; - for example, a ratio of two will attempt to produce a - mixture of rectangles whose width:height ratio is - either 2:1 or 1:2. When using "squarify", unlike d3 - which uses the Golden Ratio i.e. 1.618034, Plotly - applies 1 to increase squares in treemap layouts. - """ - - def __init__( - self, arg=None, flip=None, packing=None, pad=None, squarifyratio=None, **kwargs - ): - """ - Construct a new Tiling object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Tiling` - flip - Determines if the positions obtained from solver are - flipped on each axis. - packing - Determines d3 treemap solver. For more info please - refer to https://github.com/d3/d3-hierarchy#treemap- - tiling - pad - Sets the inner padding (in px). - squarifyratio - When using "squarify" `packing` algorithm, according to - https://github.com/d3/d3-hierarchy/blob/master/README.m - d#squarify_ratio this option specifies the desired - aspect ratio of the generated rectangles. The ratio - must be specified as a number greater than or equal to - one. Note that the orientation of the generated - rectangles (tall or wide) is not implied by the ratio; - for example, a ratio of two will attempt to produce a - mixture of rectangles whose width:height ratio is - either 2:1 or 1:2. When using "squarify", unlike d3 - which uses the Golden Ratio i.e. 1.618034, Plotly - applies 1 to increase squares in treemap layouts. - - Returns - ------- - Tiling - """ - super(Tiling, self).__init__("tiling") - - # Validate arg - # ------------ - 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.treemap.Tiling -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Tiling`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import tiling as v_tiling - - # Initialize validators - # --------------------- - self._validators["flip"] = v_tiling.FlipValidator() - self._validators["packing"] = v_tiling.PackingValidator() - self._validators["pad"] = v_tiling.PadValidator() - self._validators["squarifyratio"] = v_tiling.SquarifyratioValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("flip", None) - self["flip"] = flip if flip is not None else _v - _v = arg.pop("packing", None) - self["packing"] = packing if packing is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("squarifyratio", None) - self["squarifyratio"] = squarifyratio if squarifyratio is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `textinfo`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.treemap.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.treemap.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Pathbar(_BaseTraceHierarchyType): - - # edgeshape - # --------- - @property - def edgeshape(self): - """ - Determines which shape is used for edges between `barpath` - labels. - - The 'edgeshape' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['>', '<', '|', '\\'] - - A string that matches one of the following regular expressions: - [''] - - Returns - ------- - Any - """ - return self["edgeshape"] - - @edgeshape.setter - def edgeshape(self, val): - self["edgeshape"] = val - - # side - # ---- - @property - def side(self): - """ - Determines on which side of the the treemap the `pathbar` - should be presented. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used inside `pathbar`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.pathbar.Textfont` - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.treemap.pathbar.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of `pathbar` (in px). If not specified the - `pathbar.textfont.size` is used with 3 pixles extra padding on - each side. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [12, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines if the path bar is drawn i.e. outside the trace - `domain` and with one pixel gap. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - edgeshape - Determines which shape is used for edges between - `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used with 3 - pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. outside the - trace `domain` and with one pixel gap. - """ - - def __init__( - self, - arg=None, - edgeshape=None, - side=None, - textfont=None, - thickness=None, - visible=None, - **kwargs - ): - """ - Construct a new Pathbar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Pathbar` - edgeshape - Determines which shape is used for edges between - `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used with 3 - pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. outside the - trace `domain` and with one pixel gap. - - Returns - ------- - Pathbar - """ - super(Pathbar, self).__init__("pathbar") - - # Validate arg - # ------------ - 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.treemap.Pathbar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Pathbar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import pathbar as v_pathbar - - # Initialize validators - # --------------------- - self._validators["edgeshape"] = v_pathbar.EdgeshapeValidator() - self._validators["side"] = v_pathbar.SideValidator() - self._validators["textfont"] = v_pathbar.TextfontValidator() - self._validators["thickness"] = v_pathbar.ThicknessValidator() - self._validators["visible"] = v_pathbar.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("edgeshape", None) - self["edgeshape"] = edgeshape if edgeshape is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Outsidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Outsidetextfont object - - Sets the font used for `textinfo` lying outside the sector. - This option refers to the root of the hierarchy presented on - top left corner of a treemap graph. Please note that if a - hierarchy has multiple root nodes, this option won't have any - effect and `insidetextfont` would be used. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Outsidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Outsidetextfont - """ - super(Outsidetextfont, self).__init__("outsidetextfont") - - # Validate arg - # ------------ - 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.treemap.Outsidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Outsidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import outsidetextfont as v_outsidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_outsidetextfont.ColorValidator() - self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() - self._validators["family"] = v_outsidetextfont.FamilyValidator() - self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() - self._validators["size"] = v_outsidetextfont.SizeValidator() - self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if colorsis set to a - numerical array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here colors) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect only if colorsis - set to a numerical array. Defaults to `false` when - `marker.cmin` and `marker.cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Has an effect only if - colorsis set to a numerical array. Value should have the same - units as colors and if set, `marker.cmin` must be set as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `marker.cmin` - and/or `marker.cmax` to be equidistant to this point. Has an - effect only if colorsis set to a numerical array. Value should - have the same units as colors. Has no effect when - `marker.cauto` is `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Has an effect only if - colorsis set to a numerical array. Value should have the same - units as colors and if set, `marker.cmax` must be set as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.ColorBar` - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.treemap - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.treemap.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - treemap.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.treemap.marker.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - treemap.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - treemap.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.treemap.marker.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colors - # ------ - @property - def colors(self): - """ - Sets the color of each sector of this trace. If not specified, - the default trace color set is used to pick the sector colors. - - The 'colors' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["colors"] - - @colors.setter - def colors(self, val): - self["colors"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. Has an effect only if colorsis set to a - numerical array. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu,Greens,YlOrRd,B - luered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbod - y,Earth,Electric,Viridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. - Appending '_r' to a named colorscale reverses it. - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # colorssrc - # --------- - @property - def colorssrc(self): - """ - Sets the source reference on Chart Studio Cloud for colors . - - The 'colorssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorssrc"] - - @colorssrc.setter - def colorssrc(self, val): - self["colorssrc"] = val - - # depthfade - # --------- - @property - def depthfade(self): - """ - Determines if the sector colors are faded towards the - background from the leaves up to the headers. This option is - unavailable when a `colorscale` is present, defaults to false - when `marker.colors` is set, but otherwise defaults to true. - When set to "reversed", the fading direction is inverted, that - is the top elements within hierarchy are drawn with fully - saturated colors while the leaves are faded towards the - background color. - - The 'depthfade' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'reversed'] - - Returns - ------- - Any - """ - return self["depthfade"] - - @depthfade.setter - def depthfade(self, val): - self["depthfade"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - - Returns - ------- - plotly.graph_objs.treemap.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # pad - # --- - @property - def pad(self): - """ - The 'pad' property is an instance of Pad - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.Pad` - - A dict of string/value properties that will be passed - to the Pad constructor - - Supported dict properties: - - b - Sets the padding form the bottom (in px). - l - Sets the padding form the left (in px). - r - Sets the padding form the right (in px). - t - Sets the padding form the top (in px). - - Returns - ------- - plotly.graph_objs.treemap.marker.Pad - """ - return self["pad"] - - @pad.setter - def pad(self, val): - self["pad"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. Has an effect only if - colorsis set to a numerical array. If true, `marker.cmin` will - correspond to the last color in the array and `marker.cmax` - will correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. Has an effect only if colorsis set to a numerical array. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if colorsis set - to a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the default - palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or - mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here colors) or the - bounds set in `marker.cmin` and `marker.cmax` Has an - effect only if colorsis set to a numerical array. - Defaults to `false` when `marker.cmin` and - `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if colorsis set to a - numerical array. Value should have the same units as - colors. Has no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.treemap.marker.ColorBar` - instance or dict with compatible properties - colors - Sets the color of each sector of this trace. If not - specified, the default trace color set is used to pick - the sector colors. - colorscale - Sets the colorscale. Has an effect only if colorsis set - to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - depthfade - Determines if the sector colors are faded towards the - background from the leaves up to the headers. This - option is unavailable when a `colorscale` is present, - defaults to false when `marker.colors` is set, but - otherwise defaults to true. When set to "reversed", the - fading direction is inverted, that is the top elements - within hierarchy are drawn with fully saturated colors - while the leaves are faded towards the background - color. - line - :class:`plotly.graph_objects.treemap.marker.Line` - instance or dict with compatible properties - pad - :class:`plotly.graph_objects.treemap.marker.Pad` - instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an effect only - if colorsis set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the - array and `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if colorsis set to a - numerical array. - """ - - def __init__( - self, - arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colors=None, - colorscale=None, - colorssrc=None, - depthfade=None, - line=None, - pad=None, - reversescale=None, - showscale=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Marker` - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `marker.colorscale`. Has an effect only if colorsis set - to a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the default - palette will be chosen according to whether numbers in - the `color` array are all positive, all negative or - mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here colors) or the - bounds set in `marker.cmin` and `marker.cmax` Has an - effect only if colorsis set to a numerical array. - Defaults to `false` when `marker.cmin` and - `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `marker.cmin` and/or `marker.cmax` to be equidistant to - this point. Has an effect only if colorsis set to a - numerical array. Value should have the same units as - colors. Has no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has an effect - only if colorsis set to a numerical array. Value should - have the same units as colors and if set, `marker.cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - :class:`plotly.graph_objects.treemap.marker.ColorBar` - instance or dict with compatible properties - colors - Sets the color of each sector of this trace. If not - specified, the default trace color set is used to pick - the sector colors. - colorscale - Sets the colorscale. Has an effect only if colorsis set - to a numerical array. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P - ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi - s. - colorssrc - Sets the source reference on Chart Studio Cloud for - colors . - depthfade - Determines if the sector colors are faded towards the - background from the leaves up to the headers. This - option is unavailable when a `colorscale` is present, - defaults to false when `marker.colors` is set, but - otherwise defaults to true. When set to "reversed", the - fading direction is inverted, that is the top elements - within hierarchy are drawn with fully saturated colors - while the leaves are faded towards the background - color. - line - :class:`plotly.graph_objects.treemap.marker.Line` - instance or dict with compatible properties - pad - :class:`plotly.graph_objects.treemap.marker.Pad` - instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an effect only - if colorsis set to a numerical array. If true, - `marker.cmin` will correspond to the last color in the - array and `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is displayed for - this trace. Has an effect only if colorsis set to a - numerical array. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.treemap.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() - self._validators["cauto"] = v_marker.CautoValidator() - self._validators["cmax"] = v_marker.CmaxValidator() - self._validators["cmid"] = v_marker.CmidValidator() - self._validators["cmin"] = v_marker.CminValidator() - self._validators["coloraxis"] = v_marker.ColoraxisValidator() - self._validators["colorbar"] = v_marker.ColorBarValidator() - self._validators["colors"] = v_marker.ColorsValidator() - self._validators["colorscale"] = v_marker.ColorscaleValidator() - self._validators["colorssrc"] = v_marker.ColorssrcValidator() - self._validators["depthfade"] = v_marker.DepthfadeValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["pad"] = v_marker.PadValidator() - self._validators["reversescale"] = v_marker.ReversescaleValidator() - self._validators["showscale"] = v_marker.ShowscaleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colors", None) - self["colors"] = colors if colors is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorssrc", None) - self["colorssrc"] = colorssrc if colorssrc is not None else _v - _v = arg.pop("depthfade", None) - self["depthfade"] = depthfade if depthfade is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("pad", None) - self["pad"] = pad if pad is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `textinfo` lying inside the sector. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.treemap.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.treemap.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.treemap.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Domain(_BaseTraceHierarchyType): - - # column - # ------ - @property - def column(self): - """ - If there is a layout grid, use the domain for this column in - the grid for this treemap trace . - - The 'column' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["column"] - - @column.setter - def column(self, val): - self["column"] = val - - # row - # --- - @property - def row(self): - """ - If there is a layout grid, use the domain for this row in the - grid for this treemap trace . - - The 'row' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["row"] - - @row.setter - def row(self, val): - self["row"] = val - - # x - # - - @property - def x(self): - """ - Sets the horizontal domain of this treemap trace (in plot - fraction). - - The 'x' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'x[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'x[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Sets the vertical domain of this treemap trace (in plot - fraction). - - The 'y' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'y[0]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - (1) The 'y[1]' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - list - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - column - If there is a layout grid, use the domain for this - column in the grid for this treemap trace . - row - If there is a layout grid, use the domain for this row - in the grid for this treemap trace . - x - Sets the horizontal domain of this treemap trace (in - plot fraction). - y - Sets the vertical domain of this treemap trace (in plot - fraction). - """ - - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): - """ - Construct a new Domain object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.Domain` - column - If there is a layout grid, use the domain for this - column in the grid for this treemap trace . - row - If there is a layout grid, use the domain for this row - in the grid for this treemap trace . - x - Sets the horizontal domain of this treemap trace (in - plot fraction). - y - Sets the vertical domain of this treemap trace (in plot - fraction). - - Returns - ------- - Domain - """ - super(Domain, self).__init__("domain") - - # Validate arg - # ------------ - 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.treemap.Domain -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.Domain`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap import domain as v_domain - - # Initialize validators - # --------------------- - self._validators["column"] = v_domain.ColumnValidator() - self._validators["row"] = v_domain.RowValidator() - self._validators["x"] = v_domain.XValidator() - self._validators["y"] = v_domain.YValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - self["column"] = column if column is not None else _v - _v = arg.pop("row", None) - self["row"] = row if row is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Domain", - "Hoverlabel", - "Insidetextfont", - "Marker", - "Outsidetextfont", - "Pathbar", - "Stream", - "Textfont", - "Tiling", - "hoverlabel", - "marker", - "pathbar", -] - -from plotly.graph_objs.treemap import pathbar -from plotly.graph_objs.treemap import marker -from plotly.graph_objs.treemap import hoverlabel +import sys + +if sys.version_info < (3, 7): + from ._tiling import Tiling + from ._textfont import Textfont + from ._stream import Stream + from ._pathbar import Pathbar + from ._outsidetextfont import Outsidetextfont + from ._marker import Marker + from ._insidetextfont import Insidetextfont + from ._hoverlabel import Hoverlabel + from ._domain import Domain + from . import pathbar + from . import marker + from . import hoverlabel +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".pathbar", ".marker", ".hoverlabel"], + [ + "._tiling.Tiling", + "._textfont.Textfont", + "._stream.Stream", + "._pathbar.Pathbar", + "._outsidetextfont.Outsidetextfont", + "._marker.Marker", + "._insidetextfont.Insidetextfont", + "._hoverlabel.Hoverlabel", + "._domain.Domain", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_domain.py b/packages/python/plotly/plotly/graph_objs/treemap/_domain.py new file mode 100644 index 00000000000..0ea1666fc14 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_domain.py @@ -0,0 +1,206 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.domain" + _valid_props = {"column", "row", "x", "y"} + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this treemap trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this treemap trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this treemap trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this treemap trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this treemap trace . + row + If there is a layout grid, use the domain for this row + in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap trace (in + plot fraction). + y + Sets the vertical domain of this treemap trace (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Domain` + column + If there is a layout grid, use the domain for this + column in the grid for this treemap trace . + row + If there is a layout grid, use the domain for this row + in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap trace (in + plot fraction). + y + Sets the vertical domain of this treemap trace (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Domain +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Domain`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + _v = column if column is not None else _v + if _v is not None: + self["column"] = _v + _v = arg.pop("row", None) + _v = row if row is not None else _v + if _v is not None: + self["row"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/treemap/_hoverlabel.py new file mode 100644 index 00000000000..3f0989ddeeb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.treemap.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/treemap/_insidetextfont.py new file mode 100644 index 00000000000..a97f56e8fb4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `textinfo` lying inside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_marker.py b/packages/python/plotly/plotly/graph_objs/treemap/_marker.py new file mode 100644 index 00000000000..50305369ded --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_marker.py @@ -0,0 +1,958 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colors", + "colorscale", + "colorssrc", + "depthfade", + "line", + "pad", + "reversescale", + "showscale", + } + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set to a + numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here colors) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` when + `marker.cmin` and `marker.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if colorsis set to a numerical array. Value should + have the same units as colors. Has no effect when + `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.treemap + .marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.treemap.marker.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.treemap.marker.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.treemap.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colors + # ------ + @property + def colors(self): + """ + Sets the color of each sector of this trace. If not specified, + the default trace color set is used to pick the sector colors. + + The 'colors' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["colors"] + + @colors.setter + def colors(self, val): + self["colors"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if colorsis set to a + numerical array. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu,Greens,YlOrRd,B + luered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbod + y,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorssrc + # --------- + @property + def colorssrc(self): + """ + Sets the source reference on Chart Studio Cloud for colors . + + The 'colorssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorssrc"] + + @colorssrc.setter + def colorssrc(self, val): + self["colorssrc"] = val + + # depthfade + # --------- + @property + def depthfade(self): + """ + Determines if the sector colors are faded towards the + background from the leaves up to the headers. This option is + unavailable when a `colorscale` is present, defaults to false + when `marker.colors` is set, but otherwise defaults to true. + When set to "reversed", the fading direction is inverted, that + is the top elements within hierarchy are drawn with fully + saturated colors while the leaves are faded towards the + background color. + + The 'depthfade' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["depthfade"] + + @depthfade.setter + def depthfade(self, val): + self["depthfade"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + + Returns + ------- + plotly.graph_objs.treemap.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # pad + # --- + @property + def pad(self): + """ + The 'pad' property is an instance of Pad + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.Pad` + - A dict of string/value properties that will be passed + to the Pad constructor + + Supported dict properties: + + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). + + Returns + ------- + plotly.graph_objs.treemap.marker.Pad + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if + colorsis set to a numerical array. If true, `marker.cmin` will + correspond to the last color in the array and `marker.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if colorsis set to a numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.treemap.marker.ColorBar` + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + depthfade + Determines if the sector colors are faded towards the + background from the leaves up to the headers. This + option is unavailable when a `colorscale` is present, + defaults to false when `marker.colors` is set, but + otherwise defaults to true. When set to "reversed", the + fading direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated colors + while the leaves are faded towards the background + color. + line + :class:`plotly.graph_objects.treemap.marker.Line` + instance or dict with compatible properties + pad + :class:`plotly.graph_objects.treemap.marker.Pad` + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colors=None, + colorscale=None, + colorssrc=None, + depthfade=None, + line=None, + pad=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.treemap.marker.ColorBar` + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorssrc + Sets the source reference on Chart Studio Cloud for + colors . + depthfade + Determines if the sector colors are faded towards the + background from the leaves up to the headers. This + option is unavailable when a `colorscale` is present, + defaults to false when `marker.colors` is set, but + otherwise defaults to true. When set to "reversed", the + fading direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated colors + while the leaves are faded towards the background + color. + line + :class:`plotly.graph_objects.treemap.marker.Line` + instance or dict with compatible properties + pad + :class:`plotly.graph_objects.treemap.marker.Pad` + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + _v = autocolorscale if autocolorscale is not None else _v + if _v is not None: + self["autocolorscale"] = _v + _v = arg.pop("cauto", None) + _v = cauto if cauto is not None else _v + if _v is not None: + self["cauto"] = _v + _v = arg.pop("cmax", None) + _v = cmax if cmax is not None else _v + if _v is not None: + self["cmax"] = _v + _v = arg.pop("cmid", None) + _v = cmid if cmid is not None else _v + if _v is not None: + self["cmid"] = _v + _v = arg.pop("cmin", None) + _v = cmin if cmin is not None else _v + if _v is not None: + self["cmin"] = _v + _v = arg.pop("coloraxis", None) + _v = coloraxis if coloraxis is not None else _v + if _v is not None: + self["coloraxis"] = _v + _v = arg.pop("colorbar", None) + _v = colorbar if colorbar is not None else _v + if _v is not None: + self["colorbar"] = _v + _v = arg.pop("colors", None) + _v = colors if colors is not None else _v + if _v is not None: + self["colors"] = _v + _v = arg.pop("colorscale", None) + _v = colorscale if colorscale is not None else _v + if _v is not None: + self["colorscale"] = _v + _v = arg.pop("colorssrc", None) + _v = colorssrc if colorssrc is not None else _v + if _v is not None: + self["colorssrc"] = _v + _v = arg.pop("depthfade", None) + _v = depthfade if depthfade is not None else _v + if _v is not None: + self["depthfade"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("reversescale", None) + _v = reversescale if reversescale is not None else _v + if _v is not None: + self["reversescale"] = _v + _v = arg.pop("showscale", None) + _v = showscale if showscale is not None else _v + if _v is not None: + self["showscale"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_outsidetextfont.py b/packages/python/plotly/plotly/graph_objs/treemap/_outsidetextfont.py new file mode 100644 index 00000000000..a5fe98eaaec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_outsidetextfont.py @@ -0,0 +1,333 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.outsidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented on + top left corner of a treemap graph. Please note that if a + hierarchy has multiple root nodes, this option won't have any + effect and `insidetextfont` would be used. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Outsidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_pathbar.py b/packages/python/plotly/plotly/graph_objs/treemap/_pathbar.py new file mode 100644 index 00000000000..fc36206d874 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_pathbar.py @@ -0,0 +1,274 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Pathbar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.pathbar" + _valid_props = {"edgeshape", "side", "textfont", "thickness", "visible"} + + # edgeshape + # --------- + @property + def edgeshape(self): + """ + Determines which shape is used for edges between `barpath` + labels. + + The 'edgeshape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['>', '<', '|', '\\'] + - A string that matches one of the following regular expressions: + [''] + + Returns + ------- + Any + """ + return self["edgeshape"] + + @edgeshape.setter + def edgeshape(self, val): + self["edgeshape"] = val + + # side + # ---- + @property + def side(self): + """ + Determines on which side of the the treemap the `pathbar` + should be presented. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used inside `pathbar`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.pathbar.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.treemap.pathbar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of `pathbar` (in px). If not specified the + `pathbar.textfont.size` is used with 3 pixles extra padding on + each side. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [12, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines if the path bar is drawn i.e. outside the trace + `domain` and with one pixel gap. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + edgeshape + Determines which shape is used for edges between + `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used with 3 + pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. outside the + trace `domain` and with one pixel gap. + """ + + def __init__( + self, + arg=None, + edgeshape=None, + side=None, + textfont=None, + thickness=None, + visible=None, + **kwargs + ): + """ + Construct a new Pathbar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Pathbar` + edgeshape + Determines which shape is used for edges between + `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used with 3 + pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. outside the + trace `domain` and with one pixel gap. + + Returns + ------- + Pathbar + """ + super(Pathbar, self).__init__("pathbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Pathbar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Pathbar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("edgeshape", None) + _v = edgeshape if edgeshape is not None else _v + if _v is not None: + self["edgeshape"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("textfont", None) + _v = textfont if textfont is not None else _v + if _v is not None: + self["textfont"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_stream.py b/packages/python/plotly/plotly/graph_objs/treemap/_stream.py new file mode 100644 index 00000000000..ae6b85a25a6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_textfont.py b/packages/python/plotly/plotly/graph_objs/treemap/_textfont.py new file mode 100644 index 00000000000..7d1fbc248a0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `textinfo`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/_tiling.py b/packages/python/plotly/plotly/graph_objs/treemap/_tiling.py new file mode 100644 index 00000000000..5e2a1623bc0 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/_tiling.py @@ -0,0 +1,228 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tiling(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap" + _path_str = "treemap.tiling" + _valid_props = {"flip", "packing", "pad", "squarifyratio"} + + # flip + # ---- + @property + def flip(self): + """ + Determines if the positions obtained from solver are flipped on + each axis. + + The 'flip' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y'] joined with '+' characters + (e.g. 'x+y') + + Returns + ------- + Any + """ + return self["flip"] + + @flip.setter + def flip(self, val): + self["flip"] = val + + # packing + # ------- + @property + def packing(self): + """ + Determines d3 treemap solver. For more info please refer to + https://github.com/d3/d3-hierarchy#treemap-tiling + + The 'packing' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['squarify', 'binary', 'dice', 'slice', 'slice-dice', + 'dice-slice'] + + Returns + ------- + Any + """ + return self["packing"] + + @packing.setter + def packing(self, val): + self["packing"] = val + + # pad + # --- + @property + def pad(self): + """ + Sets the inner padding (in px). + + The 'pad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # squarifyratio + # ------------- + @property + def squarifyratio(self): + """ + When using "squarify" `packing` algorithm, according to https:/ + /github.com/d3/d3-hierarchy/blob/master/README.md#squarify_rati + o this option specifies the desired aspect ratio of the + generated rectangles. The ratio must be specified as a number + greater than or equal to one. Note that the orientation of the + generated rectangles (tall or wide) is not implied by the + ratio; for example, a ratio of two will attempt to produce a + mixture of rectangles whose width:height ratio is either 2:1 or + 1:2. When using "squarify", unlike d3 which uses the Golden + Ratio i.e. 1.618034, Plotly applies 1 to increase squares in + treemap layouts. + + The 'squarifyratio' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["squarifyratio"] + + @squarifyratio.setter + def squarifyratio(self, val): + self["squarifyratio"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + flip + Determines if the positions obtained from solver are + flipped on each axis. + packing + Determines d3 treemap solver. For more info please + refer to https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, according to + https://github.com/d3/d3-hierarchy/blob/master/README.m + d#squarify_ratio this option specifies the desired + aspect ratio of the generated rectangles. The ratio + must be specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the ratio; + for example, a ratio of two will attempt to produce a + mixture of rectangles whose width:height ratio is + either 2:1 or 1:2. When using "squarify", unlike d3 + which uses the Golden Ratio i.e. 1.618034, Plotly + applies 1 to increase squares in treemap layouts. + """ + + def __init__( + self, arg=None, flip=None, packing=None, pad=None, squarifyratio=None, **kwargs + ): + """ + Construct a new Tiling object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.Tiling` + flip + Determines if the positions obtained from solver are + flipped on each axis. + packing + Determines d3 treemap solver. For more info please + refer to https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, according to + https://github.com/d3/d3-hierarchy/blob/master/README.m + d#squarify_ratio this option specifies the desired + aspect ratio of the generated rectangles. The ratio + must be specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the ratio; + for example, a ratio of two will attempt to produce a + mixture of rectangles whose width:height ratio is + either 2:1 or 1:2. When using "squarify", unlike d3 + which uses the Golden Ratio i.e. 1.618034, Plotly + applies 1 to increase squares in treemap layouts. + + Returns + ------- + Tiling + """ + super(Tiling, self).__init__("tiling") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.Tiling +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.Tiling`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("flip", None) + _v = flip if flip is not None else _v + if _v is not None: + self["flip"] = _v + _v = arg.pop("packing", None) + _v = packing if packing is not None else _v + if _v is not None: + self["packing"] = _v + _v = arg.pop("pad", None) + _v = pad if pad is not None else _v + if _v is not None: + self["pad"] = _v + _v = arg.pop("squarifyratio", None) + _v = squarifyratio if squarifyratio is not None else _v + if _v is not None: + self["squarifyratio"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py index 359759becf9..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.treemap.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/_font.py new file mode 100644 index 00000000000..b274f14e97d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.hoverlabel" + _path_str = "treemap.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py index c2d46025cda..5a8ee3f3ef6 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py @@ -1,2288 +1,13 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Pad(_BaseTraceHierarchyType): - - # b - # - - @property - def b(self): - """ - Sets the padding form the bottom (in px). - - The 'b' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # l - # - - @property - def l(self): - """ - Sets the padding form the left (in px). - - The 'l' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["l"] - - @l.setter - def l(self, val): - self["l"] = val - - # r - # - - @property - def r(self): - """ - Sets the padding form the right (in px). - - The 'r' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # t - # - - @property - def t(self): - """ - Sets the padding form the top (in px). - - The 't' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - b - Sets the padding form the bottom (in px). - l - Sets the padding form the left (in px). - r - Sets the padding form the right (in px). - t - Sets the padding form the top (in px). - """ - - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): - """ - Construct a new Pad object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.marker.Pad` - b - Sets the padding form the bottom (in px). - l - Sets the padding form the left (in px). - r - Sets the padding form the right (in px). - t - Sets the padding form the top (in px). - - Returns - ------- - Pad - """ - super(Pad, self).__init__("pad") - - # Validate arg - # ------------ - 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.treemap.marker.Pad -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.Pad`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker import pad as v_pad - - # Initialize validators - # --------------------- - self._validators["b"] = v_pad.BValidator() - self._validators["l"] = v_pad.LValidator() - self._validators["r"] = v_pad.RValidator() - self._validators["t"] = v_pad.TValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("l", None) - self["l"] = l if l is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the line enclosing each sector. Defaults to - the `paper_bgcolor` value. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the line enclosing each sector. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the line enclosing each sector. - Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - """ - - def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs - ): - """ - Construct a new Line object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.marker.Line` - color - Sets the color of the line enclosing each sector. - Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - width - Sets the width (in px) of the line enclosing each - sector. - widthsrc - Sets the source reference on Chart Studio Cloud for - width . - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.treemap.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["colorsrc"] = v_line.ColorsrcValidator() - self._validators["width"] = v_line.WidthValidator() - self._validators["widthsrc"] = v_line.WidthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.treemap.marker.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.treemap.marker.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.treemap.marker.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as layout.template.data.treemap.marker - .colorbar.tickformatstopdefaults), sets the default property - values to use for elements of - treemap.marker.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.treemap.marker.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.treemap.marker.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use treemap.marker.colorbar.title.font - instead. Sets this color bar's title font. Note that the - title's font used to be set by the now deprecated `titlefont` - attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use treemap.marker.colorbar.title.side - instead. Determines the location of color bar's title with - respect to the color bar. Note that the title's location used - to be set by the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.treemap.marker. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.treema - p.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - treemap.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.treemap.marker.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - treemap.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - treemap.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.marker.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.treemap.marker. - colorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.data.treema - p.marker.colorbar.tickformatstopdefaults), sets the - default property values to use for elements of - treemap.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.treemap.marker.colorbar.Ti - tle` instance or dict with compatible properties - titlefont - Deprecated: Please use - treemap.marker.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleside - Deprecated: Please use - treemap.marker.colorbar.title.side instead. Determines - the location of color bar's title with respect to the - color bar. Note that the title's location used to be - set by the now deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.treemap.marker.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["ColorBar", "Line", "Pad", "colorbar"] - -from plotly.graph_objs.treemap.marker import colorbar +import sys + +if sys.version_info < (3, 7): + from ._pad import Pad + from ._line import Line + from ._colorbar import ColorBar + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._pad.Pad", "._line.Line", "._colorbar.ColorBar"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py new file mode 100644 index 00000000000..4f1d1ac2d47 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py @@ -0,0 +1,1941 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker" + _path_str = "treemap.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.treemap.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.treemap.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.treemap.marker + .colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + treemap.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use treemap.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use treemap.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.treemap.marker. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.treema + p.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.treemap.marker.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.treemap.marker. + colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.treema + p.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.treemap.marker.colorbar.Ti + tle` instance or dict with compatible properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/_line.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/_line.py new file mode 100644 index 00000000000..fb8f0e12ff5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/_line.py @@ -0,0 +1,234 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker" + _path_str = "treemap.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. Defaults to + the `paper_bgcolor` value. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.marker.Line` + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on Chart Studio Cloud for + width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + _v = arg.pop("widthsrc", None) + _v = widthsrc if widthsrc is not None else _v + if _v is not None: + self["widthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/_pad.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/_pad.py new file mode 100644 index 00000000000..30f270118d4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/_pad.py @@ -0,0 +1,182 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Pad(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker" + _path_str = "treemap.marker.pad" + _valid_props = {"b", "l", "r", "t"} + + # b + # - + @property + def b(self): + """ + Sets the padding form the bottom (in px). + + The 'b' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # l + # - + @property + def l(self): + """ + Sets the padding form the left (in px). + + The 'l' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["l"] + + @l.setter + def l(self, val): + self["l"] = val + + # r + # - + @property + def r(self): + """ + Sets the padding form the right (in px). + + The 'r' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # t + # - + @property + def t(self): + """ + Sets the padding form the top (in px). + + The 't' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). + """ + + def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + """ + Construct a new Pad object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.marker.Pad` + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). + + Returns + ------- + Pad + """ + super(Pad, self).__init__("pad") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.Pad +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.Pad`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("b", None) + _v = b if b is not None else _v + if _v is not None: + self["b"] = _v + _v = arg.pop("l", None) + _v = l if l is not None else _v + if _v is not None: + self["l"] = _v + _v = arg.pop("r", None) + _v = r if r is not None else _v + if _v is not None: + self["r"] = _v + _v = arg.pop("t", None) + _v = t if t is not None else _v + if _v is not None: + self["t"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py index 99c7a44afd4..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py @@ -1,724 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.treemap.marker.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.treemap.marker - .colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.treemap.marker.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.treemap.marker - .colorbar.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.treemap.marker.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker.colorbar import ( - tickformatstop as v_tickformatstop, - ) - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.treemap.marker - .colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.treemap.marker.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.treemap.marker.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..981ff0886ae --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker.colorbar" + _path_str = "treemap.marker.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.treemap.marker + .colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..6ad728997d1 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker.colorbar" + _path_str = "treemap.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.treemap.marker + .colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_title.py new file mode 100644 index 00000000000..6879d38a78a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker.colorbar" + _path_str = "treemap.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.treemap.marker + .colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py index 0dc3c9cddbf..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.marker.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.treemap.marker - .colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.treemap.marker.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.marker.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..9c6ea6d9e2f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.marker.colorbar.title" + _path_str = "treemap.marker.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.treemap.marker + .colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py index 94473d4c4cf..9b414c35677 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py @@ -1,329 +1,10 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._textfont import Textfont +else: + from _plotly_utils.importers import relative_import -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "treemap.pathbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used inside `pathbar`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.treemap.pathbar.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.treemap.pathbar.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.treemap.pathbar.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.treemap.pathbar import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Textfont"] + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.Textfont"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/treemap/pathbar/_textfont.py b/packages/python/plotly/plotly/graph_objs/treemap/pathbar/_textfont.py new file mode 100644 index 00000000000..f6f291f6cb9 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/pathbar/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "treemap.pathbar" + _path_str = "treemap.pathbar.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used inside `pathbar`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.treemap.pathbar.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.treemap.pathbar.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.treemap.pathbar.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/__init__.py index 8e98db143bd..5fbad339e40 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/__init__.py @@ -1,1926 +1,33 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Unselected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.unselected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - - Returns - ------- - plotly.graph_objs.violin.unselected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.violin.unselected.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Unselected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.Unselected` - marker - :class:`plotly.graph_objects.violin.unselected.Marker` - instance or dict with compatible properties - - Returns - ------- - Unselected - """ - super(Unselected, self).__init__("unselected") - - # Validate arg - # ------------ - 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.violin.Unselected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Unselected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import unselected as v_unselected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_unselected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.violin.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.violin.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Selected(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.selected.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - plotly.graph_objs.violin.selected.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.violin.selected.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Selected object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.Selected` - marker - :class:`plotly.graph_objects.violin.selected.Marker` - instance or dict with compatible properties - - Returns - ------- - Selected - """ - super(Selected, self).__init__("selected") - - # Validate arg - # ------------ - 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.violin.Selected -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Selected`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import selected as v_selected - - # Initialize validators - # --------------------- - self._validators["marker"] = v_selected.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Meanline(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the mean line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines if a line corresponding to the sample's mean is - shown inside the violins. If `box.visible` is turned on, the - mean line is drawn inside the inner box. Otherwise, the mean - line is drawn from one side of the violin to other. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the mean line width. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the mean line color. - visible - Determines if a line corresponding to the sample's mean - is shown inside the violins. If `box.visible` is turned - on, the mean line is drawn inside the inner box. - Otherwise, the mean line is drawn from one side of the - violin to other. - width - Sets the mean line width. - """ - - def __init__(self, arg=None, color=None, visible=None, width=None, **kwargs): - """ - Construct a new Meanline object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.Meanline` - color - Sets the mean line color. - visible - Determines if a line corresponding to the sample's mean - is shown inside the violins. If `box.visible` is turned - on, the mean line is drawn inside the inner box. - Otherwise, the mean line is drawn from one side of the - violin to other. - width - Sets the mean line width. - - Returns - ------- - Meanline - """ - super(Meanline, self).__init__("meanline") - - # Validate arg - # ------------ - 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.violin.Meanline -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Meanline`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import meanline as v_meanline - - # Initialize validators - # --------------------- - self._validators["color"] = v_meanline.ColorValidator() - self._validators["visible"] = v_meanline.VisibleValidator() - self._validators["width"] = v_meanline.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets themarkercolor. It accepts either a specific color or an - array of numbers that are mapped to the colorscale relative to - the max and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. - - Returns - ------- - plotly.graph_objs.violin.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # outliercolor - # ------------ - @property - def outliercolor(self): - """ - Sets the color of the outlier sample points. - - The 'outliercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outliercolor"] - - @outliercolor.setter - def outliercolor(self, val): - self["outliercolor"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size (in px). - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # symbol - # ------ - @property - def symbol(self): - """ - Sets the marker symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 is equivalent to - appending "-dot" to a symbol name. Adding 300 is equivalent to - appending "-open-dot" or "dot-open" to a symbol name. - - The 'symbol' property is an enumeration that may be specified as: - - One of the following enumeration values: - [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, - 'circle-open-dot', 1, 'square', 101, 'square-open', 201, - 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, - 'diamond-open', 202, 'diamond-dot', 302, - 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, - 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', - 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, - 'triangle-up-open', 205, 'triangle-up-dot', 305, - 'triangle-up-open-dot', 6, 'triangle-down', 106, - 'triangle-down-open', 206, 'triangle-down-dot', 306, - 'triangle-down-open-dot', 7, 'triangle-left', 107, - 'triangle-left-open', 207, 'triangle-left-dot', 307, - 'triangle-left-open-dot', 8, 'triangle-right', 108, - 'triangle-right-open', 208, 'triangle-right-dot', 308, - 'triangle-right-open-dot', 9, 'triangle-ne', 109, - 'triangle-ne-open', 209, 'triangle-ne-dot', 309, - 'triangle-ne-open-dot', 10, 'triangle-se', 110, - 'triangle-se-open', 210, 'triangle-se-dot', 310, - 'triangle-se-open-dot', 11, 'triangle-sw', 111, - 'triangle-sw-open', 211, 'triangle-sw-dot', 311, - 'triangle-sw-open-dot', 12, 'triangle-nw', 112, - 'triangle-nw-open', 212, 'triangle-nw-dot', 312, - 'triangle-nw-open-dot', 13, 'pentagon', 113, - 'pentagon-open', 213, 'pentagon-dot', 313, - 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', - 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, - 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', - 315, 'hexagon2-open-dot', 16, 'octagon', 116, - 'octagon-open', 216, 'octagon-dot', 316, - 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, - 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, - 'hexagram-open', 218, 'hexagram-dot', 318, - 'hexagram-open-dot', 19, 'star-triangle-up', 119, - 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, - 'star-triangle-up-open-dot', 20, 'star-triangle-down', - 120, 'star-triangle-down-open', 220, - 'star-triangle-down-dot', 320, - 'star-triangle-down-open-dot', 21, 'star-square', 121, - 'star-square-open', 221, 'star-square-dot', 321, - 'star-square-open-dot', 22, 'star-diamond', 122, - 'star-diamond-open', 222, 'star-diamond-dot', 322, - 'star-diamond-open-dot', 23, 'diamond-tall', 123, - 'diamond-tall-open', 223, 'diamond-tall-dot', 323, - 'diamond-tall-open-dot', 24, 'diamond-wide', 124, - 'diamond-wide-open', 224, 'diamond-wide-dot', 324, - 'diamond-wide-open-dot', 25, 'hourglass', 125, - 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, - 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', - 128, 'circle-x-open', 29, 'square-cross', 129, - 'square-cross-open', 30, 'square-x', 130, 'square-x-open', - 31, 'diamond-cross', 131, 'diamond-cross-open', 32, - 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, - 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, - 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, - 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, - 'y-up', 137, 'y-up-open', 38, 'y-down', 138, - 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, - 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, - 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, - 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, - 'line-nw-open'] - - Returns - ------- - Any - """ - return self["symbol"] - - @symbol.setter - def symbol(self, val): - self["symbol"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - line - :class:`plotly.graph_objects.violin.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - """ - - def __init__( - self, - arg=None, - color=None, - line=None, - opacity=None, - outliercolor=None, - size=None, - symbol=None, - **kwargs - ): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.violin.Marker` - color - Sets themarkercolor. It accepts either a specific color - or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.cmin` and `marker.cmax` if - set. - line - :class:`plotly.graph_objects.violin.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is equivalent - to appending "-open" to a symbol name. Adding 200 is - equivalent to appending "-dot" to a symbol name. Adding - 300 is equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.violin.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["line"] = v_marker.LineValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["outliercolor"] = v_marker.OutliercolorValidator() - self._validators["size"] = v_marker.SizeValidator() - self._validators["symbol"] = v_marker.SymbolValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outliercolor", None) - self["outliercolor"] = outliercolor if outliercolor is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("symbol", None) - self["symbol"] = symbol if symbol is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of line bounding the violin(s). - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of line bounding the violin(s). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the violin(s). - """ - - def __init__(self, arg=None, color=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.violin.Line` - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the violin(s). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.violin.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.violin.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.violin.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Box(_BaseTraceHierarchyType): - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the inner box plot fill color. - - The 'fillcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.violin.box.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the inner box plot bounding line color. - width - Sets the inner box plot bounding line width. - - Returns - ------- - plotly.graph_objs.violin.box.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines if an miniature box plot is drawn inside the - violins. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the inner box plots relative to the violins' - width. For example, with 1, the inner box plots are as wide as - the violins. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fillcolor - Sets the inner box plot fill color. - line - :class:`plotly.graph_objects.violin.box.Line` instance - or dict with compatible properties - visible - Determines if an miniature box plot is drawn inside the - violins. - width - Sets the width of the inner box plots relative to the - violins' width. For example, with 1, the inner box - plots are as wide as the violins. - """ - - def __init__( - self, arg=None, fillcolor=None, line=None, visible=None, width=None, **kwargs - ): - """ - Construct a new Box object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.violin.Box` - fillcolor - Sets the inner box plot fill color. - line - :class:`plotly.graph_objects.violin.box.Line` instance - or dict with compatible properties - visible - Determines if an miniature box plot is drawn inside the - violins. - width - Sets the width of the inner box plots relative to the - violins' width. For example, with 1, the inner box - plots are as wide as the violins. - - Returns - ------- - Box - """ - super(Box, self).__init__("box") - - # Validate arg - # ------------ - 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.violin.Box -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.Box`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin import box as v_box - - # Initialize validators - # --------------------- - self._validators["fillcolor"] = v_box.FillcolorValidator() - self._validators["line"] = v_box.LineValidator() - self._validators["visible"] = v_box.VisibleValidator() - self._validators["width"] = v_box.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Box", - "Hoverlabel", - "Line", - "Marker", - "Meanline", - "Selected", - "Stream", - "Unselected", - "box", - "hoverlabel", - "marker", - "selected", - "unselected", -] - -from plotly.graph_objs.violin import unselected -from plotly.graph_objs.violin import selected -from plotly.graph_objs.violin import marker -from plotly.graph_objs.violin import hoverlabel -from plotly.graph_objs.violin import box +import sys + +if sys.version_info < (3, 7): + from ._unselected import Unselected + from ._stream import Stream + from ._selected import Selected + from ._meanline import Meanline + from ._marker import Marker + from ._line import Line + from ._hoverlabel import Hoverlabel + from ._box import Box + from . import unselected + from . import selected + from . import marker + from . import hoverlabel + from . import box +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".unselected", ".selected", ".marker", ".hoverlabel", ".box"], + [ + "._unselected.Unselected", + "._stream.Stream", + "._selected.Selected", + "._meanline.Meanline", + "._marker.Marker", + "._line.Line", + "._hoverlabel.Hoverlabel", + "._box.Box", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/violin/_box.py b/packages/python/plotly/plotly/graph_objs/violin/_box.py new file mode 100644 index 00000000000..8ead8947413 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_box.py @@ -0,0 +1,241 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Box(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.box" + _valid_props = {"fillcolor", "line", "visible", "width"} + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the inner box plot fill color. + + The 'fillcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.box.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the inner box plot bounding line color. + width + Sets the inner box plot bounding line width. + + Returns + ------- + plotly.graph_objs.violin.box.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines if an miniature box plot is drawn inside the + violins. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the inner box plots relative to the violins' + width. For example, with 1, the inner box plots are as wide as + the violins. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the inner box plot fill color. + line + :class:`plotly.graph_objects.violin.box.Line` instance + or dict with compatible properties + visible + Determines if an miniature box plot is drawn inside the + violins. + width + Sets the width of the inner box plots relative to the + violins' width. For example, with 1, the inner box + plots are as wide as the violins. + """ + + def __init__( + self, arg=None, fillcolor=None, line=None, visible=None, width=None, **kwargs + ): + """ + Construct a new Box object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.violin.Box` + fillcolor + Sets the inner box plot fill color. + line + :class:`plotly.graph_objects.violin.box.Line` instance + or dict with compatible properties + visible + Determines if an miniature box plot is drawn inside the + violins. + width + Sets the width of the inner box plots relative to the + violins' width. For example, with 1, the inner box + plots are as wide as the violins. + + Returns + ------- + Box + """ + super(Box, self).__init__("box") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Box +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Box`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fillcolor", None) + _v = fillcolor if fillcolor is not None else _v + if _v is not None: + self["fillcolor"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/violin/_hoverlabel.py new file mode 100644 index 00000000000..3c8d6c107eb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.violin.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_line.py b/packages/python/plotly/plotly/graph_objs/violin/_line.py new file mode 100644 index 00000000000..185fd849429 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_line.py @@ -0,0 +1,164 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of line bounding the violin(s). + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of line bounding the violin(s). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the violin(s). + width + Sets the width (in px) of line bounding the violin(s). + """ + + def __init__(self, arg=None, color=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.violin.Line` + color + Sets the color of line bounding the violin(s). + width + Sets the width (in px) of line bounding the violin(s). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_marker.py b/packages/python/plotly/plotly/graph_objs/violin/_marker.py new file mode 100644 index 00000000000..e5113146d00 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_marker.py @@ -0,0 +1,430 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.marker" + _valid_props = {"color", "line", "opacity", "outliercolor", "size", "symbol"} + + # color + # ----- + @property + def color(self): + """ + Sets themarkercolor. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + outliercolor + Sets the border line color of the outlier + sample points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the + outlier sample points. + width + Sets the width (in px) of the lines bounding + the marker points. + + Returns + ------- + plotly.graph_objs.violin.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # outliercolor + # ------------ + @property + def outliercolor(self): + """ + Sets the color of the outlier sample points. + + The 'outliercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outliercolor"] + + @outliercolor.setter + def outliercolor(self, val): + self["outliercolor"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # symbol + # ------ + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, + 'circle-open-dot', 1, 'square', 101, 'square-open', 201, + 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, + 'diamond-open', 202, 'diamond-dot', 302, + 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, + 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', + 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, + 'triangle-up-open', 205, 'triangle-up-dot', 305, + 'triangle-up-open-dot', 6, 'triangle-down', 106, + 'triangle-down-open', 206, 'triangle-down-dot', 306, + 'triangle-down-open-dot', 7, 'triangle-left', 107, + 'triangle-left-open', 207, 'triangle-left-dot', 307, + 'triangle-left-open-dot', 8, 'triangle-right', 108, + 'triangle-right-open', 208, 'triangle-right-dot', 308, + 'triangle-right-open-dot', 9, 'triangle-ne', 109, + 'triangle-ne-open', 209, 'triangle-ne-dot', 309, + 'triangle-ne-open-dot', 10, 'triangle-se', 110, + 'triangle-se-open', 210, 'triangle-se-dot', 310, + 'triangle-se-open-dot', 11, 'triangle-sw', 111, + 'triangle-sw-open', 211, 'triangle-sw-dot', 311, + 'triangle-sw-open-dot', 12, 'triangle-nw', 112, + 'triangle-nw-open', 212, 'triangle-nw-dot', 312, + 'triangle-nw-open-dot', 13, 'pentagon', 113, + 'pentagon-open', 213, 'pentagon-dot', 313, + 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', + 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, + 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', + 315, 'hexagon2-open-dot', 16, 'octagon', 116, + 'octagon-open', 216, 'octagon-dot', 316, + 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, + 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, + 'hexagram-open', 218, 'hexagram-dot', 318, + 'hexagram-open-dot', 19, 'star-triangle-up', 119, + 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, + 'star-triangle-up-open-dot', 20, 'star-triangle-down', + 120, 'star-triangle-down-open', 220, + 'star-triangle-down-dot', 320, + 'star-triangle-down-open-dot', 21, 'star-square', 121, + 'star-square-open', 221, 'star-square-dot', 321, + 'star-square-open-dot', 22, 'star-diamond', 122, + 'star-diamond-open', 222, 'star-diamond-dot', 322, + 'star-diamond-open-dot', 23, 'diamond-tall', 123, + 'diamond-tall-open', 223, 'diamond-tall-dot', 323, + 'diamond-tall-open-dot', 24, 'diamond-wide', 124, + 'diamond-wide-open', 224, 'diamond-wide-dot', 324, + 'diamond-wide-open-dot', 25, 'hourglass', 125, + 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, + 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', + 128, 'circle-x-open', 29, 'square-cross', 129, + 'square-cross-open', 30, 'square-x', 130, 'square-x-open', + 31, 'diamond-cross', 131, 'diamond-cross-open', 32, + 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, + 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, + 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, + 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, + 'y-up', 137, 'y-up-open', 38, 'y-down', 138, + 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, + 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, + 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, + 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, + 'line-nw-open'] + + Returns + ------- + Any + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + line + :class:`plotly.graph_objects.violin.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + """ + + def __init__( + self, + arg=None, + color=None, + line=None, + opacity=None, + outliercolor=None, + size=None, + symbol=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.violin.Marker` + color + Sets themarkercolor. It accepts either a specific color + or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + line + :class:`plotly.graph_objects.violin.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("outliercolor", None) + _v = outliercolor if outliercolor is not None else _v + if _v is not None: + self["outliercolor"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("symbol", None) + _v = symbol if symbol is not None else _v + if _v is not None: + self["symbol"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_meanline.py b/packages/python/plotly/plotly/graph_objs/violin/_meanline.py new file mode 100644 index 00000000000..b5bc5f3726b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_meanline.py @@ -0,0 +1,204 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Meanline(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.meanline" + _valid_props = {"color", "visible", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the mean line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines if a line corresponding to the sample's mean is + shown inside the violins. If `box.visible` is turned on, the + mean line is drawn inside the inner box. Otherwise, the mean + line is drawn from one side of the violin to other. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the mean line width. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the mean line color. + visible + Determines if a line corresponding to the sample's mean + is shown inside the violins. If `box.visible` is turned + on, the mean line is drawn inside the inner box. + Otherwise, the mean line is drawn from one side of the + violin to other. + width + Sets the mean line width. + """ + + def __init__(self, arg=None, color=None, visible=None, width=None, **kwargs): + """ + Construct a new Meanline object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.Meanline` + color + Sets the mean line color. + visible + Determines if a line corresponding to the sample's mean + is shown inside the violins. If `box.visible` is turned + on, the mean line is drawn inside the inner box. + Otherwise, the mean line is drawn from one side of the + violin to other. + width + Sets the mean line width. + + Returns + ------- + Meanline + """ + super(Meanline, self).__init__("meanline") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Meanline +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Meanline`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_selected.py b/packages/python/plotly/plotly/graph_objs/violin/_selected.py new file mode 100644 index 00000000000..abbc5998d48 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_selected.py @@ -0,0 +1,110 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.selected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + plotly.graph_objs.violin.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.violin.selected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.Selected` + marker + :class:`plotly.graph_objects.violin.selected.Marker` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super(Selected, self).__init__("selected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Selected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_stream.py b/packages/python/plotly/plotly/graph_objs/violin/_stream.py new file mode 100644 index 00000000000..61ce66df07d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.violin.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/_unselected.py b/packages/python/plotly/plotly/graph_objs/violin/_unselected.py new file mode 100644 index 00000000000..8e4ad90ed6f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/_unselected.py @@ -0,0 +1,113 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin" + _path_str = "violin.unselected" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. + + Returns + ------- + plotly.graph_objs.violin.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.violin.unselected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.Unselected` + marker + :class:`plotly.graph_objects.violin.unselected.Marker` + instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super(Unselected, self).__init__("unselected") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.Unselected`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py index 2aff47d1ca2..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py @@ -1,169 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the inner box plot bounding line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the inner box plot bounding line width. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin.box" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the inner box plot bounding line color. - width - Sets the inner box plot bounding line width. - """ - - def __init__(self, arg=None, color=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.violin.box.Line` - color - Sets the inner box plot bounding line color. - width - Sets the inner box plot bounding line width. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.violin.box.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.box.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin.box import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/violin/box/_line.py b/packages/python/plotly/plotly/graph_objs/violin/box/_line.py new file mode 100644 index 00000000000..1b2f0b4720f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/box/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin.box" + _path_str = "violin.box.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the inner box plot bounding line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the inner box plot bounding line width. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the inner box plot bounding line color. + width + Sets the inner box plot bounding line width. + """ + + def __init__(self, arg=None, color=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.violin.box.Line` + color + Sets the inner box plot bounding line color. + width + Sets the inner box plot bounding line width. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.box.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.box.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py index 2a5660ed0e7..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.violin.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/_font.py new file mode 100644 index 00000000000..cc8fd3deb28 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin.hoverlabel" + _path_str = "violin.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py index 51c23240e70..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py @@ -1,289 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets themarker.linecolor. It accepts either a specific color or - an array of numbers that are mapped to the colorscale relative - to the max and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if set. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # outliercolor - # ------------ - @property - def outliercolor(self): - """ - Sets the border line color of the outlier sample points. - Defaults to marker.color - - The 'outliercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outliercolor"] - - @outliercolor.setter - def outliercolor(self, val): - self["outliercolor"] = val - - # outlierwidth - # ------------ - @property - def outlierwidth(self): - """ - Sets the border line width (in px) of the outlier sample - points. - - The 'outlierwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlierwidth"] - - @outlierwidth.setter - def outlierwidth(self, val): - self["outlierwidth"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width (in px) of the lines bounding the marker points. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - outliercolor - Sets the border line color of the outlier sample - points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the outlier - sample points. - width - Sets the width (in px) of the lines bounding the marker - points. - """ - - def __init__( - self, - arg=None, - color=None, - outliercolor=None, - outlierwidth=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.violin.marker.Line` - color - Sets themarker.linecolor. It accepts either a specific - color or an array of numbers that are mapped to the - colorscale relative to the max and min values of the - array or relative to `marker.line.cmin` and - `marker.line.cmax` if set. - outliercolor - Sets the border line color of the outlier sample - points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the outlier - sample points. - width - Sets the width (in px) of the lines bounding the marker - points. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.violin.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["outliercolor"] = v_line.OutliercolorValidator() - self._validators["outlierwidth"] = v_line.OutlierwidthValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("outliercolor", None) - self["outliercolor"] = outliercolor if outliercolor is not None else _v - _v = arg.pop("outlierwidth", None) - self["outlierwidth"] = outlierwidth if outlierwidth is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/violin/marker/_line.py b/packages/python/plotly/plotly/graph_objs/violin/marker/_line.py new file mode 100644 index 00000000000..f6e31bbc5b7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/marker/_line.py @@ -0,0 +1,287 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin.marker" + _path_str = "violin.marker.line" + _valid_props = {"color", "outliercolor", "outlierwidth", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets themarker.linecolor. It accepts either a specific color or + an array of numbers that are mapped to the colorscale relative + to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # outliercolor + # ------------ + @property + def outliercolor(self): + """ + Sets the border line color of the outlier sample points. + Defaults to marker.color + + The 'outliercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outliercolor"] + + @outliercolor.setter + def outliercolor(self, val): + self["outliercolor"] = val + + # outlierwidth + # ------------ + @property + def outlierwidth(self): + """ + Sets the border line width (in px) of the outlier sample + points. + + The 'outlierwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlierwidth"] + + @outlierwidth.setter + def outlierwidth(self, val): + self["outlierwidth"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + outliercolor + Sets the border line color of the outlier sample + points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the outlier + sample points. + width + Sets the width (in px) of the lines bounding the marker + points. + """ + + def __init__( + self, + arg=None, + color=None, + outliercolor=None, + outlierwidth=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.violin.marker.Line` + color + Sets themarker.linecolor. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + outliercolor + Sets the border line color of the outlier sample + points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the outlier + sample points. + width + Sets the width (in px) of the lines bounding the marker + points. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("outliercolor", None) + _v = outliercolor if outliercolor is not None else _v + if _v is not None: + self["outliercolor"] = _v + _v = arg.pop("outlierwidth", None) + _v = outlierwidth if outlierwidth is not None else _v + if _v is not None: + self["outlierwidth"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py index 5ca73b8dd96..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py @@ -1,196 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of selected points. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of selected points. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of selected points. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin.selected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.selected.Marker` - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.violin.selected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.selected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin.selected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/violin/selected/_marker.py b/packages/python/plotly/plotly/graph_objs/violin/selected/_marker.py new file mode 100644 index 00000000000..ea1cb5ee533 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/selected/_marker.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin.selected" + _path_str = "violin.selected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of selected points. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.selected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py index bde219f89e2..0bf20934dda 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py @@ -1,205 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of unselected points, applied only when a - selection exists. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the marker opacity of unselected points, applied only when - a selection exists. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # size - # ---- - @property - def size(self): - """ - Sets the marker size of unselected points, applied only when a - selection exists. - - The 'size' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "violin.unselected" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - """ - - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.violin.unselected.Marker` - color - Sets the marker color of unselected points, applied - only when a selection exists. - opacity - Sets the marker opacity of unselected points, applied - only when a selection exists. - size - Sets the marker size of unselected points, applied only - when a selection exists. - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.violin.unselected.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.violin.unselected.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.violin.unselected import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["opacity"] = v_marker.OpacityValidator() - self._validators["size"] = v_marker.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/packages/python/plotly/plotly/graph_objs/violin/unselected/_marker.py b/packages/python/plotly/plotly/graph_objs/violin/unselected/_marker.py new file mode 100644 index 00000000000..7f234036947 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/violin/unselected/_marker.py @@ -0,0 +1,202 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "violin.unselected" + _path_str = "violin.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # size + # ---- + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.violin.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.violin.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.violin.unselected.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("opacity", None) + _v = opacity if opacity is not None else _v + if _v is not None: + self["opacity"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/__init__.py index 7e7ee439020..b2acee2453c 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/__init__.py @@ -1,3998 +1,36 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Surface(_BaseTraceHierarchyType): - - # count - # ----- - @property - def count(self): - """ - Sets the number of iso-surfaces between minimum and maximum - iso-values. By default this value is 2 meaning that only - minimum and maximum surfaces would be drawn. - - The 'count' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["count"] - - @count.setter - def count(self, val): - self["count"] = val - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the iso-surface. The default fill value - of the surface is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # pattern - # ------- - @property - def pattern(self): - """ - Sets the surface pattern of the iso-surface 3-D sections. The - default pattern of the surface is `all` meaning that the rest - of surface elements would be shaded. The check options (either - 1 or 2) could be used to draw half of the squares on the - surface. Using various combinations of capital `A`, `B`, `C`, - `D` and `E` may also be used to reduce the number of triangles - on the iso-surfaces and creating other patterns of interest. - - The 'pattern' property is a flaglist and may be specified - as a string containing: - - Any combination of ['A', 'B', 'C', 'D', 'E'] joined with '+' characters - (e.g. 'A+B') - OR exactly one of ['all', 'odd', 'even'] (e.g. 'even') - - Returns - ------- - Any - """ - return self["pattern"] - - @pattern.setter - def pattern(self, val): - self["pattern"] = val - - # show - # ---- - @property - def show(self): - """ - Hides/displays surfaces between minimum and maximum iso-values. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - count - Sets the number of iso-surfaces between minimum and - maximum iso-values. By default this value is 2 meaning - that only minimum and maximum surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The default - fill value of the surface is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is `all` - meaning that the rest of surface elements would be - shaded. The check options (either 1 or 2) could be used - to draw half of the squares on the surface. Using - various combinations of capital `A`, `B`, `C`, `D` and - `E` may also be used to reduce the number of triangles - on the iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and maximum - iso-values. - """ - - def __init__( - self, arg=None, count=None, fill=None, pattern=None, show=None, **kwargs - ): - """ - Construct a new Surface object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.Surface` - count - Sets the number of iso-surfaces between minimum and - maximum iso-values. By default this value is 2 meaning - that only minimum and maximum surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The default - fill value of the surface is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is `all` - meaning that the rest of surface elements would be - shaded. The check options (either 1 or 2) could be used - to draw half of the squares on the surface. Using - various combinations of capital `A`, `B`, `C`, `D` and - `E` may also be used to reduce the number of triangles - on the iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and maximum - iso-values. - - Returns - ------- - Surface - """ - super(Surface, self).__init__("surface") - - # Validate arg - # ------------ - 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.volume.Surface -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Surface`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import surface as v_surface - - # Initialize validators - # --------------------- - self._validators["count"] = v_surface.CountValidator() - self._validators["fill"] = v_surface.FillValidator() - self._validators["pattern"] = v_surface.PatternValidator() - self._validators["show"] = v_surface.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("count", None) - self["count"] = count if count is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("pattern", None) - self["pattern"] = pattern if pattern is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.volume.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Spaceframe(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `spaceframe` elements. The default - fill value is 1 meaning that they are entirely shaded. Applying - a `fill` ratio less than one would allow the creation of - openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Displays/hides tetrahedron shapes between minimum and maximum - iso-values. Often useful when either caps or surfaces are - disabled or filled with values less than 1. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `spaceframe` elements. The - default fill value is 1 meaning that they are entirely - shaded. Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between minimum and - maximum iso-values. Often useful when either caps or - surfaces are disabled or filled with values less than - 1. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new Spaceframe object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.Spaceframe` - fill - Sets the fill ratio of the `spaceframe` elements. The - default fill value is 1 meaning that they are entirely - shaded. Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between minimum and - maximum iso-values. Often useful when either caps or - surfaces are disabled or filled with values less than - 1. - - Returns - ------- - Spaceframe - """ - super(Spaceframe, self).__init__("spaceframe") - - # Validate arg - # ------------ - 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.volume.Spaceframe -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Spaceframe`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import spaceframe as v_spaceframe - - # Initialize validators - # --------------------- - self._validators["fill"] = v_spaceframe.FillValidator() - self._validators["show"] = v_spaceframe.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Slices(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is an instance of X - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.slices.X` - - A dict of string/value properties that will be passed - to the X constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the x dimension are drawn. - - Returns - ------- - plotly.graph_objs.volume.slices.X - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is an instance of Y - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.slices.Y` - - A dict of string/value properties that will be passed - to the Y constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the y dimension are drawn. - - Returns - ------- - plotly.graph_objs.volume.slices.Y - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is an instance of Z - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.slices.Z` - - A dict of string/value properties that will be passed - to the Z constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the z dimension are drawn. - - Returns - ------- - plotly.graph_objs.volume.slices.Z - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - :class:`plotly.graph_objects.volume.slices.X` instance - or dict with compatible properties - y - :class:`plotly.graph_objects.volume.slices.Y` instance - or dict with compatible properties - z - :class:`plotly.graph_objects.volume.slices.Z` instance - or dict with compatible properties - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Slices object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.Slices` - x - :class:`plotly.graph_objects.volume.slices.X` instance - or dict with compatible properties - y - :class:`plotly.graph_objects.volume.slices.Y` instance - or dict with compatible properties - z - :class:`plotly.graph_objects.volume.slices.Z` instance - or dict with compatible properties - - Returns - ------- - Slices - """ - super(Slices, self).__init__("slices") - - # Validate arg - # ------------ - 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.volume.Slices -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Slices`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import slices as v_slices - - # Initialize validators - # --------------------- - self._validators["x"] = v_slices.XValidator() - self._validators["y"] = v_slices.YValidator() - self._validators["z"] = v_slices.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lightposition(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - Numeric vector, representing the X coordinate for each vertex. - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - Numeric vector, representing the Y coordinate for each vertex. - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - Numeric vector, representing the Z coordinate for each vertex. - - The 'z' property is a number and may be specified as: - - An int or float in the interval [-100000, 100000] - - Returns - ------- - int|float - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Lightposition object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.Lightposition` - x - Numeric vector, representing the X coordinate for each - vertex. - y - Numeric vector, representing the Y coordinate for each - vertex. - z - Numeric vector, representing the Z coordinate for each - vertex. - - Returns - ------- - Lightposition - """ - super(Lightposition, self).__init__("lightposition") - - # Validate arg - # ------------ - 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.volume.Lightposition -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Lightposition`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import lightposition as v_lightposition - - # Initialize validators - # --------------------- - self._validators["x"] = v_lightposition.XValidator() - self._validators["y"] = v_lightposition.YValidator() - self._validators["z"] = v_lightposition.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Lighting(_BaseTraceHierarchyType): - - # ambient - # ------- - @property - def ambient(self): - """ - Ambient light increases overall color visibility but can wash - out the image. - - The 'ambient' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["ambient"] - - @ambient.setter - def ambient(self, val): - self["ambient"] = val - - # diffuse - # ------- - @property - def diffuse(self): - """ - Represents the extent that incident rays are reflected in a - range of angles. - - The 'diffuse' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["diffuse"] - - @diffuse.setter - def diffuse(self, val): - self["diffuse"] = val - - # facenormalsepsilon - # ------------------ - @property - def facenormalsepsilon(self): - """ - Epsilon for face normals calculation avoids math issues arising - from degenerate geometry. - - The 'facenormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["facenormalsepsilon"] - - @facenormalsepsilon.setter - def facenormalsepsilon(self, val): - self["facenormalsepsilon"] = val - - # fresnel - # ------- - @property - def fresnel(self): - """ - Represents the reflectance as a dependency of the viewing - angle; e.g. paper is reflective when viewing it from the edge - of the paper (almost 90 degrees), causing shine. - - The 'fresnel' property is a number and may be specified as: - - An int or float in the interval [0, 5] - - Returns - ------- - int|float - """ - return self["fresnel"] - - @fresnel.setter - def fresnel(self, val): - self["fresnel"] = val - - # roughness - # --------- - @property - def roughness(self): - """ - Alters specular reflection; the rougher the surface, the wider - and less contrasty the shine. - - The 'roughness' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["roughness"] - - @roughness.setter - def roughness(self, val): - self["roughness"] = val - - # specular - # -------- - @property - def specular(self): - """ - Represents the level that incident rays are reflected in a - single direction, causing shine. - - The 'specular' property is a number and may be specified as: - - An int or float in the interval [0, 2] - - Returns - ------- - int|float - """ - return self["specular"] - - @specular.setter - def specular(self, val): - self["specular"] = val - - # vertexnormalsepsilon - # -------------------- - @property - def vertexnormalsepsilon(self): - """ - Epsilon for vertex normals calculation avoids math issues - arising from degenerate geometry. - - The 'vertexnormalsepsilon' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["vertexnormalsepsilon"] - - @vertexnormalsepsilon.setter - def vertexnormalsepsilon(self, val): - self["vertexnormalsepsilon"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - """ - - def __init__( - self, - arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, - **kwargs - ): - """ - Construct a new Lighting object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.Lighting` - ambient - Ambient light increases overall color visibility but - can wash out the image. - diffuse - Represents the extent that incident rays are reflected - in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids math issues - arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of the - viewing angle; e.g. paper is reflective when viewing it - from the edge of the paper (almost 90 degrees), causing - shine. - roughness - Alters specular reflection; the rougher the surface, - the wider and less contrasty the shine. - specular - Represents the level that incident rays are reflected - in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids math - issues arising from degenerate geometry. - - Returns - ------- - Lighting - """ - super(Lighting, self).__init__("lighting") - - # Validate arg - # ------------ - 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.volume.Lighting -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Lighting`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import lighting as v_lighting - - # Initialize validators - # --------------------- - self._validators["ambient"] = v_lighting.AmbientValidator() - self._validators["diffuse"] = v_lighting.DiffuseValidator() - self._validators[ - "facenormalsepsilon" - ] = v_lighting.FacenormalsepsilonValidator() - self._validators["fresnel"] = v_lighting.FresnelValidator() - self._validators["roughness"] = v_lighting.RoughnessValidator() - self._validators["specular"] = v_lighting.SpecularValidator() - self._validators[ - "vertexnormalsepsilon" - ] = v_lighting.VertexnormalsepsilonValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - self["ambient"] = ambient if ambient is not None else _v - _v = arg.pop("diffuse", None) - self["diffuse"] = diffuse if diffuse is not None else _v - _v = arg.pop("facenormalsepsilon", None) - self["facenormalsepsilon"] = ( - facenormalsepsilon if facenormalsepsilon is not None else _v - ) - _v = arg.pop("fresnel", None) - self["fresnel"] = fresnel if fresnel is not None else _v - _v = arg.pop("roughness", None) - self["roughness"] = roughness if roughness is not None else _v - _v = arg.pop("specular", None) - self["specular"] = specular if specular is not None else _v - _v = arg.pop("vertexnormalsepsilon", None) - self["vertexnormalsepsilon"] = ( - vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - ) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.volume.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.volume.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Contour(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the color of the contour lines. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # show - # ---- - @property - def show(self): - """ - Sets whether or not dynamic contours are shown on hover - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the width of the contour lines. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [1, 16] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown on hover - width - Sets the width of the contour lines. - """ - - def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): - """ - Construct a new Contour object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.Contour` - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown on hover - width - Sets the width of the contour lines. - - Returns - ------- - Contour - """ - super(Contour, self).__init__("contour") - - # Validate arg - # ------------ - 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.volume.Contour -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Contour`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import contour as v_contour - - # Initialize validators - # --------------------- - self._validators["color"] = v_contour.ColorValidator() - self._validators["show"] = v_contour.ShowValidator() - self._validators["width"] = v_contour.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class ColorBar(_BaseTraceHierarchyType): - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the color of padded area. - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the axis line color. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # borderwidth - # ----------- - @property - def borderwidth(self): - """ - Sets the width (in px) or the border enclosing this color bar. - - The 'borderwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["borderwidth"] - - @borderwidth.setter - def borderwidth(self, val): - self["borderwidth"] = val - - # dtick - # ----- - @property - def dtick(self): - """ - Sets the step in-between ticks on this axis. Use with `tick0`. - Must be a positive number, or special strings available to - "log" and "date" axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick number. For - example, to set a tick mark at 1, 10, 100, 1000, ... set dtick - to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. - To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special values; - "L", where `f` is a positive number, gives ticks linearly - spaced in value (but not position). For example `tick0` = 0.1, - `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To - show powers of 10 plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and - "D2". If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval between - ticks to one day, set `dtick` to 86400000.0. "date" also has - special values "M" gives ticks spaced by a number of months. - `n` must be a positive integer. To set ticks on the 15th of - every third month, set `tick0` to "2000-01-15" and `dtick` to - "M3". To set ticks every 4 years, set `dtick` to "M48" - - The 'dtick' property accepts values of any type - - Returns - ------- - Any - """ - return self["dtick"] - - @dtick.setter - def dtick(self, val): - self["dtick"] = val - - # exponentformat - # -------------- - @property - def exponentformat(self): - """ - Determines a formatting rule for the tick exponents. For - example, consider the number 1,000,000,000. If "none", it - appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If - "B", 1B. - - The 'exponentformat' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'e', 'E', 'power', 'SI', 'B'] - - Returns - ------- - Any - """ - return self["exponentformat"] - - @exponentformat.setter - def exponentformat(self, val): - self["exponentformat"] = val - - # len - # --- - @property - def len(self): - """ - Sets the length of the color bar This measure excludes the - padding of both ends. That is, the color bar length is this - length minus the padding on both ends. - - The 'len' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["len"] - - @len.setter - def len(self, val): - self["len"] = val - - # lenmode - # ------- - @property - def lenmode(self): - """ - Determines whether this color bar's length (i.e. the measure in - the color variation direction) is set in units of plot - "fraction" or in *pixels. Use `len` to set the value. - - The 'lenmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["lenmode"] - - @lenmode.setter - def lenmode(self, val): - self["lenmode"] = val - - # nticks - # ------ - @property - def nticks(self): - """ - Specifies the maximum number of ticks for the particular axis. - The actual number of ticks will be chosen automatically to be - less than or equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - - The 'nticks' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nticks"] - - @nticks.setter - def nticks(self, val): - self["nticks"] = val - - # outlinecolor - # ------------ - @property - def outlinecolor(self): - """ - Sets the axis line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["outlinecolor"] - - @outlinecolor.setter - def outlinecolor(self, val): - self["outlinecolor"] = val - - # outlinewidth - # ------------ - @property - def outlinewidth(self): - """ - Sets the width (in px) of the axis line. - - The 'outlinewidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["outlinewidth"] - - @outlinewidth.setter - def outlinewidth(self, val): - self["outlinewidth"] = val - - # separatethousands - # ----------------- - @property - def separatethousands(self): - """ - If "true", even 4-digit integers are separated - - The 'separatethousands' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["separatethousands"] - - @separatethousands.setter - def separatethousands(self, val): - self["separatethousands"] = val - - # showexponent - # ------------ - @property - def showexponent(self): - """ - If "all", all exponents are shown besides their significands. - If "first", only the exponent of the first tick is shown. If - "last", only the exponent of the last tick is shown. If "none", - no exponents appear. - - The 'showexponent' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showexponent"] - - @showexponent.setter - def showexponent(self, val): - self["showexponent"] = val - - # showticklabels - # -------------- - @property - def showticklabels(self): - """ - Determines whether or not the tick labels are drawn. - - The 'showticklabels' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showticklabels"] - - @showticklabels.setter - def showticklabels(self, val): - self["showticklabels"] = val - - # showtickprefix - # -------------- - @property - def showtickprefix(self): - """ - If "all", all tick labels are displayed with a prefix. If - "first", only the first tick is displayed with a prefix. If - "last", only the last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - - The 'showtickprefix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showtickprefix"] - - @showtickprefix.setter - def showtickprefix(self, val): - self["showtickprefix"] = val - - # showticksuffix - # -------------- - @property - def showticksuffix(self): - """ - Same as `showtickprefix` but for tick suffixes. - - The 'showticksuffix' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'first', 'last', 'none'] - - Returns - ------- - Any - """ - return self["showticksuffix"] - - @showticksuffix.setter - def showticksuffix(self, val): - self["showticksuffix"] = val - - # thickness - # --------- - @property - def thickness(self): - """ - Sets the thickness of the color bar This measure excludes the - size of the padding, ticks and labels. - - The 'thickness' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["thickness"] - - @thickness.setter - def thickness(self, val): - self["thickness"] = val - - # thicknessmode - # ------------- - @property - def thicknessmode(self): - """ - Determines whether this color bar's thickness (i.e. the measure - in the constant color direction) is set in units of plot - "fraction" or in "pixels". Use `thickness` to set the value. - - The 'thicknessmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fraction', 'pixels'] - - Returns - ------- - Any - """ - return self["thicknessmode"] - - @thicknessmode.setter - def thicknessmode(self, val): - self["thicknessmode"] = val - - # tick0 - # ----- - @property - def tick0(self): - """ - Sets the placement of the first tick on this axis. Use with - `dtick`. If the axis `type` is "log", then you must take the - log of your starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when `dtick`=*L* (see - `dtick` for more info). If the axis `type` is "date", it should - be a date string, like date data. If the axis `type` is - "category", it should be a number, using the scale where each - category is assigned a serial number from zero in the order it - appears. - - The 'tick0' property accepts values of any type - - Returns - ------- - Any - """ - return self["tick0"] - - @tick0.setter - def tick0(self, val): - self["tick0"] = val - - # tickangle - # --------- - @property - def tickangle(self): - """ - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the tick - labels vertically. - - The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["tickangle"] - - @tickangle.setter - def tickangle(self, val): - self["tickangle"] = val - - # tickcolor - # --------- - @property - def tickcolor(self): - """ - Sets the tick color. - - The 'tickcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["tickcolor"] - - @tickcolor.setter - def tickcolor(self, val): - self["tickcolor"] = val - - # tickfont - # -------- - @property - def tickfont(self): - """ - Sets the color bar's tick label font - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.colorbar.Tickfont` - - A dict of string/value properties that will be passed - to the Tickfont constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.volume.colorbar.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # tickformat - # ---------- - @property - def tickformat(self): - """ - Sets the tick label formatting rule using d3 formatting mini- - languages which are very similar to those in Python. For - numbers, see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for dates - see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add one item - to d3's date formatter: "%{n}f" for fractional seconds with n - digits. For example, *2016-10-13 09:15:23.456* with tickformat - "%H~%M~%S.%2f" would display "09~15~23.46" - - The 'tickformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickformat"] - - @tickformat.setter - def tickformat(self, val): - self["tickformat"] = val - - # tickformatstops - # --------------- - @property - def tickformatstops(self): - """ - The 'tickformatstops' property is a tuple of instances of - Tickformatstop that may be specified as: - - A list or tuple of instances of plotly.graph_objs.volume.colorbar.Tickformatstop - - A list or tuple of dicts of string/value properties that - will be passed to the Tickformatstop constructor - - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - - Returns - ------- - tuple[plotly.graph_objs.volume.colorbar.Tickformatstop] - """ - return self["tickformatstops"] - - @tickformatstops.setter - def tickformatstops(self, val): - self["tickformatstops"] = val - - # tickformatstopdefaults - # ---------------------- - @property - def tickformatstopdefaults(self): - """ - When used in a template (as - layout.template.data.volume.colorbar.tickformatstopdefaults), - sets the default property values to use for elements of - volume.colorbar.tickformatstops - - The 'tickformatstopdefaults' property is an instance of Tickformatstop - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.colorbar.Tickformatstop` - - A dict of string/value properties that will be passed - to the Tickformatstop constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.volume.colorbar.Tickformatstop - """ - return self["tickformatstopdefaults"] - - @tickformatstopdefaults.setter - def tickformatstopdefaults(self, val): - self["tickformatstopdefaults"] = val - - # ticklen - # ------- - @property - def ticklen(self): - """ - Sets the tick length (in px). - - The 'ticklen' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ticklen"] - - @ticklen.setter - def ticklen(self, val): - self["ticklen"] = val - - # tickmode - # -------- - @property - def tickmode(self): - """ - Sets the tick mode for this axis. If "auto", the number of - ticks is set via `nticks`. If "linear", the placement of the - ticks is determined by a starting position `tick0` and a tick - step `dtick` ("linear" is the default value if `tick0` and - `dtick` are provided). If "array", the placement of the ticks - is set via `tickvals` and the tick text is `ticktext`. ("array" - is the default value if `tickvals` is provided). - - The 'tickmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['auto', 'linear', 'array'] - - Returns - ------- - Any - """ - return self["tickmode"] - - @tickmode.setter - def tickmode(self, val): - self["tickmode"] = val - - # tickprefix - # ---------- - @property - def tickprefix(self): - """ - Sets a tick label prefix. - - The 'tickprefix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["tickprefix"] - - @tickprefix.setter - def tickprefix(self, val): - self["tickprefix"] = val - - # ticks - # ----- - @property - def ticks(self): - """ - Determines whether ticks are drawn or not. If "", this axis' - ticks are not drawn. If "outside" ("inside"), this axis' are - drawn outside (inside) the axis lines. - - The 'ticks' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['outside', 'inside', ''] - - Returns - ------- - Any - """ - return self["ticks"] - - @ticks.setter - def ticks(self, val): - self["ticks"] = val - - # ticksuffix - # ---------- - @property - def ticksuffix(self): - """ - Sets a tick label suffix. - - The 'ticksuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ticksuffix"] - - @ticksuffix.setter - def ticksuffix(self, val): - self["ticksuffix"] = val - - # ticktext - # -------- - @property - def ticktext(self): - """ - Sets the text displayed at the ticks position via `tickvals`. - Only has an effect if `tickmode` is set to "array". Used with - `tickvals`. - - The 'ticktext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ticktext"] - - @ticktext.setter - def ticktext(self, val): - self["ticktext"] = val - - # ticktextsrc - # ----------- - @property - def ticktextsrc(self): - """ - Sets the source reference on Chart Studio Cloud for ticktext . - - The 'ticktextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ticktextsrc"] - - @ticktextsrc.setter - def ticktextsrc(self, val): - self["ticktextsrc"] = val - - # tickvals - # -------- - @property - def tickvals(self): - """ - Sets the values at which ticks on this axis appear. Only has an - effect if `tickmode` is set to "array". Used with `ticktext`. - - The 'tickvals' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["tickvals"] - - @tickvals.setter - def tickvals(self, val): - self["tickvals"] = val - - # tickvalssrc - # ----------- - @property - def tickvalssrc(self): - """ - Sets the source reference on Chart Studio Cloud for tickvals . - - The 'tickvalssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tickvalssrc"] - - @tickvalssrc.setter - def tickvalssrc(self, val): - self["tickvalssrc"] = val - - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the tick width (in px). - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.colorbar.Title` - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. - - Returns - ------- - plotly.graph_objs.volume.colorbar.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use volume.colorbar.title.font instead. Sets - this color bar's title font. Note that the title's font used to - be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleside - # --------- - @property - def titleside(self): - """ - Deprecated: Please use volume.colorbar.title.side instead. - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - - """ - return self["titleside"] - - @titleside.setter - def titleside(self, val): - self["titleside"] = val - - # x - # - - @property - def x(self): - """ - Sets the x position of the color bar (in plot fraction). - - The 'x' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xanchor - # ------- - @property - def xanchor(self): - """ - Sets this color bar's horizontal position anchor. This anchor - binds the `x` position to the "left", "center" or "right" of - the color bar. - - The 'xanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'center', 'right'] - - Returns - ------- - Any - """ - return self["xanchor"] - - @xanchor.setter - def xanchor(self, val): - self["xanchor"] = val - - # xpad - # ---- - @property - def xpad(self): - """ - Sets the amount of padding (in px) along the x direction. - - The 'xpad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xpad"] - - @xpad.setter - def xpad(self, val): - self["xpad"] = val - - # y - # - - @property - def y(self): - """ - Sets the y position of the color bar (in plot fraction). - - The 'y' property is a number and may be specified as: - - An int or float in the interval [-2, 3] - - Returns - ------- - int|float - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yanchor - # ------- - @property - def yanchor(self): - """ - Sets this color bar's vertical position anchor This anchor - binds the `y` position to the "top", "middle" or "bottom" of - the color bar. - - The 'yanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'middle', 'bottom'] - - Returns - ------- - Any - """ - return self["yanchor"] - - @yanchor.setter - def yanchor(self, val): - self["yanchor"] = val - - # ypad - # ---- - @property - def ypad(self): - """ - Sets the amount of padding (in px) along the y direction. - - The 'ypad' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ypad"] - - @ypad.setter - def ypad(self, val): - self["ypad"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.volume.colorbar - .Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.volume - .colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - volume.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.volume.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use volume.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use volume.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - """ - - _mapped_properties = { - "titlefont": ("title", "font"), - "titleside": ("title", "side"), - } - - def __init__( - self, - arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - len=None, - lenmode=None, - nticks=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - titlefont=None, - titleside=None, - x=None, - xanchor=None, - xpad=None, - y=None, - yanchor=None, - ypad=None, - **kwargs - ): - """ - Construct a new ColorBar object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.ColorBar` - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing this - color bar. - dtick - Sets the step in-between ticks on this axis. Use with - `tick0`. Must be a positive number, or special strings - available to "log" and "date" axes. If the axis `type` - is "log", then ticks are set every 10^(n*dtick) where n - is the tick number. For example, to set a tick mark at - 1, 10, 100, 1000, ... set dtick to 1. To set tick marks - at 1, 100, 10000, ... set dtick to 2. To set tick marks - at 1, 5, 25, 125, 625, 3125, ... set dtick to - log_10(5), or 0.69897000433. "log" has several special - values; "L", where `f` is a positive number, gives - ticks linearly spaced in value (but not position). For - example `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus - small digits between, use "D1" (all digits) or "D2" - (only 2 and 5). `tick0` is ignored for "D1" and "D2". - If the axis `type` is "date", then you must convert the - time to milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to 86400000.0. - "date" also has special values "M" gives ticks - spaced by a number of months. `n` must be a positive - integer. To set ticks on the 15th of every third month, - set `tick0` to "2000-01-15" and `dtick` to "M3". To set - ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick exponents. - For example, consider the number 1,000,000,000. If - "none", it appears as 1,000,000,000. If "e", 1e+9. If - "E", 1E+9. If "power", 1x10^9 (with 9 in a super - script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure excludes - the padding of both ends. That is, the color bar length - is this length minus the padding on both ends. - lenmode - Determines whether this color bar's length (i.e. the - measure in the color variation direction) is set in - units of plot "fraction" or in *pixels. Use `len` to - set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks will be - chosen automatically to be less than or equal to - `nticks`. Has an effect only if `tickmode` is set to - "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of the - first tick is shown. If "last", only the exponent of - the last tick is shown. If "none", no exponents appear. - showticklabels - Determines whether or not the tick labels are drawn. - showtickprefix - If "all", all tick labels are displayed with a prefix. - If "first", only the first tick is displayed with a - prefix. If "last", only the last tick is displayed with - a suffix. If "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This measure - excludes the size of the padding, ticks and labels. - thicknessmode - Determines whether this color bar's thickness (i.e. the - measure in the constant color direction) is set in - units of plot "fraction" or in "pixels". Use - `thickness` to set the value. - tick0 - Sets the placement of the first tick on this axis. Use - with `dtick`. If the axis `type` is "log", then you - must take the log of your starting tick (e.g. to set - the starting tick to 100, set the `tick0` to 2) except - when `dtick`=*L* (see `dtick` for more info). If the - axis `type` is "date", it should be a date string, like - date data. If the axis `type` is "category", it should - be a number, using the scale where each category is - assigned a serial number from zero in the order it - appears. - tickangle - Sets the angle of the tick labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format And for - dates see: https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format We add - one item to d3's date formatter: "%{n}f" for fractional - seconds with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" would - display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.volume.colorbar - .Tickformatstop` instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.data.volume - .colorbar.tickformatstopdefaults), sets the default - property values to use for elements of - volume.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", the number - of ticks is set via `nticks`. If "linear", the - placement of the ticks is determined by a starting - position `tick0` and a tick step `dtick` ("linear" is - the default value if `tick0` and `dtick` are provided). - If "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. ("array" is - the default value if `tickvals` is provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If "", this - axis' ticks are not drawn. If "outside" ("inside"), - this axis' are drawn outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position via - `tickvals`. Only has an effect if `tickmode` is set to - "array". Used with `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud for - ticktext . - tickvals - Sets the values at which ticks on this axis appear. - Only has an effect if `tickmode` is set to "array". - Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud for - tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.volume.colorbar.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use volume.colorbar.title.font - instead. Sets this color bar's title font. Note that - the title's font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use volume.colorbar.title.side - instead. Determines the location of color bar's title - with respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position anchor. This - anchor binds the `x` position to the "left", "center" - or "right" of the color bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor This - anchor binds the `y` position to the "top", "middle" or - "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - ColorBar - """ - super(ColorBar, self).__init__("colorbar") - - # Validate arg - # ------------ - 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.volume.ColorBar -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.ColorBar`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import colorbar as v_colorbar - - # Initialize validators - # --------------------- - self._validators["bgcolor"] = v_colorbar.BgcolorValidator() - self._validators["bordercolor"] = v_colorbar.BordercolorValidator() - self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() - self._validators["dtick"] = v_colorbar.DtickValidator() - self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() - self._validators["len"] = v_colorbar.LenValidator() - self._validators["lenmode"] = v_colorbar.LenmodeValidator() - self._validators["nticks"] = v_colorbar.NticksValidator() - self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() - self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() - self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() - self._validators["showexponent"] = v_colorbar.ShowexponentValidator() - self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() - self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() - self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() - self._validators["thickness"] = v_colorbar.ThicknessValidator() - self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() - self._validators["tick0"] = v_colorbar.Tick0Validator() - self._validators["tickangle"] = v_colorbar.TickangleValidator() - self._validators["tickcolor"] = v_colorbar.TickcolorValidator() - self._validators["tickfont"] = v_colorbar.TickfontValidator() - self._validators["tickformat"] = v_colorbar.TickformatValidator() - self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() - self._validators[ - "tickformatstopdefaults" - ] = v_colorbar.TickformatstopValidator() - self._validators["ticklen"] = v_colorbar.TicklenValidator() - self._validators["tickmode"] = v_colorbar.TickmodeValidator() - self._validators["tickprefix"] = v_colorbar.TickprefixValidator() - self._validators["ticks"] = v_colorbar.TicksValidator() - self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() - self._validators["ticktext"] = v_colorbar.TicktextValidator() - self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() - self._validators["tickvals"] = v_colorbar.TickvalsValidator() - self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() - self._validators["tickwidth"] = v_colorbar.TickwidthValidator() - self._validators["title"] = v_colorbar.TitleValidator() - self._validators["x"] = v_colorbar.XValidator() - self._validators["xanchor"] = v_colorbar.XanchorValidator() - self._validators["xpad"] = v_colorbar.XpadValidator() - self._validators["y"] = v_colorbar.YValidator() - self._validators["yanchor"] = v_colorbar.YanchorValidator() - self._validators["ypad"] = v_colorbar.YpadValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("borderwidth", None) - self["borderwidth"] = borderwidth if borderwidth is not None else _v - _v = arg.pop("dtick", None) - self["dtick"] = dtick if dtick is not None else _v - _v = arg.pop("exponentformat", None) - self["exponentformat"] = exponentformat if exponentformat is not None else _v - _v = arg.pop("len", None) - self["len"] = len if len is not None else _v - _v = arg.pop("lenmode", None) - self["lenmode"] = lenmode if lenmode is not None else _v - _v = arg.pop("nticks", None) - self["nticks"] = nticks if nticks is not None else _v - _v = arg.pop("outlinecolor", None) - self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v - _v = arg.pop("outlinewidth", None) - self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v - _v = arg.pop("separatethousands", None) - self["separatethousands"] = ( - separatethousands if separatethousands is not None else _v - ) - _v = arg.pop("showexponent", None) - self["showexponent"] = showexponent if showexponent is not None else _v - _v = arg.pop("showticklabels", None) - self["showticklabels"] = showticklabels if showticklabels is not None else _v - _v = arg.pop("showtickprefix", None) - self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v - _v = arg.pop("showticksuffix", None) - self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v - _v = arg.pop("thickness", None) - self["thickness"] = thickness if thickness is not None else _v - _v = arg.pop("thicknessmode", None) - self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v - _v = arg.pop("tick0", None) - self["tick0"] = tick0 if tick0 is not None else _v - _v = arg.pop("tickangle", None) - self["tickangle"] = tickangle if tickangle is not None else _v - _v = arg.pop("tickcolor", None) - self["tickcolor"] = tickcolor if tickcolor is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("tickformat", None) - self["tickformat"] = tickformat if tickformat is not None else _v - _v = arg.pop("tickformatstops", None) - self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v - _v = arg.pop("tickformatstopdefaults", None) - self["tickformatstopdefaults"] = ( - tickformatstopdefaults if tickformatstopdefaults is not None else _v - ) - _v = arg.pop("ticklen", None) - self["ticklen"] = ticklen if ticklen is not None else _v - _v = arg.pop("tickmode", None) - self["tickmode"] = tickmode if tickmode is not None else _v - _v = arg.pop("tickprefix", None) - self["tickprefix"] = tickprefix if tickprefix is not None else _v - _v = arg.pop("ticks", None) - self["ticks"] = ticks if ticks is not None else _v - _v = arg.pop("ticksuffix", None) - self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v - _v = arg.pop("ticktext", None) - self["ticktext"] = ticktext if ticktext is not None else _v - _v = arg.pop("ticktextsrc", None) - self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v - _v = arg.pop("tickvals", None) - self["tickvals"] = tickvals if tickvals is not None else _v - _v = arg.pop("tickvalssrc", None) - self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleside", None) - _v = titleside if titleside is not None else _v - if _v is not None: - self["titleside"] = _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xanchor", None) - self["xanchor"] = xanchor if xanchor is not None else _v - _v = arg.pop("xpad", None) - self["xpad"] = xpad if xpad is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yanchor", None) - self["yanchor"] = yanchor if yanchor is not None else _v - _v = arg.pop("ypad", None) - self["ypad"] = ypad if ypad is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Caps(_BaseTraceHierarchyType): - - # x - # - - @property - def x(self): - """ - The 'x' property is an instance of X - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.caps.X` - - A dict of string/value properties that will be passed - to the X constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - - Returns - ------- - plotly.graph_objs.volume.caps.X - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # y - # - - @property - def y(self): - """ - The 'y' property is an instance of Y - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.caps.Y` - - A dict of string/value properties that will be passed - to the Y constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - - Returns - ------- - plotly.graph_objs.volume.caps.Y - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # z - # - - @property - def z(self): - """ - The 'z' property is an instance of Z - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.caps.Z` - - A dict of string/value properties that will be passed - to the Z constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - - Returns - ------- - plotly.graph_objs.volume.caps.Z - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - x - :class:`plotly.graph_objects.volume.caps.X` instance or - dict with compatible properties - y - :class:`plotly.graph_objects.volume.caps.Y` instance or - dict with compatible properties - z - :class:`plotly.graph_objects.volume.caps.Z` instance or - dict with compatible properties - """ - - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): - """ - Construct a new Caps object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.Caps` - x - :class:`plotly.graph_objects.volume.caps.X` instance or - dict with compatible properties - y - :class:`plotly.graph_objects.volume.caps.Y` instance or - dict with compatible properties - z - :class:`plotly.graph_objects.volume.caps.Z` instance or - dict with compatible properties - - Returns - ------- - Caps - """ - super(Caps, self).__init__("caps") - - # Validate arg - # ------------ - 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.volume.Caps -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.Caps`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume import caps as v_caps - - # Initialize validators - # --------------------- - self._validators["x"] = v_caps.XValidator() - self._validators["y"] = v_caps.YValidator() - self._validators["z"] = v_caps.ZValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Caps", - "ColorBar", - "Contour", - "Hoverlabel", - "Lighting", - "Lightposition", - "Slices", - "Spaceframe", - "Stream", - "Surface", - "caps", - "colorbar", - "hoverlabel", - "slices", -] - -from plotly.graph_objs.volume import slices -from plotly.graph_objs.volume import hoverlabel -from plotly.graph_objs.volume import colorbar -from plotly.graph_objs.volume import caps +import sys + +if sys.version_info < (3, 7): + from ._surface import Surface + from ._stream import Stream + from ._spaceframe import Spaceframe + from ._slices import Slices + from ._lightposition import Lightposition + from ._lighting import Lighting + from ._hoverlabel import Hoverlabel + from ._contour import Contour + from ._colorbar import ColorBar + from ._caps import Caps + from . import slices + from . import hoverlabel + from . import colorbar + from . import caps +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".slices", ".hoverlabel", ".colorbar", ".caps"], + [ + "._surface.Surface", + "._stream.Stream", + "._spaceframe.Spaceframe", + "._slices.Slices", + "._lightposition.Lightposition", + "._lighting.Lighting", + "._hoverlabel.Hoverlabel", + "._contour.Contour", + "._colorbar.ColorBar", + "._caps.Caps", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/volume/_caps.py b/packages/python/plotly/plotly/graph_objs/volume/_caps.py new file mode 100644 index 00000000000..e1c286e94d8 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_caps.py @@ -0,0 +1,210 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Caps(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.caps" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is an instance of X + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.caps.X` + - A dict of string/value properties that will be passed + to the X constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the x `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. + + Returns + ------- + plotly.graph_objs.volume.caps.X + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is an instance of Y + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.caps.Y` + - A dict of string/value properties that will be passed + to the Y constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the y `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. + + Returns + ------- + plotly.graph_objs.volume.caps.Y + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is an instance of Z + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.caps.Z` + - A dict of string/value properties that will be passed + to the Z constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the z `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. + + Returns + ------- + plotly.graph_objs.volume.caps.Z + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + :class:`plotly.graph_objects.volume.caps.X` instance or + dict with compatible properties + y + :class:`plotly.graph_objects.volume.caps.Y` instance or + dict with compatible properties + z + :class:`plotly.graph_objects.volume.caps.Z` instance or + dict with compatible properties + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Caps object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.Caps` + x + :class:`plotly.graph_objects.volume.caps.X` instance or + dict with compatible properties + y + :class:`plotly.graph_objects.volume.caps.Y` instance or + dict with compatible properties + z + :class:`plotly.graph_objects.volume.caps.Z` instance or + dict with compatible properties + + Returns + ------- + Caps + """ + super(Caps, self).__init__("caps") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Caps +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Caps`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py b/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py new file mode 100644 index 00000000000..81545deeab4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py @@ -0,0 +1,1940 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "len", + "lenmode", + "nticks", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "titlefont", + "titleside", + "x", + "xanchor", + "xpad", + "y", + "yanchor", + "ypad", + } + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.volume.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.volume.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.volume.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.volume.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + volume.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.volume.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.volume.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use volume.colorbar.title.font instead. Sets + this color bar's title font. Note that the title's font used to + be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use volume.colorbar.title.side instead. + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.volume.colorbar + .Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.volume + .colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + volume.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.volume.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use volume.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use volume.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.volume.colorbar + .Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.volume + .colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + volume.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.volume.colorbar.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use volume.colorbar.title.font + instead. Sets this color bar's title font. Note that + the title's font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use volume.colorbar.title.side + instead. Determines the location of color bar's title + with respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.ColorBar`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("borderwidth", None) + _v = borderwidth if borderwidth is not None else _v + if _v is not None: + self["borderwidth"] = _v + _v = arg.pop("dtick", None) + _v = dtick if dtick is not None else _v + if _v is not None: + self["dtick"] = _v + _v = arg.pop("exponentformat", None) + _v = exponentformat if exponentformat is not None else _v + if _v is not None: + self["exponentformat"] = _v + _v = arg.pop("len", None) + _v = len if len is not None else _v + if _v is not None: + self["len"] = _v + _v = arg.pop("lenmode", None) + _v = lenmode if lenmode is not None else _v + if _v is not None: + self["lenmode"] = _v + _v = arg.pop("nticks", None) + _v = nticks if nticks is not None else _v + if _v is not None: + self["nticks"] = _v + _v = arg.pop("outlinecolor", None) + _v = outlinecolor if outlinecolor is not None else _v + if _v is not None: + self["outlinecolor"] = _v + _v = arg.pop("outlinewidth", None) + _v = outlinewidth if outlinewidth is not None else _v + if _v is not None: + self["outlinewidth"] = _v + _v = arg.pop("separatethousands", None) + _v = separatethousands if separatethousands is not None else _v + if _v is not None: + self["separatethousands"] = _v + _v = arg.pop("showexponent", None) + _v = showexponent if showexponent is not None else _v + if _v is not None: + self["showexponent"] = _v + _v = arg.pop("showticklabels", None) + _v = showticklabels if showticklabels is not None else _v + if _v is not None: + self["showticklabels"] = _v + _v = arg.pop("showtickprefix", None) + _v = showtickprefix if showtickprefix is not None else _v + if _v is not None: + self["showtickprefix"] = _v + _v = arg.pop("showticksuffix", None) + _v = showticksuffix if showticksuffix is not None else _v + if _v is not None: + self["showticksuffix"] = _v + _v = arg.pop("thickness", None) + _v = thickness if thickness is not None else _v + if _v is not None: + self["thickness"] = _v + _v = arg.pop("thicknessmode", None) + _v = thicknessmode if thicknessmode is not None else _v + if _v is not None: + self["thicknessmode"] = _v + _v = arg.pop("tick0", None) + _v = tick0 if tick0 is not None else _v + if _v is not None: + self["tick0"] = _v + _v = arg.pop("tickangle", None) + _v = tickangle if tickangle is not None else _v + if _v is not None: + self["tickangle"] = _v + _v = arg.pop("tickcolor", None) + _v = tickcolor if tickcolor is not None else _v + if _v is not None: + self["tickcolor"] = _v + _v = arg.pop("tickfont", None) + _v = tickfont if tickfont is not None else _v + if _v is not None: + self["tickfont"] = _v + _v = arg.pop("tickformat", None) + _v = tickformat if tickformat is not None else _v + if _v is not None: + self["tickformat"] = _v + _v = arg.pop("tickformatstops", None) + _v = tickformatstops if tickformatstops is not None else _v + if _v is not None: + self["tickformatstops"] = _v + _v = arg.pop("tickformatstopdefaults", None) + _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v + if _v is not None: + self["tickformatstopdefaults"] = _v + _v = arg.pop("ticklen", None) + _v = ticklen if ticklen is not None else _v + if _v is not None: + self["ticklen"] = _v + _v = arg.pop("tickmode", None) + _v = tickmode if tickmode is not None else _v + if _v is not None: + self["tickmode"] = _v + _v = arg.pop("tickprefix", None) + _v = tickprefix if tickprefix is not None else _v + if _v is not None: + self["tickprefix"] = _v + _v = arg.pop("ticks", None) + _v = ticks if ticks is not None else _v + if _v is not None: + self["ticks"] = _v + _v = arg.pop("ticksuffix", None) + _v = ticksuffix if ticksuffix is not None else _v + if _v is not None: + self["ticksuffix"] = _v + _v = arg.pop("ticktext", None) + _v = ticktext if ticktext is not None else _v + if _v is not None: + self["ticktext"] = _v + _v = arg.pop("ticktextsrc", None) + _v = ticktextsrc if ticktextsrc is not None else _v + if _v is not None: + self["ticktextsrc"] = _v + _v = arg.pop("tickvals", None) + _v = tickvals if tickvals is not None else _v + if _v is not None: + self["tickvals"] = _v + _v = arg.pop("tickvalssrc", None) + _v = tickvalssrc if tickvalssrc is not None else _v + if _v is not None: + self["tickvalssrc"] = _v + _v = arg.pop("tickwidth", None) + _v = tickwidth if tickwidth is not None else _v + if _v is not None: + self["tickwidth"] = _v + _v = arg.pop("title", None) + _v = title if title is not None else _v + if _v is not None: + self["title"] = _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("xanchor", None) + _v = xanchor if xanchor is not None else _v + if _v is not None: + self["xanchor"] = _v + _v = arg.pop("xpad", None) + _v = xpad if xpad is not None else _v + if _v is not None: + self["xpad"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("yanchor", None) + _v = yanchor if yanchor is not None else _v + if _v is not None: + self["yanchor"] = _v + _v = arg.pop("ypad", None) + _v = ypad if ypad is not None else _v + if _v is not None: + self["ypad"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_contour.py b/packages/python/plotly/plotly/graph_objs/volume/_contour.py new file mode 100644 index 00000000000..d4d14e46d27 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_contour.py @@ -0,0 +1,193 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contour(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.contour" + _valid_props = {"color", "show", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the color of the contour lines. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # show + # ---- + @property + def show(self): + """ + Sets whether or not dynamic contours are shown on hover + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the contour lines. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [1, 16] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown on hover + width + Sets the width of the contour lines. + """ + + def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): + """ + Construct a new Contour object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.Contour` + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown on hover + width + Sets the width of the contour lines. + + Returns + ------- + Contour + """ + super(Contour, self).__init__("contour") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Contour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Contour`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/volume/_hoverlabel.py new file mode 100644 index 00000000000..049de1683f4 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.volume.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_lighting.py b/packages/python/plotly/plotly/graph_objs/volume/_lighting.py new file mode 100644 index 00000000000..888677a9189 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_lighting.py @@ -0,0 +1,311 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.lighting" + _valid_props = { + "ambient", + "diffuse", + "facenormalsepsilon", + "fresnel", + "roughness", + "specular", + "vertexnormalsepsilon", + } + + # ambient + # ------- + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + # diffuse + # ------- + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + # facenormalsepsilon + # ------------------ + @property + def facenormalsepsilon(self): + """ + Epsilon for face normals calculation avoids math issues arising + from degenerate geometry. + + The 'facenormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["facenormalsepsilon"] + + @facenormalsepsilon.setter + def facenormalsepsilon(self, val): + self["facenormalsepsilon"] = val + + # fresnel + # ------- + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + # roughness + # --------- + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + # specular + # -------- + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + # vertexnormalsepsilon + # -------------------- + @property + def vertexnormalsepsilon(self): + """ + Epsilon for vertex normals calculation avoids math issues + arising from degenerate geometry. + + The 'vertexnormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["vertexnormalsepsilon"] + + @vertexnormalsepsilon.setter + def vertexnormalsepsilon(self, val): + self["vertexnormalsepsilon"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + facenormalsepsilon=None, + fresnel=None, + roughness=None, + specular=None, + vertexnormalsepsilon=None, + **kwargs + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + + Returns + ------- + Lighting + """ + super(Lighting, self).__init__("lighting") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Lighting`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("ambient", None) + _v = ambient if ambient is not None else _v + if _v is not None: + self["ambient"] = _v + _v = arg.pop("diffuse", None) + _v = diffuse if diffuse is not None else _v + if _v is not None: + self["diffuse"] = _v + _v = arg.pop("facenormalsepsilon", None) + _v = facenormalsepsilon if facenormalsepsilon is not None else _v + if _v is not None: + self["facenormalsepsilon"] = _v + _v = arg.pop("fresnel", None) + _v = fresnel if fresnel is not None else _v + if _v is not None: + self["fresnel"] = _v + _v = arg.pop("roughness", None) + _v = roughness if roughness is not None else _v + if _v is not None: + self["roughness"] = _v + _v = arg.pop("specular", None) + _v = specular if specular is not None else _v + if _v is not None: + self["specular"] = _v + _v = arg.pop("vertexnormalsepsilon", None) + _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v + if _v is not None: + self["vertexnormalsepsilon"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_lightposition.py b/packages/python/plotly/plotly/graph_objs/volume/_lightposition.py new file mode 100644 index 00000000000..368d5857b05 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_lightposition.py @@ -0,0 +1,160 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.lightposition" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super(Lightposition, self).__init__("lightposition") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Lightposition`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_slices.py b/packages/python/plotly/plotly/graph_objs/volume/_slices.py new file mode 100644 index 00000000000..ab6dbdae65a --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_slices.py @@ -0,0 +1,225 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Slices(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.slices" + _valid_props = {"x", "y", "z"} + + # x + # - + @property + def x(self): + """ + The 'x' property is an instance of X + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.slices.X` + - A dict of string/value properties that will be passed + to the X constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis x except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the x dimension are drawn. + + Returns + ------- + plotly.graph_objs.volume.slices.X + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + The 'y' property is an instance of Y + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.slices.Y` + - A dict of string/value properties that will be passed + to the Y constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis y except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the y dimension are drawn. + + Returns + ------- + plotly.graph_objs.volume.slices.Y + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # z + # - + @property + def z(self): + """ + The 'z' property is an instance of Z + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.slices.Z` + - A dict of string/value properties that will be passed + to the Z constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis z except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the z dimension are drawn. + + Returns + ------- + plotly.graph_objs.volume.slices.Z + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + x + :class:`plotly.graph_objects.volume.slices.X` instance + or dict with compatible properties + y + :class:`plotly.graph_objects.volume.slices.Y` instance + or dict with compatible properties + z + :class:`plotly.graph_objects.volume.slices.Z` instance + or dict with compatible properties + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Slices object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.Slices` + x + :class:`plotly.graph_objects.volume.slices.X` instance + or dict with compatible properties + y + :class:`plotly.graph_objects.volume.slices.Y` instance + or dict with compatible properties + z + :class:`plotly.graph_objects.volume.slices.Z` instance + or dict with compatible properties + + Returns + ------- + Slices + """ + super(Slices, self).__init__("slices") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Slices +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Slices`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("x", None) + _v = x if x is not None else _v + if _v is not None: + self["x"] = _v + _v = arg.pop("y", None) + _v = y if y is not None else _v + if _v is not None: + self["y"] = _v + _v = arg.pop("z", None) + _v = z if z is not None else _v + if _v is not None: + self["z"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_spaceframe.py b/packages/python/plotly/plotly/graph_objs/volume/_spaceframe.py new file mode 100644 index 00000000000..0fff4d7757f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_spaceframe.py @@ -0,0 +1,143 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Spaceframe(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.spaceframe" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `spaceframe` elements. The default + fill value is 1 meaning that they are entirely shaded. Applying + a `fill` ratio less than one would allow the creation of + openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Displays/hides tetrahedron shapes between minimum and maximum + iso-values. Often useful when either caps or surfaces are + disabled or filled with values less than 1. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `spaceframe` elements. The + default fill value is 1 meaning that they are entirely + shaded. Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + show + Displays/hides tetrahedron shapes between minimum and + maximum iso-values. Often useful when either caps or + surfaces are disabled or filled with values less than + 1. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new Spaceframe object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.Spaceframe` + fill + Sets the fill ratio of the `spaceframe` elements. The + default fill value is 1 meaning that they are entirely + shaded. Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + show + Displays/hides tetrahedron shapes between minimum and + maximum iso-values. Often useful when either caps or + surfaces are disabled or filled with values less than + 1. + + Returns + ------- + Spaceframe + """ + super(Spaceframe, self).__init__("spaceframe") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Spaceframe +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Spaceframe`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_stream.py b/packages/python/plotly/plotly/graph_objs/volume/_stream.py new file mode 100644 index 00000000000..1d0f4cd9037 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_stream.py @@ -0,0 +1,139 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/_surface.py b/packages/python/plotly/plotly/graph_objs/volume/_surface.py new file mode 100644 index 00000000000..d45128921c7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/_surface.py @@ -0,0 +1,229 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Surface(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume" + _path_str = "volume.surface" + _valid_props = {"count", "fill", "pattern", "show"} + + # count + # ----- + @property + def count(self): + """ + Sets the number of iso-surfaces between minimum and maximum + iso-values. By default this value is 2 meaning that only + minimum and maximum surfaces would be drawn. + + The 'count' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the iso-surface. The default fill value + of the surface is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # pattern + # ------- + @property + def pattern(self): + """ + Sets the surface pattern of the iso-surface 3-D sections. The + default pattern of the surface is `all` meaning that the rest + of surface elements would be shaded. The check options (either + 1 or 2) could be used to draw half of the squares on the + surface. Using various combinations of capital `A`, `B`, `C`, + `D` and `E` may also be used to reduce the number of triangles + on the iso-surfaces and creating other patterns of interest. + + The 'pattern' property is a flaglist and may be specified + as a string containing: + - Any combination of ['A', 'B', 'C', 'D', 'E'] joined with '+' characters + (e.g. 'A+B') + OR exactly one of ['all', 'odd', 'even'] (e.g. 'even') + + Returns + ------- + Any + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + # show + # ---- + @property + def show(self): + """ + Hides/displays surfaces between minimum and maximum iso-values. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + count + Sets the number of iso-surfaces between minimum and + maximum iso-values. By default this value is 2 meaning + that only minimum and maximum surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The default + fill value of the surface is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is `all` + meaning that the rest of surface elements would be + shaded. The check options (either 1 or 2) could be used + to draw half of the squares on the surface. Using + various combinations of capital `A`, `B`, `C`, `D` and + `E` may also be used to reduce the number of triangles + on the iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and maximum + iso-values. + """ + + def __init__( + self, arg=None, count=None, fill=None, pattern=None, show=None, **kwargs + ): + """ + Construct a new Surface object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.Surface` + count + Sets the number of iso-surfaces between minimum and + maximum iso-values. By default this value is 2 meaning + that only minimum and maximum surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The default + fill value of the surface is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is `all` + meaning that the rest of surface elements would be + shaded. The check options (either 1 or 2) could be used + to draw half of the squares on the surface. Using + various combinations of capital `A`, `B`, `C`, `D` and + `E` may also be used to reduce the number of triangles + on the iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and maximum + iso-values. + + Returns + ------- + Surface + """ + super(Surface, self).__init__("surface") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.Surface +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.Surface`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("count", None) + _v = count if count is not None else _v + if _v is not None: + self["count"] = _v + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("pattern", None) + _v = pattern if pattern is not None else _v + if _v is not None: + self["pattern"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py index c63ef0784ea..3e3a4f570cc 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py @@ -1,451 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Z(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `caps`. The default fill value of - the `caps` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the z `slices` is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.caps" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the z `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new Z object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.caps.Z` - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the z `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - - Returns - ------- - Z - """ - super(Z, self).__init__("z") - - # Validate arg - # ------------ - 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.volume.caps.Z -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.caps.Z`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.caps import z as v_z - - # Initialize validators - # --------------------- - self._validators["fill"] = v_z.FillValidator() - self._validators["show"] = v_z.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Y(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `caps`. The default fill value of - the `caps` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the y `slices` is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.caps" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the y `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new Y object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.caps.Y` - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the y `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - - Returns - ------- - Y - """ - super(Y, self).__init__("y") - - # Validate arg - # ------------ - 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.volume.caps.Y -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.caps.Y`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.caps import y as v_y - - # Initialize validators - # --------------------- - self._validators["fill"] = v_y.FillValidator() - self._validators["show"] = v_y.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class X(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `caps`. The default fill value of - the `caps` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # show - # ---- - @property - def show(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the x `slices` is 1 meaning that they are entirely shaded. On - the other hand Applying a `fill` ratio less than one would - allow the creation of openings parallel to the edges. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.caps" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the x `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - """ - - def __init__(self, arg=None, fill=None, show=None, **kwargs): - """ - Construct a new X object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.caps.X` - fill - Sets the fill ratio of the `caps`. The default fill - value of the `caps` is 1 meaning that they are entirely - shaded. On the other hand Applying a `fill` ratio less - than one would allow the creation of openings parallel - to the edges. - show - Sets the fill ratio of the `slices`. The default fill - value of the x `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - - Returns - ------- - X - """ - super(X, self).__init__("x") - - # Validate arg - # ------------ - 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.volume.caps.X -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.caps.X`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.caps import x as v_x - - # Initialize validators - # --------------------- - self._validators["fill"] = v_x.FillValidator() - self._validators["show"] = v_x.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["X", "Y", "Z"] +import sys + +if sys.version_info < (3, 7): + from ._z import Z + from ._y import Y + from ._x import X +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.Z", "._y.Y", "._x.X"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/volume/caps/_x.py b/packages/python/plotly/plotly/graph_objs/volume/caps/_x.py new file mode 100644 index 00000000000..1b752daef58 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/caps/_x.py @@ -0,0 +1,147 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class X(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.caps" + _path_str = "volume.caps.x" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `caps`. The default fill value of + the `caps` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the x `slices` is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the x `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new X object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.caps.X` + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the x `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + + Returns + ------- + X + """ + super(X, self).__init__("x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.caps.X +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.caps.X`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/caps/_y.py b/packages/python/plotly/plotly/graph_objs/volume/caps/_y.py new file mode 100644 index 00000000000..6141c4d3fed --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/caps/_y.py @@ -0,0 +1,147 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Y(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.caps" + _path_str = "volume.caps.y" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `caps`. The default fill value of + the `caps` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the y `slices` is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the y `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new Y object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.caps.Y` + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the y `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + + Returns + ------- + Y + """ + super(Y, self).__init__("y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.caps.Y +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.caps.Y`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/caps/_z.py b/packages/python/plotly/plotly/graph_objs/volume/caps/_z.py new file mode 100644 index 00000000000..0ed9ebb6d47 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/caps/_z.py @@ -0,0 +1,147 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Z(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.caps" + _path_str = "volume.caps.z" + _valid_props = {"fill", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `caps`. The default fill value of + the `caps` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # show + # ---- + @property + def show(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the z `slices` is 1 meaning that they are entirely shaded. On + the other hand Applying a `fill` ratio less than one would + allow the creation of openings parallel to the edges. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the z `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + """ + + def __init__(self, arg=None, fill=None, show=None, **kwargs): + """ + Construct a new Z object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.caps.Z` + fill + Sets the fill ratio of the `caps`. The default fill + value of the `caps` is 1 meaning that they are entirely + shaded. On the other hand Applying a `fill` ratio less + than one would allow the creation of openings parallel + to the edges. + show + Sets the fill ratio of the `slices`. The default fill + value of the z `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + + Returns + ------- + Z + """ + super(Z, self).__init__("z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.caps.Z +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.caps.Z`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py index a61012d5e4c..4e5b92242be 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py @@ -1,722 +1,15 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Title(_BaseTraceHierarchyType): - - # font - # ---- - @property - def font(self): - """ - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.volume.colorbar.title.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.volume.colorbar.title.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # side - # ---- - @property - def side(self): - """ - Determines the location of color bar's title with respect to - the color bar. Note that the title's location used to be set by - the now deprecated `titleside` attribute. - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['right', 'top', 'bottom'] - - Returns - ------- - Any - """ - return self["side"] - - @side.setter - def side(self, val): - self["side"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the title of the color bar. Note that before the existence - of `title.text`, the title's contents used to be defined as the - `title` attribute itself. This behavior has been deprecated. - - 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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - """ - - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): - """ - Construct a new Title object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.colorbar.Title` - font - Sets this color bar's title font. Note that the title's - font used to be set by the now deprecated `titlefont` - attribute. - side - Determines the location of color bar's title with - respect to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - text - Sets the title of the color bar. Note that before the - existence of `title.text`, the title's contents used to - be defined as the `title` attribute itself. This - behavior has been deprecated. - - Returns - ------- - Title - """ - super(Title, self).__init__("title") - - # Validate arg - # ------------ - 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.volume.colorbar.Title -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.colorbar.Title`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.colorbar import title as v_title - - # Initialize validators - # --------------------- - self._validators["font"] = v_title.FontValidator() - self._validators["side"] = v_title.SideValidator() - self._validators["text"] = v_title.TextValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickformatstop(_BaseTraceHierarchyType): - - # dtickrange - # ---------- - @property - def dtickrange(self): - """ - range [*min*, *max*], where "min", "max" - dtick values which - describe some zoom level, it is possible to omit "min" or "max" - value by passing "null" - - The 'dtickrange' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'dtickrange[0]' property accepts values of any type - (1) The 'dtickrange[1]' property accepts values of any type - - Returns - ------- - list - """ - return self["dtickrange"] - - @dtickrange.setter - def dtickrange(self, val): - self["dtickrange"] = val - - # enabled - # ------- - @property - def enabled(self): - """ - Determines whether or not this stop is used. If `false`, this - stop is ignored even within its `dtickrange`. - - The 'enabled' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["enabled"] - - @enabled.setter - def enabled(self, val): - self["enabled"] = val - - # name - # ---- - @property - def name(self): - """ - When used in a template, named items are created in the output - figure in addition to any items the figure already has in this - array. You can modify these items in the output figure by - making your own item with `templateitemname` matching this - `name` alongside your modifications (including `visible: false` - or `enabled: false` to hide it). Has no effect outside of a - template. - - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # templateitemname - # ---------------- - @property - def templateitemname(self): - """ - Used to refer to a named item in this array in the template. - Named items from the template will be created even without a - matching item in the input figure, but you can modify one by - making an item with `templateitemname` matching its `name`, - alongside your modifications (including `visible: false` or - `enabled: false` to hide it). If there is no template or no - matching item, this item will be hidden unless you explicitly - show it with `visible: true`. - - The 'templateitemname' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["templateitemname"] - - @templateitemname.setter - def templateitemname(self, val): - self["templateitemname"] = val - - # value - # ----- - @property - def value(self): - """ - string - dtickformat for described zoom level, the same as - "tickformat" - - The 'value' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - """ - - def __init__( - self, - arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, - **kwargs - ): - """ - Construct a new Tickformatstop object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of :class:`plotly.graph_objs.volume.colorba - r.Tickformatstop` - dtickrange - range [*min*, *max*], where "min", "max" - dtick values - which describe some zoom level, it is possible to omit - "min" or "max" value by passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are created in the - output figure in addition to any items the figure - already has in this array. You can modify these items - in the output figure by making your own item with - `templateitemname` matching this `name` alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). Has no effect outside of a - template. - templateitemname - Used to refer to a named item in this array in the - template. Named items from the template will be created - even without a matching item in the input figure, but - you can modify one by making an item with - `templateitemname` matching its `name`, alongside your - modifications (including `visible: false` or `enabled: - false` to hide it). If there is no template or no - matching item, this item will be hidden unless you - explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, the same - as "tickformat" - - Returns - ------- - Tickformatstop - """ - super(Tickformatstop, self).__init__("tickformatstops") - - # Validate arg - # ------------ - 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.volume.colorbar.Tickformatstop -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.colorbar.Tickformatstop`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.colorbar import tickformatstop as v_tickformatstop - - # Initialize validators - # --------------------- - self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() - self._validators["enabled"] = v_tickformatstop.EnabledValidator() - self._validators["name"] = v_tickformatstop.NameValidator() - self._validators[ - "templateitemname" - ] = v_tickformatstop.TemplateitemnameValidator() - self._validators["value"] = v_tickformatstop.ValueValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - self["dtickrange"] = dtickrange if dtickrange is not None else _v - _v = arg.pop("enabled", None) - self["enabled"] = enabled if enabled is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("templateitemname", None) - self["templateitemname"] = ( - templateitemname if templateitemname is not None else _v - ) - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Tickfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.colorbar" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Tickfont object - - Sets the color bar's tick label font - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.colorbar.Tickfont` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Tickfont - """ - super(Tickfont, self).__init__("tickfont") - - # Validate arg - # ------------ - 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.volume.colorbar.Tickfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.colorbar.Tickfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.colorbar import tickfont as v_tickfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_tickfont.ColorValidator() - self._validators["family"] = v_tickfont.FamilyValidator() - self._validators["size"] = v_tickfont.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] - -from plotly.graph_objs.volume.colorbar import title +import sys + +if sys.version_info < (3, 7): + from ._title import Title + from ._tickformatstop import Tickformatstop + from ._tickfont import Tickfont + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._title.Title", "._tickformatstop.Tickformatstop", "._tickfont.Tickfont"], + ) diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/_tickfont.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/_tickfont.py new file mode 100644 index 00000000000..697332a5607 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/_tickfont.py @@ -0,0 +1,226 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.colorbar" + _path_str = "volume.colorbar.tickfont" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.colorbar.Tickfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/_tickformatstop.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/_tickformatstop.py new file mode 100644 index 00000000000..5ff20c4c80f --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/_tickformatstop.py @@ -0,0 +1,282 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.colorbar" + _path_str = "volume.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.volume.colorba + r.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.colorbar.Tickformatstop`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + _v = dtickrange if dtickrange is not None else _v + if _v is not None: + self["dtickrange"] = _v + _v = arg.pop("enabled", None) + _v = enabled if enabled is not None else _v + if _v is not None: + self["enabled"] = _v + _v = arg.pop("name", None) + _v = name if name is not None else _v + if _v is not None: + self["name"] = _v + _v = arg.pop("templateitemname", None) + _v = templateitemname if templateitemname is not None else _v + if _v is not None: + self["templateitemname"] = _v + _v = arg.pop("value", None) + _v = value if value is not None else _v + if _v is not None: + self["value"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/_title.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/_title.py new file mode 100644 index 00000000000..6816a675ed2 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/_title.py @@ -0,0 +1,203 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.colorbar" + _path_str = "volume.colorbar.title" + _valid_props = {"font", "side", "text"} + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.volume.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + 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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.colorbar.Title` + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.colorbar.Title`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("side", None) + _v = side if side is not None else _v + if _v is not None: + self["side"] = _v + _v = arg.pop("text", None) + _v = text if text is not None else _v + if _v is not None: + self["text"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py index 2bc47ce4306..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py @@ -1,230 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - 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 - - # size - # ---- - @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 parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.colorbar.title" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - """ - - def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): - """ - Construct a new Font object - - Sets this color bar's title font. Note that the title's font - used to be set by the now deprecated `titlefont` attribute. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.colorbar.title.Font` - color - - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - size - - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.volume.colorbar.title.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.colorbar.title.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.colorbar.title import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["size"] = v_font.SizeValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/_font.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/_font.py new file mode 100644 index 00000000000..97343394df5 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/_font.py @@ -0,0 +1,227 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.colorbar.title" + _path_str = "volume.colorbar.title.font" + _valid_props = {"color", "family", "size"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + 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 + + # size + # ---- + @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 + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.colorbar.title.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py index 8f6dfbfe864..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.volume.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/_font.py new file mode 100644 index 00000000000..3a04f43b1cc --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.hoverlabel" + _path_str = "volume.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py index 1066624c614..3e3a4f570cc 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py @@ -1,643 +1,12 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Z(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the `slices` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # locations - # --------- - @property - def locations(self): - """ - Specifies the location(s) of slices on the axis. When not - specified slices would be created for all points of the axis z - except start and end. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not slice planes about the z dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.slices" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis z except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the z - dimension are drawn. - """ - - def __init__( - self, - arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, - **kwargs - ): - """ - Construct a new Z object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.slices.Z` - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis z except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the z - dimension are drawn. - - Returns - ------- - Z - """ - super(Z, self).__init__("z") - - # Validate arg - # ------------ - 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.volume.slices.Z -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.slices.Z`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.slices import z as v_z - - # Initialize validators - # --------------------- - self._validators["fill"] = v_z.FillValidator() - self._validators["locations"] = v_z.LocationsValidator() - self._validators["locationssrc"] = v_z.LocationssrcValidator() - self._validators["show"] = v_z.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Y(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the `slices` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # locations - # --------- - @property - def locations(self): - """ - Specifies the location(s) of slices on the axis. When not - specified slices would be created for all points of the axis y - except start and end. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not slice planes about the y dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.slices" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis y except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the y - dimension are drawn. - """ - - def __init__( - self, - arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, - **kwargs - ): - """ - Construct a new Y object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.slices.Y` - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis y except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the y - dimension are drawn. - - Returns - ------- - Y - """ - super(Y, self).__init__("y") - - # Validate arg - # ------------ - 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.volume.slices.Y -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.slices.Y`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.slices import y as v_y - - # Initialize validators - # --------------------- - self._validators["fill"] = v_y.FillValidator() - self._validators["locations"] = v_y.LocationsValidator() - self._validators["locationssrc"] = v_y.LocationssrcValidator() - self._validators["show"] = v_y.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class X(_BaseTraceHierarchyType): - - # fill - # ---- - @property - def fill(self): - """ - Sets the fill ratio of the `slices`. The default fill value of - the `slices` is 1 meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than one would allow - the creation of openings parallel to the edges. - - The 'fill' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # locations - # --------- - @property - def locations(self): - """ - Specifies the location(s) of slices on the axis. When not - specified slices would be created for all points of the axis x - except start and end. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on Chart Studio Cloud for locations - . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # show - # ---- - @property - def show(self): - """ - Determines whether or not slice planes about the x dimension - are drawn. - - The 'show' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["show"] - - @show.setter - def show(self, val): - self["show"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "volume.slices" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis x except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the x - dimension are drawn. - """ - - def __init__( - self, - arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, - **kwargs - ): - """ - Construct a new X object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.volume.slices.X` - fill - Sets the fill ratio of the `slices`. The default fill - value of the `slices` is 1 meaning that they are - entirely shaded. On the other hand Applying a `fill` - ratio less than one would allow the creation of - openings parallel to the edges. - locations - Specifies the location(s) of slices on the axis. When - not specified slices would be created for all points of - the axis x except start and end. - locationssrc - Sets the source reference on Chart Studio Cloud for - locations . - show - Determines whether or not slice planes about the x - dimension are drawn. - - Returns - ------- - X - """ - super(X, self).__init__("x") - - # Validate arg - # ------------ - 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.volume.slices.X -constructor must be a dict or -an instance of :class:`plotly.graph_objs.volume.slices.X`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.volume.slices import x as v_x - - # Initialize validators - # --------------------- - self._validators["fill"] = v_x.FillValidator() - self._validators["locations"] = v_x.LocationsValidator() - self._validators["locationssrc"] = v_x.LocationssrcValidator() - self._validators["show"] = v_x.ShowValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("show", None) - self["show"] = show if show is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["X", "Y", "Z"] +import sys + +if sys.version_info < (3, 7): + from ._z import Z + from ._y import Y + from ._x import X +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.Z", "._y.Y", "._x.X"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/volume/slices/_x.py b/packages/python/plotly/plotly/graph_objs/volume/slices/_x.py new file mode 100644 index 00000000000..d7d5c20d230 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/slices/_x.py @@ -0,0 +1,213 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class X(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.slices" + _path_str = "volume.slices.x" + _valid_props = {"fill", "locations", "locationssrc", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the `slices` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # locations + # --------- + @property + def locations(self): + """ + Specifies the location(s) of slices on the axis. When not + specified slices would be created for all points of the axis x + except start and end. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not slice planes about the x dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis x except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the x + dimension are drawn. + """ + + def __init__( + self, + arg=None, + fill=None, + locations=None, + locationssrc=None, + show=None, + **kwargs + ): + """ + Construct a new X object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.slices.X` + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis x except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the x + dimension are drawn. + + Returns + ------- + X + """ + super(X, self).__init__("x") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.slices.X +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.slices.X`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/slices/_y.py b/packages/python/plotly/plotly/graph_objs/volume/slices/_y.py new file mode 100644 index 00000000000..f63a953f9f7 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/slices/_y.py @@ -0,0 +1,213 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Y(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.slices" + _path_str = "volume.slices.y" + _valid_props = {"fill", "locations", "locationssrc", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the `slices` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # locations + # --------- + @property + def locations(self): + """ + Specifies the location(s) of slices on the axis. When not + specified slices would be created for all points of the axis y + except start and end. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not slice planes about the y dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis y except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the y + dimension are drawn. + """ + + def __init__( + self, + arg=None, + fill=None, + locations=None, + locationssrc=None, + show=None, + **kwargs + ): + """ + Construct a new Y object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.slices.Y` + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis y except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the y + dimension are drawn. + + Returns + ------- + Y + """ + super(Y, self).__init__("y") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.slices.Y +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.slices.Y`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/volume/slices/_z.py b/packages/python/plotly/plotly/graph_objs/volume/slices/_z.py new file mode 100644 index 00000000000..8679c88c641 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/volume/slices/_z.py @@ -0,0 +1,213 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Z(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "volume.slices" + _path_str = "volume.slices.z" + _valid_props = {"fill", "locations", "locationssrc", "show"} + + # fill + # ---- + @property + def fill(self): + """ + Sets the fill ratio of the `slices`. The default fill value of + the `slices` is 1 meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than one would allow + the creation of openings parallel to the edges. + + The 'fill' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # locations + # --------- + @property + def locations(self): + """ + Specifies the location(s) of slices on the axis. When not + specified slices would be created for all points of the axis z + except start and end. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for locations + . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # show + # ---- + @property + def show(self): + """ + Determines whether or not slice planes about the z dimension + are drawn. + + The 'show' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["show"] + + @show.setter + def show(self, val): + self["show"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis z except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the z + dimension are drawn. + """ + + def __init__( + self, + arg=None, + fill=None, + locations=None, + locationssrc=None, + show=None, + **kwargs + ): + """ + Construct a new Z object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.volume.slices.Z` + fill + Sets the fill ratio of the `slices`. The default fill + value of the `slices` is 1 meaning that they are + entirely shaded. On the other hand Applying a `fill` + ratio less than one would allow the creation of + openings parallel to the edges. + locations + Specifies the location(s) of slices on the axis. When + not specified slices would be created for all points of + the axis z except start and end. + locationssrc + Sets the source reference on Chart Studio Cloud for + locations . + show + Determines whether or not slice planes about the z + dimension are drawn. + + Returns + ------- + Z + """ + super(Z, self).__init__("z") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.volume.slices.Z +constructor must be a dict or +an instance of :class:`plotly.graph_objs.volume.slices.Z`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("fill", None) + _v = fill if fill is not None else _v + if _v is not None: + self["fill"] = _v + _v = arg.pop("locations", None) + _v = locations if locations is not None else _v + if _v is not None: + self["locations"] = _v + _v = arg.pop("locationssrc", None) + _v = locationssrc if locationssrc is not None else _v + if _v is not None: + self["locationssrc"] = _v + _v = arg.pop("show", None) + _v = show if show is not None else _v + if _v is not None: + self["show"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py index b6e04187138..103a30abb40 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py @@ -1,2152 +1,35 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Totals(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.totals.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of all intermediate sums - and total values. - line - :class:`plotly.graph_objects.waterfall.totals.m - arker.Line` instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.waterfall.totals.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.waterfall.totals.Marker` - instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Totals object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Totals` - marker - :class:`plotly.graph_objects.waterfall.totals.Marker` - instance or dict with compatible properties - - Returns - ------- - Totals - """ - super(Totals, self).__init__("totals") - - # Validate arg - # ------------ - 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.waterfall.Totals -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Totals`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import totals as v_totals - - # Initialize validators - # --------------------- - self._validators["marker"] = v_totals.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Textfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Textfont object - - Sets the font used for `text`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Textfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Textfont - """ - super(Textfont, self).__init__("textfont") - - # Validate arg - # ------------ - 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.waterfall.Textfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Textfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import textfont as v_textfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_textfont.ColorValidator() - self._validators["colorsrc"] = v_textfont.ColorsrcValidator() - self._validators["family"] = v_textfont.FamilyValidator() - self._validators["familysrc"] = v_textfont.FamilysrcValidator() - self._validators["size"] = v_textfont.SizeValidator() - self._validators["sizesrc"] = v_textfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Stream(_BaseTraceHierarchyType): - - # maxpoints - # --------- - @property - def maxpoints(self): - """ - Sets the maximum number of points to keep on the plots from an - incoming stream. If `maxpoints` is set to 50, only the newest - 50 points will be displayed on the plot. - - The 'maxpoints' property is a number and may be specified as: - - An int or float in the interval [0, 10000] - - Returns - ------- - int|float - """ - return self["maxpoints"] - - @maxpoints.setter - def maxpoints(self, val): - self["maxpoints"] = val - - # token - # ----- - @property - def token(self): - """ - The stream id number links a data trace on a plot with a - stream. See https://chart-studio.plotly.com/settings for more - details. - - The 'token' property is a string and must be specified as: - - A non-empty string - - Returns - ------- - str - """ - return self["token"] - - @token.setter - def token(self, val): - self["token"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - """ - - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): - """ - Construct a new Stream object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Stream` - maxpoints - Sets the maximum number of points to keep on the plots - from an incoming stream. If `maxpoints` is set to 50, - only the newest 50 points will be displayed on the - plot. - token - The stream id number links a data trace on a plot with - a stream. See https://chart-studio.plotly.com/settings - for more details. - - Returns - ------- - Stream - """ - super(Stream, self).__init__("stream") - - # Validate arg - # ------------ - 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.waterfall.Stream -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Stream`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import stream as v_stream - - # Initialize validators - # --------------------- - self._validators["maxpoints"] = v_stream.MaxpointsValidator() - self._validators["token"] = v_stream.TokenValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - self["maxpoints"] = maxpoints if maxpoints is not None else _v - _v = arg.pop("token", None) - self["token"] = token if token is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Outsidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Outsidetextfont object - - Sets the font used for `text` lying outside the bar. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Outsidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Outsidetextfont - """ - super(Outsidetextfont, self).__init__("outsidetextfont") - - # Validate arg - # ------------ - 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.waterfall.Outsidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import outsidetextfont as v_outsidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_outsidetextfont.ColorValidator() - self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() - self._validators["family"] = v_outsidetextfont.FamilyValidator() - self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() - self._validators["size"] = v_outsidetextfont.SizeValidator() - self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Insidetextfont(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Insidetextfont object - - Sets the font used for `text` lying inside the bar. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Insidetextfont` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Insidetextfont - """ - super(Insidetextfont, self).__init__("insidetextfont") - - # Validate arg - # ------------ - 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.waterfall.Insidetextfont -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Insidetextfont`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import insidetextfont as v_insidetextfont - - # Initialize validators - # --------------------- - self._validators["color"] = v_insidetextfont.ColorValidator() - self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() - self._validators["family"] = v_insidetextfont.FamilyValidator() - self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() - self._validators["size"] = v_insidetextfont.SizeValidator() - self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Increasing(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.increasing.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of all increasing values. - line - :class:`plotly.graph_objects.waterfall.increasi - ng.marker.Line` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.waterfall.increasing.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.waterfall.increasing.Marke - r` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Increasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Increasing` - marker - :class:`plotly.graph_objects.waterfall.increasing.Marke - r` instance or dict with compatible properties - - Returns - ------- - Increasing - """ - super(Increasing, self).__init__("increasing") - - # Validate arg - # ------------ - 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.waterfall.Increasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Increasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import increasing as v_increasing - - # Initialize validators - # --------------------- - self._validators["marker"] = v_increasing.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on Chart Studio Cloud for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for - bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.hoverlabel.Font` - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - - Returns - ------- - plotly.graph_objs.waterfall.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on Chart Studio Cloud for namelength - . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Hoverlabel` - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on Chart Studio Cloud for - align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud for - bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud for - namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - 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.waterfall.Hoverlabel -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Hoverlabel`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Decreasing(_BaseTraceHierarchyType): - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.decreasing.Marker` - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the marker color of all decreasing values. - line - :class:`plotly.graph_objects.waterfall.decreasi - ng.marker.Line` instance or dict with - compatible properties - - Returns - ------- - plotly.graph_objs.waterfall.decreasing.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - marker - :class:`plotly.graph_objects.waterfall.decreasing.Marke - r` instance or dict with compatible properties - """ - - def __init__(self, arg=None, marker=None, **kwargs): - """ - Construct a new Decreasing object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Decreasing` - marker - :class:`plotly.graph_objects.waterfall.decreasing.Marke - r` instance or dict with compatible properties - - Returns - ------- - Decreasing - """ - super(Decreasing, self).__init__("decreasing") - - # Validate arg - # ------------ - 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.waterfall.Decreasing -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Decreasing`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import decreasing as v_decreasing - - # Initialize validators - # --------------------- - self._validators["marker"] = v_decreasing.MarkerValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - -class Connector(_BaseTraceHierarchyType): - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.connector.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.waterfall.connector.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # mode - # ---- - @property - def mode(self): - """ - Sets the shape of connector lines. - - The 'mode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['spanning', 'between'] - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines if connector lines are drawn. - - The 'visible' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - line - :class:`plotly.graph_objects.waterfall.connector.Line` - instance or dict with compatible properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. - """ - - def __init__(self, arg=None, line=None, mode=None, visible=None, **kwargs): - """ - Construct a new Connector object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.Connector` - line - :class:`plotly.graph_objects.waterfall.connector.Line` - instance or dict with compatible properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. - - Returns - ------- - Connector - """ - super(Connector, self).__init__("connector") - - # Validate arg - # ------------ - 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.waterfall.Connector -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.Connector`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall import connector as v_connector - - # Initialize validators - # --------------------- - self._validators["line"] = v_connector.LineValidator() - self._validators["mode"] = v_connector.ModeValidator() - self._validators["visible"] = v_connector.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = [ - "Connector", - "Decreasing", - "Hoverlabel", - "Increasing", - "Insidetextfont", - "Outsidetextfont", - "Stream", - "Textfont", - "Totals", - "connector", - "decreasing", - "hoverlabel", - "increasing", - "totals", -] - -from plotly.graph_objs.waterfall import totals -from plotly.graph_objs.waterfall import increasing -from plotly.graph_objs.waterfall import hoverlabel -from plotly.graph_objs.waterfall import decreasing -from plotly.graph_objs.waterfall import connector +import sys + +if sys.version_info < (3, 7): + from ._totals import Totals + from ._textfont import Textfont + from ._stream import Stream + from ._outsidetextfont import Outsidetextfont + from ._insidetextfont import Insidetextfont + from ._increasing import Increasing + from ._hoverlabel import Hoverlabel + from ._decreasing import Decreasing + from ._connector import Connector + from . import totals + from . import increasing + from . import hoverlabel + from . import decreasing + from . import connector +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".totals", ".increasing", ".hoverlabel", ".decreasing", ".connector"], + [ + "._totals.Totals", + "._textfont.Textfont", + "._stream.Stream", + "._outsidetextfont.Outsidetextfont", + "._insidetextfont.Insidetextfont", + "._increasing.Increasing", + "._hoverlabel.Hoverlabel", + "._decreasing.Decreasing", + "._connector.Connector", + ], + ) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_connector.py b/packages/python/plotly/plotly/graph_objs/waterfall/_connector.py new file mode 100644 index 00000000000..c5015e1a670 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_connector.py @@ -0,0 +1,170 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Connector(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.connector" + _valid_props = {"line", "mode", "visible"} + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.connector.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.waterfall.connector.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # mode + # ---- + @property + def mode(self): + """ + Sets the shape of connector lines. + + The 'mode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['spanning', 'between'] + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines if connector lines are drawn. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.waterfall.connector.Line` + instance or dict with compatible properties + mode + Sets the shape of connector lines. + visible + Determines if connector lines are drawn. + """ + + def __init__(self, arg=None, line=None, mode=None, visible=None, **kwargs): + """ + Construct a new Connector object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Connector` + line + :class:`plotly.graph_objects.waterfall.connector.Line` + instance or dict with compatible properties + mode + Sets the shape of connector lines. + visible + Determines if connector lines are drawn. + + Returns + ------- + Connector + """ + super(Connector, self).__init__("connector") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Connector +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Connector`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + _v = arg.pop("mode", None) + _v = mode if mode is not None else _v + if _v is not None: + self["mode"] = _v + _v = arg.pop("visible", None) + _v = visible if visible is not None else _v + if _v is not None: + self["visible"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_decreasing.py b/packages/python/plotly/plotly/graph_objs/waterfall/_decreasing.py new file mode 100644 index 00000000000..296266ca8ab --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_decreasing.py @@ -0,0 +1,110 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Decreasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.decreasing" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.decreasing.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of all decreasing values. + line + :class:`plotly.graph_objects.waterfall.decreasi + ng.marker.Line` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.waterfall.decreasing.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.waterfall.decreasing.Marke + r` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Decreasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Decreasing` + marker + :class:`plotly.graph_objects.waterfall.decreasing.Marke + r` instance or dict with compatible properties + + Returns + ------- + Decreasing + """ + super(Decreasing, self).__init__("decreasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Decreasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Decreasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_hoverlabel.py b/packages/python/plotly/plotly/graph_objs/waterfall/_hoverlabel.py new file mode 100644 index 00000000000..c505cc9866c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_hoverlabel.py @@ -0,0 +1,502 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + } + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + + Returns + ------- + plotly.graph_objs.waterfall.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for namelength + . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Hoverlabel`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + _v = align if align is not None else _v + if _v is not None: + self["align"] = _v + _v = arg.pop("alignsrc", None) + _v = alignsrc if alignsrc is not None else _v + if _v is not None: + self["alignsrc"] = _v + _v = arg.pop("bgcolor", None) + _v = bgcolor if bgcolor is not None else _v + if _v is not None: + self["bgcolor"] = _v + _v = arg.pop("bgcolorsrc", None) + _v = bgcolorsrc if bgcolorsrc is not None else _v + if _v is not None: + self["bgcolorsrc"] = _v + _v = arg.pop("bordercolor", None) + _v = bordercolor if bordercolor is not None else _v + if _v is not None: + self["bordercolor"] = _v + _v = arg.pop("bordercolorsrc", None) + _v = bordercolorsrc if bordercolorsrc is not None else _v + if _v is not None: + self["bordercolorsrc"] = _v + _v = arg.pop("font", None) + _v = font if font is not None else _v + if _v is not None: + self["font"] = _v + _v = arg.pop("namelength", None) + _v = namelength if namelength is not None else _v + if _v is not None: + self["namelength"] = _v + _v = arg.pop("namelengthsrc", None) + _v = namelengthsrc if namelengthsrc is not None else _v + if _v is not None: + self["namelengthsrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_increasing.py b/packages/python/plotly/plotly/graph_objs/waterfall/_increasing.py new file mode 100644 index 00000000000..d3b5d2cdc9c --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_increasing.py @@ -0,0 +1,110 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Increasing(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.increasing" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.increasing.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of all increasing values. + line + :class:`plotly.graph_objects.waterfall.increasi + ng.marker.Line` instance or dict with + compatible properties + + Returns + ------- + plotly.graph_objs.waterfall.increasing.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.waterfall.increasing.Marke + r` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Increasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Increasing` + marker + :class:`plotly.graph_objects.waterfall.increasing.Marke + r` instance or dict with compatible properties + + Returns + ------- + Increasing + """ + super(Increasing, self).__init__("increasing") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Increasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Increasing`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_insidetextfont.py b/packages/python/plotly/plotly/graph_objs/waterfall/_insidetextfont.py new file mode 100644 index 00000000000..d138694e3c6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_insidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.insidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `text` lying inside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Insidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_outsidetextfont.py b/packages/python/plotly/plotly/graph_objs/waterfall/_outsidetextfont.py new file mode 100644 index 00000000000..69e561baa04 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_outsidetextfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.outsidetextfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `text` lying outside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_stream.py b/packages/python/plotly/plotly/graph_objs/waterfall/_stream.py new file mode 100644 index 00000000000..5d46d2573ab --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_stream.py @@ -0,0 +1,140 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.stream" + _valid_props = {"maxpoints", "token"} + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Stream`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + _v = maxpoints if maxpoints is not None else _v + if _v is not None: + self["maxpoints"] = _v + _v = arg.pop("token", None) + _v = token if token is not None else _v + if _v is not None: + self["token"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_textfont.py b/packages/python/plotly/plotly/graph_objs/waterfall/_textfont.py new file mode 100644 index 00000000000..b7937e12d47 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_textfont.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.textfont" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `text`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Textfont`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/_totals.py b/packages/python/plotly/plotly/graph_objs/waterfall/_totals.py new file mode 100644 index 00000000000..33a1414709b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/_totals.py @@ -0,0 +1,111 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Totals(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall" + _path_str = "waterfall.totals" + _valid_props = {"marker"} + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.totals.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets the marker color of all intermediate sums + and total values. + line + :class:`plotly.graph_objects.waterfall.totals.m + arker.Line` instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.waterfall.totals.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.waterfall.totals.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Totals object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.Totals` + marker + :class:`plotly.graph_objects.waterfall.totals.Marker` + instance or dict with compatible properties + + Returns + ------- + Totals + """ + super(Totals, self).__init__("totals") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.Totals +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.Totals`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("marker", None) + _v = marker if marker is not None else _v + if _v is not None: + self["marker"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py index e01341a52d1..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py @@ -1,208 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # dash - # ---- - @property - def dash(self): - """ - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - - The 'dash' property is a string and must be specified as: - - One of the following strings: - ['solid', 'dot', 'dash', 'longdash', 'dashdot', - 'longdashdot'] - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["dash"] - - @dash.setter - def dash(self, val): - self["dash"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width (in px). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.connector" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - """ - - def __init__(self, arg=None, color=None, dash=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.waterfall.connector.Line` - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - width - Sets the line width (in px). - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.waterfall.connector.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.connector.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.connector import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["dash"] = v_line.DashValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("dash", None) - self["dash"] = dash if dash is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py b/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py new file mode 100644 index 00000000000..d1fa4a3a3ec --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py @@ -0,0 +1,205 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.connector" + _path_str = "waterfall.connector.line" + _valid_props = {"color", "dash", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # dash + # ---- + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is a string and must be specified as: + - One of the following strings: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', + 'longdashdot'] + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + """ + + def __init__(self, arg=None, color=None, dash=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.waterfall.connector.Line` + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + width + Sets the line width (in px). + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.connector.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.connector.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("dash", None) + _v = dash if dash is not None else _v + if _v is not None: + self["dash"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py index 733d5079b0a..872e6e009da 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py @@ -1,181 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker + from . import marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of all decreasing values. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.decreasing.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color of all decreasing values. - width - Sets the line width of all decreasing values. - - Returns - ------- - plotly.graph_objs.waterfall.decreasing.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.decreasing" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of all decreasing values. - line - :class:`plotly.graph_objects.waterfall.decreasing.marke - r.Line` instance or dict with compatible properties - """ - - def __init__(self, arg=None, color=None, line=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.decreasing.Marker` - color - Sets the marker color of all decreasing values. - line - :class:`plotly.graph_objects.waterfall.decreasing.marke - r.Line` instance or dict with compatible properties - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.waterfall.decreasing.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.decreasing.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.decreasing import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["line"] = v_marker.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "marker"] - -from plotly.graph_objs.waterfall.decreasing import marker + __all__, __getattr__, __dir__ = relative_import( + __name__, [".marker"], ["._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/_marker.py b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/_marker.py new file mode 100644 index 00000000000..54b1f6c2d74 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/_marker.py @@ -0,0 +1,175 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.decreasing" + _path_str = "waterfall.decreasing.marker" + _valid_props = {"color", "line"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of all decreasing values. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.decreasing.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color of all decreasing values. + width + Sets the line width of all decreasing values. + + Returns + ------- + plotly.graph_objs.waterfall.decreasing.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of all decreasing values. + line + :class:`plotly.graph_objects.waterfall.decreasing.marke + r.Line` instance or dict with compatible properties + """ + + def __init__(self, arg=None, color=None, line=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.decreasing.Marker` + color + Sets the marker color of all decreasing values. + line + :class:`plotly.graph_objects.waterfall.decreasing.marke + r.Line` instance or dict with compatible properties + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.decreasing.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.decreasing.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py index 751facc434c..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py @@ -1,169 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color of all decreasing values. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width of all decreasing values. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.decreasing.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color of all decreasing values. - width - Sets the line width of all decreasing values. - """ - - def __init__(self, arg=None, color=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.waterfall.decr - easing.marker.Line` - color - Sets the line color of all decreasing values. - width - Sets the line width of all decreasing values. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.waterfall.decreasing.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.decreasing.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.decreasing.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/_line.py b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/_line.py new file mode 100644 index 00000000000..d90a0887269 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.decreasing.marker" + _path_str = "waterfall.decreasing.marker.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color of all decreasing values. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width of all decreasing values. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color of all decreasing values. + width + Sets the line width of all decreasing values. + """ + + def __init__(self, arg=None, color=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.waterfall.decr + easing.marker.Line` + color + Sets the line color of all decreasing values. + width + Sets the line width of all decreasing values. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.decreasing.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.decreasing.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py index 6bd43cb86f3..5830914f97e 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py @@ -1,329 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._font import Font +else: + from _plotly_utils.importers import relative_import -class Font(_BaseTraceHierarchyType): - - # color - # ----- - @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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # colorsrc - # -------- - @property - def colorsrc(self): - """ - Sets the source reference on Chart Studio Cloud for color . - - The 'colorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["colorsrc"] - - @colorsrc.setter - def colorsrc(self, val): - self["colorsrc"] = val - - # family - # ------ - @property - def family(self): - """ - HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - - The 'family' property is a string and must be specified as: - - A non-empty string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["family"] - - @family.setter - def family(self, val): - self["family"] = val - - # familysrc - # --------- - @property - def familysrc(self): - """ - Sets the source reference on Chart Studio Cloud for family . - - The 'familysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["familysrc"] - - @familysrc.setter - def familysrc(self, val): - self["familysrc"] = val - - # size - # ---- - @property - def size(self): - """ - The 'size' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["size"] - - @size.setter - def size(self, val): - self["size"] = val - - # sizesrc - # ------- - @property - def sizesrc(self): - """ - Sets the source reference on Chart Studio Cloud for size . - - The 'sizesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["sizesrc"] - - @sizesrc.setter - def sizesrc(self, val): - self["sizesrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.hoverlabel" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - """ - - def __init__( - self, - arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - **kwargs - ): - """ - Construct a new Font object - - Sets the font used in hover labels. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.hoverlabel.Font` - color - - colorsrc - Sets the source reference on Chart Studio Cloud for - color . - family - HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud for - family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud for - size . - - Returns - ------- - Font - """ - super(Font, self).__init__("font") - - # Validate arg - # ------------ - 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.waterfall.hoverlabel.Font -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.hoverlabel.Font`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.hoverlabel import font as v_font - - # Initialize validators - # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("colorsrc", None) - self["colorsrc"] = colorsrc if colorsrc is not None else _v - _v = arg.pop("family", None) - self["family"] = family if family is not None else _v - _v = arg.pop("familysrc", None) - self["familysrc"] = familysrc if familysrc is not None else _v - _v = arg.pop("size", None) - self["size"] = size if size is not None else _v - _v = arg.pop("sizesrc", None) - self["sizesrc"] = sizesrc if sizesrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Font"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/_font.py b/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/_font.py new file mode 100644 index 00000000000..63c0e9ab53d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/_font.py @@ -0,0 +1,329 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.hoverlabel" + _path_str = "waterfall.hoverlabel.font" + _valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"} + + # color + # ----- + @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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise) generates images on a server, + where only a select number of fonts are installed and + supported. These include "Arial", "Balto", "Courier New", + "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The Chart + Studio Cloud (at https://chart-studio.plotly.com or on- + premise) generates images on a server, where only a + select number of fonts are installed and supported. + These include "Arial", "Balto", "Courier New", "Droid + Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas + One", "Old Standard TT", "Open Sans", "Overpass", "PT + Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud for + family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + size . + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.hoverlabel.Font`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("colorsrc", None) + _v = colorsrc if colorsrc is not None else _v + if _v is not None: + self["colorsrc"] = _v + _v = arg.pop("family", None) + _v = family if family is not None else _v + if _v is not None: + self["family"] = _v + _v = arg.pop("familysrc", None) + _v = familysrc if familysrc is not None else _v + if _v is not None: + self["familysrc"] = _v + _v = arg.pop("size", None) + _v = size if size is not None else _v + if _v is not None: + self["size"] = _v + _v = arg.pop("sizesrc", None) + _v = sizesrc if sizesrc is not None else _v + if _v is not None: + self["sizesrc"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py index 62ffd786c78..872e6e009da 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py @@ -1,181 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker + from . import marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of all increasing values. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.increasing.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color of all increasing values. - width - Sets the line width of all increasing values. - - Returns - ------- - plotly.graph_objs.waterfall.increasing.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.increasing" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of all increasing values. - line - :class:`plotly.graph_objects.waterfall.increasing.marke - r.Line` instance or dict with compatible properties - """ - - def __init__(self, arg=None, color=None, line=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.increasing.Marker` - color - Sets the marker color of all increasing values. - line - :class:`plotly.graph_objects.waterfall.increasing.marke - r.Line` instance or dict with compatible properties - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.waterfall.increasing.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.increasing.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.increasing import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["line"] = v_marker.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "marker"] - -from plotly.graph_objs.waterfall.increasing import marker + __all__, __getattr__, __dir__ = relative_import( + __name__, [".marker"], ["._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/_marker.py b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/_marker.py new file mode 100644 index 00000000000..5d6a0427e4d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/_marker.py @@ -0,0 +1,175 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.increasing" + _path_str = "waterfall.increasing.marker" + _valid_props = {"color", "line"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of all increasing values. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.increasing.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color of all increasing values. + width + Sets the line width of all increasing values. + + Returns + ------- + plotly.graph_objs.waterfall.increasing.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of all increasing values. + line + :class:`plotly.graph_objects.waterfall.increasing.marke + r.Line` instance or dict with compatible properties + """ + + def __init__(self, arg=None, color=None, line=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.increasing.Marker` + color + Sets the marker color of all increasing values. + line + :class:`plotly.graph_objects.waterfall.increasing.marke + r.Line` instance or dict with compatible properties + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.increasing.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.increasing.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py index 100a461fb24..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py @@ -1,169 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color of all increasing values. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width of all increasing values. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.increasing.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color of all increasing values. - width - Sets the line width of all increasing values. - """ - - def __init__(self, arg=None, color=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.waterfall.incr - easing.marker.Line` - color - Sets the line color of all increasing values. - width - Sets the line width of all increasing values. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.waterfall.increasing.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.increasing.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.increasing.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/_line.py b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/_line.py new file mode 100644 index 00000000000..6f37affe32d --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/_line.py @@ -0,0 +1,165 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.increasing.marker" + _path_str = "waterfall.increasing.marker.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color of all increasing values. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width of all increasing values. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color of all increasing values. + width + Sets the line width of all increasing values. + """ + + def __init__(self, arg=None, color=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.waterfall.incr + easing.marker.Line` + color + Sets the line color of all increasing values. + width + Sets the line width of all increasing values. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.increasing.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.increasing.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py index 39ae6bdada9..872e6e009da 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py @@ -1,186 +1,11 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._marker import Marker + from . import marker +else: + from _plotly_utils.importers import relative_import -class Marker(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the marker color of all intermediate sums and total - values. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of :class:`plotly.graph_objs.waterfall.totals.marker.Line` - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color of all intermediate sums - and total values. - width - Sets the line width of all intermediate sums - and total values. - - Returns - ------- - plotly.graph_objs.waterfall.totals.marker.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.totals" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the marker color of all intermediate sums and - total values. - line - :class:`plotly.graph_objects.waterfall.totals.marker.Li - ne` instance or dict with compatible properties - """ - - def __init__(self, arg=None, color=None, line=None, **kwargs): - """ - Construct a new Marker object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - :class:`plotly.graph_objs.waterfall.totals.Marker` - color - Sets the marker color of all intermediate sums and - total values. - line - :class:`plotly.graph_objects.waterfall.totals.marker.Li - ne` instance or dict with compatible properties - - Returns - ------- - Marker - """ - super(Marker, self).__init__("marker") - - # Validate arg - # ------------ - 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.waterfall.totals.Marker -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.totals.Marker`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.totals import marker as v_marker - - # Initialize validators - # --------------------- - self._validators["color"] = v_marker.ColorValidator() - self._validators["line"] = v_marker.LineValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Marker", "marker"] - -from plotly.graph_objs.waterfall.totals import marker + __all__, __getattr__, __dir__ = relative_import( + __name__, [".marker"], ["._marker.Marker"] + ) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/totals/_marker.py b/packages/python/plotly/plotly/graph_objs/waterfall/totals/_marker.py new file mode 100644 index 00000000000..d025008e7d3 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/totals/_marker.py @@ -0,0 +1,180 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.totals" + _path_str = "waterfall.totals.marker" + _valid_props = {"color", "line"} + + # color + # ----- + @property + def color(self): + """ + Sets the marker color of all intermediate sums and total + values. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.totals.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color of all intermediate sums + and total values. + width + Sets the line width of all intermediate sums + and total values. + + Returns + ------- + plotly.graph_objs.waterfall.totals.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of all intermediate sums and + total values. + line + :class:`plotly.graph_objects.waterfall.totals.marker.Li + ne` instance or dict with compatible properties + """ + + def __init__(self, arg=None, color=None, line=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.waterfall.totals.Marker` + color + Sets the marker color of all intermediate sums and + total values. + line + :class:`plotly.graph_objects.waterfall.totals.marker.Li + ne` instance or dict with compatible properties + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.totals.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.totals.Marker`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("line", None) + _v = line if line is not None else _v + if _v is not None: + self["line"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py index 4e4f9234247..4e0bebe4612 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py @@ -1,173 +1,8 @@ -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy +import sys +if sys.version_info < (3, 7): + from ._line import Line +else: + from _plotly_utils.importers import relative_import -class Line(_BaseTraceHierarchyType): - - # color - # ----- - @property - def color(self): - """ - Sets the line color of all intermediate sums and total values. - - 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: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the line width of all intermediate sums and total values. - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "waterfall.totals.marker" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - color - Sets the line color of all intermediate sums and total - values. - width - Sets the line width of all intermediate sums and total - values. - """ - - def __init__(self, arg=None, color=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.waterfall.totals.marker.Line` - color - Sets the line color of all intermediate sums and total - values. - width - Sets the line width of all intermediate sums and total - values. - - Returns - ------- - Line - """ - super(Line, self).__init__("line") - - # Validate arg - # ------------ - 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.waterfall.totals.marker.Line -constructor must be a dict or -an instance of :class:`plotly.graph_objs.waterfall.totals.marker.Line`""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.waterfall.totals.marker import line as v_line - - # Initialize validators - # --------------------- - self._validators["color"] = v_line.ColorValidator() - self._validators["width"] = v_line.WidthValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -__all__ = ["Line"] + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/_line.py b/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/_line.py new file mode 100644 index 00000000000..9ff4a845826 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/_line.py @@ -0,0 +1,169 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # class properties + # -------------------- + _parent_path_str = "waterfall.totals.marker" + _path_str = "waterfall.totals.marker.line" + _valid_props = {"color", "width"} + + # color + # ----- + @property + def color(self): + """ + Sets the line color of all intermediate sums and total values. + + 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: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the line width of all intermediate sums and total values. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the line color of all intermediate sums and total + values. + width + Sets the line width of all intermediate sums and total + values. + """ + + def __init__(self, arg=None, color=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.waterfall.totals.marker.Line` + color + Sets the line color of all intermediate sums and total + values. + width + Sets the line width of all intermediate sums and total + values. + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + # Validate arg + # ------------ + 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.waterfall.totals.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.waterfall.totals.marker.Line`""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + _v = color if color is not None else _v + if _v is not None: + self["color"] = _v + _v = arg.pop("width", None) + _v = width if width is not None else _v + if _v is not None: + self["width"] = _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False diff --git a/packages/python/plotly/plotly/io/__init__.py b/packages/python/plotly/plotly/io/__init__.py index 6b96585c334..ab9f9218c70 100644 --- a/packages/python/plotly/plotly/io/__init__.py +++ b/packages/python/plotly/plotly/io/__init__.py @@ -1,28 +1,52 @@ -from ._orca import to_image, write_image -from . import orca +from _plotly_utils.importers import relative_import +import sys -from ._json import to_json, from_json, read_json, write_json +if sys.version_info < (3, 7): + from ._orca import to_image, write_image + from . import orca + from ._json import to_json, from_json, read_json, write_json + from ._templates import templates, to_templated + from ._html import to_html, write_html + from ._renderers import renderers, show + from . import base_renderers -from ._templates import templates, to_templated + __all__ = [ + "to_image", + "write_image", + "orca", + "to_json", + "from_json", + "read_json", + "write_json", + "templates", + "to_templated", + "to_html", + "write_html", + "renderers", + "show", + "base_renderers", + ] +else: + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".orca", ".base_renderers"], + [ + "._orca.to_image", + "._orca.write_image", + "._json.to_json", + "._json.from_json", + "._json.read_json", + "._json.write_json", + "._templates.templates", + "._templates.to_templated", + "._html.to_html", + "._html.write_html", + "._renderers.renderers", + "._renderers.show", + ], + ) -from ._html import to_html, write_html + # Set default template (for < 3.7 this is done in ploty/__init__.py) + from plotly.io import templates -from ._renderers import renderers, show - -from . import base_renderers - -__all__ = [ - "to_image", - "write_image", - "to_json", - "from_json", - "read_json", - "write_json", - "templates", - "to_templated", - "to_html", - "write_html", - "renderers", - "show", - "base_renderers", -] + templates._default = "plotly" diff --git a/packages/python/plotly/plotly/io/_templates.py b/packages/python/plotly/plotly/io/_templates.py index f9f399a1b24..66c546a75d0 100644 --- a/packages/python/plotly/plotly/io/_templates.py +++ b/packages/python/plotly/plotly/io/_templates.py @@ -304,7 +304,7 @@ def walk_push_to_template(fig_obj, template_obj, skip): fig_val = fig_obj[prop] template_val = template_obj[prop] - validator = fig_obj._validators[prop] + validator = fig_obj._get_validator(prop) if isinstance(validator, CompoundValidator): walk_push_to_template(fig_val, template_val, skip) @@ -390,7 +390,7 @@ def to_templated(fig, skip=("title", "text")): >>> templated_fig = pio.to_templated(fig) >>> templated_fig.layout.template layout.Template({ - 'data': {}, 'layout': {'font': {'family': 'Courier', 'size': 20}} + 'layout': {'font': {'family': 'Courier', 'size': 20}} }) >>> templated_fig Figure({ @@ -483,10 +483,17 @@ def to_templated(fig, skip=("title", "text")): trace_type_indexes[trace.type] = template_index + 1 # Remove useless trace arrays + any_non_empty = False for trace_type in templated_fig.layout.template.data: traces = templated_fig.layout.template.data[trace_type] is_empty = [trace.to_plotly_json() == {"type": trace_type} for trace in traces] if all(is_empty): templated_fig.layout.template.data[trace_type] = None + else: + any_non_empty = True + + # Check if we can remove the data altogether key + if not any_non_empty: + templated_fig.layout.template.data = None return templated_fig diff --git a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_graph_objs.py b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_graph_objs.py index 5002e82059a..3b79dd62826 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_graph_objs.py +++ b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_graph_objs.py @@ -52,7 +52,7 @@ def test_old_class_names(self): # compat, so we basically just create a checkpoint with this test. for class_name in OLD_CLASS_NAMES: - self.assertIn(class_name, go.__dict__.keys()) + self.assertIsNotNone(getattr(go, class_name, None)) def test_title_as_string_layout(self): """ diff --git a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_instantiate_hierarchy.py b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_instantiate_hierarchy.py index 8f37a3c7d14..c504b417031 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_instantiate_hierarchy.py +++ b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_instantiate_hierarchy.py @@ -18,9 +18,10 @@ class HierarchyTest(TestCase): def test_construct_datatypes(self): for datatypes_module in datatype_modules: module = importlib.import_module(datatypes_module) - for name, obj in inspect.getmembers(module, inspect.isclass): - if name.startswith("_"): + for name in getattr(module, "__all__", []): + if name.startswith("_") or name[0].islower() or name == "FigureWidget": continue + obj = getattr(module, name) try: v = obj() except Exception: @@ -29,6 +30,7 @@ def test_construct_datatypes(self): obj=obj, module=datatypes_module ) ) + raise if obj.__module__ == "plotly.graph_objs._deprecations": self.assertTrue(isinstance(v, list) or isinstance(v, dict)) diff --git a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_template.py b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_template.py index 8010e962a92..d6ff6dc8995 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_template.py +++ b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_template.py @@ -195,7 +195,7 @@ def test_move_layout_nested_properties(self): "layout": { "font": {"family": "Courier New"}, "paper_bgcolor": "yellow", - } + }, }, "title": "Hello", } diff --git a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_validate.py b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_validate.py new file mode 100644 index 00000000000..1758bf85e46 --- /dev/null +++ b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_validate.py @@ -0,0 +1,48 @@ +import plotly.graph_objs as go +import json +import pytest +import plotly.io as pio + + +def build_invalid_fig(): + return go.Figure( + data=[{"type": "bar", "y": "not_a_list", "bogus": 23}], + layout_title_text="valid title", + layout_colorway="not a dict", + ) + + +expected_invalid_dict = dict( + data=[{"type": "bar", "y": "not_a_list", "bogus": 23}], + layout={"title": {"text": "valid title"}, "colorway": "not a dict"}, +) + + +def test_validate_false(): + template = pio.templates.default + should_validate = go.validate._should_validate + try: + pio.templates.default = None + + # Build figure with variety of invalid properties (both name and value), + # make sure underscore notation is still applied properly + with go.validate(False): + fig = build_invalid_fig() + assert json.loads(fig.to_json()) == expected_invalid_dict + + with go.validate(True): + with pytest.raises(ValueError): + build_invalid_fig() + + # Use validate as callable + go.validate(False) + fig = build_invalid_fig() + assert json.loads(fig.to_json()) == expected_invalid_dict + + go.validate(True) + with pytest.raises(ValueError): + build_invalid_fig() + + finally: + pio.templates.default = template + go.validate(should_validate) diff --git a/packages/python/plotly/plotly/validator_cache.py b/packages/python/plotly/plotly/validator_cache.py new file mode 100644 index 00000000000..15509a47699 --- /dev/null +++ b/packages/python/plotly/plotly/validator_cache.py @@ -0,0 +1,34 @@ +import importlib +from _plotly_utils.basevalidators import LiteralValidator + + +class ValidatorCache(object): + _cache = {} + + @staticmethod + def get_validator(parent_path, prop_name): + + key = (parent_path, prop_name) + if key not in ValidatorCache._cache: + + if "." not in parent_path and prop_name == "type": + # Special case for .type property of traces + validator = LiteralValidator("type", parent_path, parent_path) + else: + lookup_name = None + if parent_path == "layout": + from .graph_objects import Layout + + match = Layout._subplotid_prop_re.match(prop_name) + if match: + lookup_name = match.group(1) + + lookup_name = lookup_name or prop_name + class_name = lookup_name.title() + "Validator" + validator = getattr( + importlib.import_module("plotly.validators." + parent_path), + class_name, + )(plotly_name=prop_name) + ValidatorCache._cache[key] = validator + + return ValidatorCache._cache[key] diff --git a/packages/python/plotly/plotly/validators/__init__.py b/packages/python/plotly/plotly/validators/__init__.py index de8179948c2..9690ccd69f4 100644 --- a/packages/python/plotly/plotly/validators/__init__.py +++ b/packages/python/plotly/plotly/validators/__init__.py @@ -1,12889 +1,112 @@ -import _plotly_utils.basevalidators - - -class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="layout", parent_name="", **kwargs): - super(LayoutValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Layout"), - data_docs=kwargs.pop( - "data_docs", - """ - angularaxis - :class:`plotly.graph_objects.layout.AngularAxis - ` instance or dict with compatible properties - annotations - A tuple of - :class:`plotly.graph_objects.layout.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), - sets the default property values to use for - elements of layout.annotations - autosize - Determines whether or not a layout width or - height that has been left undefined by the user - is initialized on each relayout. Note that, - regardless of this attribute, an undefined - layout width or height is always initialized on - the first call to plot. - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "relative", the bars are stacked - on top of one another, with negative values - below the axis, positive values above With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to an "opacity" to see - multiple bars. - barnorm - Sets the normalization for bar traces on the - graph. With "fraction", the value of each bar - is divided by the sum of all values at that - location coordinate. "percent" is the same but - multiplied by 100 to show percentages. - boxgap - Sets the gap (in plot fraction) between boxes - of adjacent location coordinates. Has no effect - on traces that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes - of the same location coordinate. Has no effect - on traces that have "width" set. - boxmode - Determines how boxes at the same location - coordinate are displayed on the graph. If - "group", the boxes are plotted next to one - another centered around the shared location. If - "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see - them multiple boxes. Has no effect on traces - that have "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout - the plot. - clickmode - Determines the mode of single click - interactions. "event" is the default value and - emits the `plotly_click` event. In addition - this mode emits the `plotly_selected` event in - drag modes "lasso" and "select", but with no - event data attached (kept for compatibility - reasons). The "select" flag enables selecting - single data points via click. This mode also - supports persistent selections, meaning that - pressing Shift while clicking, adds to / - subtracts from an existing selection. "select" - with `hovermode`: "x" can be confusing, - consider explicitly setting `hovermode`: - "closest" when using this feature. Selection - events are sent accordingly as long as "event" - flag is set as well. When the "event" flag is - missing, `plotly_click` and `plotly_selected` - events are not fired. - coloraxis - :class:`plotly.graph_objects.layout.Coloraxis` - instance or dict with compatible properties - colorscale - :class:`plotly.graph_objects.layout.Colorscale` - instance or dict with compatible properties - colorway - Sets the default trace colors. - datarevision - If provided, a changed value tells - `Plotly.react` that one or more data arrays has - changed. This way you can modify arrays in- - place rather than making a complete new copy - for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are - being treated as immutable, thus any data array - with a different identity from its predecessor - contains new data. - direction - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the direction - corresponding to positive angles in legacy - polar charts. - dragmode - Determines the mode of drag interactions. - "select" and "lasso" apply only to scatter - traces with markers or text. "orbit" and - "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than - trace names and axis titles. Defaults to - `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether - given by `funnelareacolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendpiecolors - If `true`, the pie slice colors (whether given - by `piecolorway` or inherited from `colorway`) - will be extended to three times its original - length by first repeating every color 20% - lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether - given by `sunburstcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendtreemapcolors - If `true`, the treemap slice colors (whether - given by `treemapcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - font - Sets the global font. Note that fonts used in - traces and other layout components inherit from - the global font. - funnelareacolorway - Sets the default funnelarea slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - funnelmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "group", the bars are plotted next - to one another centered around the shared - location. With "overlay", the bars are plotted - over one another, you might need to an - "opacity" to see multiple bars. - geo - :class:`plotly.graph_objects.layout.Geo` - instance or dict with compatible properties - grid - :class:`plotly.graph_objects.layout.Grid` - instance or dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart - analog of visible:'legendonly' but it can - contain many labels, and can simultaneously - hide slices from several pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on Chart Studio Cloud - for hiddenlabels . - hidesources - Determines whether or not a text link citing - the data source is placed at the bottom-right - cored of the figure. Has only an effect only on - graphs that have been generated via forked - graphs from the Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise). - hoverdistance - Sets the default distance (in pixels) to look - for data to add hover labels (-1 means no - cutoff, 0 means no looking for data). This is - only a real distance for hovering on point-like - objects, like scatter points. For area-like - objects (bars, scatter fills, etc) hovering is - on inside the area and off outside, but these - objects will not supersede hover on point-like - objects in case of conflict. - hoverlabel - :class:`plotly.graph_objects.layout.Hoverlabel` - instance or dict with compatible properties - hovermode - Determines the mode of hover interactions. If - "closest", a single hoverlabel will appear for - the "closest" point within the `hoverdistance`. - If "x" (or "y"), multiple hoverlabels will - appear for multiple points at the "closest" x- - (or y-) coordinate within the `hoverdistance`, - with the caveat that no more than one - hoverlabel will appear per trace. If *x - unified* (or *y unified*), a single hoverlabel - will appear multiple points at the closest x- - (or y-) coordinate within the `hoverdistance` - with the caveat that no more than one - hoverlabel will appear per trace. In this mode, - spikelines are enabled by default perpendicular - to the specified axis. If false, hover - interactions are disabled. If `clickmode` - includes the "select" flag, `hovermode` - defaults to "closest". If `clickmode` lacks the - "select" flag, it defaults to "x" or "y" - (depending on the trace's `orientation` value) - for plots based on cartesian coordinates. For - anything else the default value is "closest". - images - A tuple of - :class:`plotly.graph_objects.layout.Image` - instances or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the - default property values to use for elements of - layout.images - legend - :class:`plotly.graph_objects.layout.Legend` - instance or dict with compatible properties - mapbox - :class:`plotly.graph_objects.layout.Mapbox` - instance or dict with compatible properties - margin - :class:`plotly.graph_objects.layout.Margin` - instance or dict with compatible properties - meta - Assigns extra meta information that can be used - in various `text` attributes. Attributes such - as the graph, axis and colorbar `title.text`, - annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenus` and `sliders` - `label` text all support `meta`. One can access - `meta` fields using template strings: - `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an - object for example `{key: value}` which can be - accessed %{meta[key]}. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - modebar - :class:`plotly.graph_objects.layout.Modebar` - instance or dict with compatible properties - orientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Rotates the entire - polar by the given angle in legacy polar - charts. - paper_bgcolor - Sets the background color of the paper where - the graph is drawn. - piecolorway - Sets the default pie slice colors. Defaults to - the main `colorway` used for trace colors. If - you specify a new list here it can still be - extended with lighter and darker colors, see - `extendpiecolors`. - plot_bgcolor - Sets the background color of the plotting area - in-between x and y axes. - polar - :class:`plotly.graph_objects.layout.Polar` - instance or dict with compatible properties - radialaxis - :class:`plotly.graph_objects.layout.RadialAxis` - instance or dict with compatible properties - scene - :class:`plotly.graph_objects.layout.Scene` - instance or dict with compatible properties - selectdirection - When "dragmode" is set to "select", this limits - the selection of the drag to horizontal, - vertical or diagonal. "h" only allows - horizontal selection, "v" only vertical, "d" - only diagonal and "any" sets no limit. - selectionrevision - Controls persistence of user-driven changes in - selected points from all traces. - separators - Sets the decimal and thousand separators. For - example, *. * puts a '.' before decimals and a - space between thousands. In English locales, - dflt is ".," but other locales may alter this - default. - shapes - A tuple of - :class:`plotly.graph_objects.layout.Shape` - instances or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the - default property values to use for elements of - layout.shapes - showlegend - Determines whether or not a legend is drawn. - Default is `true` if there is a trace to show - and any of these: a) Two or more traces would - by default be shown in the legend. b) One pie - trace is shown in the legend. c) One trace is - explicitly given with `showlegend: true`. - sliders - A tuple of - :class:`plotly.graph_objects.layout.Slider` - instances or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets - the default property values to use for elements - of layout.sliders - spikedistance - Sets the default distance (in pixels) to look - for data to draw spikelines to (-1 means no - cutoff, 0 means no looking for data). As with - hoverdistance, distance does not apply to area- - like objects. In addition, some objects can be - hovered on but will not generate spikelines, - such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. - This should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: - [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the - structure of `figure.layout` and - `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` - (e.g. 'scatter'). Alternatively, this may be - specified as an instance of - plotly.graph_objs.layout.Template. 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 this can be used to add 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`. - ternary - :class:`plotly.graph_objects.layout.Ternary` - instance or dict with compatible properties - title - :class:`plotly.graph_objects.layout.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.title.font - instead. Sets the title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - transition - Sets transition options used during - Plotly.react updates. - treemapcolorway - Sets the default treemap slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendtreemapcolors`. - uirevision - Used to allow user interactions with the plot - to persist after `Plotly.react` calls that are - unaware of these interactions. If `uirevision` - is omitted, or if it is given and it changed - from the previous `Plotly.react` call, the - exact new figure is used. If `uirevision` is - truthy and did NOT change, any attribute that - has been affected by user interactions and did - not receive a different value in the new figure - will keep the interaction value. - `layout.uirevision` attribute serves as the - default for `uirevision` attributes in various - sub-containers. For finer control you can set - these sub-attributes directly. For example, if - your app separately controls the data on the x - and y axes you might set - `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y - data is changed, you can update - `yaxis.uirevision=*quantity*` and the y axis - range will reset but the x axis range will - retain any user-driven zoom. - uniformtext - :class:`plotly.graph_objects.layout.Uniformtext - ` instance or dict with compatible properties - updatemenus - A tuple of - :class:`plotly.graph_objects.layout.Updatemenu` - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), - sets the default property values to use for - elements of layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins - of adjacent location coordinates. Has no effect - on traces that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins - of the same location coordinate. Has no effect - on traces that have "width" set. - violinmode - Determines how violins at the same location - coordinate are displayed on the graph. If - "group", the violins are plotted next to one - another centered around the shared location. If - "overlay", the violins are plotted over one - another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces - that have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - waterfallmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to an "opacity" to see - multiple bars. - width - Sets the plot's width (in px). - xaxis - :class:`plotly.graph_objects.layout.XAxis` - instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.YAxis` - instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WaterfallValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="waterfall", parent_name="", **kwargs): - super(WaterfallValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Waterfall"), - data_docs=kwargs.pop( - "data_docs", - """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - base - Sets where the bar base is drawn (in position - axis units). - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connector - :class:`plotly.graph_objects.waterfall.Connecto - r` instance or dict with compatible properties - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - decreasing - :class:`plotly.graph_objects.waterfall.Decreasi - ng` instance or dict with compatible properties - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.waterfall.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `initial`, `delta` and `final`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - increasing - :class:`plotly.graph_objects.waterfall.Increasi - ng` instance or dict with compatible properties - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - measure - An array containing types of values. By default - the values are considered as 'relative'. - However; it is possible to use 'total' to - compute the sums. Also 'absolute' could be - applied to reset the computed total or to - declare an initial value where needed. - measuresrc - Sets the source reference on Chart Studio Cloud - for measure . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - offset - Shifts the position where the bar is drawn (in - position axis units). In "group" barmode, - traces that set "offset" will be excluded and - drawn in "overlay" mode instead. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - offsetsrc - Sets the source reference on Chart Studio Cloud - for offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the - bar. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.waterfall.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on - the graph. In the case of having multiple - waterfalls, totals are computed separately (per - trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `initial`, `delta`, - `final` and `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - totals - :class:`plotly.graph_objects.waterfall.Totals` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VolumeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="volume", parent_name="", **kwargs): - super(VolumeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Volume"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.volume.Caps` - instance or dict with compatible properties - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - `value`) or the bounds set in `cmin` and `cmax` - Defaults to `false` when `cmin` and `cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as `value` and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as `value`. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as `value` and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.volume.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.volume.Contour` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - flatshading - Determines whether or not normal smoothing is - applied to the meshes, creating meshes with an - angular, low-poly look via flat reflections. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.volume.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lighting - :class:`plotly.graph_objects.volume.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.volume.Lightpositi - on` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be - an array containing arrays mapping a normalized - value to an opacity value. At minimum, a - mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], - [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and - those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette - name string of the following list: 'min', - 'max', 'extremes' and 'uniform'. The default is - 'uniform'. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - slices - :class:`plotly.graph_objects.volume.Slices` - instance or dict with compatible properties - spaceframe - :class:`plotly.graph_objects.volume.Spaceframe` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.volume.Stream` - instance or dict with compatible properties - surface - :class:`plotly.graph_objects.volume.Surface` - instance or dict with compatible properties - text - Sets the text elements associated with the - vertices. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on Chart Studio Cloud - for value . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the X coordinates of the vertices on X - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the Y coordinates of the vertices on Y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the Z coordinates of the vertices on Z - axis. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ViolinValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="violin", parent_name="", **kwargs): - super(ViolinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Violin"), - data_docs=kwargs.pop( - "data_docs", - """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - bandwidth - Sets the bandwidth used to compute the kernel - density estimate. By default, the bandwidth is - determined by Silverman's rule of thumb. - box - :class:`plotly.graph_objects.violin.Box` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.violin.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual - violins or sample points or the kernel density - estimate or any combination of them? - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - jitter - Sets the amount of jitter in the sample points - drawn. If 0, the sample points align along the - distribution axis. If 1, the sample points are - drawn in a random jitter of width equal to the - width of the violins. - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.violin.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.violin.Marker` - instance or dict with compatible properties - meanline - :class:`plotly.graph_objects.violin.Meanline` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. For violin - traces, the name will also be used for the - position coordinate, if `x` and `x0` (`y` and - `y0` if horizontal) are missing and the - position axis is categorical. Note that the - trace name is also used as a default value for - attribute `scalegroup` (please see its - description for details). - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" - ("h"), the distribution is visualized along the - vertical (horizontal). - pointpos - Sets the position of the sample points in - relation to the violins. If 0, the sample - points are places over the center of the - violins. Positive (negative) values correspond - to positions to the right (left) for vertical - violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying - outside the whiskers are shown If - "suspectedoutliers", the outlier points are - shown and points either less than 4*Q1-3*Q3 or - greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are - shown If False, only the violins are shown with - no sample points. Defaults to - "suspectedoutliers" when `marker.outliercolor` - or `marker.line.outliercolor` is set, otherwise - defaults to "outliers". - scalegroup - If there are multiple violins that should be - sized according to to some metric (see - `scalemode`), link them by providing a non- - empty group id here shared by every trace in - the same group. If a violin's `width` is - undefined, `scalegroup` will default to the - trace's name. In this case, violins with the - same names will be linked together - scalemode - Sets the metric by which the width of each - violin is determined."width" means each violin - has the same (max) width*count* means the - violins are scaled by the number of sample - points makingup each violin. - selected - :class:`plotly.graph_objects.violin.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - side - Determines on which side of the position value - the density function making up one half of a - violin is plotted. Useful when comparing two - violin traces under "overlay" mode, where one - trace has `side` set to "positive" and the - other to "negative". - span - Sets the span in data space for which the - density function will be computed. Has an - effect only when `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space - where the density function will be computed. - "soft" means the span goes from the sample's - minimum value minus two bandwidths to the - sample's maximum value plus two bandwidths. - "hard" means the span goes from the sample's - minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the - `span` attribute. - stream - :class:`plotly.graph_objects.violin.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each - sample value. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (x,y) coordinates. To be - seen, trace `hoverinfo` must contain a "text" - flag. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.violin.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the width of the violin in data - coordinates. If 0 (default value) the width is - automatically selected based on the positions - of other violin traces in the same subplot. - x - Sets the x sample data or coordinates. See - overview for more info. - x0 - Sets the x coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y sample data or coordinates. See - overview for more info. - y0 - Sets the y coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TreemapValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="treemap", parent_name="", **kwargs): - super(TreemapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Treemap"), - data_docs=kwargs.pop( - "data_docs", - """ - branchvalues - Determines how the items in `values` are - summed. When set to "total", items in `values` - are taken to be value of all its descendants. - When set to "remainder", items in `values` - corresponding to the root and the branches - sectors are taken to be the extra part not part - of the sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the - "leaves" and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - domain - :class:`plotly.graph_objects.treemap.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.treemap.Hoverlabel - ` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud - for labels . - level - Sets the level from which this trace hierarchy - is rendered. Set `level` to `''` to start from - the root node in the hierarchy. Must be an "id" - if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - marker - :class:`plotly.graph_objects.treemap.Marker` - instance or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any - given `level`. Set `maxdepth` to "-1" to render - all the levels in the hierarchy. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. This option refers to the root of - the hierarchy presented on top left corner of a - treemap graph. Please note that if a hierarchy - has multiple root nodes, this option won't have - any effect and `insidetextfont` would be used. - parents - Sets the parent sectors for each of the - sectors. Empty string items '' are understood - to reference the root node in the hierarchy. If - `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, - plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud - for parents . - pathbar - :class:`plotly.graph_objects.treemap.Pathbar` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.treemap.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Sets the positions of the `text` elements. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `currentPath`, `root`, - `entry`, `percentRoot`, `percentEntry`, - `percentParent`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - tiling - :class:`plotly.graph_objects.treemap.Tiling` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values associated with each of the - sectors. Use with `branchvalues` to determine - how the values are summed. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TableValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="table", parent_name="", **kwargs): - super(TableValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Table"), - data_docs=kwargs.pop( - "data_docs", - """ - cells - :class:`plotly.graph_objects.table.Cells` - instance or dict with compatible properties - columnorder - Specifies the rendered order of the data - columns; for example, a value `2` at position - `0` means that column index `0` in the data - will be rendered as the third column, as - columns have an index base of zero. - columnordersrc - Sets the source reference on Chart Studio Cloud - for columnorder . - columnwidth - The width of columns expressed as a ratio. - Columns fill the available width in proportion - of their specified column widths. - columnwidthsrc - Sets the source reference on Chart Studio Cloud - for columnwidth . - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - domain - :class:`plotly.graph_objects.table.Domain` - instance or dict with compatible properties - header - :class:`plotly.graph_objects.table.Header` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.table.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - stream - :class:`plotly.graph_objects.table.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="surface", parent_name="", **kwargs): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Surface"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here z - or surfacecolor) or the bounds set in `cmin` - and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as z or surfacecolor - and if set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as z or surfacecolor. Has no effect when - `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as z or surfacecolor - and if set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.surface.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data are filled in. - contours - :class:`plotly.graph_objects.surface.Contours` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hidesurface - Determines whether or not a surface is drawn. - For example, set `hidesurface` to False - `contours.x.show` to True and `contours.y.show` - to True to draw a wire frame plot. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.surface.Hoverlabel - ` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lighting - :class:`plotly.graph_objects.surface.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.surface.Lightposit - ion` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be - an array containing arrays mapping a normalized - value to an opacity value. At minimum, a - mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], - [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and - those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette - name string of the following list: 'min', - 'max', 'extremes' and 'uniform'. The default is - 'uniform'. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.surface.Stream` - instance or dict with compatible properties - surfacecolor - Sets the surface color values, used for setting - a color scale independent of `z`. - surfacecolorsrc - Sets the source reference on Chart Studio Cloud - for surfacecolor . - text - Sets the text elements associated with each z - value. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements - will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date - data. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SunburstValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): - super(SunburstValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Sunburst"), - data_docs=kwargs.pop( - "data_docs", - """ - branchvalues - Determines how the items in `values` are - summed. When set to "total", items in `values` - are taken to be value of all its descendants. - When set to "remainder", items in `values` - corresponding to the root and the branches - sectors are taken to be the extra part not part - of the sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the - "leaves" and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - domain - :class:`plotly.graph_objects.sunburst.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.sunburst.Hoverlabe - l` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - insidetextorientation - Controls the orientation of the text inside - chart sectors. When set to "auto", text may be - oriented in any direction in order to be as big - as possible in the middle of a sector. The - "horizontal" option orients text to be parallel - with the bottom of the chart, and may make text - smaller in order to achieve that goal. The - "radial" option orients text along the radius - of the sector. The "tangential" option orients - text perpendicular to the radius of the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud - for labels . - leaf - :class:`plotly.graph_objects.sunburst.Leaf` - instance or dict with compatible properties - level - Sets the level from which this trace hierarchy - is rendered. Set `level` to `''` to start from - the root node in the hierarchy. Must be an "id" - if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - marker - :class:`plotly.graph_objects.sunburst.Marker` - instance or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any - given `level`. Set `maxdepth` to "-1" to render - all the levels in the hierarchy. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. This option refers to the root of - the hierarchy presented at the center of a - sunburst graph. Please note that if a hierarchy - has multiple root nodes, this option won't have - any effect and `insidetextfont` would be used. - parents - Sets the parent sectors for each of the - sectors. Empty string items '' are understood - to reference the root node in the hierarchy. If - `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, - plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud - for parents . - stream - :class:`plotly.graph_objects.sunburst.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `currentPath`, `root`, - `entry`, `percentRoot`, `percentEntry`, - `percentParent`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values associated with each of the - sectors. Use with `branchvalues` to determine - how the values are summed. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamtubeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="streamtube", parent_name="", **kwargs): - super(StreamtubeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Streamtube"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - u/v/w norm) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as u/v/w norm. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.streamtube.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.streamtube.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `tubex`, `tubey`, `tubez`, `tubeu`, - `tubev`, `tubew`, `norm` and `divergence`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lighting - :class:`plotly.graph_objects.streamtube.Lightin - g` instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.streamtube.Lightpo - sition` instance or dict with compatible - properties - maxdisplayed - The maximum number of displayed segments in a - streamtube. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - sizeref - The scaling factor for the streamtubes. The - default is 1, which avoids two max divergence - tubes from touching at adjacent starting - positions. - starts - :class:`plotly.graph_objects.streamtube.Starts` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.streamtube.Stream` - instance or dict with compatible properties - text - Sets a text element associated with this trace. - If trace `hoverinfo` contains a "text" flag, - this text element will be seen in all hover - labels. Note that streamtube traces do not - support array `text` values. - u - Sets the x components of the vector field. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud - for u . - v - Sets the y components of the vector field. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - vsrc - Sets the source reference on Chart Studio Cloud - for v . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on Chart Studio Cloud - for w . - x - Sets the x coordinates of the vector field. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates of the vector field. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the z coordinates of the vector field. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SplomValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="splom", parent_name="", **kwargs): - super(SplomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Splom"), - data_docs=kwargs.pop( - "data_docs", - """ - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - diagonal - :class:`plotly.graph_objects.splom.Diagonal` - instance or dict with compatible properties - dimensions - A tuple of - :class:`plotly.graph_objects.splom.Dimension` - instances or dicts with compatible properties - dimensiondefaults - When used in a template (as - layout.template.data.splom.dimensiondefaults), - sets the default property values to use for - elements of splom.dimensions - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.splom.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.splom.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.splom.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showlowerhalf - Determines whether or not subplots on the lower - half from the diagonal are displayed. - showupperhalf - Determines whether or not subplots on the upper - half from the diagonal are displayed. - stream - :class:`plotly.graph_objects.splom.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair to appear on hover. If a single string, - the same string appears over all the data - points. If an array of string, the items are - mapped in order to the this trace's (x,y) - coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.splom.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - xaxes - Sets the list of x axes corresponding to - dimensions of this splom trace. By default, a - splom will match the first N xaxes where N is - the number of input dimensions. Note that, in - case where `diagonal.visible` is false and - `showupperhalf` or `showlowerhalf` is false, - this splom trace will generate one less x-axis - and one less y-axis. - yaxes - Sets the list of y axes corresponding to - dimensions of this splom trace. By default, a - splom will match the first N yaxes where N is - the number of input dimensions. Note that, in - case where `diagonal.visible` is false and - `showupperhalf` or `showlowerhalf` is false, - this splom trace will generate one less x-axis - and one less y-axis. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterternaryValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scatterternary", parent_name="", **kwargs): - super(ScatterternaryValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatterternary"), - data_docs=kwargs.pop( - "data_docs", - """ - a - Sets the quantity of component `a` in each data - point. If `a`, `b`, and `c` are all provided, - they need not be normalized, only the relative - values matter. If only two arrays are provided - they must be normalized to match - `ternary.sum`. - asrc - Sets the source reference on Chart Studio Cloud - for a . - b - Sets the quantity of component `a` in each data - point. If `a`, `b`, and `c` are all provided, - they need not be normalized, only the relative - values matter. If only two arrays are provided - they must be normalized to match - `ternary.sum`. - bsrc - Sets the source reference on Chart Studio Cloud - for b . - c - Sets the quantity of component `a` in each data - point. If `a`, `b`, and `c` are all provided, - they need not be normalized, only the relative - values matter. If only two arrays are provided - they must be normalized to match - `ternary.sum`. - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - csrc - Sets the source reference on Chart Studio Cloud - for c . - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scatterternary - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterternary.Hov - erlabel` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (a,b,c) point. If a single string, the same - string appears over all the data points. If an - array of strings, the items are mapped in order - to the the data points in (a,b,c). To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scatterternary.Lin - e` instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterternary.Mar - ker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scatterternary.Sel - ected` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterternary.Str - eam` instance or dict with compatible - properties - subplot - Sets a reference between this trace's data - coordinates and a ternary subplot. If "ternary" - (the default value), the data refer to - `layout.ternary`. If "ternary2", the data refer - to `layout.ternary2`, and so on. - sum - The number each triplet should sum to, if only - two of `a`, `b`, and `c` are provided. This - overrides `ternary.sum` to normalize this - specific trace, but does not affect the values - displayed on the axes. 0 (or missing) means to - use ternary.sum - text - Sets text elements associated with each (a,b,c) - point. If a single string, the same string - appears over all the data points. If an array - of strings, the items are mapped in order to - the the data points in (a,b,c). If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `a`, `b`, `c` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterternary.Uns - elected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterpolarglValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scatterpolargl", parent_name="", **kwargs): - super(ScatterpolarglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatterpolargl"), - data_docs=kwargs.pop( - "data_docs", - """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period - divided by the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. - Defaults to "none" unless this trace is - stacked, then it gets "tonexty" ("tonextx") if - `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to - x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this - trace and the endpoints of the trace before it, - connecting those endpoints with straight lines - (to make a stacked area graph); if there is no - trace before it, they behave like "tozerox" and - "tozeroy". "toself" connects the endpoints of - the trace (or each segment of the trace if it - has gaps) into a closed shape. "tonext" fills - the space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. Traces - in a `stackgroup` will only fill to (or be - filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked - and some not, if fill-linked traces are not - already consecutive, the later ones will be - pushed down in the drawing order. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterpolargl.Hov - erlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scatterpolargl.Lin - e` instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolargl.Mar - ker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the - starting coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud - for r . - selected - :class:`plotly.graph_objects.scatterpolargl.Sel - ected` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolargl.Str - eam` instance or dict with compatible - properties - subplot - Sets a reference between this trace's data - coordinates and a polar subplot. If "polar" - (the default value), the data refer to - `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `r`, `theta` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of - theta coordinates. Use with `dtheta` where - `theta0` is the starting coordinate and - `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud - for theta . - thetaunit - Sets the unit of input "theta" values. Has an - effect only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolargl.Uns - elected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterpolarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scatterpolar", parent_name="", **kwargs): - super(ScatterpolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatterpolar"), - data_docs=kwargs.pop( - "data_docs", - """ - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period - divided by the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scatterpolar - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatterpolar.Hover - label` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scatterpolar.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolar.Marke - r` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the - starting coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud - for r . - selected - :class:`plotly.graph_objects.scatterpolar.Selec - ted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolar.Strea - m` instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a polar subplot. If "polar" - (the default value), the data refer to - `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `r`, `theta` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of - theta coordinates. Use with `dtheta` where - `theta0` is the starting coordinate and - `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud - for theta . - thetaunit - Sets the unit of input "theta" values. Has an - effect only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolar.Unsel - ected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs): - super(ScattermapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattermapbox"), - data_docs=kwargs.pop( - "data_docs", - """ - below - Determines if this scattermapbox trace's layers - are to be inserted before the layer with the - specified ID. By default, scattermapbox layers - are inserted above all the base layers. To - place the scattermapbox layers above every - other layer, set `below` to "''". - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". "toself" - connects the endpoints of the trace (or each - segment of the trace if it has gaps) into a - closed shape. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattermapbox.Hove - rlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. To - be seen, trace `hoverinfo` must contain a - "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for lat . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scattermapbox.Line - ` instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for lon . - marker - :class:`plotly.graph_objects.scattermapbox.Mark - er` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattermapbox.Sele - cted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattermapbox.Stre - am` instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a mapbox subplot. If "mapbox" - (the default value), the data refer to - `layout.mapbox`. If "mapbox2", the data refer - to `layout.mapbox2`, and so on. - text - Sets text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - 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. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `lat`, `lon` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattermapbox.Unse - lected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterglValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scattergl", parent_name="", **kwargs): - super(ScatterglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattergl"), - data_docs=kwargs.pop( - "data_docs", - """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - error_x - :class:`plotly.graph_objects.scattergl.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.scattergl.ErrorY` - instance or dict with compatible properties - fill - Sets the area to fill with a solid color. - Defaults to "none" unless this trace is - stacked, then it gets "tonexty" ("tonextx") if - `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to - x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this - trace and the endpoints of the trace before it, - connecting those endpoints with straight lines - (to make a stacked area graph); if there is no - trace before it, they behave like "tozerox" and - "tozeroy". "toself" connects the endpoints of - the trace (or each segment of the trace if it - has gaps) into a closed shape. "tonext" fills - the space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. Traces - in a `stackgroup` will only fill to (or be - filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked - and some not, if fill-linked traces are not - already consecutive, the later ones will be - pushed down in the drawing order. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattergl.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scattergl.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattergl.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergl.Selected - ` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergl.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergl.Unselect - ed` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattergeoValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scattergeo", parent_name="", **kwargs): - super(ScattergeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattergeo"), - data_docs=kwargs.pop( - "data_docs", - """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Only has an effect when - `geojson` is set. Support nested property, for - example "properties.name". - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". "toself" - connects the endpoints of the trace (or each - segment of the trace if it has gaps) into a - closed shape. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - geo - Sets a reference between this trace's - geospatial coordinates and a geographic map. If - "geo" (the default value), the geospatial - coordinates refer to `layout.geo`. If "geo2", - the geospatial coordinates refer to - `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this - trace. If not given, the features on the base - map are used when `locations` is set. It can be - set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of - type "FeatureCollection" or "Feature" with - geometries of type "Polygon" or "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattergeo.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (lon,lat) pair or item in `locations`. If a - single string, the same string appears over all - the data points. If an array of string, the - items are mapped in order to the this trace's - (lon,lat) or `locations` coordinates. To be - seen, trace `hoverinfo` must contain a "text" - flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for lat . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scattergeo.Line` - instance or dict with compatible properties - locationmode - Determines the set of locations used to match - entries in `locations` to regions on the map. - Values "ISO-3", "USA-states", *country names* - correspond to features on the base map and - value "geojson-id" corresponds to features from - a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. - Coordinates correspond to the centroid of each - location given. See `locationmode` for more - info. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for lon . - marker - :class:`plotly.graph_objects.scattergeo.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergeo.Selecte - d` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergeo.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each - (lon,lat) pair or item in `locations`. If a - single string, the same string appears over all - the data points. If an array of string, the - items are mapped in order to the this trace's - (lon,lat) or `locations` coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `lat`, `lon`, `location` - and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergeo.Unselec - ted` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattercarpetValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scattercarpet", parent_name="", **kwargs): - super(ScattercarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattercarpet"), - data_docs=kwargs.pop( - "data_docs", - """ - a - Sets the a-axis coordinates. - asrc - Sets the source reference on Chart Studio Cloud - for a . - b - Sets the b-axis coordinates. - bsrc - Sets the source reference on Chart Studio Cloud - for b . - carpet - An identifier for this carpet, so that - `scattercarpet` and `contourcarpet` traces can - specify a carpet plot on which they lie - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scatterternary - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scattercarpet.Hove - rlabel` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (a,b) point. If a single string, the same - string appears over all the data points. If an - array of strings, the items are mapped in order - to the the data points in (a,b). To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scattercarpet.Line - ` instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattercarpet.Mark - er` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattercarpet.Sele - cted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattercarpet.Stre - am` instance or dict with compatible properties - text - Sets text elements associated with each (a,b) - point. If a single string, the same string - appears over all the data points. If an array - of strings, the items are mapped in order to - the the data points in (a,b). If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `a`, `b` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattercarpet.Unse - lected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Scatter3dValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scatter3d", parent_name="", **kwargs): - super(Scatter3dValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatter3d"), - data_docs=kwargs.pop( - "data_docs", - """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - error_x - :class:`plotly.graph_objects.scatter3d.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter3d.ErrorY` - instance or dict with compatible properties - error_z - :class:`plotly.graph_objects.scatter3d.ErrorZ` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatter3d.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y,z) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scatter3d.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatter3d.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - projection - :class:`plotly.graph_objects.scatter3d.Projecti - on` instance or dict with compatible properties - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatter3d.Stream` - instance or dict with compatible properties - surfaceaxis - If "-1", the scatter points are not fill with a - surface If 0, 1, 2, the scatter points are - filled with a Delaunay surface about the x, y, - z respectively. - surfacecolor - Sets the surface fill color. - text - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y,z) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - :class:`plotly.graph_objects.scatter3d.Textfont - ` instance or dict with compatible properties - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date - data. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scatter", parent_name="", **kwargs): - super(ScatterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatter"), - data_docs=kwargs.pop( - "data_docs", - """ - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - error_x - :class:`plotly.graph_objects.scatter.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter.ErrorY` - instance or dict with compatible properties - fill - Sets the area to fill with a solid color. - Defaults to "none" unless this trace is - stacked, then it gets "tonexty" ("tonextx") if - `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to - x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this - trace and the endpoints of the trace before it, - connecting those endpoints with straight lines - (to make a stacked area graph); if there is no - trace before it, they behave like "tozerox" and - "tozeroy". "toself" connects the endpoints of - the trace (or each segment of the trace if it - has gaps) into a closed shape. "tonext" fills - the space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. Traces - in a `stackgroup` will only fill to (or be - filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked - and some not, if fill-linked traces are not - already consecutive, the later ones will be - pushed down in the drawing order. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - groupnorm - Only relevant when `stackgroup` is used, and - only the first `groupnorm` found in the - `stackgroup` will be used - including if - `visible` is "legendonly" but not if it is - `false`. Sets the normalization for the sum of - this `stackgroup`. With "fraction", the value - of each trace at each location is divided by - the sum of all trace values at that location. - "percent" is the same but multiplied by 100 to - show percentages. If there are multiple - subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own - set. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.scatter.Hoverlabel - ` instance or dict with compatible properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.scatter.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatter.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - orientation - Only relevant when `stackgroup` is used, and - only the first `orientation` found in the - `stackgroup` will be used - including if - `visible` is "legendonly" but not if it is - `false`. Sets the stacking direction. With "v" - ("h"), the y (x) values of subsequent traces - are added. Also affects the default value of - `fill`. - r - r coordinates in scatter traces are - deprecated!Please switch to the "scatterpolar" - trace type.Sets the radial coordinatesfor - legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud - for r . - selected - :class:`plotly.graph_objects.scatter.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stackgaps - Only relevant when `stackgroup` is used, and - only the first `stackgaps` found in the - `stackgroup` will be used - including if - `visible` is "legendonly" but not if it is - `false`. Determines how we handle locations at - which other traces in this group have data but - this one does not. With *infer zero* we insert - a zero at these locations. With "interpolate" - we linearly interpolate between existing - values, and extrapolate a constant beyond the - existing values. - stackgroup - Set several scatter traces (on the same - subplot) to the same stackgroup in order to add - their y values (or their x values if - `orientation` is "h"). If blank or omitted this - trace will not be stacked. Stacking also turns - `fill` on by default, using "tonexty" - ("tonextx") if `orientation` is "h" ("v") and - sets the default `mode` to "lines" irrespective - of point count. You can only stack on a numeric - (linear or log) axis. Traces in a `stackgroup` - will only fill to (or be filled to) other - traces in the same group. With multiple - `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already - consecutive, the later ones will be pushed down - in the drawing order. - stream - :class:`plotly.graph_objects.scatter.Stream` - instance or dict with compatible properties - t - t coordinates in scatter traces are - deprecated!Please switch to the "scatterpolar" - trace type.Sets the angular coordinatesfor - legacy polar chart only. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - tsrc - Sets the source reference on Chart Studio Cloud - for t . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatter.Unselected - ` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SankeyValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="sankey", parent_name="", **kwargs): - super(SankeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Sankey"), - data_docs=kwargs.pop( - "data_docs", - """ - arrangement - If value is `snap` (the default), the node - arrangement is assisted by automatic snapping - of elements to preserve space between nodes - specified via `nodepad`. If value is - `perpendicular`, the nodes can only move along - a line perpendicular to the flow. If value is - `freeform`, the nodes can freely move on the - plane. If value is `fixed`, the nodes are - stationary. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - domain - :class:`plotly.graph_objects.sankey.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. Note that this attribute is superseded - by `node.hoverinfo` and `node.hoverinfo` for - nodes and links respectively. - hoverlabel - :class:`plotly.graph_objects.sankey.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - link - The links of the Sankey plot. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - node - The nodes of the Sankey plot. - orientation - Sets the orientation of the Sankey diagram. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - stream - :class:`plotly.graph_objects.sankey.Stream` - instance or dict with compatible properties - textfont - Sets the font for node labels - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - valuesuffix - Adds a unit to follow the value in the hover - tooltip. Add a space if a separation is - necessary from the value. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PointcloudValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pointcloud", parent_name="", **kwargs): - super(PointcloudValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pointcloud"), - data_docs=kwargs.pop( - "data_docs", - """ - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.pointcloud.Hoverla - bel` instance or dict with compatible - properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - indices - A sequential value, 0..n, supply it to avoid - creating this array inside plotting. If - specified, it must be a typed `Int32Array` - array. Its length must be equal to or greater - than the number of points. For the best - performance and memory use, create one large - `indices` typed array that is guaranteed to be - at least as long as the largest number of - points during use, and reuse it on each - `Plotly.restyle()` call. - indicessrc - Sets the source reference on Chart Studio Cloud - for indices . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.pointcloud.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.pointcloud.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbounds - Specify `xbounds` in the shape of `[xMin, xMax] - to avoid looping through the `xy` typed array. - Use it in conjunction with `xy` and `ybounds` - for the performance benefits. - xboundssrc - Sets the source reference on Chart Studio Cloud - for xbounds . - xsrc - Sets the source reference on Chart Studio Cloud - for x . - xy - Faster alternative to specifying `x` and `y` - separately. If supplied, it must be a typed - `Float32Array` array that represents points - such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] - = y[i]` - xysrc - Sets the source reference on Chart Studio Cloud - for xy . - y - Sets the y coordinates. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybounds - Specify `ybounds` in the shape of `[yMin, yMax] - to avoid looping through the `xy` typed array. - Use it in conjunction with `xy` and `xbounds` - for the performance benefits. - yboundssrc - Sets the source reference on Chart Studio Cloud - for ybounds . - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PieValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pie", parent_name="", **kwargs): - super(PieValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pie"), - data_docs=kwargs.pop( - "data_docs", - """ - automargin - Determines whether outside text labels can push - the margins. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - direction - Specifies the direction at which succeeding - sectors follow one another. - dlabel - Sets the label step. See `label0` for more - info. - domain - :class:`plotly.graph_objects.pie.Domain` - instance or dict with compatible properties - hole - Sets the fraction of the radius to cut out of - the pie. Use this to make a donut chart. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.pie.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `percent` - and `text`. Anything contained in tag `` - is displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - insidetextorientation - Controls the orientation of the text inside - chart sectors. When set to "auto", text may be - oriented in any direction in order to be as big - as possible in the middle of a sector. The - "horizontal" option orients text to be parallel - with the bottom of the chart, and may make text - smaller in order to achieve that goal. The - "radial" option orients text along the radius - of the sector. The "tangential" option orients - text perpendicular to the radius of the sector. - label0 - Alternate to `labels`. Builds a numeric set of - labels. Use with `dlabel` where `label0` is the - starting label and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or - simply count occurrences if `values` is not - provided. For other array attributes (including - color) we use the first non-empty entry among - all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud - for labels . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.pie.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. - pull - Sets the fraction of larger radius to pull the - sectors out from the center. This can be a - constant to pull all slices apart from each - other equally or an array to highlight one or - more slices. - pullsrc - Sets the source reference on Chart Studio Cloud - for pull . - rotation - Instead of the first slice starting at 12 - o'clock, rotate to some other angle. - scalegroup - If there are multiple pie charts that should be - sized according to their totals, link them by - providing a non-empty group id here shared by - every trace in the same group. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - sort - Determines whether or not the sectors are - reordered from largest to smallest. - stream - :class:`plotly.graph_objects.pie.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - title - :class:`plotly.graph_objects.pie.Title` - instance or dict with compatible properties - titlefont - Deprecated: Please use pie.title.font instead. - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleposition - Deprecated: Please use pie.title.position - instead. Specifies the location of the `title`. - Note that the title's position used to be set - by the now deprecated `titleposition` - attribute. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we - count occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParcoordsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="parcoords", parent_name="", **kwargs): - super(ParcoordsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Parcoords"), - data_docs=kwargs.pop( - "data_docs", - """ - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dimensions - The dimensions (variables) of the parallel - coordinates chart. 2..60 dimensions are - supported. - dimensiondefaults - When used in a template (as layout.template.dat - a.parcoords.dimensiondefaults), sets the - default property values to use for elements of - parcoords.dimensions - domain - :class:`plotly.graph_objects.parcoords.Domain` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - labelangle - Sets the angle of the labels with respect to - the horizontal. For example, a `tickangle` of - -90 draws the labels vertically. Tilted labels - with "labelangle" may be positioned better - inside margins when `labelposition` is set to - "bottom". - labelfont - Sets the font for the `dimension` labels. - labelside - Specifies the location of the `label`. "top" - positions labels above, next to the title - "bottom" positions labels below the graph - Tilted labels with "labelangle" may be - positioned better inside margins when - `labelposition` is set to "bottom". - line - :class:`plotly.graph_objects.parcoords.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - rangefont - Sets the font for the `dimension` range values. - stream - :class:`plotly.graph_objects.parcoords.Stream` - instance or dict with compatible properties - tickfont - Sets the font for the `dimension` tick values. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParcatsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="parcats", parent_name="", **kwargs): - super(ParcatsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Parcats"), - data_docs=kwargs.pop( - "data_docs", - """ - arrangement - Sets the drag interaction mode for categories - and dimensions. If `perpendicular`, the - categories can only move along a line - perpendicular to the paths. If `freeform`, the - categories can freely move on the plane. If - `fixed`, the categories and dimensions are - stationary. - bundlecolors - Sort paths so that like colors are bundled - together within each category. - counts - The number of observations represented by each - state. Defaults to 1 so that each state - represents one observation - countssrc - Sets the source reference on Chart Studio Cloud - for counts . - dimensions - The dimensions (variables) of the parallel - categories diagram. - dimensiondefaults - When used in a template (as layout.template.dat - a.parcats.dimensiondefaults), sets the default - property values to use for elements of - parcats.dimensions - domain - :class:`plotly.graph_objects.parcats.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoveron - Sets the hover interaction mode for the parcats - diagram. If `category`, hover interaction take - place per category. If `color`, hover - interactions take place per color per category. - If `dimension`, hover interactions take place - across all categories per dimension. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `count`, `probability`, `category`, - `categorycount`, `colorcount` and - `bandcolorcount`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - labelfont - Sets the font for the `dimension` labels. - line - :class:`plotly.graph_objects.parcats.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - sortpaths - Sets the path sorting algorithm. If `forward`, - sort paths based on dimension categories from - left to right. If `backward`, sort paths based - on dimensions categories from right to left. - stream - :class:`plotly.graph_objects.parcats.Stream` - instance or dict with compatible properties - tickfont - Sets the font for the `category` labels. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OhlcValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="ohlc", parent_name="", **kwargs): - super(OhlcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Ohlc"), - data_docs=kwargs.pop( - "data_docs", - """ - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud - for close . - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - decreasing - :class:`plotly.graph_objects.ohlc.Decreasing` - instance or dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud - for high . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.ohlc.Hoverlabel` - instance or dict with compatible properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - increasing - :class:`plotly.graph_objects.ohlc.Increasing` - instance or dict with compatible properties - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.ohlc.Line` - instance or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud - for low . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud - for open . - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.ohlc.Stream` - instance or dict with compatible properties - text - Sets hover text elements associated with each - sample point. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - tickwidth - Sets the width of the open/close tick marks - relative to the "x" minimal interval. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. If absent, linear - coordinate will be generated. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Mesh3dValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="mesh3d", parent_name="", **kwargs): - super(Mesh3dValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Mesh3d"), - data_docs=kwargs.pop( - "data_docs", - """ - alphahull - Determines how the mesh surface triangles are - derived from the set of vertices (points) - represented by the `x`, `y` and `z` arrays, if - the `i`, `j`, `k` arrays are not supplied. For - general use of `mesh3d` it is preferred that - `i`, `j`, `k` are supplied. If "-1", Delaunay - triangulation is used, which is mainly suitable - if the mesh is a single, more or less layer - surface that is perpendicular to - `delaunayaxis`. In case the `delaunayaxis` - intersects the mesh surface at more than one - point it will result triangles that are very - long in the dimension of `delaunayaxis`. If - ">0", the alpha-shape algorithm is used. In - this case, the positive `alphahull` value - signals the use of the alpha-shape algorithm, - _and_ its value acts as the parameter for the - mesh fitting. If 0, the convex-hull algorithm - is used. It is suitable for convex bodies or if - the intention is to enclose the `x`, `y` and - `z` point set into a convex hull. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - `intensity`) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as `intensity` and - if set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as `intensity`. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as `intensity` and - if set, `cmax` must be set as well. - color - Sets the color of the whole mesh - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.mesh3d.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.mesh3d.Contour` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - delaunayaxis - Sets the Delaunay axis, which is the axis that - is perpendicular to the surface of the Delaunay - triangulation. It has an effect if `i`, `j`, - `k` are not provided and `alphahull` is set to - indicate Delaunay triangulation. - facecolor - Sets the color of each face Overrides "color" - and "vertexcolor". - facecolorsrc - Sets the source reference on Chart Studio Cloud - for facecolor . - flatshading - Determines whether or not normal smoothing is - applied to the meshes, creating meshes with an - angular, low-poly look via flat reflections. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.mesh3d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - i - A vector of vertex indices, i.e. integer values - between 0 and the length of the vertex vectors, - representing the "first" vertex of a triangle. - For example, `{i[m], j[m], k[m]}` together - represent face m (triangle m) in the mesh, - where `i[m] = n` points to the triplet `{x[n], - y[n], z[n]}` in the vertex arrays. Therefore, - each element in `i` represents a point in - space, which is the first vertex of a triangle. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - intensity - Sets the intensity values for vertices or cells - as defined by `intensitymode`. It can be used - for plotting fields on meshes. - intensitymode - Determines the source of `intensity` values. - intensitysrc - Sets the source reference on Chart Studio Cloud - for intensity . - isrc - Sets the source reference on Chart Studio Cloud - for i . - j - A vector of vertex indices, i.e. integer values - between 0 and the length of the vertex vectors, - representing the "second" vertex of a triangle. - For example, `{i[m], j[m], k[m]}` together - represent face m (triangle m) in the mesh, - where `j[m] = n` points to the triplet `{x[n], - y[n], z[n]}` in the vertex arrays. Therefore, - each element in `j` represents a point in - space, which is the second vertex of a - triangle. - jsrc - Sets the source reference on Chart Studio Cloud - for j . - k - A vector of vertex indices, i.e. integer values - between 0 and the length of the vertex vectors, - representing the "third" vertex of a triangle. - For example, `{i[m], j[m], k[m]}` together - represent face m (triangle m) in the mesh, - where `k[m] = n` points to the triplet `{x[n], - y[n], z[n]}` in the vertex arrays. Therefore, - each element in `k` represents a point in - space, which is the third vertex of a triangle. - ksrc - Sets the source reference on Chart Studio Cloud - for k . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lighting - :class:`plotly.graph_objects.mesh3d.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.mesh3d.Lightpositi - on` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.mesh3d.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with the - vertices. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - vertexcolor - Sets the color of each vertex Overrides - "color". While Red, green and blue colors are - in the range of 0 and 255; in the case of - having vertex color data in RGBA format, the - alpha color should be normalized to be between - 0 and 1. - vertexcolorsrc - Sets the source reference on Chart Studio Cloud - for vertexcolor . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the X coordinates of the vertices. The nth - element of vectors `x`, `y` and `z` jointly - represent the X, Y and Z coordinates of the nth - vertex. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the Y coordinates of the vertices. The nth - element of vectors `x`, `y` and `z` jointly - represent the X, Y and Z coordinates of the nth - vertex. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the Z coordinates of the vertices. The nth - element of vectors `x`, `y` and `z` jointly - represent the X, Y and Z coordinates of the nth - vertex. - zcalendar - Sets the calendar system to use with `z` date - data. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsosurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="isosurface", parent_name="", **kwargs): - super(IsosurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Isosurface"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.isosurface.Caps` - instance or dict with compatible properties - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - `value`) or the bounds set in `cmin` and `cmax` - Defaults to `false` when `cmin` and `cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as `value` and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as `value`. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as `value` and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.isosurface.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - contour - :class:`plotly.graph_objects.isosurface.Contour - ` instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - flatshading - Determines whether or not normal smoothing is - applied to the meshes, creating meshes with an - angular, low-poly look via flat reflections. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.isosurface.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lighting - :class:`plotly.graph_objects.isosurface.Lightin - g` instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.isosurface.Lightpo - sition` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - slices - :class:`plotly.graph_objects.isosurface.Slices` - instance or dict with compatible properties - spaceframe - :class:`plotly.graph_objects.isosurface.Spacefr - ame` instance or dict with compatible - properties - stream - :class:`plotly.graph_objects.isosurface.Stream` - instance or dict with compatible properties - surface - :class:`plotly.graph_objects.isosurface.Surface - ` instance or dict with compatible properties - text - Sets the text elements associated with the - vertices. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on Chart Studio Cloud - for value . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the X coordinates of the vertices on X - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the Y coordinates of the vertices on Y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the Z coordinates of the vertices on Z - axis. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IndicatorValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="indicator", parent_name="", **kwargs): - super(IndicatorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Indicator"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the `text` - within the box. Note that this attribute has no - effect if an angular gauge is displayed: in - this case, it is always centered - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - delta - :class:`plotly.graph_objects.indicator.Delta` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.indicator.Domain` - instance or dict with compatible properties - gauge - The gauge of the Indicator plot. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - mode - Determines how the value is displayed on the - graph. `number` displays the value numerically - in text. `delta` displays the difference to a - reference value in text. Finally, `gauge` - displays the value graphically on an axis. - name - Sets the trace name. The trace name appear as - the legend item and on hover. - number - :class:`plotly.graph_objects.indicator.Number` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.indicator.Stream` - instance or dict with compatible properties - title - :class:`plotly.graph_objects.indicator.Title` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - value - Sets the number to be displayed. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ImageValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="image", parent_name="", **kwargs): - super(ImageValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Image"), - data_docs=kwargs.pop( - "data_docs", - """ - colormodel - Color model used to map the numerical color - components described in `z` into colors. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Set the pixel's horizontal size. - dy - Set the pixel's vertical size - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.image.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `z`, `color` and `colormodel`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.image.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x0 - Set the image's x position. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - y0 - Set the image's y position. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - z - A 2-dimensional array in which each element is - an array of 3 or 4 numbers representing a - color. - zmax - Array defining the higher bound for each color - component. Note that the default value will - depend on the colormodel. For the `rgb` - colormodel, it is [255, 255, 255]. For the - `rgba` colormodel, it is [255, 255, 255, 1]. - For the `hsl` colormodel, it is [360, 100, - 100]. For the `hsla` colormodel, it is [360, - 100, 100, 1]. - zmin - Array defining the lower bound for each color - component. Note that the default value will - depend on the colormodel. For the `rgb` - colormodel, it is [0, 0, 0]. For the `rgba` - colormodel, it is [0, 0, 0, 0]. For the `hsl` - colormodel, it is [0, 0, 0]. For the `hsla` - colormodel, it is [0, 0, 0, 0]. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Histogram2dContourValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="histogram2dcontour", parent_name="", **kwargs): - super(Histogram2dContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Histogram2dContour"), - data_docs=kwargs.pop( - "data_docs", - """ - autobinx - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobinx` is - not needed. However, we accept `autobinx: true` - or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobiny` is - not needed. However, we accept `autobiny: true` - or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level - attributes are picked by an algorithm. If True, - the number of contour levels can be set in - `ncontours`. If False, set the contour level - attributes in `contours`. - bingroup - Set the `xbingroup` and `ybingroup` default - prefix For example, setting a `bingroup` of 1 - on two histogram2d traces will make them their - x-bins and y-bins match separately. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram2dcontour - .ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - contours - :class:`plotly.graph_objects.histogram2dcontour - .Contours` instance or dict with compatible - properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - histfunc - Specifies the binning function used for this - histogram trace. If "count", the histogram - values are computed by counting the number of - values lying inside each bin. If "sum", "avg", - "min", "max", the histogram values are computed - using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for - this histogram trace. If "", the span of each - bar corresponds to the number of occurrences - (i.e. the number of data points lying inside - the bins). If "percent" / "probability", the - span of each bar corresponds to the percentage - / fraction of occurrences with respect to the - total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", - the span of each bar corresponds to the number - of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin - AREAS equals the total number of sample - points). If *probability density*, the area of - each bar corresponds to the probability that an - event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram2dcontour - .Hoverlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variable `z` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.histogram2dcontour - .Line` instance or dict with compatible - properties - marker - :class:`plotly.graph_objects.histogram2dcontour - .Marker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `ybins.size` is provided. - ncontours - Sets the maximum number of contour levels. The - actual number of contours will be chosen - automatically to be less than or equal to the - value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is - missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.histogram2dcontour - .Stream` instance or dict with compatible - properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the sample data to be binned on the x - axis. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram - `bingroup` - xbins - :class:`plotly.graph_objects.histogram2dcontour - .XBins` instance or dict with compatible - properties - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the sample data to be binned on the y - axis. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram - `bingroup` - ybins - :class:`plotly.graph_objects.histogram2dcontour - .YBins` instance or dict with compatible - properties - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Histogram2dValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="histogram2d", parent_name="", **kwargs): - super(Histogram2dValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Histogram2d"), - data_docs=kwargs.pop( - "data_docs", - """ - autobinx - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobinx` is - not needed. However, we accept `autobinx: true` - or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobiny` is - not needed. However, we accept `autobiny: true` - or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - bingroup - Set the `xbingroup` and `ybingroup` default - prefix For example, setting a `bingroup` of 1 - on two histogram2d traces will make them their - x-bins and y-bins match separately. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram2d.ColorB - ar` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - histfunc - Specifies the binning function used for this - histogram trace. If "count", the histogram - values are computed by counting the number of - values lying inside each bin. If "sum", "avg", - "min", "max", the histogram values are computed - using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for - this histogram trace. If "", the span of each - bar corresponds to the number of occurrences - (i.e. the number of data points lying inside - the bins). If "percent" / "probability", the - span of each bar corresponds to the percentage - / fraction of occurrences with respect to the - total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", - the span of each bar corresponds to the number - of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin - AREAS equals the total number of sample - points). If *probability density*, the area of - each bar corresponds to the probability that an - event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram2d.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variable `z` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.histogram2d.Marker - ` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `ybins.size` is provided. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.histogram2d.Stream - ` instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the sample data to be binned on the x - axis. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram - `bingroup` - xbins - :class:`plotly.graph_objects.histogram2d.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date - data. - xgap - Sets the horizontal gap (in pixels) between - bricks. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the sample data to be binned on the y - axis. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram - `bingroup` - ybins - :class:`plotly.graph_objects.histogram2d.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date - data. - ygap - Sets the vertical gap (in pixels) between - bricks. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` - data. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistogramValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="histogram", parent_name="", **kwargs): - super(HistogramValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Histogram"), - data_docs=kwargs.pop( - "data_docs", - """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - autobinx - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobinx` is - not needed. However, we accept `autobinx: true` - or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobiny` is - not needed. However, we accept `autobiny: true` - or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - bingroup - Set a group of histogram traces which will have - compatible bin settings. Note that traces on - the same subplot and with the same - "orientation" under `barmode` "stack", - "relative" and "group" are forced into the same - bingroup, Using `bingroup`, traces under - `barmode` "overlay" and on different axes (of - the same axis type) can have compatible bin - settings. Note that histogram and histogram2d* - trace can share the same `bingroup` - cumulative - :class:`plotly.graph_objects.histogram.Cumulati - ve` instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - error_x - :class:`plotly.graph_objects.histogram.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.histogram.ErrorY` - instance or dict with compatible properties - histfunc - Specifies the binning function used for this - histogram trace. If "count", the histogram - values are computed by counting the number of - values lying inside each bin. If "sum", "avg", - "min", "max", the histogram values are computed - using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for - this histogram trace. If "", the span of each - bar corresponds to the number of occurrences - (i.e. the number of data points lying inside - the bins). If "percent" / "probability", the - span of each bar corresponds to the percentage - / fraction of occurrences with respect to the - total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", - the span of each bar corresponds to the number - of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin - AREAS equals the total number of sample - points). If *probability density*, the area of - each bar corresponds to the probability that an - event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.histogram.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variable `binNumber` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.histogram.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `ybins.size` is provided. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). - selected - :class:`plotly.graph_objects.histogram.Selected - ` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.histogram.Stream` - instance or dict with compatible properties - text - Sets hover text elements associated with each - bar. If a single string, the same string - appears over all bars. If an array of string, - the items are mapped in order to the this - trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.histogram.Unselect - ed` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the sample data to be binned on the x - axis. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbins - :class:`plotly.graph_objects.histogram.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the sample data to be binned on the y - axis. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybins - :class:`plotly.graph_objects.histogram.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeatmapglValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="heatmapgl", parent_name="", **kwargs): - super(HeatmapglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Heatmapgl"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.heatmapgl.ColorBar - ` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.heatmapgl.Hoverlab - el` instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.heatmapgl.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - xtype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - ytype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeatmapValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="heatmap", parent_name="", **kwargs): - super(HeatmapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Heatmap"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.heatmap.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data are filled in. - It is defaulted to true if `z` is a one - dimensional array and `zsmooth` is not false; - otherwise it is defaulted to false. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.heatmap.Hoverlabel - ` instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data have hover - labels associated with them. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.heatmap.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xgap - Sets the horizontal gap (in pixels) between - bricks. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - xtype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ygap - Sets the vertical gap (in pixels) between - bricks. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - ytype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` - data. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelareaValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="funnelarea", parent_name="", **kwargs): - super(FunnelareaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Funnelarea"), - data_docs=kwargs.pop( - "data_docs", - """ - aspectratio - Sets the ratio between height and width - baseratio - Sets the ratio between bottom length and - maximum top length. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dlabel - Sets the label step. See `label0` for more - info. - domain - :class:`plotly.graph_objects.funnelarea.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.funnelarea.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `text` and - `percent`. Anything contained in tag `` - is displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - label0 - Alternate to `labels`. Builds a numeric set of - labels. Use with `dlabel` where `label0` is the - starting label and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or - simply count occurrences if `values` is not - provided. For other array attributes (including - color) we use the first non-empty entry among - all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud - for labels . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.funnelarea.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - scalegroup - If there are multiple funnelareas that should - be sized according to their totals, link them - by providing a non-empty group id here shared - by every trace in the same group. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnelarea.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `text` and `percent`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - title - :class:`plotly.graph_objects.funnelarea.Title` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we - count occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="funnel", parent_name="", **kwargs): - super(FunnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Funnel"), - data_docs=kwargs.pop( - "data_docs", - """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connector - :class:`plotly.graph_objects.funnel.Connector` - instance or dict with compatible properties - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.funnel.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `percentInitial`, `percentPrevious` - and `percentTotal`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.funnel.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - offset - Shifts the position where the bar is drawn (in - position axis units). In "group" barmode, - traces that set "offset" will be excluded and - drawn in "overlay" mode instead. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the funnels. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). By default funnels - are tend to be oriented horizontally; unless - only "y" array is presented or orientation is - set to "v". Also regarding graphs including - only 'horizontal' funnels, "autorange" on the - "y-axis" are set to "reversed". - outsidetextfont - Sets the font used for `text` lying outside the - bar. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnel.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on - the graph. In the case of having multiple - funnels, percentages & totals are computed - separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `percentInitial`, - `percentPrevious`, `percentTotal`, `label` and - `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DensitymapboxValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="densitymapbox", parent_name="", **kwargs): - super(DensitymapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Densitymapbox"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the densitymapbox trace will be - inserted before the layer with the specified - ID. By default, densitymapbox traces are placed - below the first layer of type symbol If set to - '', the layer will be inserted above every - existing layer. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.densitymapbox.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.densitymapbox.Hove - rlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. To - be seen, trace `hoverinfo` must contain a - "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for lat . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for lon . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / - `lat` point in pixels. Increasing the value - makes the densitymapbox trace smoother, but - less detailed. - radiussrc - Sets the source reference on Chart Studio Cloud - for radius . - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.densitymapbox.Stre - am` instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a mapbox subplot. If "mapbox" - (the default value), the data refer to - `layout.mapbox`. If "mapbox2", the data refer - to `layout.mapbox2`, and so on. - text - Sets text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the points' weight. For example, a value - of 10 would be equivalent to having 10 points - of weight 1 in the same spot - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContourcarpetValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contourcarpet", parent_name="", **kwargs): - super(ContourcarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contourcarpet"), - data_docs=kwargs.pop( - "data_docs", - """ - a - Sets the x coordinates. - a0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - asrc - Sets the source reference on Chart Studio Cloud - for a . - atype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level - attributes are picked by an algorithm. If True, - the number of contour levels can be set in - `ncontours`. If False, set the contour level - attributes in `contours`. - b - Sets the y coordinates. - b0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - bsrc - Sets the source reference on Chart Studio Cloud - for b . - btype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - carpet - The `carpet` of the carpet axes on which this - contour trace lies - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.contourcarpet.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - contours - :class:`plotly.graph_objects.contourcarpet.Cont - ours` instance or dict with compatible - properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - da - Sets the x coordinate step. See `x0` for more - info. - db - Sets the y coordinate step. See `y0` for more - info. - fillcolor - Sets the fill color if `contours.type` is - "constraint". Defaults to a half-transparent - variant of the line color, marker color, or - marker line color, whichever is available. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.contourcarpet.Line - ` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The - actual number of contours will be chosen - automatically to be less than or equal to the - value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is - missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.contourcarpet.Stre - am` instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contour", parent_name="", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contour"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level - attributes are picked by an algorithm. If True, - the number of contour levels can be set in - `ncontours`. If False, set the contour level - attributes in `contours`. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.contour.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data are filled in. - It is defaulted to true if `z` is a one - dimensional array otherwise it is defaulted to - false. - contours - :class:`plotly.graph_objects.contour.Contours` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - fillcolor - Sets the fill color if `contours.type` is - "constraint". Defaults to a half-transparent - variant of the line color, marker color, or - marker line color, whichever is available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.contour.Hoverlabel - ` instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data have hover - labels associated with them. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.contour.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The - actual number of contours will be chosen - automatically to be less than or equal to the - value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is - missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.contour.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - xtype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - ytype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="cone", parent_name="", **kwargs): - super(ConeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Cone"), - data_docs=kwargs.pop( - "data_docs", - """ - anchor - Sets the cones' anchor with respect to their - x/y/z positions. Note that "cm" denote the - cone's center of mass which corresponds to 1/4 - from the tail to tip. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - u/v/w norm) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as u/v/w norm. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.cone.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.cone.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variable `norm` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - lighting - :class:`plotly.graph_objects.cone.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.cone.Lightposition - ` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - sizemode - Determines whether `sizeref` is set as a - "scaled" (i.e unitless) scalar (normalized by - the max u/v/w norm in the vector field) or as - "absolute" value (in the same units as the - vector field). - sizeref - Adjusts the cone size scaling. The size of the - cones is determined by their u/v/w norm - multiplied a factor and `sizeref`. This factor - (computed internally) corresponds to the - minimum "time" to travel across two successive - x/y/z positions at the average velocity of - those two successive positions. All cones in a - given trace use the same factor. With - `sizemode` set to "scaled", `sizeref` is - unitless, its default value is 0.5 With - `sizemode` set to "absolute", `sizeref` has the - same units as the u/v/w vector field, its the - default value is half the sample's maximum - vector norm. - stream - :class:`plotly.graph_objects.cone.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with the - cones. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements - will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - u - Sets the x components of the vector field. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud - for u . - v - Sets the y components of the vector field. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - vsrc - Sets the source reference on Chart Studio Cloud - for v . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on Chart Studio Cloud - for w . - x - Sets the x coordinates of the vector field and - of the displayed cones. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates of the vector field and - of the displayed cones. - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the z coordinates of the vector field and - of the displayed cones. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ChoroplethmapboxValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="choroplethmapbox", parent_name="", **kwargs): - super(ChoroplethmapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Choroplethmapbox"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be - inserted before the layer with the specified - ID. By default, choroplethmapbox traces are - placed above the water layers. If set to '', - the layer will be inserted above every existing - layer. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.choroplethmapbox.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Support nested property, for - example "properties.name". - geojson - Sets the GeoJSON data associated with this - trace. It can be set as a valid GeoJSON object - or as a URL string. Note that we only accept - GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.choroplethmapbox.H - overlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variable `properties` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - locations - Sets which features found in "geojson" to plot - using their feature `id` field. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - marker - :class:`plotly.graph_objects.choroplethmapbox.M - arker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - selected - :class:`plotly.graph_objects.choroplethmapbox.S - elected` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.choroplethmapbox.S - tream` instance or dict with compatible - properties - subplot - Sets a reference between this trace's data - coordinates and a mapbox subplot. If "mapbox" - (the default value), the data refer to - `layout.mapbox`. If "mapbox2", the data refer - to `layout.mapbox2`, and so on. - text - Sets the text elements associated with each - location. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choroplethmapbox.U - nselected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ChoroplethValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="choropleth", parent_name="", **kwargs): - super(ChoroplethValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Choropleth"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.choropleth.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Only has an effect when - `geojson` is set. Support nested property, for - example "properties.name". - geo - Sets a reference between this trace's - geospatial coordinates and a geographic map. If - "geo" (the default value), the geospatial - coordinates refer to `layout.geo`. If "geo2", - the geospatial coordinates refer to - `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this - trace. If not given, the features on the base - map are used. It can be set as a valid GeoJSON - object or as a URL string. Note that we only - accept GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.choropleth.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - locationmode - Determines the set of locations used to match - entries in `locations` to regions on the map. - Values "ISO-3", "USA-states", *country names* - correspond to features on the base map and - value "geojson-id" corresponds to features from - a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. - See `locationmode` for more info. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - marker - :class:`plotly.graph_objects.choropleth.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - selected - :class:`plotly.graph_objects.choropleth.Selecte - d` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.choropleth.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each - location. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choropleth.Unselec - ted` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CarpetValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="carpet", parent_name="", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Carpet"), - data_docs=kwargs.pop( - "data_docs", - """ - a - An array containing values of the first - parameter value - a0 - Alternate to `a`. Builds a linear space of a - coordinates. Use with `da` where `a0` is the - starting coordinate and `da` the step. - aaxis - :class:`plotly.graph_objects.carpet.Aaxis` - instance or dict with compatible properties - asrc - Sets the source reference on Chart Studio Cloud - for a . - b - A two dimensional array of y coordinates at - each carpet point. - b0 - Alternate to `b`. Builds a linear space of a - coordinates. Use with `db` where `b0` is the - starting coordinate and `db` the step. - baxis - :class:`plotly.graph_objects.carpet.Baxis` - instance or dict with compatible properties - bsrc - Sets the source reference on Chart Studio Cloud - for b . - carpet - An identifier for this carpet, so that - `scattercarpet` and `contourcarpet` traces can - specify a carpet plot on which they lie - cheaterslope - The shift applied to each successive row of - data in creating a cheater plot. Only used if - `x` is been ommitted. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - da - Sets the a coordinate step. See `a0` for more - info. - db - Sets the b coordinate step. See `b0` for more - info. - font - The default font used for axis & tick labels on - this carpet - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.carpet.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - A two dimensional array of x coordinates at - each carpet point. If ommitted, the plot is a - cheater plot and the xaxis is hidden by - default. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - A two dimensional array of y coordinates at - each carpet point. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CandlestickValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="candlestick", parent_name="", **kwargs): - super(CandlestickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Candlestick"), - data_docs=kwargs.pop( - "data_docs", - """ - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud - for close . - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - decreasing - :class:`plotly.graph_objects.candlestick.Decrea - sing` instance or dict with compatible - properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud - for high . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.candlestick.Hoverl - abel` instance or dict with compatible - properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - increasing - :class:`plotly.graph_objects.candlestick.Increa - sing` instance or dict with compatible - properties - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.candlestick.Line` - instance or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud - for low . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud - for open . - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.candlestick.Stream - ` instance or dict with compatible properties - text - Sets hover text elements associated with each - sample point. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the - box' width. For example, with 1, the whiskers - are as wide as the box(es). - x - Sets the x coordinates. If absent, linear - coordinate will be generated. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="box", parent_name="", **kwargs): - super(BoxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Box"), - data_docs=kwargs.pop( - "data_docs", - """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - boxmean - If True, the mean of the box(es)' underlying - distribution is drawn as a dashed line inside - the box(es). If "sd" the standard deviation is - also drawn. Defaults to True when `mean` is - set. Defaults to "sd" when `sd` is set - Otherwise defaults to False. - boxpoints - If "outliers", only the sample points lying - outside the whiskers are shown If - "suspectedoutliers", the outlier points are - shown and points either less than 4*Q1-3*Q3 or - greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are - shown If False, only the box(es) are shown with - no sample points Defaults to - "suspectedoutliers" when `marker.outliercolor` - or `marker.line.outliercolor` is set. Defaults - to "all" under the q1/median/q3 signature. - Otherwise defaults to "outliers". - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step for multi-box traces - set using q1/median/q3. - dy - Sets the y coordinate step for multi-box traces - set using q1/median/q3. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.box.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual boxes - or sample points or both? - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - jitter - Sets the amount of jitter in the sample points - drawn. If 0, the sample points align along the - distribution axis. If 1, the sample points are - drawn in a random jitter of width equal to the - width of the box(es). - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - line - :class:`plotly.graph_objects.box.Line` instance - or dict with compatible properties - lowerfence - Sets the lower fence values. There should be as - many items as the number of boxes desired. This - attribute has effect only under the - q1/median/q3 signature. If `lowerfence` is not - provided but a sample (in `y` or `x`) is set, - we compute the lower as the last sample point - below 1.5 times the IQR. - lowerfencesrc - Sets the source reference on Chart Studio Cloud - for lowerfence . - marker - :class:`plotly.graph_objects.box.Marker` - instance or dict with compatible properties - mean - Sets the mean values. There should be as many - items as the number of boxes desired. This - attribute has effect only under the - q1/median/q3 signature. If `mean` is not - provided but a sample (in `y` or `x`) is set, - we compute the mean for each box using the - sample values. - meansrc - Sets the source reference on Chart Studio Cloud - for mean . - median - Sets the median values. There should be as many - items as the number of boxes desired. - mediansrc - Sets the source reference on Chart Studio Cloud - for median . - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. For box traces, - the name will also be used for the position - coordinate, if `x` and `x0` (`y` and `y0` if - horizontal) are missing and the position axis - is categorical - notched - Determines whether or not notches are drawn. - Notches displays a confidence interval around - the median. We compute the confidence interval - as median +/- 1.57 * IQR / sqrt(N), where IQR - is the interquartile range and N is the sample - size. If two boxes' notches do not overlap - there is 95% confidence their medians differ. - See https://sites.google.com/site/davidsstatist - ics/home/notched-box-plots for more info. - Defaults to False unless `notchwidth` or - `notchspan` is set. - notchspan - Sets the notch span from the boxes' `median` - values. There should be as many items as the - number of boxes desired. This attribute has - effect only under the q1/median/q3 signature. - If `notchspan` is not provided but a sample (in - `y` or `x`) is set, we compute it as 1.57 * IQR - / sqrt(N), where N is the sample size. - notchspansrc - Sets the source reference on Chart Studio Cloud - for notchspan . - notchwidth - Sets the width of the notches relative to the - box' width. For example, with 0, the notches - are as wide as the box(es). - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the box(es). If "v" - ("h"), the distribution is visualized along the - vertical (horizontal). - pointpos - Sets the position of the sample points in - relation to the box(es). If 0, the sample - points are places over the center of the - box(es). Positive (negative) values correspond - to positions to the right (left) for vertical - boxes and above (below) for horizontal boxes - q1 - Sets the Quartile 1 values. There should be as - many items as the number of boxes desired. - q1src - Sets the source reference on Chart Studio Cloud - for q1 . - q3 - Sets the Quartile 3 values. There should be as - many items as the number of boxes desired. - q3src - Sets the source reference on Chart Studio Cloud - for q3 . - quartilemethod - Sets the method used to compute the sample's Q1 - and Q3 quartiles. The "linear" method uses the - 25th percentile for Q1 and 75th percentile for - Q3 as computed using method #10 (listed on http - ://www.amstat.org/publications/jse/v14n3/langfo - rd.html). The "exclusive" method uses the - median to divide the ordered dataset into two - halves if the sample is odd, it does not - include the median in either half - Q1 is then - the median of the lower half and Q3 the median - of the upper half. The "inclusive" method also - uses the median to divide the ordered dataset - into two halves but if the sample is odd, it - includes the median in both halves - Q1 is then - the median of the lower half and Q3 the median - of the upper half. - sd - Sets the standard deviation values. There - should be as many items as the number of boxes - desired. This attribute has effect only under - the q1/median/q3 signature. If `sd` is not - provided but a sample (in `y` or `x`) is set, - we compute the standard deviation for each box - using the sample values. - sdsrc - Sets the source reference on Chart Studio Cloud - for sd . - selected - :class:`plotly.graph_objects.box.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.box.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each - sample value. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (x,y) coordinates. To be - seen, trace `hoverinfo` must contain a "text" - flag. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.box.Unselected` - instance or dict with compatible properties - upperfence - Sets the upper fence values. There should be as - many items as the number of boxes desired. This - attribute has effect only under the - q1/median/q3 signature. If `upperfence` is not - provided but a sample (in `y` or `x`) is set, - we compute the lower as the last sample point - above 1.5 times the IQR. - upperfencesrc - Sets the source reference on Chart Studio Cloud - for upperfence . - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the - box' width. For example, with 1, the whiskers - are as wide as the box(es). - width - Sets the width of the box in data coordinate If - 0 (default value) the width is automatically - selected based on the positions of other box - traces in the same subplot. - x - Sets the x sample data or coordinates. See - overview for more info. - x0 - Sets the x coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y sample data or coordinates. See - overview for more info. - y0 - Sets the y coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarpolarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="barpolar", parent_name="", **kwargs): - super(BarpolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Barpolar"), - data_docs=kwargs.pop( - "data_docs", - """ - base - Sets where the bar base is drawn (in radial - axis units). In "stack" barmode, traces that - set "base" will be excluded and drawn in - "overlay" mode instead. - basesrc - Sets the source reference on Chart Studio Cloud - for base . - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period - divided by the length of the `r` coordinates. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.barpolar.Hoverlabe - l` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.barpolar.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - offset - Shifts the angular position where the bar is - drawn (in "thetatunit" units). - offsetsrc - Sets the source reference on Chart Studio Cloud - for offset . - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the - starting coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud - for r . - selected - :class:`plotly.graph_objects.barpolar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.barpolar.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a polar subplot. If "polar" - (the default value), the data refer to - `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - text - Sets hover text elements associated with each - bar. If a single string, the same string - appears over all bars. If an array of string, - the items are mapped in order to the this - trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of - theta coordinates. Use with `dtheta` where - `theta0` is the starting coordinate and - `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud - for theta . - thetaunit - Sets the unit of input "theta" values. Has an - effect only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.barpolar.Unselecte - d` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar angular width (in "thetaunit" - units). - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="bar", parent_name="", **kwargs): - super(BarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Bar"), - data_docs=kwargs.pop( - "data_docs", - """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - base - Sets where the bar base is drawn (in position - axis units). In "stack" or "relative" barmode, - traces that set "base" will be excluded and - drawn in "overlay" mode instead. - basesrc - Sets the source reference on Chart Studio Cloud - for base . - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - error_x - :class:`plotly.graph_objects.bar.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.bar.ErrorY` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.bar.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for hovertext . - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.bar.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - offset - Shifts the position where the bar is drawn (in - position axis units). In "group" barmode, - traces that set "offset" will be excluded and - drawn in "overlay" mode instead. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - offsetsrc - Sets the source reference on Chart Studio Cloud - for offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the - bar. - r - r coordinates in scatter traces are - deprecated!Please switch to the "scatterpolar" - trace type.Sets the radial coordinatesfor - legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud - for r . - selected - :class:`plotly.graph_objects.bar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.bar.Stream` - instance or dict with compatible properties - t - t coordinates in scatter traces are - deprecated!Please switch to the "scatterpolar" - trace type.Sets the angular coordinatesfor - legacy polar chart only. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the font used for `text`. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for textposition . - textsrc - Sets the source reference on Chart Studio Cloud - for text . - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. - Every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are - available. variables `value` and `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for texttemplate . - tsrc - Sets the source reference on Chart Studio Cloud - for t . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.bar.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud - for width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AreaValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="area", parent_name="", **kwargs): - super(AreaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Area"), - data_docs=kwargs.pop( - "data_docs", - """ - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for hoverinfo . - hoverlabel - :class:`plotly.graph_objects.area.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for ids . - legendgroup - Sets the legend group for this trace. Traces - part of the same legend group hide/show at the - same time when toggling legend items. - marker - :class:`plotly.graph_objects.area.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for meta . - name - Sets the trace name. The trace name appear as - the legend item and on hover. - opacity - Sets the opacity of the trace. - r - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the radial - coordinates for legacy polar chart only. - rsrc - Sets the source reference on Chart Studio Cloud - for r . - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.area.Stream` - instance or dict with compatible properties - t - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the angular - coordinates for legacy polar chart only. - tsrc - Sets the source reference on Chart Studio Cloud - for t . - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FramesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="frames", parent_name="", **kwargs): - super(FramesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Frame"), - data_docs=kwargs.pop( - "data_docs", - """ - baseframe - The name of the frame into which this frame's - properties are merged before applying. This is - used to unify properties and avoid needing to - specify the same values for the same properties - in multiple frames. - data - A list of traces this frame modifies. The - format is identical to the normal trace - definition. - group - An identifier that specifies the group to which - the frame belongs, used by animate to select a - subset of frames. - layout - Layout properties which this frame modifies. - The format is identical to the normal layout - definition. - name - A label by which to identify the frame - traces - A list of trace indices that identify the - respective traces in the data attribute -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DataValidator(_plotly_utils.basevalidators.BaseDataValidator): - def __init__(self, plotly_name="data", parent_name="", **kwargs): - - super(DataValidator, self).__init__( - class_strs_map={ - "area": "Area", - "bar": "Bar", - "barpolar": "Barpolar", - "box": "Box", - "candlestick": "Candlestick", - "carpet": "Carpet", - "choropleth": "Choropleth", - "choroplethmapbox": "Choroplethmapbox", - "cone": "Cone", - "contour": "Contour", - "contourcarpet": "Contourcarpet", - "densitymapbox": "Densitymapbox", - "funnel": "Funnel", - "funnelarea": "Funnelarea", - "heatmap": "Heatmap", - "heatmapgl": "Heatmapgl", - "histogram": "Histogram", - "histogram2d": "Histogram2d", - "histogram2dcontour": "Histogram2dContour", - "image": "Image", - "indicator": "Indicator", - "isosurface": "Isosurface", - "mesh3d": "Mesh3d", - "ohlc": "Ohlc", - "parcats": "Parcats", - "parcoords": "Parcoords", - "pie": "Pie", - "pointcloud": "Pointcloud", - "sankey": "Sankey", - "scatter": "Scatter", - "scatter3d": "Scatter3d", - "scattercarpet": "Scattercarpet", - "scattergeo": "Scattergeo", - "scattergl": "Scattergl", - "scattermapbox": "Scattermapbox", - "scatterpolar": "Scatterpolar", - "scatterpolargl": "Scatterpolargl", - "scatterternary": "Scatterternary", - "splom": "Splom", - "streamtube": "Streamtube", - "sunburst": "Sunburst", - "surface": "Surface", - "table": "Table", - "treemap": "Treemap", - "violin": "Violin", - "volume": "Volume", - "waterfall": "Waterfall", - }, - plotly_name=plotly_name, - parent_name=parent_name, - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._waterfall import WaterfallValidator + from ._volume import VolumeValidator + from ._violin import ViolinValidator + from ._treemap import TreemapValidator + from ._table import TableValidator + from ._surface import SurfaceValidator + from ._sunburst import SunburstValidator + from ._streamtube import StreamtubeValidator + from ._splom import SplomValidator + from ._scatterternary import ScatterternaryValidator + from ._scatterpolargl import ScatterpolarglValidator + from ._scatterpolar import ScatterpolarValidator + from ._scattermapbox import ScattermapboxValidator + from ._scattergl import ScatterglValidator + from ._scattergeo import ScattergeoValidator + from ._scattercarpet import ScattercarpetValidator + from ._scatter3d import Scatter3DValidator + from ._scatter import ScatterValidator + from ._sankey import SankeyValidator + from ._pointcloud import PointcloudValidator + from ._pie import PieValidator + from ._parcoords import ParcoordsValidator + from ._parcats import ParcatsValidator + from ._ohlc import OhlcValidator + from ._mesh3d import Mesh3DValidator + from ._isosurface import IsosurfaceValidator + from ._indicator import IndicatorValidator + from ._image import ImageValidator + from ._histogram2dcontour import Histogram2DcontourValidator + from ._histogram2d import Histogram2DValidator + from ._histogram import HistogramValidator + from ._heatmapgl import HeatmapglValidator + from ._heatmap import HeatmapValidator + from ._funnelarea import FunnelareaValidator + from ._funnel import FunnelValidator + from ._densitymapbox import DensitymapboxValidator + from ._contourcarpet import ContourcarpetValidator + from ._contour import ContourValidator + from ._cone import ConeValidator + from ._choroplethmapbox import ChoroplethmapboxValidator + from ._choropleth import ChoroplethValidator + from ._carpet import CarpetValidator + from ._candlestick import CandlestickValidator + from ._box import BoxValidator + from ._barpolar import BarpolarValidator + from ._bar import BarValidator + from ._area import AreaValidator + from ._layout import LayoutValidator + from ._frames import FramesValidator + from ._data import DataValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._waterfall.WaterfallValidator", + "._volume.VolumeValidator", + "._violin.ViolinValidator", + "._treemap.TreemapValidator", + "._table.TableValidator", + "._surface.SurfaceValidator", + "._sunburst.SunburstValidator", + "._streamtube.StreamtubeValidator", + "._splom.SplomValidator", + "._scatterternary.ScatterternaryValidator", + "._scatterpolargl.ScatterpolarglValidator", + "._scatterpolar.ScatterpolarValidator", + "._scattermapbox.ScattermapboxValidator", + "._scattergl.ScatterglValidator", + "._scattergeo.ScattergeoValidator", + "._scattercarpet.ScattercarpetValidator", + "._scatter3d.Scatter3DValidator", + "._scatter.ScatterValidator", + "._sankey.SankeyValidator", + "._pointcloud.PointcloudValidator", + "._pie.PieValidator", + "._parcoords.ParcoordsValidator", + "._parcats.ParcatsValidator", + "._ohlc.OhlcValidator", + "._mesh3d.Mesh3DValidator", + "._isosurface.IsosurfaceValidator", + "._indicator.IndicatorValidator", + "._image.ImageValidator", + "._histogram2dcontour.Histogram2DcontourValidator", + "._histogram2d.Histogram2DValidator", + "._histogram.HistogramValidator", + "._heatmapgl.HeatmapglValidator", + "._heatmap.HeatmapValidator", + "._funnelarea.FunnelareaValidator", + "._funnel.FunnelValidator", + "._densitymapbox.DensitymapboxValidator", + "._contourcarpet.ContourcarpetValidator", + "._contour.ContourValidator", + "._cone.ConeValidator", + "._choroplethmapbox.ChoroplethmapboxValidator", + "._choropleth.ChoroplethValidator", + "._carpet.CarpetValidator", + "._candlestick.CandlestickValidator", + "._box.BoxValidator", + "._barpolar.BarpolarValidator", + "._bar.BarValidator", + "._area.AreaValidator", + "._layout.LayoutValidator", + "._frames.FramesValidator", + "._data.DataValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/_area.py b/packages/python/plotly/plotly/validators/_area.py new file mode 100644 index 00000000000..f5b1c4ed2ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/_area.py @@ -0,0 +1,125 @@ +import _plotly_utils.basevalidators + + +class AreaValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="area", parent_name="", **kwargs): + super(AreaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Area"), + data_docs=kwargs.pop( + "data_docs", + """ + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.area.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.area.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + r + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the radial + coordinates for legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud + for r . + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.area.Stream` + instance or dict with compatible properties + t + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the angular + coordinates for legacy polar chart only. + tsrc + Sets the source reference on Chart Studio Cloud + for t . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_bar.py b/packages/python/plotly/plotly/validators/_bar.py new file mode 100644 index 00000000000..42b2db18476 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_bar.py @@ -0,0 +1,344 @@ +import _plotly_utils.basevalidators + + +class BarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="bar", parent_name="", **kwargs): + super(BarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Bar"), + data_docs=kwargs.pop( + "data_docs", + """ + alignmentgroup + Set several traces linked to the same position + axis or matching axes to the same + alignmentgroup. This controls whether bars + compute their positional range dependently or + independently. + base + Sets where the bar base is drawn (in position + axis units). In "stack" or "relative" barmode, + traces that set "base" will be excluded and + drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud + for base . + cliponaxis + Determines whether the text nodes are clipped + about the subplot axes. To show the text nodes + above axis lines and tick labels, make sure to + set `xaxis.layer` and `yaxis.layer` to *below + traces*. + constraintext + Constrain the size of text inside or outside a + bar to be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` + instance or dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + insidetextanchor + Determines if texts are kept at center or + start/end points in `textposition` "inside" + mode. + insidetextfont + Sets the font used for `text` lying inside the + bar. + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.bar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + offset + Shifts the position where the bar is drawn (in + position axis units). In "group" barmode, + traces that set "offset" will be excluded and + drawn in "overlay" mode instead. + offsetgroup + Set several traces linked to the same position + axis or matching axes to the same offsetgroup + where bars of the same position coordinate will + line up. + offsetsrc + Sets the source reference on Chart Studio Cloud + for offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" + ("h"), the value of the each bar spans along + the vertical (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the + bar. + r + r coordinates in scatter traces are + deprecated!Please switch to the "scatterpolar" + trace type.Sets the radial coordinatesfor + legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud + for r . + selected + :class:`plotly.graph_objects.bar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` + instance or dict with compatible properties + t + t coordinates in scatter traces are + deprecated!Please switch to the "scatterpolar" + trace type.Sets the angular coordinatesfor + legacy polar chart only. + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textangle + Sets the angle of the tick labels with respect + to the bar. For example, a `tickangle` of -90 + draws the tick labels vertically. With "auto" + the texts may automatically be rotated to fit + with the maximum size in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end + (rotated and scaled if needed). "outside" + positions `text` outside, next to the bar end + (scaled if needed), unless there is another bar + stacked on this one, then the text gets pushed + inside. "auto" tries to position `text` inside + the bar, but if the bar is too small and no bar + is stacked on this one the text is moved + outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `value` and `label`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + tsrc + Sets the source reference on Chart Studio Cloud + for t . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_barpolar.py b/packages/python/plotly/plotly/validators/_barpolar.py new file mode 100644 index 00000000000..11268681be1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_barpolar.py @@ -0,0 +1,225 @@ +import _plotly_utils.basevalidators + + +class BarpolarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="barpolar", parent_name="", **kwargs): + super(BarpolarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Barpolar"), + data_docs=kwargs.pop( + "data_docs", + """ + base + Sets where the bar base is drawn (in radial + axis units). In "stack" barmode, traces that + set "base" will be excluded and drawn in + "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud + for base . + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period + divided by the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.barpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + offset + Shifts the angular position where the bar is + drawn (in "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud + for offset . + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the + starting coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud + for r . + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data + coordinates and a polar subplot. If "polar" + (the default value), the data refer to + `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + text + Sets hover text elements associated with each + bar. If a single string, the same string + appears over all bars. If an array of string, + the items are mapped in order to the this + trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of + theta coordinates. Use with `dtheta` where + `theta0` is the starting coordinate and + `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud + for theta . + thetaunit + Sets the unit of input "theta" values. Has an + effect only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + width + Sets the bar angular width (in "thetaunit" + units). + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_box.py b/packages/python/plotly/plotly/validators/_box.py new file mode 100644 index 00000000000..ee81d37bb38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_box.py @@ -0,0 +1,397 @@ +import _plotly_utils.basevalidators + + +class BoxValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="box", parent_name="", **kwargs): + super(BoxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Box"), + data_docs=kwargs.pop( + "data_docs", + """ + alignmentgroup + Set several traces linked to the same position + axis or matching axes to the same + alignmentgroup. This controls whether bars + compute their positional range dependently or + independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside + the box(es). If "sd" the standard deviation is + also drawn. Defaults to True when `mean` is + set. Defaults to "sd" when `sd` is set + Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying + outside the whiskers are shown If + "suspectedoutliers", the outlier points are + shown and points either less than 4*Q1-3*Q3 or + greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are + shown If False, only the box(es) are shown with + no sample points Defaults to + "suspectedoutliers" when `marker.outliercolor` + or `marker.line.outliercolor` is set. Defaults + to "all" under the q1/median/q3 signature. + Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step for multi-box traces + set using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces + set using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes + or sample points or both? + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + jitter + Sets the amount of jitter in the sample points + drawn. If 0, the sample points align along the + distribution axis. If 1, the sample points are + drawn in a random jitter of width equal to the + width of the box(es). + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.box.Line` instance + or dict with compatible properties + lowerfence + Sets the lower fence values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the + q1/median/q3 signature. If `lowerfence` is not + provided but a sample (in `y` or `x`) is set, + we compute the lower as the last sample point + below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud + for lowerfence . + marker + :class:`plotly.graph_objects.box.Marker` + instance or dict with compatible properties + mean + Sets the mean values. There should be as many + items as the number of boxes desired. This + attribute has effect only under the + q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, + we compute the mean for each box using the + sample values. + meansrc + Sets the source reference on Chart Studio Cloud + for mean . + median + Sets the median values. There should be as many + items as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud + for median . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. For box traces, + the name will also be used for the position + coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis + is categorical + notched + Determines whether or not notches are drawn. + Notches displays a confidence interval around + the median. We compute the confidence interval + as median +/- 1.57 * IQR / sqrt(N), where IQR + is the interquartile range and N is the sample + size. If two boxes' notches do not overlap + there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatist + ics/home/notched-box-plots for more info. + Defaults to False unless `notchwidth` or + `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` + values. There should be as many items as the + number of boxes desired. This attribute has + effect only under the q1/median/q3 signature. + If `notchspan` is not provided but a sample (in + `y` or `x`) is set, we compute it as 1.57 * IQR + / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud + for notchspan . + notchwidth + Sets the width of the notches relative to the + box' width. For example, with 0, the notches + are as wide as the box(es). + offsetgroup + Set several traces linked to the same position + axis or matching axes to the same offsetgroup + where bars of the same position coordinate will + line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" + ("h"), the distribution is visualized along the + vertical (horizontal). + pointpos + Sets the position of the sample points in + relation to the box(es). If 0, the sample + points are places over the center of the + box(es). Positive (negative) values correspond + to positions to the right (left) for vertical + boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as + many items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud + for q1 . + q3 + Sets the Quartile 3 values. There should be as + many items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud + for q3 . + quartilemethod + Sets the method used to compute the sample's Q1 + and Q3 quartiles. The "linear" method uses the + 25th percentile for Q1 and 75th percentile for + Q3 as computed using method #10 (listed on http + ://www.amstat.org/publications/jse/v14n3/langfo + rd.html). The "exclusive" method uses the + median to divide the ordered dataset into two + halves if the sample is odd, it does not + include the median in either half - Q1 is then + the median of the lower half and Q3 the median + of the upper half. The "inclusive" method also + uses the median to divide the ordered dataset + into two halves but if the sample is odd, it + includes the median in both halves - Q1 is then + the median of the lower half and Q3 the median + of the upper half. + sd + Sets the standard deviation values. There + should be as many items as the number of boxes + desired. This attribute has effect only under + the q1/median/q3 signature. If `sd` is not + provided but a sample (in `y` or `x`) is set, + we compute the standard deviation for each box + using the sample values. + sdsrc + Sets the source reference on Chart Studio Cloud + for sd . + selected + :class:`plotly.graph_objects.box.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.box.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each + sample value. If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to the this trace's (x,y) coordinates. To be + seen, trace `hoverinfo` must contain a "text" + flag. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` + instance or dict with compatible properties + upperfence + Sets the upper fence values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the + q1/median/q3 signature. If `upperfence` is not + provided but a sample (in `y` or `x`) is set, + we compute the lower as the last sample point + above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud + for upperfence . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + whiskerwidth + Sets the width of the whiskers relative to the + box' width. For example, with 1, the whiskers + are as wide as the box(es). + width + Sets the width of the box in data coordinate If + 0 (default value) the width is automatically + selected based on the positions of other box + traces in the same subplot. + x + Sets the x sample data or coordinates. See + overview for more info. + x0 + Sets the x coordinate for single-box traces or + the starting coordinate for multi-box traces + set using q1/median/q3. See overview for more + info. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y sample data or coordinates. See + overview for more info. + y0 + Sets the y coordinate for single-box traces or + the starting coordinate for multi-box traces + set using q1/median/q3. See overview for more + info. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_candlestick.py b/packages/python/plotly/plotly/validators/_candlestick.py new file mode 100644 index 00000000000..e27c8cfd7d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_candlestick.py @@ -0,0 +1,188 @@ +import _plotly_utils.basevalidators + + +class CandlestickValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="candlestick", parent_name="", **kwargs): + super(CandlestickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Candlestick"), + data_docs=kwargs.pop( + "data_docs", + """ + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud + for close . + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + decreasing + :class:`plotly.graph_objects.candlestick.Decrea + sing` instance or dict with compatible + properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud + for high . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverl + abel` instance or dict with compatible + properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + increasing + :class:`plotly.graph_objects.candlestick.Increa + sing` instance or dict with compatible + properties + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.candlestick.Line` + instance or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud + for low . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud + for open . + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream + ` instance or dict with compatible properties + text + Sets hover text elements associated with each + sample point. If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + whiskerwidth + Sets the width of the whiskers relative to the + box' width. For example, with 1, the whiskers + are as wide as the box(es). + x + Sets the x coordinates. If absent, linear + coordinate will be generated. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_carpet.py b/packages/python/plotly/plotly/validators/_carpet.py new file mode 100644 index 00000000000..b57f457a679 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_carpet.py @@ -0,0 +1,164 @@ +import _plotly_utils.basevalidators + + +class CarpetValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="carpet", parent_name="", **kwargs): + super(CarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Carpet"), + data_docs=kwargs.pop( + "data_docs", + """ + a + An array containing values of the first + parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the + starting coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` + instance or dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud + for a . + b + A two dimensional array of y coordinates at + each carpet point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the + starting coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` + instance or dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud + for b . + carpet + An identifier for this carpet, so that + `scattercarpet` and `contourcarpet` traces can + specify a carpet plot on which they lie + cheaterslope + The shift applied to each successive row of + data in creating a cheater plot. Only used if + `x` is been ommitted. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + da + Sets the a coordinate step. See `a0` for more + info. + db + Sets the b coordinate step. See `b0` for more + info. + font + The default font used for axis & tick labels on + this carpet + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + A two dimensional array of x coordinates at + each carpet point. If ommitted, the plot is a + cheater plot and the xaxis is hidden by + default. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + A two dimensional array of y coordinates at + each carpet point. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_choropleth.py b/packages/python/plotly/plotly/validators/_choropleth.py new file mode 100644 index 00000000000..ed7c947d111 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_choropleth.py @@ -0,0 +1,270 @@ +import _plotly_utils.basevalidators + + +class ChoroplethValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="choropleth", parent_name="", **kwargs): + super(ChoroplethValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Choropleth"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + featureidkey + Sets the key in GeoJSON features which is used + as id to match the items included in the + `locations` array. Only has an effect when + `geojson` is set. Support nested property, for + example "properties.name". + geo + Sets a reference between this trace's + geospatial coordinates and a geographic map. If + "geo" (the default value), the geospatial + coordinates refer to `layout.geo`. If "geo2", + the geospatial coordinates refer to + `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this + trace. If not given, the features on the base + map are used. It can be set as a valid GeoJSON + object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverla + bel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + locationmode + Determines the set of locations used to match + entries in `locations` to regions on the map. + Values "ISO-3", "USA-states", *country names* + correspond to features on the base map and + value "geojson-id" corresponds to features from + a custom GeoJSON linked to the `geojson` + attribute. + locations + Sets the coordinates via location IDs or names. + See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + selected + :class:`plotly.graph_objects.choropleth.Selecte + d` instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each + location. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselec + ted` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_choroplethmapbox.py b/packages/python/plotly/plotly/validators/_choroplethmapbox.py new file mode 100644 index 00000000000..bf62e34976b --- /dev/null +++ b/packages/python/plotly/plotly/validators/_choroplethmapbox.py @@ -0,0 +1,270 @@ +import _plotly_utils.basevalidators + + +class ChoroplethmapboxValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="choroplethmapbox", parent_name="", **kwargs): + super(ChoroplethmapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Choroplethmapbox"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be + inserted before the layer with the specified + ID. By default, choroplethmapbox traces are + placed above the water layers. If set to '', + the layer will be inserted above every existing + layer. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + featureidkey + Sets the key in GeoJSON features which is used + as id to match the items included in the + `locations` array. Support nested property, for + example "properties.name". + geojson + Sets the GeoJSON data associated with this + trace. It can be set as a valid GeoJSON object + or as a URL string. Note that we only accept + GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.H + overlabel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variable `properties` Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + locations + Sets which features found in "geojson" to plot + using their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + marker + :class:`plotly.graph_objects.choroplethmapbox.M + arker` instance or dict with compatible + properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + selected + :class:`plotly.graph_objects.choroplethmapbox.S + elected` instance or dict with compatible + properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.S + tream` instance or dict with compatible + properties + subplot + Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" + (the default value), the data refer to + `layout.mapbox`. If "mapbox2", the data refer + to `layout.mapbox2`, and so on. + text + Sets the text elements associated with each + location. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.U + nselected` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_cone.py b/packages/python/plotly/plotly/validators/_cone.py new file mode 100644 index 00000000000..5a0405a75e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_cone.py @@ -0,0 +1,293 @@ +import _plotly_utils.basevalidators + + +class ConeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="cone", parent_name="", **kwargs): + super(ConeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Cone"), + data_docs=kwargs.pop( + "data_docs", + """ + anchor + Sets the cones' anchor with respect to their + x/y/z positions. Note that "cm" denote the + cone's center of mass which corresponds to 1/4 + from the tail to tip. + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + u/v/w norm) or the bounds set in `cmin` and + `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as u/v/w norm and if + set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as u/v/w norm. Has no effect when `cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as u/v/w norm and if + set, `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variable `norm` Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lighting + :class:`plotly.graph_objects.cone.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition + ` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the surface. Please note + that in the case of using high `opacity` values + for example a value greater than or equal to + 0.5 on two surfaces (and 0.25 with four + surfaces), an overlay of multiple transparent + surfaces may not perfectly be sorted in depth + by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + sizemode + Determines whether `sizeref` is set as a + "scaled" (i.e unitless) scalar (normalized by + the max u/v/w norm in the vector field) or as + "absolute" value (in the same units as the + vector field). + sizeref + Adjusts the cone size scaling. The size of the + cones is determined by their u/v/w norm + multiplied a factor and `sizeref`. This factor + (computed internally) corresponds to the + minimum "time" to travel across two successive + x/y/z positions at the average velocity of + those two successive positions. All cones in a + given trace use the same factor. With + `sizemode` set to "scaled", `sizeref` is + unitless, its default value is 0.5 With + `sizemode` set to "absolute", `sizeref` has the + same units as the u/v/w vector field, its the + default value is half the sample's maximum + vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with the + cones. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements + will be seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + u + Sets the x components of the vector field. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud + for u . + v + Sets the y components of the vector field. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + vsrc + Sets the source reference on Chart Studio Cloud + for v . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on Chart Studio Cloud + for w . + x + Sets the x coordinates of the vector field and + of the displayed cones. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates of the vector field and + of the displayed cones. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the z coordinates of the vector field and + of the displayed cones. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_contour.py b/packages/python/plotly/plotly/validators/_contour.py new file mode 100644 index 00000000000..b0facbc481a --- /dev/null +++ b/packages/python/plotly/plotly/validators/_contour.py @@ -0,0 +1,313 @@ +import _plotly_utils.basevalidators + + +class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contour", parent_name="", **kwargs): + super(ContourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contour"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level + attributes are picked by an algorithm. If True, + the number of contour levels can be set in + `ncontours`. If False, set the contour level + attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the `z` data are filled in. + It is defaulted to true if `z` is a one + dimensional array otherwise it is defaulted to + false. + contours + :class:`plotly.graph_objects.contour.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + fillcolor + Sets the fill color if `contours.type` is + "constraint". Defaults to a half-transparent + variant of the line color, marker color, or + marker line color, whichever is available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel + ` instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the `z` data have hover + labels associated with them. + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.contour.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + ncontours + Sets the maximum number of contour levels. The + actual number of contours will be chosen + automatically to be less than or equal to the + value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is + missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.contour.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z + value. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + xtype + If "array", the heatmap's x coordinates are + given by "x" (the default behavior when `x` is + provided). If "scaled", the heatmap's x + coordinates are given by "x0" and "dx" (the + default behavior when `x` is not provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + ytype + If "array", the heatmap's y coordinates are + given by "y" (the default behavior when `y` is + provided) If "scaled", the heatmap's y + coordinates are given by "y0" and "dy" (the + default behavior when `y` is not provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zhoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_contourcarpet.py b/packages/python/plotly/plotly/validators/_contourcarpet.py new file mode 100644 index 00000000000..ab31fa4f452 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_contourcarpet.py @@ -0,0 +1,253 @@ +import _plotly_utils.basevalidators + + +class ContourcarpetValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contourcarpet", parent_name="", **kwargs): + super(ContourcarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contourcarpet"), + data_docs=kwargs.pop( + "data_docs", + """ + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud + for a . + atype + If "array", the heatmap's x coordinates are + given by "x" (the default behavior when `x` is + provided). If "scaled", the heatmap's x + coordinates are given by "x0" and "dx" (the + default behavior when `x` is not provided). + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level + attributes are picked by an algorithm. If True, + the number of contour levels can be set in + `ncontours`. If False, set the contour level + attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud + for b . + btype + If "array", the heatmap's y coordinates are + given by "y" (the default behavior when `y` is + provided) If "scaled", the heatmap's y + coordinates are given by "y0" and "dy" (the + default behavior when `y` is not provided) + carpet + The `carpet` of the carpet axes on which this + contour trace lies + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.Colo + rBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + contours + :class:`plotly.graph_objects.contourcarpet.Cont + ours` instance or dict with compatible + properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + da + Sets the x coordinate step. See `x0` for more + info. + db + Sets the y coordinate step. See `y0` for more + info. + fillcolor + Sets the fill color if `contours.type` is + "constraint". Defaults to a half-transparent + variant of the line color, marker color, or + marker line color, whichever is available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.contourcarpet.Line + ` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + ncontours + Sets the maximum number of contour levels. The + actual number of contours will be chosen + automatically to be less than or equal to the + value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is + missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stre + am` instance or dict with compatible properties + text + Sets the text elements associated with each z + value. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_data.py b/packages/python/plotly/plotly/validators/_data.py new file mode 100644 index 00000000000..c1a867fb11f --- /dev/null +++ b/packages/python/plotly/plotly/validators/_data.py @@ -0,0 +1,60 @@ +import _plotly_utils.basevalidators + + +class DataValidator(_plotly_utils.basevalidators.BaseDataValidator): + def __init__(self, plotly_name="data", parent_name="", **kwargs): + + super(DataValidator, self).__init__( + class_strs_map={ + "area": "Area", + "bar": "Bar", + "barpolar": "Barpolar", + "box": "Box", + "candlestick": "Candlestick", + "carpet": "Carpet", + "choropleth": "Choropleth", + "choroplethmapbox": "Choroplethmapbox", + "cone": "Cone", + "contour": "Contour", + "contourcarpet": "Contourcarpet", + "densitymapbox": "Densitymapbox", + "funnel": "Funnel", + "funnelarea": "Funnelarea", + "heatmap": "Heatmap", + "heatmapgl": "Heatmapgl", + "histogram": "Histogram", + "histogram2d": "Histogram2d", + "histogram2dcontour": "Histogram2dContour", + "image": "Image", + "indicator": "Indicator", + "isosurface": "Isosurface", + "mesh3d": "Mesh3d", + "ohlc": "Ohlc", + "parcats": "Parcats", + "parcoords": "Parcoords", + "pie": "Pie", + "pointcloud": "Pointcloud", + "sankey": "Sankey", + "scatter": "Scatter", + "scatter3d": "Scatter3d", + "scattercarpet": "Scattercarpet", + "scattergeo": "Scattergeo", + "scattergl": "Scattergl", + "scattermapbox": "Scattermapbox", + "scatterpolar": "Scatterpolar", + "scatterpolargl": "Scatterpolargl", + "scatterternary": "Scatterternary", + "splom": "Splom", + "streamtube": "Streamtube", + "sunburst": "Sunburst", + "surface": "Surface", + "table": "Table", + "treemap": "Treemap", + "violin": "Violin", + "volume": "Volume", + "waterfall": "Waterfall", + }, + plotly_name=plotly_name, + parent_name=parent_name, + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_densitymapbox.py b/packages/python/plotly/plotly/validators/_densitymapbox.py new file mode 100644 index 00000000000..8b69f046a69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_densitymapbox.py @@ -0,0 +1,266 @@ +import _plotly_utils.basevalidators + + +class DensitymapboxValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="densitymapbox", parent_name="", **kwargs): + super(DensitymapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Densitymapbox"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be + inserted before the layer with the specified + ID. By default, densitymapbox traces are placed + below the first layer of type symbol If set to + '', the layer will be inserted above every + existing layer. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.Colo + rBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hove + rlabel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (lon,lat) pair If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to the this trace's (lon,lat) coordinates. To + be seen, trace `hoverinfo` must contain a + "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + lat + Sets the latitude coordinates (in degrees + North). + latsrc + Sets the source reference on Chart Studio Cloud + for lat . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lon + Sets the longitude coordinates (in degrees + East). + lonsrc + Sets the source reference on Chart Studio Cloud + for lon . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / + `lat` point in pixels. Increasing the value + makes the densitymapbox trace smoother, but + less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud + for radius . + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stre + am` instance or dict with compatible properties + subplot + Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" + (the default value), the data refer to + `layout.mapbox`. If "mapbox2", the data refer + to `layout.mapbox2`, and so on. + text + Sets text elements associated with each + (lon,lat) pair If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to the this trace's (lon,lat) coordinates. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + z + Sets the points' weight. For example, a value + of 10 would be equivalent to having 10 points + of weight 1 in the same spot + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_frames.py b/packages/python/plotly/plotly/validators/_frames.py new file mode 100644 index 00000000000..9f906030af6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_frames.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FramesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="frames", parent_name="", **kwargs): + super(FramesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Frame"), + data_docs=kwargs.pop( + "data_docs", + """ + baseframe + The name of the frame into which this frame's + properties are merged before applying. This is + used to unify properties and avoid needing to + specify the same values for the same properties + in multiple frames. + data + A list of traces this frame modifies. The + format is identical to the normal trace + definition. + group + An identifier that specifies the group to which + the frame belongs, used by animate to select a + subset of frames. + layout + Layout properties which this frame modifies. + The format is identical to the normal layout + definition. + name + A label by which to identify the frame + traces + A list of trace indices that identify the + respective traces in the data attribute +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_funnel.py b/packages/python/plotly/plotly/validators/_funnel.py new file mode 100644 index 00000000000..13b84ab07d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_funnel.py @@ -0,0 +1,311 @@ +import _plotly_utils.basevalidators + + +class FunnelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="funnel", parent_name="", **kwargs): + super(FunnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Funnel"), + data_docs=kwargs.pop( + "data_docs", + """ + alignmentgroup + Set several traces linked to the same position + axis or matching axes to the same + alignmentgroup. This controls whether bars + compute their positional range dependently or + independently. + cliponaxis + Determines whether the text nodes are clipped + about the subplot axes. To show the text nodes + above axis lines and tick labels, make sure to + set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a + bar to be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `percentInitial`, `percentPrevious` + and `percentTotal`. Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + insidetextanchor + Determines if texts are kept at center or + start/end points in `textposition` "inside" + mode. + insidetextfont + Sets the font used for `text` lying inside the + bar. + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.funnel.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + offset + Shifts the position where the bar is drawn (in + position axis units). In "group" barmode, + traces that set "offset" will be excluded and + drawn in "overlay" mode instead. + offsetgroup + Set several traces linked to the same position + axis or matching axes to the same offsetgroup + where bars of the same position coordinate will + line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" + ("h"), the value of the each bar spans along + the vertical (horizontal). By default funnels + are tend to be oriented horizontally; unless + only "y" array is presented or orientation is + set to "v". Also regarding graphs including + only 'horizontal' funnels, "autorange" on the + "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the + bar. + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textangle + Sets the angle of the tick labels with respect + to the bar. For example, a `tickangle` of -90 + draws the tick labels vertically. With "auto" + the texts may automatically be rotated to fit + with the maximum size in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on + the graph. In the case of having multiple + funnels, percentages & totals are computed + separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end + (rotated and scaled if needed). "outside" + positions `text` outside, next to the bar end + (scaled if needed), unless there is another bar + stacked on this one, then the text gets pushed + inside. "auto" tries to position `text` inside + the bar, but if the bar is too small and no bar + is stacked on this one the text is moved + outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `percentInitial`, + `percentPrevious`, `percentTotal`, `label` and + `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_funnelarea.py b/packages/python/plotly/plotly/validators/_funnelarea.py new file mode 100644 index 00000000000..b68df23b4e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_funnelarea.py @@ -0,0 +1,240 @@ +import _plotly_utils.basevalidators + + +class FunnelareaValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="funnelarea", parent_name="", **kwargs): + super(FunnelareaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Funnelarea"), + data_docs=kwargs.pop( + "data_docs", + """ + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and + maximum top length. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dlabel + Sets the label step. See `label0` for more + info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverla + bel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `label`, `color`, `value`, `text` and + `percent`. Anything contained in tag `` + is displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + sector. If a single string, the same string + appears for all data points. If an array of + string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` + must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + insidetextfont + Sets the font used for `textinfo` lying inside + the sector. + label0 + Alternate to `labels`. Builds a numeric set of + labels. Use with `dlabel` where `label0` is the + starting label and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or + simply count occurrences if `values` is not + provided. For other array attributes (including + color) we use the first non-empty entry among + all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud + for labels . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should + be sized according to their totals, link them + by providing a non-empty group id here shared + by every trace in the same group. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. + If trace `textinfo` contains a "text" flag, + these elements will be seen on the chart. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on + the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, + `text` and `percent`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + title + :class:`plotly.graph_objects.funnelarea.Title` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we + count occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_heatmap.py b/packages/python/plotly/plotly/validators/_heatmap.py new file mode 100644 index 00000000000..f4f20393280 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_heatmap.py @@ -0,0 +1,298 @@ +import _plotly_utils.basevalidators + + +class HeatmapValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="heatmap", parent_name="", **kwargs): + super(HeatmapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Heatmap"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the `z` data are filled in. + It is defaulted to true if `z` is a one + dimensional array and `zsmooth` is not false; + otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel + ` instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the `z` data have hover + labels associated with them. + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z + value. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xgap + Sets the horizontal gap (in pixels) between + bricks. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + xtype + If "array", the heatmap's x coordinates are + given by "x" (the default behavior when `x` is + provided). If "scaled", the heatmap's x + coordinates are given by "x0" and "dx" (the + default behavior when `x` is not provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date + data. + ygap + Sets the vertical gap (in pixels) between + bricks. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + ytype + If "array", the heatmap's y coordinates are + given by "y" (the default behavior when `y` is + provided) If "scaled", the heatmap's y + coordinates are given by "y0" and "dy" (the + default behavior when `y` is not provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zhoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` + data. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_heatmapgl.py b/packages/python/plotly/plotly/validators/_heatmapgl.py new file mode 100644 index 00000000000..35fe522558f --- /dev/null +++ b/packages/python/plotly/plotly/validators/_heatmapgl.py @@ -0,0 +1,224 @@ +import _plotly_utils.basevalidators + + +class HeatmapglValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="heatmapgl", parent_name="", **kwargs): + super(HeatmapglValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Heatmapgl"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.heatmapgl.ColorBar + ` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.heatmapgl.Hoverlab + el` instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.heatmapgl.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z + value. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + xtype + If "array", the heatmap's x coordinates are + given by "x" (the default behavior when `x` is + provided). If "scaled", the heatmap's x + coordinates are given by "x0" and "dx" (the + default behavior when `x` is not provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + ytype + If "array", the heatmap's y coordinates are + given by "y" (the default behavior when `y` is + provided) If "scaled", the heatmap's y + coordinates are given by "y0" and "dy" (the + default behavior when `y` is not provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_histogram.py b/packages/python/plotly/plotly/validators/_histogram.py new file mode 100644 index 00000000000..6cb3ccf0d8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/_histogram.py @@ -0,0 +1,293 @@ +import _plotly_utils.basevalidators + + +class HistogramValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="histogram", parent_name="", **kwargs): + super(HistogramValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Histogram"), + data_docs=kwargs.pop( + "data_docs", + """ + alignmentgroup + Set several traces linked to the same position + axis or matching axes to the same + alignmentgroup. This controls whether bars + compute their positional range dependently or + independently. + autobinx + Obsolete: since v1.42 each bin attribute is + auto-determined separately and `autobinx` is + not needed. However, we accept `autobinx: true` + or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is + auto-determined separately and `autobiny` is + not needed. However, we accept `autobiny: true` + or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on + the same subplot and with the same + "orientation" under `barmode` "stack", + "relative" and "group" are forced into the same + bingroup, Using `bingroup`, traces under + `barmode` "overlay" and on different axes (of + the same axis type) can have compatible bin + settings. Note that histogram and histogram2d* + trace can share the same `bingroup` + cumulative + :class:`plotly.graph_objects.histogram.Cumulati + ve` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + error_x + :class:`plotly.graph_objects.histogram.ErrorX` + instance or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` + instance or dict with compatible properties + histfunc + Specifies the binning function used for this + histogram trace. If "count", the histogram + values are computed by counting the number of + values lying inside each bin. If "sum", "avg", + "min", "max", the histogram values are computed + using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for + this histogram trace. If "", the span of each + bar corresponds to the number of occurrences + (i.e. the number of data points lying inside + the bins). If "percent" / "probability", the + span of each bar corresponds to the percentage + / fraction of occurrences with respect to the + total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", + the span of each bar corresponds to the number + of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin + AREAS equals the total number of sample + points). If *probability density*, the area of + each bar corresponds to the probability that an + event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlab + el` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variable `binNumber` Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.histogram.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. + This value will be used in an algorithm that + will decide the optimal bin size such that the + histogram best visualizes the distribution of + the data. Ignored if `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. + This value will be used in an algorithm that + will decide the optimal bin size such that the + histogram best visualizes the distribution of + the data. Ignored if `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position + axis or matching axes to the same offsetgroup + where bars of the same position coordinate will + line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" + ("h"), the value of the each bar spans along + the vertical (horizontal). + selected + :class:`plotly.graph_objects.histogram.Selected + ` instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each + bar. If a single string, the same string + appears over all bars. If an array of string, + the items are mapped in order to the this + trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselect + ed` instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the sample data to be binned on the x + axis. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the sample data to be binned on the y + axis. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_histogram2d.py b/packages/python/plotly/plotly/validators/_histogram2d.py new file mode 100644 index 00000000000..b2bbad238bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/_histogram2d.py @@ -0,0 +1,333 @@ +import _plotly_utils.basevalidators + + +class Histogram2DValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="histogram2d", parent_name="", **kwargs): + super(Histogram2DValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Histogram2d"), + data_docs=kwargs.pop( + "data_docs", + """ + autobinx + Obsolete: since v1.42 each bin attribute is + auto-determined separately and `autobinx` is + not needed. However, we accept `autobinx: true` + or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is + auto-determined separately and `autobiny` is + not needed. However, we accept `autobiny: true` + or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default + prefix For example, setting a `bingroup` of 1 + on two histogram2d traces will make them their + x-bins and y-bins match separately. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorB + ar` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + histfunc + Specifies the binning function used for this + histogram trace. If "count", the histogram + values are computed by counting the number of + values lying inside each bin. If "sum", "avg", + "min", "max", the histogram values are computed + using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for + this histogram trace. If "", the span of each + bar corresponds to the number of occurrences + (i.e. the number of data points lying inside + the bins). If "percent" / "probability", the + span of each bar corresponds to the percentage + / fraction of occurrences with respect to the + total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", + the span of each bar corresponds to the number + of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin + AREAS equals the total number of sample + points). If *probability density*, the area of + each bar corresponds to the probability that an + event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverl + abel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variable `z` Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.histogram2d.Marker + ` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. + This value will be used in an algorithm that + will decide the optimal bin size such that the + histogram best visualizes the distribution of + the data. Ignored if `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. + This value will be used in an algorithm that + will decide the optimal bin size such that the + histogram best visualizes the distribution of + the data. Ignored if `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream + ` instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the sample data to be binned on the x + axis. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on + axes of the same axis type) can have compatible + x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram + `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date + data. + xgap + Sets the horizontal gap (in pixels) between + bricks. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the sample data to be binned on the y + axis. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on + axes of the same axis type) can have compatible + y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram + `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date + data. + ygap + Sets the vertical gap (in pixels) between + bricks. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zhoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` + data. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_histogram2dcontour.py b/packages/python/plotly/plotly/validators/_histogram2dcontour.py new file mode 100644 index 00000000000..dd44b948000 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_histogram2dcontour.py @@ -0,0 +1,350 @@ +import _plotly_utils.basevalidators + + +class Histogram2DcontourValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="histogram2dcontour", parent_name="", **kwargs): + super(Histogram2DcontourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Histogram2dContour"), + data_docs=kwargs.pop( + "data_docs", + """ + autobinx + Obsolete: since v1.42 each bin attribute is + auto-determined separately and `autobinx` is + not needed. However, we accept `autobinx: true` + or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is + auto-determined separately and `autobiny` is + not needed. However, we accept `autobiny: true` + or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level + attributes are picked by an algorithm. If True, + the number of contour levels can be set in + `ncontours`. If False, set the contour level + attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default + prefix For example, setting a `bingroup` of 1 + on two histogram2d traces will make them their + x-bins and y-bins match separately. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour + .ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and + `zmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + contours + :class:`plotly.graph_objects.histogram2dcontour + .Contours` instance or dict with compatible + properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + histfunc + Specifies the binning function used for this + histogram trace. If "count", the histogram + values are computed by counting the number of + values lying inside each bin. If "sum", "avg", + "min", "max", the histogram values are computed + using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for + this histogram trace. If "", the span of each + bar corresponds to the number of occurrences + (i.e. the number of data points lying inside + the bins). If "percent" / "probability", the + span of each bar corresponds to the percentage + / fraction of occurrences with respect to the + total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", + the span of each bar corresponds to the number + of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin + AREAS equals the total number of sample + points). If *probability density*, the area of + each bar corresponds to the probability that an + event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour + .Hoverlabel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variable `z` Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.histogram2dcontour + .Line` instance or dict with compatible + properties + marker + :class:`plotly.graph_objects.histogram2dcontour + .Marker` instance or dict with compatible + properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. + This value will be used in an algorithm that + will decide the optimal bin size such that the + histogram best visualizes the distribution of + the data. Ignored if `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. + This value will be used in an algorithm that + will decide the optimal bin size such that the + histogram best visualizes the distribution of + the data. Ignored if `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The + actual number of contours will be chosen + automatically to be less than or equal to the + value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is + missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, + `zmin` will correspond to the last color in the + array and `zmax` will correspond to the first + color. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour + .Stream` instance or dict with compatible + properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the sample data to be binned on the x + axis. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on + axes of the same axis type) can have compatible + x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram + `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour + .XBins` instance or dict with compatible + properties + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the sample data to be binned on the y + axis. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on + axes of the same axis type) can have compatible + y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram + `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour + .YBins` instance or dict with compatible + properties + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `z`) or the bounds set in `zmin` and `zmax` + Defaults to `false` when `zmin` and `zmax` are + set by the user. + zhoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value + should have the same units as in `z` and if + set, `zmin` must be set as well. + zmid + Sets the mid-point of the color domain by + scaling `zmin` and/or `zmax` to be equidistant + to this point. Value should have the same units + as in `z`. Has no effect when `zauto` is + `false`. + zmin + Sets the lower bound of the color domain. Value + should have the same units as in `z` and if + set, `zmax` must be set as well. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_image.py b/packages/python/plotly/plotly/validators/_image.py new file mode 100644 index 00000000000..d1240aea576 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_image.py @@ -0,0 +1,191 @@ +import _plotly_utils.basevalidators + + +class ImageValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="image", parent_name="", **kwargs): + super(ImageValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Image"), + data_docs=kwargs.pop( + "data_docs", + """ + colormodel + Color model used to map the numerical color + components described in `z` into colors. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `z`, `color` and `colormodel`. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.image.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z + value. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x0 + Set the image's x position. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is + an array of 3 or 4 numbers representing a + color. + zmax + Array defining the higher bound for each color + component. Note that the default value will + depend on the colormodel. For the `rgb` + colormodel, it is [255, 255, 255]. For the + `rgba` colormodel, it is [255, 255, 255, 1]. + For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, + 100, 100, 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will + depend on the colormodel. For the `rgb` + colormodel, it is [0, 0, 0]. For the `rgba` + colormodel, it is [0, 0, 0, 0]. For the `hsl` + colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_indicator.py b/packages/python/plotly/plotly/validators/_indicator.py new file mode 100644 index 00000000000..50c4acf3f0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/_indicator.py @@ -0,0 +1,114 @@ +import _plotly_utils.basevalidators + + +class IndicatorValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="indicator", parent_name="", **kwargs): + super(IndicatorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Indicator"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the `text` + within the box. Note that this attribute has no + effect if an angular gauge is displayed: in + this case, it is always centered + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + delta + :class:`plotly.graph_objects.indicator.Delta` + instance or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` + instance or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines how the value is displayed on the + graph. `number` displays the value numerically + in text. `delta` displays the difference to a + reference value in text. Finally, `gauge` + displays the value graphically on an axis. + name + Sets the trace name. The trace name appear as + the legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` + instance or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_isosurface.py b/packages/python/plotly/plotly/validators/_isosurface.py new file mode 100644 index 00000000000..08f75f9442c --- /dev/null +++ b/packages/python/plotly/plotly/validators/_isosurface.py @@ -0,0 +1,283 @@ +import _plotly_utils.basevalidators + + +class IsosurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="isosurface", parent_name="", **kwargs): + super(IsosurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Isosurface"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` + instance or dict with compatible properties + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + `value`) or the bounds set in `cmin` and `cmax` + Defaults to `false` when `cmin` and `cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as `value` and if + set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as `value`. Has no effect when `cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as `value` and if + set, `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.isosurface.Contour + ` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + flatshading + Determines whether or not normal smoothing is + applied to the meshes, creating meshes with an + angular, low-poly look via flat reflections. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverla + bel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lighting + :class:`plotly.graph_objects.isosurface.Lightin + g` instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightpo + sition` instance or dict with compatible + properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the surface. Please note + that in the case of using high `opacity` values + for example a value greater than or equal to + 0.5 on two surfaces (and 0.25 with four + surfaces), an overlay of multiple transparent + surfaces may not perfectly be sorted in depth + by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spacefr + ame` instance or dict with compatible + properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface + ` instance or dict with compatible properties + text + Sets the text elements associated with the + vertices. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on Chart Studio Cloud + for value . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the X coordinates of the vertices on X + axis. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the Y coordinates of the vertices on Y + axis. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the Z coordinates of the vertices on Z + axis. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_layout.py b/packages/python/plotly/plotly/validators/_layout.py new file mode 100644 index 00000000000..8699c2a9196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_layout.py @@ -0,0 +1,497 @@ +import _plotly_utils.basevalidators + + +class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="layout", parent_name="", **kwargs): + super(LayoutValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Layout"), + data_docs=kwargs.pop( + "data_docs", + """ + angularaxis + :class:`plotly.graph_objects.layout.AngularAxis + ` instance or dict with compatible properties + annotations + A tuple of + :class:`plotly.graph_objects.layout.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), + sets the default property values to use for + elements of layout.annotations + autosize + Determines whether or not a layout width or + height that has been left undefined by the user + is initialized on each relayout. Note that, + regardless of this attribute, an undefined + layout width or height is always initialized on + the first call to plot. + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of + the same location coordinate. + barmode + Determines how bars at the same location + coordinate are displayed on the graph. With + "stack", the bars are stacked on top of one + another With "relative", the bars are stacked + on top of one another, with negative values + below the axis, positive values above With + "group", the bars are plotted next to one + another centered around the shared location. + With "overlay", the bars are plotted over one + another, you might need to an "opacity" to see + multiple bars. + barnorm + Sets the normalization for bar traces on the + graph. With "fraction", the value of each bar + is divided by the sum of all values at that + location coordinate. "percent" is the same but + multiplied by 100 to show percentages. + boxgap + Sets the gap (in plot fraction) between boxes + of adjacent location coordinates. Has no effect + on traces that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes + of the same location coordinate. Has no effect + on traces that have "width" set. + boxmode + Determines how boxes at the same location + coordinate are displayed on the graph. If + "group", the boxes are plotted next to one + another centered around the shared location. If + "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see + them multiple boxes. Has no effect on traces + that have "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout + the plot. + clickmode + Determines the mode of single click + interactions. "event" is the default value and + emits the `plotly_click` event. In addition + this mode emits the `plotly_selected` event in + drag modes "lasso" and "select", but with no + event data attached (kept for compatibility + reasons). The "select" flag enables selecting + single data points via click. This mode also + supports persistent selections, meaning that + pressing Shift while clicking, adds to / + subtracts from an existing selection. "select" + with `hovermode`: "x" can be confusing, + consider explicitly setting `hovermode`: + "closest" when using this feature. Selection + events are sent accordingly as long as "event" + flag is set as well. When the "event" flag is + missing, `plotly_click` and `plotly_selected` + events are not fired. + coloraxis + :class:`plotly.graph_objects.layout.Coloraxis` + instance or dict with compatible properties + colorscale + :class:`plotly.graph_objects.layout.Colorscale` + instance or dict with compatible properties + colorway + Sets the default trace colors. + datarevision + If provided, a changed value tells + `Plotly.react` that one or more data arrays has + changed. This way you can modify arrays in- + place rather than making a complete new copy + for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are + being treated as immutable, thus any data array + with a different identity from its predecessor + contains new data. + direction + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the direction + corresponding to positive angles in legacy + polar charts. + dragmode + Determines the mode of drag interactions. + "select" and "lasso" apply only to scatter + traces with markers or text. "orbit" and + "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than + trace names and axis titles. Defaults to + `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether + given by `funnelareacolorway` or inherited from + `colorway`) will be extended to three times its + original length by first repeating every color + 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. + extendpiecolors + If `true`, the pie slice colors (whether given + by `piecolorway` or inherited from `colorway`) + will be extended to three times its original + length by first repeating every color 20% + lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether + given by `sunburstcolorway` or inherited from + `colorway`) will be extended to three times its + original length by first repeating every color + 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether + given by `treemapcolorway` or inherited from + `colorway`) will be extended to three times its + original length by first repeating every color + 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. + font + Sets the global font. Note that fonts used in + traces and other layout components inherit from + the global font. + funnelareacolorway + Sets the default funnelarea slice colors. + Defaults to the main `colorway` used for trace + colors. If you specify a new list here it can + still be extended with lighter and darker + colors, see `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of + the same location coordinate. + funnelmode + Determines how bars at the same location + coordinate are displayed on the graph. With + "stack", the bars are stacked on top of one + another With "group", the bars are plotted next + to one another centered around the shared + location. With "overlay", the bars are plotted + over one another, you might need to an + "opacity" to see multiple bars. + geo + :class:`plotly.graph_objects.layout.Geo` + instance or dict with compatible properties + grid + :class:`plotly.graph_objects.layout.Grid` + instance or dict with compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart + analog of visible:'legendonly' but it can + contain many labels, and can simultaneously + hide slices from several pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on Chart Studio Cloud + for hiddenlabels . + hidesources + Determines whether or not a text link citing + the data source is placed at the bottom-right + cored of the figure. Has only an effect only on + graphs that have been generated via forked + graphs from the Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise). + hoverdistance + Sets the default distance (in pixels) to look + for data to add hover labels (-1 means no + cutoff, 0 means no looking for data). This is + only a real distance for hovering on point-like + objects, like scatter points. For area-like + objects (bars, scatter fills, etc) hovering is + on inside the area and off outside, but these + objects will not supersede hover on point-like + objects in case of conflict. + hoverlabel + :class:`plotly.graph_objects.layout.Hoverlabel` + instance or dict with compatible properties + hovermode + Determines the mode of hover interactions. If + "closest", a single hoverlabel will appear for + the "closest" point within the `hoverdistance`. + If "x" (or "y"), multiple hoverlabels will + appear for multiple points at the "closest" x- + (or y-) coordinate within the `hoverdistance`, + with the caveat that no more than one + hoverlabel will appear per trace. If *x + unified* (or *y unified*), a single hoverlabel + will appear multiple points at the closest x- + (or y-) coordinate within the `hoverdistance` + with the caveat that no more than one + hoverlabel will appear per trace. In this mode, + spikelines are enabled by default perpendicular + to the specified axis. If false, hover + interactions are disabled. If `clickmode` + includes the "select" flag, `hovermode` + defaults to "closest". If `clickmode` lacks the + "select" flag, it defaults to "x" or "y" + (depending on the trace's `orientation` value) + for plots based on cartesian coordinates. For + anything else the default value is "closest". + images + A tuple of + :class:`plotly.graph_objects.layout.Image` + instances or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the + default property values to use for elements of + layout.images + legend + :class:`plotly.graph_objects.layout.Legend` + instance or dict with compatible properties + mapbox + :class:`plotly.graph_objects.layout.Mapbox` + instance or dict with compatible properties + margin + :class:`plotly.graph_objects.layout.Margin` + instance or dict with compatible properties + meta + Assigns extra meta information that can be used + in various `text` attributes. Attributes such + as the graph, axis and colorbar `title.text`, + annotation `text` `trace.name` in legend items, + `rangeselector`, `updatemenus` and `sliders` + `label` text all support `meta`. One can access + `meta` fields using template strings: + `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an + object for example `{key: value}` which can be + accessed %{meta[key]}. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + modebar + :class:`plotly.graph_objects.layout.Modebar` + instance or dict with compatible properties + orientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Rotates the entire + polar by the given angle in legacy polar + charts. + paper_bgcolor + Sets the background color of the paper where + the graph is drawn. + piecolorway + Sets the default pie slice colors. Defaults to + the main `colorway` used for trace colors. If + you specify a new list here it can still be + extended with lighter and darker colors, see + `extendpiecolors`. + plot_bgcolor + Sets the background color of the plotting area + in-between x and y axes. + polar + :class:`plotly.graph_objects.layout.Polar` + instance or dict with compatible properties + radialaxis + :class:`plotly.graph_objects.layout.RadialAxis` + instance or dict with compatible properties + scene + :class:`plotly.graph_objects.layout.Scene` + instance or dict with compatible properties + selectdirection + When "dragmode" is set to "select", this limits + the selection of the drag to horizontal, + vertical or diagonal. "h" only allows + horizontal selection, "v" only vertical, "d" + only diagonal and "any" sets no limit. + selectionrevision + Controls persistence of user-driven changes in + selected points from all traces. + separators + Sets the decimal and thousand separators. For + example, *. * puts a '.' before decimals and a + space between thousands. In English locales, + dflt is ".," but other locales may alter this + default. + shapes + A tuple of + :class:`plotly.graph_objects.layout.Shape` + instances or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the + default property values to use for elements of + layout.shapes + showlegend + Determines whether or not a legend is drawn. + Default is `true` if there is a trace to show + and any of these: a) Two or more traces would + by default be shown in the legend. b) One pie + trace is shown in the legend. c) One trace is + explicitly given with `showlegend: true`. + sliders + A tuple of + :class:`plotly.graph_objects.layout.Slider` + instances or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets + the default property values to use for elements + of layout.sliders + spikedistance + Sets the default distance (in pixels) to look + for data to draw spikelines to (-1 means no + cutoff, 0 means no looking for data). As with + hoverdistance, distance does not apply to area- + like objects. In addition, some objects can be + hovered on but will not generate spikelines, + such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. + Defaults to the main `colorway` used for trace + colors. If you specify a new list here it can + still be extended with lighter and darker + colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. + This should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: + [traceTemplate, ...], ...}}` where + `layoutTemplate` is a dict matching the + structure of `figure.layout` and + `traceTemplate` is a dict matching the + structure of the trace with type `trace_type` + (e.g. 'scatter'). Alternatively, this may be + specified as an instance of + plotly.graph_objs.layout.Template. 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 this can be used to add 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`. + ternary + :class:`plotly.graph_objects.layout.Ternary` + instance or dict with compatible properties + title + :class:`plotly.graph_objects.layout.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.title.font + instead. Sets the title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + transition + Sets transition options used during + Plotly.react updates. + treemapcolorway + Sets the default treemap slice colors. Defaults + to the main `colorway` used for trace colors. + If you specify a new list here it can still be + extended with lighter and darker colors, see + `extendtreemapcolors`. + uirevision + Used to allow user interactions with the plot + to persist after `Plotly.react` calls that are + unaware of these interactions. If `uirevision` + is omitted, or if it is given and it changed + from the previous `Plotly.react` call, the + exact new figure is used. If `uirevision` is + truthy and did NOT change, any attribute that + has been affected by user interactions and did + not receive a different value in the new figure + will keep the interaction value. + `layout.uirevision` attribute serves as the + default for `uirevision` attributes in various + sub-containers. For finer control you can set + these sub-attributes directly. For example, if + your app separately controls the data on the x + and y axes you might set + `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y + data is changed, you can update + `yaxis.uirevision=*quantity*` and the y axis + range will reset but the x axis range will + retain any user-driven zoom. + uniformtext + :class:`plotly.graph_objects.layout.Uniformtext + ` instance or dict with compatible properties + updatemenus + A tuple of + :class:`plotly.graph_objects.layout.Updatemenu` + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), + sets the default property values to use for + elements of layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins + of adjacent location coordinates. Has no effect + on traces that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins + of the same location coordinate. Has no effect + on traces that have "width" set. + violinmode + Determines how violins at the same location + coordinate are displayed on the graph. If + "group", the violins are plotted next to one + another centered around the shared location. If + "overlay", the violins are plotted over one + another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces + that have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of + the same location coordinate. + waterfallmode + Determines how bars at the same location + coordinate are displayed on the graph. With + "group", the bars are plotted next to one + another centered around the shared location. + With "overlay", the bars are plotted over one + another, you might need to an "opacity" to see + multiple bars. + width + Sets the plot's width (in px). + xaxis + :class:`plotly.graph_objects.layout.XAxis` + instance or dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.YAxis` + instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_mesh3d.py b/packages/python/plotly/plotly/validators/_mesh3d.py new file mode 100644 index 00000000000..56e90bed1a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_mesh3d.py @@ -0,0 +1,369 @@ +import _plotly_utils.basevalidators + + +class Mesh3DValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="mesh3d", parent_name="", **kwargs): + super(Mesh3DValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Mesh3d"), + data_docs=kwargs.pop( + "data_docs", + """ + alphahull + Determines how the mesh surface triangles are + derived from the set of vertices (points) + represented by the `x`, `y` and `z` arrays, if + the `i`, `j`, `k` arrays are not supplied. For + general use of `mesh3d` it is preferred that + `i`, `j`, `k` are supplied. If "-1", Delaunay + triangulation is used, which is mainly suitable + if the mesh is a single, more or less layer + surface that is perpendicular to + `delaunayaxis`. In case the `delaunayaxis` + intersects the mesh surface at more than one + point it will result triangles that are very + long in the dimension of `delaunayaxis`. If + ">0", the alpha-shape algorithm is used. In + this case, the positive `alphahull` value + signals the use of the alpha-shape algorithm, + _and_ its value acts as the parameter for the + mesh fitting. If 0, the convex-hull algorithm + is used. It is suitable for convex bodies or if + the intention is to enclose the `x`, `y` and + `z` point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + `intensity`) or the bounds set in `cmin` and + `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as `intensity` and + if set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as `intensity`. Has no effect when `cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as `intensity` and + if set, `cmax` must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.mesh3d.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + delaunayaxis + Sets the Delaunay axis, which is the axis that + is perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, + `k` are not provided and `alphahull` is set to + indicate Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" + and "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud + for facecolor . + flatshading + Determines whether or not normal smoothing is + applied to the meshes, creating meshes with an + angular, low-poly look via flat reflections. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + i + A vector of vertex indices, i.e. integer values + between 0 and the length of the vertex vectors, + representing the "first" vertex of a triangle. + For example, `{i[m], j[m], k[m]}` together + represent face m (triangle m) in the mesh, + where `i[m] = n` points to the triplet `{x[n], + y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in + space, which is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + intensity + Sets the intensity values for vertices or cells + as defined by `intensitymode`. It can be used + for plotting fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud + for intensity . + isrc + Sets the source reference on Chart Studio Cloud + for i . + j + A vector of vertex indices, i.e. integer values + between 0 and the length of the vertex vectors, + representing the "second" vertex of a triangle. + For example, `{i[m], j[m], k[m]}` together + represent face m (triangle m) in the mesh, + where `j[m] = n` points to the triplet `{x[n], + y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in + space, which is the second vertex of a + triangle. + jsrc + Sets the source reference on Chart Studio Cloud + for j . + k + A vector of vertex indices, i.e. integer values + between 0 and the length of the vertex vectors, + representing the "third" vertex of a triangle. + For example, `{i[m], j[m], k[m]}` together + represent face m (triangle m) in the mesh, + where `k[m] = n` points to the triplet `{x[n], + y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in + space, which is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud + for k . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightpositi + on` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the surface. Please note + that in the case of using high `opacity` values + for example a value greater than or equal to + 0.5 on two surfaces (and 0.25 with four + surfaces), an overlay of multiple transparent + surfaces may not perfectly be sorted in depth + by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with the + vertices. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides + "color". While Red, green and blue colors are + in the range of 0 and 255; in the case of + having vertex color data in RGBA format, the + alpha color should be normalized to be between + 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud + for vertexcolor . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the X coordinates of the vertices. The nth + element of vectors `x`, `y` and `z` jointly + represent the X, Y and Z coordinates of the nth + vertex. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the Y coordinates of the vertices. The nth + element of vectors `x`, `y` and `z` jointly + represent the X, Y and Z coordinates of the nth + vertex. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the Z coordinates of the vertices. The nth + element of vectors `x`, `y` and `z` jointly + represent the X, Y and Z coordinates of the nth + vertex. + zcalendar + Sets the calendar system to use with `z` date + data. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_ohlc.py b/packages/python/plotly/plotly/validators/_ohlc.py new file mode 100644 index 00000000000..64f3b890423 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_ohlc.py @@ -0,0 +1,184 @@ +import _plotly_utils.basevalidators + + +class OhlcValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="ohlc", parent_name="", **kwargs): + super(OhlcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Ohlc"), + data_docs=kwargs.pop( + "data_docs", + """ + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud + for close . + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud + for high . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` + instance or dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + increasing + :class:`plotly.graph_objects.ohlc.Increasing` + instance or dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.ohlc.Line` + instance or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud + for low . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud + for open . + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each + sample point. If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + tickwidth + Sets the width of the open/close tick marks + relative to the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. If absent, linear + coordinate will be generated. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_parcats.py b/packages/python/plotly/plotly/validators/_parcats.py new file mode 100644 index 00000000000..2b7607ebf14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_parcats.py @@ -0,0 +1,154 @@ +import _plotly_utils.basevalidators + + +class ParcatsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="parcats", parent_name="", **kwargs): + super(ParcatsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Parcats"), + data_docs=kwargs.pop( + "data_docs", + """ + arrangement + Sets the drag interaction mode for categories + and dimensions. If `perpendicular`, the + categories can only move along a line + perpendicular to the paths. If `freeform`, the + categories can freely move on the plane. If + `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled + together within each category. + counts + The number of observations represented by each + state. Defaults to 1 so that each state + represents one observation + countssrc + Sets the source reference on Chart Studio Cloud + for counts . + dimensions + The dimensions (variables) of the parallel + categories diagram. + dimensiondefaults + When used in a template (as layout.template.dat + a.parcats.dimensiondefaults), sets the default + property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take + place per category. If `color`, hover + interactions take place per color per category. + If `dimension`, hover interactions take place + across all categories per dimension. + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `count`, `probability`, `category`, + `categorycount`, `colorcount` and + `bandcolorcount`. Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + labelfont + Sets the font for the `dimension` labels. + line + :class:`plotly.graph_objects.parcats.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, + sort paths based on dimension categories from + left to right. If `backward`, sort paths based + on dimensions categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` + instance or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_parcoords.py b/packages/python/plotly/plotly/validators/_parcoords.py new file mode 100644 index 00000000000..c7d03a66cfa --- /dev/null +++ b/packages/python/plotly/plotly/validators/_parcoords.py @@ -0,0 +1,122 @@ +import _plotly_utils.basevalidators + + +class ParcoordsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="parcoords", parent_name="", **kwargs): + super(ParcoordsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Parcoords"), + data_docs=kwargs.pop( + "data_docs", + """ + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dimensions + The dimensions (variables) of the parallel + coordinates chart. 2..60 dimensions are + supported. + dimensiondefaults + When used in a template (as layout.template.dat + a.parcoords.dimensiondefaults), sets the + default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + labelangle + Sets the angle of the labels with respect to + the horizontal. For example, a `tickangle` of + -90 draws the labels vertically. Tilted labels + with "labelangle" may be positioned better + inside margins when `labelposition` is set to + "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" + positions labels above, next to the title + "bottom" positions labels below the graph + Tilted labels with "labelangle" may be + positioned better inside margins when + `labelposition` is set to "bottom". + line + :class:`plotly.graph_objects.parcoords.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` + instance or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_pie.py b/packages/python/plotly/plotly/validators/_pie.py new file mode 100644 index 00000000000..7d00a988fc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_pie.py @@ -0,0 +1,283 @@ +import _plotly_utils.basevalidators + + +class PieValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pie", parent_name="", **kwargs): + super(PieValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pie"), + data_docs=kwargs.pop( + "data_docs", + """ + automargin + Determines whether outside text labels can push + the margins. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + direction + Specifies the direction at which succeeding + sectors follow one another. + dlabel + Sets the label step. See `label0` for more + info. + domain + :class:`plotly.graph_objects.pie.Domain` + instance or dict with compatible properties + hole + Sets the fraction of the radius to cut out of + the pie. Use this to make a donut chart. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `label`, `color`, `value`, `percent` + and `text`. Anything contained in tag `` + is displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + sector. If a single string, the same string + appears for all data points. If an array of + string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` + must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + insidetextfont + Sets the font used for `textinfo` lying inside + the sector. + insidetextorientation + Controls the orientation of the text inside + chart sectors. When set to "auto", text may be + oriented in any direction in order to be as big + as possible in the middle of a sector. The + "horizontal" option orients text to be parallel + with the bottom of the chart, and may make text + smaller in order to achieve that goal. The + "radial" option orients text along the radius + of the sector. The "tangential" option orients + text perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of + labels. Use with `dlabel` where `label0` is the + starting label and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or + simply count occurrences if `values` is not + provided. For other array attributes (including + color) we use the first non-empty entry among + all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud + for labels . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.pie.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside + the sector. + pull + Sets the fraction of larger radius to pull the + sectors out from the center. This can be a + constant to pull all slices apart from each + other equally or an array to highlight one or + more slices. + pullsrc + Sets the source reference on Chart Studio Cloud + for pull . + rotation + Instead of the first slice starting at 12 + o'clock, rotate to some other angle. + scalegroup + If there are multiple pie charts that should be + sized according to their totals, link them by + providing a non-empty group id here shared by + every trace in the same group. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + sort + Determines whether or not the sectors are + reordered from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. + If trace `textinfo` contains a "text" flag, + these elements will be seen on the chart. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on + the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, + `percent` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + title + :class:`plotly.graph_objects.pie.Title` + instance or dict with compatible properties + titlefont + Deprecated: Please use pie.title.font instead. + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleposition + Deprecated: Please use pie.title.position + instead. Specifies the location of the `title`. + Note that the title's position used to be set + by the now deprecated `titleposition` + attribute. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we + count occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_pointcloud.py b/packages/python/plotly/plotly/validators/_pointcloud.py new file mode 100644 index 00000000000..6a39b4584e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_pointcloud.py @@ -0,0 +1,185 @@ +import _plotly_utils.basevalidators + + +class PointcloudValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pointcloud", parent_name="", **kwargs): + super(PointcloudValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pointcloud"), + data_docs=kwargs.pop( + "data_docs", + """ + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.pointcloud.Hoverla + bel` instance or dict with compatible + properties + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + indices + A sequential value, 0..n, supply it to avoid + creating this array inside plotting. If + specified, it must be a typed `Int32Array` + array. Its length must be equal to or greater + than the number of points. For the best + performance and memory use, create one large + `indices` typed array that is guaranteed to be + at least as long as the largest number of + points during use, and reuse it on each + `Plotly.restyle()` call. + indicessrc + Sets the source reference on Chart Studio Cloud + for indices . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.pointcloud.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.pointcloud.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xbounds + Specify `xbounds` in the shape of `[xMin, xMax] + to avoid looping through the `xy` typed array. + Use it in conjunction with `xy` and `ybounds` + for the performance benefits. + xboundssrc + Sets the source reference on Chart Studio Cloud + for xbounds . + xsrc + Sets the source reference on Chart Studio Cloud + for x . + xy + Faster alternative to specifying `x` and `y` + separately. If supplied, it must be a typed + `Float32Array` array that represents points + such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] + = y[i]` + xysrc + Sets the source reference on Chart Studio Cloud + for xy . + y + Sets the y coordinates. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ybounds + Specify `ybounds` in the shape of `[yMin, yMax] + to avoid looping through the `xy` typed array. + Use it in conjunction with `xy` and `xbounds` + for the performance benefits. + yboundssrc + Sets the source reference on Chart Studio Cloud + for ybounds . + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_sankey.py b/packages/python/plotly/plotly/validators/_sankey.py new file mode 100644 index 00000000000..f48ac76f0a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_sankey.py @@ -0,0 +1,138 @@ +import _plotly_utils.basevalidators + + +class SankeyValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="sankey", parent_name="", **kwargs): + super(SankeyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Sankey"), + data_docs=kwargs.pop( + "data_docs", + """ + arrangement + If value is `snap` (the default), the node + arrangement is assisted by automatic snapping + of elements to preserve space between nodes + specified via `nodepad`. If value is + `perpendicular`, the nodes can only move along + a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the + plane. If value is `fixed`, the nodes are + stationary. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + domain + :class:`plotly.graph_objects.sankey.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. Note that this attribute is superseded + by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` + instance or dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + valuesuffix + Adds a unit to follow the value in the hover + tooltip. Add a space if a separation is + necessary from the value. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scatter.py b/packages/python/plotly/plotly/validators/_scatter.py new file mode 100644 index 00000000000..d738cc90221 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scatter.py @@ -0,0 +1,385 @@ +import _plotly_utils.basevalidators + + +class ScatterValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scatter", parent_name="", **kwargs): + super(ScatterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatter"), + data_docs=kwargs.pop( + "data_docs", + """ + cliponaxis + Determines whether or not markers and text + nodes are clipped about the subplot axes. To + show markers and text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` + and `yaxis.layer` to *below traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` + instance or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` + instance or dict with compatible properties + fill + Sets the area to fill with a solid color. + Defaults to "none" unless this trace is + stacked, then it gets "tonexty" ("tonextx") if + `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to + x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this + trace and the endpoints of the trace before it, + connecting those endpoints with straight lines + (to make a stacked area graph); if there is no + trace before it, they behave like "tozerox" and + "tozeroy". "toself" connects the endpoints of + the trace (or each segment of the trace if it + has gaps) into a closed shape. "tonext" fills + the space between two traces if one completely + encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is + no trace before it. "tonext" should not be used + if one trace does not enclose the other. Traces + in a `stackgroup` will only fill to (or be + filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked + and some not, if fill-linked traces are not + already consecutive, the later ones will be + pushed down in the drawing order. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + groupnorm + Only relevant when `stackgroup` is used, and + only the first `groupnorm` found in the + `stackgroup` will be used - including if + `visible` is "legendonly" but not if it is + `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value + of each trace at each location is divided by + the sum of all trace values at that location. + "percent" is the same but multiplied by 100 to + show percentages. If there are multiple + subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own + set. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel + ` instance or dict with compatible properties + hoveron + Do the hover effects highlight individual + points (markers or line points) or do they + highlight filled regions? If the fill is + "toself" or "tonext" and there are no markers + or text, then the default is "fills", otherwise + it is "points". + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scatter.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + orientation + Only relevant when `stackgroup` is used, and + only the first `orientation` found in the + `stackgroup` will be used - including if + `visible` is "legendonly" but not if it is + `false`. Sets the stacking direction. With "v" + ("h"), the y (x) values of subsequent traces + are added. Also affects the default value of + `fill`. + r + r coordinates in scatter traces are + deprecated!Please switch to the "scatterpolar" + trace type.Sets the radial coordinatesfor + legacy polar chart only. + rsrc + Sets the source reference on Chart Studio Cloud + for r . + selected + :class:`plotly.graph_objects.scatter.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and + only the first `stackgaps` found in the + `stackgroup` will be used - including if + `visible` is "legendonly" but not if it is + `false`. Determines how we handle locations at + which other traces in this group have data but + this one does not. With *infer zero* we insert + a zero at these locations. With "interpolate" + we linearly interpolate between existing + values, and extrapolate a constant beyond the + existing values. + stackgroup + Set several scatter traces (on the same + subplot) to the same stackgroup in order to add + their y values (or their x values if + `orientation` is "h"). If blank or omitted this + trace will not be stacked. Stacking also turns + `fill` on by default, using "tonexty" + ("tonextx") if `orientation` is "h" ("v") and + sets the default `mode` to "lines" irrespective + of point count. You can only stack on a numeric + (linear or log) axis. Traces in a `stackgroup` + will only fill to (or be filled to) other + traces in the same group. With multiple + `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already + consecutive, the later ones will be pushed down + in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` + instance or dict with compatible properties + t + t coordinates in scatter traces are + deprecated!Please switch to the "scatterpolar" + trace type.Sets the angular coordinatesfor + legacy polar chart only. + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + tsrc + Sets the source reference on Chart Studio Cloud + for t . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected + ` instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scatter3d.py b/packages/python/plotly/plotly/validators/_scatter3d.py new file mode 100644 index 00000000000..8c58de59b0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scatter3d.py @@ -0,0 +1,261 @@ +import _plotly_utils.basevalidators + + +class Scatter3DValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scatter3d", parent_name="", **kwargs): + super(Scatter3DValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatter3d"), + data_docs=kwargs.pop( + "data_docs", + """ + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` + instance or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` + instance or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlab + el` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y,z) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scatter3d.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projecti + on` instance or dict with compatible properties + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` + instance or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a + surface If 0, 1, 2, the scatter points are + filled with a Delaunay surface about the x, y, + z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y,z) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + :class:`plotly.graph_objects.scatter3d.Textfont + ` instance or dict with compatible properties + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date + data. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scattercarpet.py b/packages/python/plotly/plotly/validators/_scattercarpet.py new file mode 100644 index 00000000000..e5d92aa1bca --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scattercarpet.py @@ -0,0 +1,278 @@ +import _plotly_utils.basevalidators + + +class ScattercarpetValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scattercarpet", parent_name="", **kwargs): + super(ScattercarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattercarpet"), + data_docs=kwargs.pop( + "data_docs", + """ + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud + for a . + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud + for b . + carpet + An identifier for this carpet, so that + `scattercarpet` and `contourcarpet` traces can + specify a carpet plot on which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + fill + Sets the area to fill with a solid color. Use + with `fillcolor` if not "none". scatterternary + has a subset of the options available to + scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the + space between two traces if one completely + encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is + no trace before it. "tonext" should not be used + if one trace does not enclose the other. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hove + rlabel` instance or dict with compatible + properties + hoveron + Do the hover effects highlight individual + points (markers or line points) or do they + highlight filled regions? If the fill is + "toself" or "tonext" and there are no markers + or text, then the default is "fills", otherwise + it is "points". + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (a,b) point. If a single string, the same + string appears over all the data points. If an + array of strings, the items are mapped in order + to the the data points in (a,b). To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scattercarpet.Line + ` instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Mark + er` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Sele + cted` instance or dict with compatible + properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stre + am` instance or dict with compatible properties + text + Sets text elements associated with each (a,b) + point. If a single string, the same string + appears over all the data points. If an array + of strings, the items are mapped in order to + the the data points in (a,b). If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `a`, `b` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unse + lected` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scattergeo.py b/packages/python/plotly/plotly/validators/_scattergeo.py new file mode 100644 index 00000000000..646a7bda6df --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scattergeo.py @@ -0,0 +1,291 @@ +import _plotly_utils.basevalidators + + +class ScattergeoValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scattergeo", parent_name="", **kwargs): + super(ScattergeoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattergeo"), + data_docs=kwargs.pop( + "data_docs", + """ + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + featureidkey + Sets the key in GeoJSON features which is used + as id to match the items included in the + `locations` array. Only has an effect when + `geojson` is set. Support nested property, for + example "properties.name". + fill + Sets the area to fill with a solid color. Use + with `fillcolor` if not "none". "toself" + connects the endpoints of the trace (or each + segment of the trace if it has gaps) into a + closed shape. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + geo + Sets a reference between this trace's + geospatial coordinates and a geographic map. If + "geo" (the default value), the geospatial + coordinates refer to `layout.geo`. If "geo2", + the geospatial coordinates refer to + `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this + trace. If not given, the features on the base + map are used when `locations` is set. It can be + set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of + type "FeatureCollection" or "Feature" with + geometries of type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverla + bel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (lon,lat) pair or item in `locations`. If a + single string, the same string appears over all + the data points. If an array of string, the + items are mapped in order to the this trace's + (lon,lat) or `locations` coordinates. To be + seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + lat + Sets the latitude coordinates (in degrees + North). + latsrc + Sets the source reference on Chart Studio Cloud + for lat . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scattergeo.Line` + instance or dict with compatible properties + locationmode + Determines the set of locations used to match + entries in `locations` to regions on the map. + Values "ISO-3", "USA-states", *country names* + correspond to features on the base map and + value "geojson-id" corresponds to features from + a custom GeoJSON linked to the `geojson` + attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each + location given. See `locationmode` for more + info. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + lon + Sets the longitude coordinates (in degrees + East). + lonsrc + Sets the source reference on Chart Studio Cloud + for lon . + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selecte + d` instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each + (lon,lat) pair or item in `locations`. If a + single string, the same string appears over all + the data points. If an array of string, the + items are mapped in order to the this trace's + (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon`, `location` + and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselec + ted` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scattergl.py b/packages/python/plotly/plotly/validators/_scattergl.py new file mode 100644 index 00000000000..a45ca1043e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scattergl.py @@ -0,0 +1,299 @@ +import _plotly_utils.basevalidators + + +class ScatterglValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scattergl", parent_name="", **kwargs): + super(ScatterglValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattergl"), + data_docs=kwargs.pop( + "data_docs", + """ + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` + instance or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` + instance or dict with compatible properties + fill + Sets the area to fill with a solid color. + Defaults to "none" unless this trace is + stacked, then it gets "tonexty" ("tonextx") if + `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to + x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this + trace and the endpoints of the trace before it, + connecting those endpoints with straight lines + (to make a stacked area graph); if there is no + trace before it, they behave like "tozerox" and + "tozeroy". "toself" connects the endpoints of + the trace (or each segment of the trace if it + has gaps) into a closed shape. "tonext" fills + the space between two traces if one completely + encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is + no trace before it. "tonext" should not be used + if one trace does not enclose the other. Traces + in a `stackgroup` will only fill to (or be + filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked + and some not, if fill-linked traces are not + already consecutive, the later ones will be + pushed down in the drawing order. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlab + el` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scattergl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected + ` instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselect + ed` instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scattermapbox.py b/packages/python/plotly/plotly/validators/_scattermapbox.py new file mode 100644 index 00000000000..bab25d74807 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scattermapbox.py @@ -0,0 +1,263 @@ +import _plotly_utils.basevalidators + + +class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs): + super(ScattermapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattermapbox"), + data_docs=kwargs.pop( + "data_docs", + """ + below + Determines if this scattermapbox trace's layers + are to be inserted before the layer with the + specified ID. By default, scattermapbox layers + are inserted above all the base layers. To + place the scattermapbox layers above every + other layer, set `below` to "''". + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + fill + Sets the area to fill with a solid color. Use + with `fillcolor` if not "none". "toself" + connects the endpoints of the trace (or each + segment of the trace if it has gaps) into a + closed shape. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hove + rlabel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (lon,lat) pair If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to the this trace's (lon,lat) coordinates. To + be seen, trace `hoverinfo` must contain a + "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + lat + Sets the latitude coordinates (in degrees + North). + latsrc + Sets the source reference on Chart Studio Cloud + for lat . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scattermapbox.Line + ` instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees + East). + lonsrc + Sets the source reference on Chart Studio Cloud + for lon . + marker + :class:`plotly.graph_objects.scattermapbox.Mark + er` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Sele + cted` instance or dict with compatible + properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stre + am` instance or dict with compatible properties + subplot + Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" + (the default value), the data refer to + `layout.mapbox`. If "mapbox2", the data refer + to `layout.mapbox2`, and so on. + text + Sets text elements associated with each + (lon,lat) pair If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to the this trace's (lon,lat) coordinates. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + 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. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unse + lected` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scatterpolar.py b/packages/python/plotly/plotly/validators/_scatterpolar.py new file mode 100644 index 00000000000..e64a05e76b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scatterpolar.py @@ -0,0 +1,292 @@ +import _plotly_utils.basevalidators + + +class ScatterpolarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scatterpolar", parent_name="", **kwargs): + super(ScatterpolarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatterpolar"), + data_docs=kwargs.pop( + "data_docs", + """ + cliponaxis + Determines whether or not markers and text + nodes are clipped about the subplot axes. To + show markers and text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` + and `yaxis.layer` to *below traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period + divided by the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use + with `fillcolor` if not "none". scatterpolar + has a subset of the options available to + scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the + space between two traces if one completely + encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is + no trace before it. "tonext" should not be used + if one trace does not enclose the other. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hover + label` instance or dict with compatible + properties + hoveron + Do the hover effects highlight individual + points (markers or line points) or do they + highlight filled regions? If the fill is + "toself" or "tonext" and there are no markers + or text, then the default is "fills", otherwise + it is "points". + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marke + r` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the + starting coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud + for r . + selected + :class:`plotly.graph_objects.scatterpolar.Selec + ted` instance or dict with compatible + properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Strea + m` instance or dict with compatible properties + subplot + Sets a reference between this trace's data + coordinates and a polar subplot. If "polar" + (the default value), the data refer to + `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of + theta coordinates. Use with `dtheta` where + `theta0` is the starting coordinate and + `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud + for theta . + thetaunit + Sets the unit of input "theta" values. Has an + effect only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unsel + ected` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scatterpolargl.py b/packages/python/plotly/plotly/validators/_scatterpolargl.py new file mode 100644 index 00000000000..30e377caa8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scatterpolargl.py @@ -0,0 +1,295 @@ +import _plotly_utils.basevalidators + + +class ScatterpolarglValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scatterpolargl", parent_name="", **kwargs): + super(ScatterpolarglValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatterpolargl"), + data_docs=kwargs.pop( + "data_docs", + """ + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period + divided by the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. + Defaults to "none" unless this trace is + stacked, then it gets "tonexty" ("tonextx") if + `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to + x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this + trace and the endpoints of the trace before it, + connecting those endpoints with straight lines + (to make a stacked area graph); if there is no + trace before it, they behave like "tozerox" and + "tozeroy". "toself" connects the endpoints of + the trace (or each segment of the trace if it + has gaps) into a closed shape. "tonext" fills + the space between two traces if one completely + encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is + no trace before it. "tonext" should not be used + if one trace does not enclose the other. Traces + in a `stackgroup` will only fill to (or be + filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked + and some not, if fill-linked traces are not + already consecutive, the later ones will be + pushed down in the drawing order. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hov + erlabel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scatterpolargl.Lin + e` instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Mar + ker` instance or dict with compatible + properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the + starting coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud + for r . + selected + :class:`plotly.graph_objects.scatterpolargl.Sel + ected` instance or dict with compatible + properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Str + eam` instance or dict with compatible + properties + subplot + Sets a reference between this trace's data + coordinates and a polar subplot. If "polar" + (the default value), the data refer to + `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of + theta coordinates. Use with `dtheta` where + `theta0` is the starting coordinate and + `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud + for theta . + thetaunit + Sets the unit of input "theta" values. Has an + effect only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Uns + elected` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_scatterternary.py b/packages/python/plotly/plotly/validators/_scatterternary.py new file mode 100644 index 00000000000..4d139f11fbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/_scatterternary.py @@ -0,0 +1,303 @@ +import _plotly_utils.basevalidators + + +class ScatterternaryValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scatterternary", parent_name="", **kwargs): + super(ScatterternaryValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatterternary"), + data_docs=kwargs.pop( + "data_docs", + """ + a + Sets the quantity of component `a` in each data + point. If `a`, `b`, and `c` are all provided, + they need not be normalized, only the relative + values matter. If only two arrays are provided + they must be normalized to match + `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud + for a . + b + Sets the quantity of component `a` in each data + point. If `a`, `b`, and `c` are all provided, + they need not be normalized, only the relative + values matter. If only two arrays are provided + they must be normalized to match + `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud + for b . + c + Sets the quantity of component `a` in each data + point. If `a`, `b`, and `c` are all provided, + they need not be normalized, only the relative + values matter. If only two arrays are provided + they must be normalized to match + `ternary.sum`. + cliponaxis + Determines whether or not markers and text + nodes are clipped about the subplot axes. To + show markers and text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` + and `yaxis.layer` to *below traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the provided data arrays are + connected. + csrc + Sets the source reference on Chart Studio Cloud + for c . + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + fill + Sets the area to fill with a solid color. Use + with `fillcolor` if not "none". scatterternary + has a subset of the options available to + scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the + space between two traces if one completely + encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is + no trace before it. "tonext" should not be used + if one trace does not enclose the other. + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hov + erlabel` instance or dict with compatible + properties + hoveron + Do the hover effects highlight individual + points (markers or line points) or do they + highlight filled regions? If the fill is + "toself" or "tonext" and there are no markers + or text, then the default is "fills", otherwise + it is "points". + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (a,b,c) point. If a single string, the same + string appears over all the data points. If an + array of strings, the items are mapped in order + to the the data points in (a,b,c). To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.scatterternary.Lin + e` instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Mar + ker` instance or dict with compatible + properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + mode + Determines the drawing mode for this scatter + trace. If the provided `mode` includes "text" + then the `text` elements appear at the + coordinates. Otherwise, the `text` elements + appear on hover. If there are less than 20 + points and the trace is not stacked then the + default is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Sel + ected` instance or dict with compatible + properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Str + eam` instance or dict with compatible + properties + subplot + Sets a reference between this trace's data + coordinates and a ternary subplot. If "ternary" + (the default value), the data refer to + `layout.ternary`. If "ternary2", the data refer + to `layout.ternary2`, and so on. + sum + The number each triplet should sum to, if only + two of `a`, `b`, and `c` are provided. This + overrides `ternary.sum` to normalize this + specific trace, but does not affect the values + displayed on the axes. 0 (or missing) means to + use ternary.sum + text + Sets text elements associated with each (a,b,c) + point. If a single string, the same string + appears over all the data points. If an array + of strings, the items are mapped in order to + the the data points in (a,b,c). If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with + respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `a`, `b`, `c` and `text`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Uns + elected` instance or dict with compatible + properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_splom.py b/packages/python/plotly/plotly/validators/_splom.py new file mode 100644 index 00000000000..a41a52f3e8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/_splom.py @@ -0,0 +1,208 @@ +import _plotly_utils.basevalidators + + +class SplomValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="splom", parent_name="", **kwargs): + super(SplomValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Splom"), + data_docs=kwargs.pop( + "data_docs", + """ + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + diagonal + :class:`plotly.graph_objects.splom.Diagonal` + instance or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` + instances or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), + sets the default property values to use for + elements of splom.dimensions + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + marker + :class:`plotly.graph_objects.splom.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower + half from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper + half from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) + pair to appear on hover. If a single string, + the same string appears over all the data + points. If an array of string, the items are + mapped in order to the this trace's (x,y) + coordinates. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + xaxes + Sets the list of x axes corresponding to + dimensions of this splom trace. By default, a + splom will match the first N xaxes where N is + the number of input dimensions. Note that, in + case where `diagonal.visible` is false and + `showupperhalf` or `showlowerhalf` is false, + this splom trace will generate one less x-axis + and one less y-axis. + yaxes + Sets the list of y axes corresponding to + dimensions of this splom trace. By default, a + splom will match the first N yaxes where N is + the number of input dimensions. Note that, in + case where `diagonal.visible` is false and + `showupperhalf` or `showlowerhalf` is false, + this splom trace will generate one less x-axis + and one less y-axis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_streamtube.py b/packages/python/plotly/plotly/validators/_streamtube.py new file mode 100644 index 00000000000..6a6d367f394 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_streamtube.py @@ -0,0 +1,274 @@ +import _plotly_utils.basevalidators + + +class StreamtubeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="streamtube", parent_name="", **kwargs): + super(StreamtubeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Streamtube"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + u/v/w norm) or the bounds set in `cmin` and + `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as u/v/w norm and if + set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as u/v/w norm. Has no effect when `cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as u/v/w norm and if + set, `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverla + bel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `tubex`, `tubey`, `tubez`, `tubeu`, + `tubev`, `tubew`, `norm` and `divergence`. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lighting + :class:`plotly.graph_objects.streamtube.Lightin + g` instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightpo + sition` instance or dict with compatible + properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the surface. Please note + that in the case of using high `opacity` values + for example a value greater than or equal to + 0.5 on two surfaces (and 0.25 with four + surfaces), an overlay of multiple transparent + surfaces may not perfectly be sorted in depth + by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + sizeref + The scaling factor for the streamtubes. The + default is 1, which avoids two max divergence + tubes from touching at adjacent starting + positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. + If trace `hoverinfo` contains a "text" flag, + this text element will be seen in all hover + labels. Note that streamtube traces do not + support array `text` values. + u + Sets the x components of the vector field. + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud + for u . + v + Sets the y components of the vector field. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + vsrc + Sets the source reference on Chart Studio Cloud + for v . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on Chart Studio Cloud + for w . + x + Sets the x coordinates of the vector field. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates of the vector field. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the z coordinates of the vector field. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_sunburst.py b/packages/python/plotly/plotly/validators/_sunburst.py new file mode 100644 index 00000000000..f124b092cda --- /dev/null +++ b/packages/python/plotly/plotly/validators/_sunburst.py @@ -0,0 +1,259 @@ +import _plotly_utils.basevalidators + + +class SunburstValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): + super(SunburstValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Sunburst"), + data_docs=kwargs.pop( + "data_docs", + """ + branchvalues + Determines how the items in `values` are + summed. When set to "total", items in `values` + are taken to be value of all its descendants. + When set to "remainder", items in `values` + corresponding to the root and the branches + sectors are taken to be the extra part not part + of the sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the + "leaves" and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + domain + :class:`plotly.graph_objects.sunburst.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + sector. If a single string, the same string + appears for all data points. If an array of + string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` + must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + insidetextfont + Sets the font used for `textinfo` lying inside + the sector. + insidetextorientation + Controls the orientation of the text inside + chart sectors. When set to "auto", text may be + oriented in any direction in order to be as big + as possible in the middle of a sector. The + "horizontal" option orients text to be parallel + with the bottom of the chart, and may make text + smaller in order to achieve that goal. The + "radial" option orients text along the radius + of the sector. The "tangential" option orients + text perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud + for labels . + leaf + :class:`plotly.graph_objects.sunburst.Leaf` + instance or dict with compatible properties + level + Sets the level from which this trace hierarchy + is rendered. Set `level` to `''` to start from + the root node in the hierarchy. Must be an "id" + if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` + instance or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any + given `level`. Set `maxdepth` to "-1" to render + all the levels in the hierarchy. + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside + the sector. This option refers to the root of + the hierarchy presented at the center of a + sunburst graph. Please note that if a hierarchy + has multiple root nodes, this option won't have + any effect and `insidetextfont` would be used. + parents + Sets the parent sectors for each of the + sectors. Empty string items '' are understood + to reference the root node in the hierarchy. If + `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, + plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud + for parents . + stream + :class:`plotly.graph_objects.sunburst.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. + If trace `textinfo` contains a "text" flag, + these elements will be seen on the chart. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on + the graph. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + values + Sets the values associated with each of the + sectors. Use with `branchvalues` to determine + how the values are summed. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_surface.py b/packages/python/plotly/plotly/validators/_surface.py new file mode 100644 index 00000000000..29f550021df --- /dev/null +++ b/packages/python/plotly/plotly/validators/_surface.py @@ -0,0 +1,289 @@ +import _plotly_utils.basevalidators + + +class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="surface", parent_name="", **kwargs): + super(SurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Surface"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here z + or surfacecolor) or the bounds set in `cmin` + and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as z or surfacecolor + and if set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as z or surfacecolor. Has no effect when + `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as z or surfacecolor + and if set, `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or + missing values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hidesurface + Determines whether or not a surface is drawn. + For example, set `hidesurface` to False + `contours.x.show` to True and `contours.y.show` + to True to draw a wire frame plot. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel + ` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lighting + :class:`plotly.graph_objects.surface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposit + ion` instance or dict with compatible + properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the surface. Please note + that in the case of using high `opacity` values + for example a value greater than or equal to + 0.5 on two surfaces (and 0.25 with four + surfaces), an overlay of multiple transparent + surfaces may not perfectly be sorted in depth + by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be + an array containing arrays mapping a normalized + value to an opacity value. At minimum, a + mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], + [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and + those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette + name string of the following list: 'min', + 'max', 'extremes' and 'uniform'. The default is + 'uniform'. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + stream + :class:`plotly.graph_objects.surface.Stream` + instance or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting + a color scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud + for surfacecolor . + text + Sets the text elements associated with each z + value. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements + will be seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date + data. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date + data. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date + data. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_table.py b/packages/python/plotly/plotly/validators/_table.py new file mode 100644 index 00000000000..24550e463e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_table.py @@ -0,0 +1,124 @@ +import _plotly_utils.basevalidators + + +class TableValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="table", parent_name="", **kwargs): + super(TableValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Table"), + data_docs=kwargs.pop( + "data_docs", + """ + cells + :class:`plotly.graph_objects.table.Cells` + instance or dict with compatible properties + columnorder + Specifies the rendered order of the data + columns; for example, a value `2` at position + `0` means that column index `0` in the data + will be rendered as the third column, as + columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud + for columnorder . + columnwidth + The width of columns expressed as a ratio. + Columns fill the available width in proportion + of their specified column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud + for columnwidth . + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + domain + :class:`plotly.graph_objects.table.Domain` + instance or dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_treemap.py b/packages/python/plotly/plotly/validators/_treemap.py new file mode 100644 index 00000000000..fb23391d8b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_treemap.py @@ -0,0 +1,253 @@ +import _plotly_utils.basevalidators + + +class TreemapValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="treemap", parent_name="", **kwargs): + super(TreemapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Treemap"), + data_docs=kwargs.pop( + "data_docs", + """ + branchvalues + Determines how the items in `values` are + summed. When set to "total", items in `values` + are taken to be value of all its descendants. + When set to "remainder", items in `values` + corresponding to the root and the branches + sectors are taken to be the extra part not part + of the sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the + "leaves" and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + domain + :class:`plotly.graph_objects.treemap.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel + ` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + sector. If a single string, the same string + appears for all data points. If an array of + string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` + must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + insidetextfont + Sets the font used for `textinfo` lying inside + the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud + for labels . + level + Sets the level from which this trace hierarchy + is rendered. Set `level` to `''` to start from + the root node in the hierarchy. Must be an "id" + if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` + instance or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any + given `level`. Set `maxdepth` to "-1" to render + all the levels in the hierarchy. + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside + the sector. This option refers to the root of + the hierarchy presented on top left corner of a + treemap graph. Please note that if a hierarchy + has multiple root nodes, this option won't have + any effect and `insidetextfont` would be used. + parents + Sets the parent sectors for each of the + sectors. Empty string items '' are understood + to reference the root node in the hierarchy. If + `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, + plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud + for parents . + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.treemap.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. + If trace `textinfo` contains a "text" flag, + these elements will be seen on the chart. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on + the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + tiling + :class:`plotly.graph_objects.treemap.Tiling` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + values + Sets the values associated with each of the + sectors. Use with `branchvalues` to determine + how the values are summed. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_violin.py b/packages/python/plotly/plotly/validators/_violin.py new file mode 100644 index 00000000000..decd75e07d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_violin.py @@ -0,0 +1,318 @@ +import _plotly_utils.basevalidators + + +class ViolinValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="violin", parent_name="", **kwargs): + super(ViolinValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Violin"), + data_docs=kwargs.pop( + "data_docs", + """ + alignmentgroup + Set several traces linked to the same position + axis or matching axes to the same + alignmentgroup. This controls whether bars + compute their positional range dependently or + independently. + bandwidth + Sets the bandwidth used to compute the kernel + density estimate. By default, the bandwidth is + determined by Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual + violins or sample points or the kernel density + estimate or any combination of them? + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + jitter + Sets the amount of jitter in the sample points + drawn. If 0, the sample points align along the + distribution axis. If 1, the sample points are + drawn in a random jitter of width equal to the + width of the violins. + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + line + :class:`plotly.graph_objects.violin.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` + instance or dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` + instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. For violin + traces, the name will also be used for the + position coordinate, if `x` and `x0` (`y` and + `y0` if horizontal) are missing and the + position axis is categorical. Note that the + trace name is also used as a default value for + attribute `scalegroup` (please see its + description for details). + offsetgroup + Set several traces linked to the same position + axis or matching axes to the same offsetgroup + where bars of the same position coordinate will + line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" + ("h"), the distribution is visualized along the + vertical (horizontal). + pointpos + Sets the position of the sample points in + relation to the violins. If 0, the sample + points are places over the center of the + violins. Positive (negative) values correspond + to positions to the right (left) for vertical + violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying + outside the whiskers are shown If + "suspectedoutliers", the outlier points are + shown and points either less than 4*Q1-3*Q3 or + greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are + shown If False, only the violins are shown with + no sample points. Defaults to + "suspectedoutliers" when `marker.outliercolor` + or `marker.line.outliercolor` is set, otherwise + defaults to "outliers". + scalegroup + If there are multiple violins that should be + sized according to to some metric (see + `scalemode`), link them by providing a non- + empty group id here shared by every trace in + the same group. If a violin's `width` is + undefined, `scalegroup` will default to the + trace's name. In this case, violins with the + same names will be linked together + scalemode + Sets the metric by which the width of each + violin is determined."width" means each violin + has the same (max) width*count* means the + violins are scaled by the number of sample + points makingup each violin. + selected + :class:`plotly.graph_objects.violin.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + side + Determines on which side of the position value + the density function making up one half of a + violin is plotted. Useful when comparing two + violin traces under "overlay" mode, where one + trace has `side` set to "positive" and the + other to "negative". + span + Sets the span in data space for which the + density function will be computed. Has an + effect only when `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space + where the density function will be computed. + "soft" means the span goes from the sample's + minimum value minus two bandwidths to the + sample's maximum value plus two bandwidths. + "hard" means the span goes from the sample's + minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the + `span` attribute. + stream + :class:`plotly.graph_objects.violin.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each + sample value. If a single string, the same + string appears over all the data points. If an + array of string, the items are mapped in order + to the this trace's (x,y) coordinates. To be + seen, trace `hoverinfo` must contain a "text" + flag. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + width + Sets the width of the violin in data + coordinates. If 0 (default value) the width is + automatically selected based on the positions + of other violin traces in the same subplot. + x + Sets the x sample data or coordinates. See + overview for more info. + x0 + Sets the x coordinate for single-box traces or + the starting coordinate for multi-box traces + set using q1/median/q3. See overview for more + info. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y sample data or coordinates. See + overview for more info. + y0 + Sets the y coordinate for single-box traces or + the starting coordinate for multi-box traces + set using q1/median/q3. See overview for more + info. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_volume.py b/packages/python/plotly/plotly/validators/_volume.py new file mode 100644 index 00000000000..c60583fa82c --- /dev/null +++ b/packages/python/plotly/plotly/validators/_volume.py @@ -0,0 +1,293 @@ +import _plotly_utils.basevalidators + + +class VolumeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="volume", parent_name="", **kwargs): + super(VolumeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Volume"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` + instance or dict with compatible properties + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + `value`) or the bounds set in `cmin` and `cmax` + Defaults to `false` when `cmin` and `cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as `value` and if + set, `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as `value`. Has no effect when `cauto` is + `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as `value` and if + set, `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + contour + :class:`plotly.graph_objects.volume.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + flatshading + Determines whether or not normal smoothing is + applied to the meshes, creating meshes with an + angular, low-poly look via flat reflections. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + lighting + :class:`plotly.graph_objects.volume.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightpositi + on` instance or dict with compatible properties + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the surface. Please note + that in the case of using high `opacity` values + for example a value greater than or equal to + 0.5 on two surfaces (and 0.25 with four + surfaces), an overlay of multiple transparent + surfaces may not perfectly be sorted in depth + by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be + an array containing arrays mapping a normalized + value to an opacity value. At minimum, a + mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], + [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and + those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette + name string of the following list: 'min', + 'max', 'extremes' and 'uniform'. The default is + 'uniform'. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + scene + Sets a reference between this trace's 3D + coordinate system and a 3D scene. If "scene" + (the default value), the (x,y,z) coordinates + refer to `layout.scene`. If "scene2", the + (x,y,z) coordinates refer to `layout.scene2`, + and so on. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is + displayed for this trace. + slices + :class:`plotly.graph_objects.volume.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the + vertices. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud + for text . + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on Chart Studio Cloud + for value . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + x + Sets the X coordinates of the vertices on X + axis. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the Y coordinates of the vertices on Y + axis. + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the Z coordinates of the vertices on Z + axis. + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/_waterfall.py b/packages/python/plotly/plotly/validators/_waterfall.py new file mode 100644 index 00000000000..ad510f14575 --- /dev/null +++ b/packages/python/plotly/plotly/validators/_waterfall.py @@ -0,0 +1,330 @@ +import _plotly_utils.basevalidators + + +class WaterfallValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="waterfall", parent_name="", **kwargs): + super(WaterfallValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Waterfall"), + data_docs=kwargs.pop( + "data_docs", + """ + alignmentgroup + Set several traces linked to the same position + axis or matching axes to the same + alignmentgroup. This controls whether bars + compute their positional range dependently or + independently. + base + Sets where the bar base is drawn (in position + axis units). + cliponaxis + Determines whether the text nodes are clipped + about the subplot axes. To show the text nodes + above axis lines and tick labels, make sure to + set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connector + :class:`plotly.graph_objects.waterfall.Connecto + r` instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a + bar to be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + decreasing + :class:`plotly.graph_objects.waterfall.Decreasi + ng` instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more + info. + dy + Sets the y coordinate step. See `y0` for more + info. + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud + for hoverinfo . + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlab + el` instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `initial`, `delta` and `final`. + Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + hovertext + Sets hover text elements associated with each + (x,y) pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud + for hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud + for ids . + increasing + :class:`plotly.graph_objects.waterfall.Increasi + ng` instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or + start/end points in `textposition` "inside" + mode. + insidetextfont + Sets the font used for `text` lying inside the + bar. + legendgroup + Sets the legend group for this trace. Traces + part of the same legend group hide/show at the + same time when toggling legend items. + measure + An array containing types of values. By default + the values are considered as 'relative'. + However; it is possible to use 'total' to + compute the sums. Also 'absolute' could be + applied to reset the computed total or to + declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud + for measure . + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on Chart Studio Cloud + for meta . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + offset + Shifts the position where the bar is drawn (in + position axis units). In "group" barmode, + traces that set "offset" will be excluded and + drawn in "overlay" mode instead. + offsetgroup + Set several traces linked to the same position + axis or matching axes to the same offsetgroup + where bars of the same position coordinate will + line up. + offsetsrc + Sets the source reference on Chart Studio Cloud + for offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" + ("h"), the value of the each bar spans along + the vertical (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the + bar. + selectedpoints + Array containing integer indices of selected + points. Has an effect only for traces that + support selections. Note that an empty array + means an empty selection where the `unselected` + are turned on for all points, whereas, any + other non-array values means no selection all + where the `selected` and `unselected` styles + have no effect. + showlegend + Determines whether or not an item corresponding + to this trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (x,y) + pair. If a single string, the same string + appears over all the data points. If an array + of string, the items are mapped in order to the + this trace's (x,y) coordinates. If trace + `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textangle + Sets the angle of the tick labels with respect + to the bar. For example, a `tickangle` of -90 + draws the tick labels vertically. With "auto" + the texts may automatically be rotated to fit + with the maximum size in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on + the graph. In the case of having multiple + waterfalls, totals are computed separately (per + trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end + (rotated and scaled if needed). "outside" + positions `text` outside, next to the bar end + (scaled if needed), unless there is another bar + stacked on this one, then the text gets pushed + inside. "auto" tries to position `text` inside + the bar, but if the bar is too small and no bar + is stacked on this one the text is moved + outside. + textpositionsrc + Sets the source reference on Chart Studio Cloud + for textposition . + textsrc + Sets the source reference on Chart Studio Cloud + for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `initial`, `delta`, + `final` and `label`. + texttemplatesrc + Sets the source reference on Chart Studio Cloud + for texttemplate . + totals + :class:`plotly.graph_objects.waterfall.Totals` + instance or dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud + for width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the + starting coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x + coordinates and a 2D cartesian x axis. If "x" + (the default value), the x coordinates refer to + `layout.xaxis`. If "x2", the x coordinates + refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the + starting coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y + coordinates and a 2D cartesian y axis. If "y" + (the default value), the y coordinates refer to + `layout.yaxis`. If "y2", the y coordinates + refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/__init__.py b/packages/python/plotly/plotly/validators/area/__init__.py index 48e62120579..8e48d99f2b5 100644 --- a/packages/python/plotly/plotly/validators/area/__init__.py +++ b/packages/python/plotly/plotly/validators/area/__init__.py @@ -1,405 +1,56 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="area", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="area", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="area", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tsrc", parent_name="area", **kwargs): - super(TsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="t", parent_name="area", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="area", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="area", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="rsrc", parent_name="area", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="r", parent_name="area", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="area", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="area", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="area", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="area", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="area", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets themarkercolor. - It accepts either a specific color or an array - of numbers that are mapped to the colorscale - relative to the max and min values of the array - or relative to `marker.cmin` and `marker.cmax` - if set. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - opacity - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker - opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - size - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker size - (in px). - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker - symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 - is equivalent to appending "-dot" to a symbol - name. Adding 300 is equivalent to appending - "-open-dot" or "dot-open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="area", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="area", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="area", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="area", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="area", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="area", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="area", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="area", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tsrc import TsrcValidator + from ._t import TValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._rsrc import RsrcValidator + from ._r import RValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tsrc.TsrcValidator", + "._t.TValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._rsrc.RsrcValidator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/area/_customdata.py b/packages/python/plotly/plotly/validators/area/_customdata.py new file mode 100644 index 00000000000..c7cdf8f67b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="area", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_customdatasrc.py b/packages/python/plotly/plotly/validators/area/_customdatasrc.py new file mode 100644 index 00000000000..6f2358e3f55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="area", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_hoverinfo.py b/packages/python/plotly/plotly/validators/area/_hoverinfo.py new file mode 100644 index 00000000000..da958d9a47a --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="area", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/area/_hoverinfosrc.py new file mode 100644 index 00000000000..6096e594120 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="area", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_hoverlabel.py b/packages/python/plotly/plotly/validators/area/_hoverlabel.py new file mode 100644 index 00000000000..4deac2c2cec --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="area", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_ids.py b/packages/python/plotly/plotly/validators/area/_ids.py new file mode 100644 index 00000000000..ba649797939 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="area", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_idssrc.py b/packages/python/plotly/plotly/validators/area/_idssrc.py new file mode 100644 index 00000000000..57815552a4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="area", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_legendgroup.py b/packages/python/plotly/plotly/validators/area/_legendgroup.py new file mode 100644 index 00000000000..c0100f73e27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="area", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_marker.py b/packages/python/plotly/plotly/validators/area/_marker.py new file mode 100644 index 00000000000..d7980e8fd8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_marker.py @@ -0,0 +1,52 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="area", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets themarkercolor. + It accepts either a specific color or an array + of numbers that are mapped to the colorscale + relative to the max and min values of the array + or relative to `marker.cmin` and `marker.cmax` + if set. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + opacity + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker + opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + size + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker size + (in px). + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker + symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 + is equivalent to appending "-dot" to a symbol + name. Adding 300 is equivalent to appending + "-open-dot" or "dot-open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_meta.py b/packages/python/plotly/plotly/validators/area/_meta.py new file mode 100644 index 00000000000..2079d6b7042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="area", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_metasrc.py b/packages/python/plotly/plotly/validators/area/_metasrc.py new file mode 100644 index 00000000000..867aacba9bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="area", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_name.py b/packages/python/plotly/plotly/validators/area/_name.py new file mode 100644 index 00000000000..01af0f08da5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="area", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_opacity.py b/packages/python/plotly/plotly/validators/area/_opacity.py new file mode 100644 index 00000000000..7ad96a2b6d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="area", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_r.py b/packages/python/plotly/plotly/validators/area/_r.py new file mode 100644 index 00000000000..67f0e5ac4dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="r", parent_name="area", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_rsrc.py b/packages/python/plotly/plotly/validators/area/_rsrc.py new file mode 100644 index 00000000000..09bdd57b8de --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_rsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="rsrc", parent_name="area", **kwargs): + super(RsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_showlegend.py b/packages/python/plotly/plotly/validators/area/_showlegend.py new file mode 100644 index 00000000000..1a4cdfac3f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="area", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_stream.py b/packages/python/plotly/plotly/validators/area/_stream.py new file mode 100644 index 00000000000..6fd5712fb42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="area", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_t.py b/packages/python/plotly/plotly/validators/area/_t.py new file mode 100644 index 00000000000..6fca3637416 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_t.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="t", parent_name="area", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_tsrc.py b/packages/python/plotly/plotly/validators/area/_tsrc.py new file mode 100644 index 00000000000..5e6e929d52d --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_tsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tsrc", parent_name="area", **kwargs): + super(TsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_uid.py b/packages/python/plotly/plotly/validators/area/_uid.py new file mode 100644 index 00000000000..867610ed6e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="area", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_uirevision.py b/packages/python/plotly/plotly/validators/area/_uirevision.py new file mode 100644 index 00000000000..7b29f0f49c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="area", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/_visible.py b/packages/python/plotly/plotly/validators/area/_visible.py new file mode 100644 index 00000000000..cfeaf721152 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="area", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/area/hoverlabel/__init__.py index 887adbcb1d6..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/area/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/__init__.py @@ -1,174 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="area.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="area.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="area.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="area.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="area.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="area.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="area.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="area.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="area.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_align.py new file mode 100644 index 00000000000..630c6e63afb --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="area.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..dd318be04b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="area.hoverlabel", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..f6097eba4f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="area.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..5ad2c133ec0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="area.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..4a72989d61a --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="area.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..475444c8d7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="area.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_font.py new file mode 100644 index 00000000000..6b58ea61b6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="area.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_namelength.py new file mode 100644 index 00000000000..3465ed6af22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="area.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..1f6931e2d9c --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="area.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/__init__.py index eaefcfd59b8..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/area/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="area.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="area.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="area.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="area.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="area.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="area.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_color.py new file mode 100644 index 00000000000..a01987beebd --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="area.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..e821aa72d7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="area.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_family.py new file mode 100644 index 00000000000..2ce83b4ae53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="area.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..3913e73b5b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="area.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_size.py new file mode 100644 index 00000000000..79faf6a1c72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="area.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..f348e6a9084 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="area.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/__init__.py b/packages/python/plotly/plotly/validators/area/marker/__init__.py index 46656a51467..b697000bb18 100644 --- a/packages/python/plotly/plotly/validators/area/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/area/marker/__init__.py @@ -1,406 +1,28 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="symbolsrc", parent_name="area.marker", **kwargs): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="area.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="area.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="area.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="opacitysrc", parent_name="area.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="area.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="area.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="area.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_color.py b/packages/python/plotly/plotly/validators/area/marker/_color.py new file mode 100644 index 00000000000..098d66055ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="area.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/area/marker/_colorsrc.py new file mode 100644 index 00000000000..e4cfa8f22bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="area.marker", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_opacity.py b/packages/python/plotly/plotly/validators/area/marker/_opacity.py new file mode 100644 index 00000000000..934b143b29c --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="area.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/area/marker/_opacitysrc.py new file mode 100644 index 00000000000..f59451e679b --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_opacitysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="opacitysrc", parent_name="area.marker", **kwargs): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_size.py b/packages/python/plotly/plotly/validators/area/marker/_size.py new file mode 100644 index 00000000000..b2ad7131448 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="area.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/area/marker/_sizesrc.py new file mode 100644 index 00000000000..a05baddf486 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="area.marker", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_symbol.py b/packages/python/plotly/plotly/validators/area/marker/_symbol.py new file mode 100644 index 00000000000..2455d34cff4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="area.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/area/marker/_symbolsrc.py new file mode 100644 index 00000000000..5fa367a0040 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/marker/_symbolsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="symbolsrc", parent_name="area.marker", **kwargs): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/stream/__init__.py b/packages/python/plotly/plotly/validators/area/stream/__init__.py index e8e72656f7b..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/area/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/area/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="area.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="area.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/area/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/area/stream/_maxpoints.py new file mode 100644 index 00000000000..c59f537b1a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="area.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/area/stream/_token.py b/packages/python/plotly/plotly/validators/area/stream/_token.py new file mode 100644 index 00000000000..460be2bb62a --- /dev/null +++ b/packages/python/plotly/plotly/validators/area/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="area.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/__init__.py b/packages/python/plotly/plotly/validators/bar/__init__.py index dcfcb378534..10bad2066f2 100644 --- a/packages/python/plotly/plotly/validators/bar/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/__init__.py @@ -1,1375 +1,142 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="bar", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="bar", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="bar", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="bar", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="bar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="bar", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="bar", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="bar", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="bar", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="bar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="widthsrc", parent_name="bar", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="bar", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="bar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="bar", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.bar.unselected.Mar - ker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.bar.unselected.Tex - tfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="bar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="bar", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tsrc", parent_name="bar", **kwargs): - super(TsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="texttemplatesrc", parent_name="bar", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="bar", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="bar", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textpositionsrc", parent_name="bar", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="bar", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="bar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="textangle", parent_name="bar", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="bar", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="t", parent_name="bar", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="bar", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="bar", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="bar", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="bar", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.bar.selected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.selected.Textf - ont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="rsrc", parent_name="bar", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="r", parent_name="bar", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="outsidetextfont", parent_name="bar", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="bar", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="bar", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="offsetsrc", parent_name="bar", **kwargs): - super(OffsetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="offsetgroup", parent_name="bar", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="offset", parent_name="bar", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="bar", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="bar", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="bar", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="bar", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.bar.marker.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.bar.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="bar", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="insidetextfont", parent_name="bar", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="insidetextanchor", parent_name="bar", **kwargs): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["end", "middle", "start"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="bar", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="bar", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="bar", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="bar", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="bar", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="bar", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="bar", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="bar", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="bar", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorYValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_y", parent_name="bar", **kwargs): - super(ErrorYValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorY"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorXValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_x", parent_name="bar", **kwargs): - super(ErrorXValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorX"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="bar", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="bar", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="bar", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="bar", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="constraintext", parent_name="bar", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "both", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cliponaxis", parent_name="bar", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BasesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="basesrc", parent_name="bar", **kwargs): - super(BasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaseValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="base", parent_name="bar", **kwargs): - super(BaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="alignmentgroup", parent_name="bar", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tsrc import TsrcValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._textangle import TextangleValidator + from ._text import TextValidator + from ._t import TValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._rsrc import RsrcValidator + from ._r import RValidator + from ._outsidetextfont import OutsidetextfontValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._offsetsrc import OffsetsrcValidator + from ._offsetgroup import OffsetgroupValidator + from ._offset import OffsetValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._insidetextfont import InsidetextfontValidator + from ._insidetextanchor import InsidetextanchorValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._error_y import Error_YValidator + from ._error_x import Error_XValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._constraintext import ConstraintextValidator + from ._cliponaxis import CliponaxisValidator + from ._basesrc import BasesrcValidator + from ._base import BaseValidator + from ._alignmentgroup import AlignmentgroupValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tsrc.TsrcValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._t.TValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r.RValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetsrc.OffsetsrcValidator", + "._offsetgroup.OffsetgroupValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._constraintext.ConstraintextValidator", + "._cliponaxis.CliponaxisValidator", + "._basesrc.BasesrcValidator", + "._base.BaseValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/_alignmentgroup.py b/packages/python/plotly/plotly/validators/bar/_alignmentgroup.py new file mode 100644 index 00000000000..41dcfddcb26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_alignmentgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="alignmentgroup", parent_name="bar", **kwargs): + super(AlignmentgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_base.py b/packages/python/plotly/plotly/validators/bar/_base.py new file mode 100644 index 00000000000..550b80e11d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_base.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BaseValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="base", parent_name="bar", **kwargs): + super(BaseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_basesrc.py b/packages/python/plotly/plotly/validators/bar/_basesrc.py new file mode 100644 index 00000000000..abdcbab535a --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_basesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BasesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="basesrc", parent_name="bar", **kwargs): + super(BasesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_cliponaxis.py b/packages/python/plotly/plotly/validators/bar/_cliponaxis.py new file mode 100644 index 00000000000..7f123bbe5ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_cliponaxis.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cliponaxis", parent_name="bar", **kwargs): + super(CliponaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_constraintext.py b/packages/python/plotly/plotly/validators/bar/_constraintext.py new file mode 100644 index 00000000000..a9935fcdc01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_constraintext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="constraintext", parent_name="bar", **kwargs): + super(ConstraintextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "both", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_customdata.py b/packages/python/plotly/plotly/validators/bar/_customdata.py new file mode 100644 index 00000000000..3def74637f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="bar", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_customdatasrc.py b/packages/python/plotly/plotly/validators/bar/_customdatasrc.py new file mode 100644 index 00000000000..0642dcb3fd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="bar", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_dx.py b/packages/python/plotly/plotly/validators/bar/_dx.py new file mode 100644 index 00000000000..36998937123 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_dx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="bar", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_dy.py b/packages/python/plotly/plotly/validators/bar/_dy.py new file mode 100644 index 00000000000..c2908ef619c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_dy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="bar", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_error_x.py b/packages/python/plotly/plotly/validators/bar/_error_x.py new file mode 100644 index 00000000000..73cc2dbef90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_error_x.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_x", parent_name="bar", **kwargs): + super(Error_XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorX"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_error_y.py b/packages/python/plotly/plotly/validators/bar/_error_y.py new file mode 100644 index 00000000000..83756280228 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_error_y.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_y", parent_name="bar", **kwargs): + super(Error_YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorY"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hoverinfo.py b/packages/python/plotly/plotly/validators/bar/_hoverinfo.py new file mode 100644 index 00000000000..5cb51cb603c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="bar", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/bar/_hoverinfosrc.py new file mode 100644 index 00000000000..06de717ed8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="bar", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hoverlabel.py b/packages/python/plotly/plotly/validators/bar/_hoverlabel.py new file mode 100644 index 00000000000..9979b91f23e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="bar", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hovertemplate.py b/packages/python/plotly/plotly/validators/bar/_hovertemplate.py new file mode 100644 index 00000000000..770622c5d12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="bar", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/bar/_hovertemplatesrc.py new file mode 100644 index 00000000000..4d4dd68fc7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="bar", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hovertext.py b/packages/python/plotly/plotly/validators/bar/_hovertext.py new file mode 100644 index 00000000000..1aba8f97b7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="bar", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_hovertextsrc.py b/packages/python/plotly/plotly/validators/bar/_hovertextsrc.py new file mode 100644 index 00000000000..46491588d70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="bar", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_ids.py b/packages/python/plotly/plotly/validators/bar/_ids.py new file mode 100644 index 00000000000..147fb2e84d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_ids.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="bar", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_idssrc.py b/packages/python/plotly/plotly/validators/bar/_idssrc.py new file mode 100644 index 00000000000..92bf744a258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="bar", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_insidetextanchor.py b/packages/python/plotly/plotly/validators/bar/_insidetextanchor.py new file mode 100644 index 00000000000..eb8a4f89f28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_insidetextanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="insidetextanchor", parent_name="bar", **kwargs): + super(InsidetextanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["end", "middle", "start"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_insidetextfont.py b/packages/python/plotly/plotly/validators/bar/_insidetextfont.py new file mode 100644 index 00000000000..d017ab0a454 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_insidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="bar", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_legendgroup.py b/packages/python/plotly/plotly/validators/bar/_legendgroup.py new file mode 100644 index 00000000000..51788b43d3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="bar", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_marker.py b/packages/python/plotly/plotly/validators/bar/_marker.py new file mode 100644 index 00000000000..1c589d6384b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_marker.py @@ -0,0 +1,110 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="bar", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.bar.marker.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.bar.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_meta.py b/packages/python/plotly/plotly/validators/bar/_meta.py new file mode 100644 index 00000000000..559fdd3abb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="bar", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_metasrc.py b/packages/python/plotly/plotly/validators/bar/_metasrc.py new file mode 100644 index 00000000000..22fdea0be36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="bar", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_name.py b/packages/python/plotly/plotly/validators/bar/_name.py new file mode 100644 index 00000000000..b4e7908e2f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="bar", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_offset.py b/packages/python/plotly/plotly/validators/bar/_offset.py new file mode 100644 index 00000000000..984a56cc079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_offset.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="offset", parent_name="bar", **kwargs): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_offsetgroup.py b/packages/python/plotly/plotly/validators/bar/_offsetgroup.py new file mode 100644 index 00000000000..e42aef8cd25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_offsetgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="offsetgroup", parent_name="bar", **kwargs): + super(OffsetgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_offsetsrc.py b/packages/python/plotly/plotly/validators/bar/_offsetsrc.py new file mode 100644 index 00000000000..571fe391bff --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_offsetsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="offsetsrc", parent_name="bar", **kwargs): + super(OffsetsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_opacity.py b/packages/python/plotly/plotly/validators/bar/_opacity.py new file mode 100644 index 00000000000..5338a157310 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="bar", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_orientation.py b/packages/python/plotly/plotly/validators/bar/_orientation.py new file mode 100644 index 00000000000..287f914bff8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="bar", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_outsidetextfont.py b/packages/python/plotly/plotly/validators/bar/_outsidetextfont.py new file mode 100644 index 00000000000..07f45be094a --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_outsidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="outsidetextfont", parent_name="bar", **kwargs): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_r.py b/packages/python/plotly/plotly/validators/bar/_r.py new file mode 100644 index 00000000000..5c04e7f3454 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="r", parent_name="bar", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_rsrc.py b/packages/python/plotly/plotly/validators/bar/_rsrc.py new file mode 100644 index 00000000000..fca7bd21342 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_rsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="rsrc", parent_name="bar", **kwargs): + super(RsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_selected.py b/packages/python/plotly/plotly/validators/bar/_selected.py new file mode 100644 index 00000000000..42c05f2acbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_selected.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="bar", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.bar.selected.Marke + r` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.selected.Textf + ont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_selectedpoints.py b/packages/python/plotly/plotly/validators/bar/_selectedpoints.py new file mode 100644 index 00000000000..6441ebdad4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="bar", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_showlegend.py b/packages/python/plotly/plotly/validators/bar/_showlegend.py new file mode 100644 index 00000000000..c19f421b0e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="bar", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_stream.py b/packages/python/plotly/plotly/validators/bar/_stream.py new file mode 100644 index 00000000000..8c12806765e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="bar", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_t.py b/packages/python/plotly/plotly/validators/bar/_t.py new file mode 100644 index 00000000000..7574ba79ee8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_t.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="t", parent_name="bar", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_text.py b/packages/python/plotly/plotly/validators/bar/_text.py new file mode 100644 index 00000000000..6b36ac40e2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="bar", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_textangle.py b/packages/python/plotly/plotly/validators/bar/_textangle.py new file mode 100644 index 00000000000..355776b8163 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_textangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="textangle", parent_name="bar", **kwargs): + super(TextangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_textfont.py b/packages/python/plotly/plotly/validators/bar/_textfont.py new file mode 100644 index 00000000000..ec8feb8f8f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="bar", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_textposition.py b/packages/python/plotly/plotly/validators/bar/_textposition.py new file mode 100644 index 00000000000..0d092265048 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_textposition.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="bar", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_textpositionsrc.py b/packages/python/plotly/plotly/validators/bar/_textpositionsrc.py new file mode 100644 index 00000000000..82fae0949fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_textpositionsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textpositionsrc", parent_name="bar", **kwargs): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_textsrc.py b/packages/python/plotly/plotly/validators/bar/_textsrc.py new file mode 100644 index 00000000000..94fc3304dd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="bar", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_texttemplate.py b/packages/python/plotly/plotly/validators/bar/_texttemplate.py new file mode 100644 index 00000000000..63b48895ce5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="bar", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/bar/_texttemplatesrc.py new file mode 100644 index 00000000000..8a15b5dc9e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_texttemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="bar", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_tsrc.py b/packages/python/plotly/plotly/validators/bar/_tsrc.py new file mode 100644 index 00000000000..3726946008d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_tsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tsrc", parent_name="bar", **kwargs): + super(TsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_uid.py b/packages/python/plotly/plotly/validators/bar/_uid.py new file mode 100644 index 00000000000..5b8ae0ea701 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_uid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="bar", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_uirevision.py b/packages/python/plotly/plotly/validators/bar/_uirevision.py new file mode 100644 index 00000000000..574d5b80b83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="bar", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_unselected.py b/packages/python/plotly/plotly/validators/bar/_unselected.py new file mode 100644 index 00000000000..146039457d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="bar", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.bar.unselected.Mar + ker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.bar.unselected.Tex + tfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_visible.py b/packages/python/plotly/plotly/validators/bar/_visible.py new file mode 100644 index 00000000000..6125bde123e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="bar", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_width.py b/packages/python/plotly/plotly/validators/bar/_width.py new file mode 100644 index 00000000000..3fdbcb82683 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="bar", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_widthsrc.py b/packages/python/plotly/plotly/validators/bar/_widthsrc.py new file mode 100644 index 00000000000..d33233ad73d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_widthsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="widthsrc", parent_name="bar", **kwargs): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_x.py b/packages/python/plotly/plotly/validators/bar/_x.py new file mode 100644 index 00000000000..4ff09a042f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_x.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="bar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_x0.py b/packages/python/plotly/plotly/validators/bar/_x0.py new file mode 100644 index 00000000000..08fc7ab61dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_x0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="bar", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_xaxis.py b/packages/python/plotly/plotly/validators/bar/_xaxis.py new file mode 100644 index 00000000000..e6cea95051d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="bar", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_xcalendar.py b/packages/python/plotly/plotly/validators/bar/_xcalendar.py new file mode 100644 index 00000000000..64b4d0f1d84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="bar", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_xsrc.py b/packages/python/plotly/plotly/validators/bar/_xsrc.py new file mode 100644 index 00000000000..239e2de6084 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="bar", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_y.py b/packages/python/plotly/plotly/validators/bar/_y.py new file mode 100644 index 00000000000..99513a52d9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_y.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="bar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_y0.py b/packages/python/plotly/plotly/validators/bar/_y0.py new file mode 100644 index 00000000000..d52ba3bb2e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_y0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="bar", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_yaxis.py b/packages/python/plotly/plotly/validators/bar/_yaxis.py new file mode 100644 index 00000000000..761abb2396b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="bar", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_ycalendar.py b/packages/python/plotly/plotly/validators/bar/_ycalendar.py new file mode 100644 index 00000000000..b0653a8db4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="bar", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/_ysrc.py b/packages/python/plotly/plotly/validators/bar/_ysrc.py new file mode 100644 index 00000000000..e7bb0cfe5d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="bar", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/__init__.py b/packages/python/plotly/plotly/validators/bar/error_x/__init__.py index 05ebb4da7e2..e4688233f0f 100644 --- a/packages/python/plotly/plotly/validators/bar/error_x/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/error_x/__init__.py @@ -1,219 +1,42 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="bar.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="bar.error_x", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="valueminus", parent_name="bar.error_x", **kwargs): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="bar.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="bar.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="bar.error_x", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="traceref", parent_name="bar.error_x", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="thickness", parent_name="bar.error_x", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="symmetric", parent_name="bar.error_x", **kwargs): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CopyYstyleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="copy_ystyle", parent_name="bar.error_x", **kwargs): - super(CopyYstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="bar.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="arraysrc", parent_name="bar.error_x", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="bar.error_x", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="arrayminus", parent_name="bar.error_x", **kwargs): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="bar.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._copy_ystyle import Copy_YstyleValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_array.py b/packages/python/plotly/plotly/validators/bar/error_x/_array.py new file mode 100644 index 00000000000..aa4e3c50d96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="bar.error_x", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_arrayminus.py b/packages/python/plotly/plotly/validators/bar/error_x/_arrayminus.py new file mode 100644 index 00000000000..5affa97a4b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_arrayminus.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="arrayminus", parent_name="bar.error_x", **kwargs): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_arrayminussrc.py b/packages/python/plotly/plotly/validators/bar/error_x/_arrayminussrc.py new file mode 100644 index 00000000000..d6decddc843 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="bar.error_x", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_arraysrc.py b/packages/python/plotly/plotly/validators/bar/error_x/_arraysrc.py new file mode 100644 index 00000000000..04a9fd6218c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_arraysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="arraysrc", parent_name="bar.error_x", **kwargs): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_color.py b/packages/python/plotly/plotly/validators/bar/error_x/_color.py new file mode 100644 index 00000000000..2cb2b737d33 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="bar.error_x", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_copy_ystyle.py b/packages/python/plotly/plotly/validators/bar/error_x/_copy_ystyle.py new file mode 100644 index 00000000000..95ba0fa3992 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_copy_ystyle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="copy_ystyle", parent_name="bar.error_x", **kwargs): + super(Copy_YstyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_symmetric.py b/packages/python/plotly/plotly/validators/bar/error_x/_symmetric.py new file mode 100644 index 00000000000..8eb29bdcda6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_symmetric.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="symmetric", parent_name="bar.error_x", **kwargs): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_thickness.py b/packages/python/plotly/plotly/validators/bar/error_x/_thickness.py new file mode 100644 index 00000000000..9a9eedbeddd --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_thickness.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="thickness", parent_name="bar.error_x", **kwargs): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_traceref.py b/packages/python/plotly/plotly/validators/bar/error_x/_traceref.py new file mode 100644 index 00000000000..071259fd704 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_traceref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="traceref", parent_name="bar.error_x", **kwargs): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_tracerefminus.py b/packages/python/plotly/plotly/validators/bar/error_x/_tracerefminus.py new file mode 100644 index 00000000000..b05dafd244f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="bar.error_x", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_type.py b/packages/python/plotly/plotly/validators/bar/error_x/_type.py new file mode 100644 index 00000000000..67a8f70066c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="bar.error_x", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_value.py b/packages/python/plotly/plotly/validators/bar/error_x/_value.py new file mode 100644 index 00000000000..3cf48a3d950 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="bar.error_x", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_valueminus.py b/packages/python/plotly/plotly/validators/bar/error_x/_valueminus.py new file mode 100644 index 00000000000..7c4d33f4e48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_valueminus.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="valueminus", parent_name="bar.error_x", **kwargs): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_visible.py b/packages/python/plotly/plotly/validators/bar/error_x/_visible.py new file mode 100644 index 00000000000..457dfcc5138 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="bar.error_x", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_x/_width.py b/packages/python/plotly/plotly/validators/bar/error_x/_width.py new file mode 100644 index 00000000000..6509f4ec660 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_x/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="bar.error_x", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/__init__.py b/packages/python/plotly/plotly/validators/bar/error_y/__init__.py index 37f8b74f5aa..0a508f0c655 100644 --- a/packages/python/plotly/plotly/validators/bar/error_y/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/error_y/__init__.py @@ -1,205 +1,40 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="bar.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="bar.error_y", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="valueminus", parent_name="bar.error_y", **kwargs): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="bar.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="bar.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="bar.error_y", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="traceref", parent_name="bar.error_y", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="thickness", parent_name="bar.error_y", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="symmetric", parent_name="bar.error_y", **kwargs): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="bar.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="arraysrc", parent_name="bar.error_y", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="bar.error_y", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="arrayminus", parent_name="bar.error_y", **kwargs): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="bar.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_array.py b/packages/python/plotly/plotly/validators/bar/error_y/_array.py new file mode 100644 index 00000000000..04d3848e90b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="bar.error_y", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_arrayminus.py b/packages/python/plotly/plotly/validators/bar/error_y/_arrayminus.py new file mode 100644 index 00000000000..0ac8f55e6a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_arrayminus.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="arrayminus", parent_name="bar.error_y", **kwargs): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_arrayminussrc.py b/packages/python/plotly/plotly/validators/bar/error_y/_arrayminussrc.py new file mode 100644 index 00000000000..eb3cb696ff9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="bar.error_y", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_arraysrc.py b/packages/python/plotly/plotly/validators/bar/error_y/_arraysrc.py new file mode 100644 index 00000000000..1cf1042ce9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_arraysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="arraysrc", parent_name="bar.error_y", **kwargs): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_color.py b/packages/python/plotly/plotly/validators/bar/error_y/_color.py new file mode 100644 index 00000000000..8cfe4335bdd --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="bar.error_y", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_symmetric.py b/packages/python/plotly/plotly/validators/bar/error_y/_symmetric.py new file mode 100644 index 00000000000..1fe54f87813 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_symmetric.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="symmetric", parent_name="bar.error_y", **kwargs): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_thickness.py b/packages/python/plotly/plotly/validators/bar/error_y/_thickness.py new file mode 100644 index 00000000000..7e3370a8f3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_thickness.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="thickness", parent_name="bar.error_y", **kwargs): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_traceref.py b/packages/python/plotly/plotly/validators/bar/error_y/_traceref.py new file mode 100644 index 00000000000..86cedc587a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_traceref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="traceref", parent_name="bar.error_y", **kwargs): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_tracerefminus.py b/packages/python/plotly/plotly/validators/bar/error_y/_tracerefminus.py new file mode 100644 index 00000000000..6e9a809591c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="bar.error_y", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_type.py b/packages/python/plotly/plotly/validators/bar/error_y/_type.py new file mode 100644 index 00000000000..2cd9f44ccde --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="bar.error_y", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_value.py b/packages/python/plotly/plotly/validators/bar/error_y/_value.py new file mode 100644 index 00000000000..c4a53693b16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="bar.error_y", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_valueminus.py b/packages/python/plotly/plotly/validators/bar/error_y/_valueminus.py new file mode 100644 index 00000000000..7c7129114c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_valueminus.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="valueminus", parent_name="bar.error_y", **kwargs): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_visible.py b/packages/python/plotly/plotly/validators/bar/error_y/_visible.py new file mode 100644 index 00000000000..2e8b21fdee0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="bar.error_y", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/error_y/_width.py b/packages/python/plotly/plotly/validators/bar/error_y/_width.py new file mode 100644 index 00000000000..72410cc1964 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/error_y/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="bar.error_y", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/__init__.py index 300cdacf060..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/bar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/__init__.py @@ -1,174 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="bar.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="bar.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="bar.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="bar.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="bar.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="bar.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="bar.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="bar.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="bar.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_align.py new file mode 100644 index 00000000000..8a6f984c51e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="bar.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..cffb62e6f9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="bar.hoverlabel", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..f439bd6afc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="bar.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..cefd10cfd11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="bar.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..afaf5647ac1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="bar.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..f320d196b66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="bar.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_font.py new file mode 100644 index 00000000000..0e6f4604dc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="bar.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_namelength.py new file mode 100644 index 00000000000..3289e4c51e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="bar.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..add9e9c6844 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="bar.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/__init__.py index f1b9817df68..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="bar.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="bar.hoverlabel.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="bar.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="bar.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="bar.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_color.py new file mode 100644 index 00000000000..46dce9fa10b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..faf87dfd705 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="bar.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_family.py new file mode 100644 index 00000000000..88ef9b76d57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="bar.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..c15d24f3671 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="bar.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_size.py new file mode 100644 index 00000000000..1f4b6d52bf0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="bar.hoverlabel.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..1ff9ad97dea --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="bar.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py index 5b57343df9f..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py @@ -1,96 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="bar.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="bar.insidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="bar.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="bar.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="bar.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="bar.insidetextfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/_color.py new file mode 100644 index 00000000000..7f3be78307c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="bar.insidetextfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..14edca878bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="bar.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/_family.py new file mode 100644 index 00000000000..bb3a5a29d58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="bar.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..e806baf6061 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="bar.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/_size.py new file mode 100644 index 00000000000..a7264ed184f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="bar.insidetextfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/bar/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..3a644033632 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="bar.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/__init__.py index e2e4eaaf42e..bcbbad4466a 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/__init__.py @@ -1,530 +1,42 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="bar.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="bar.marker", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="opacitysrc", parent_name="bar.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="bar.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="bar.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="bar.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="bar.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="bar.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.bar.mar - ker.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.bar.marker.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of bar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.bar.marker.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - bar.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - bar.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="bar.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="bar.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "bar.marker.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="bar.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="bar.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="bar.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="bar.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="bar.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/bar/marker/_autocolorscale.py new file mode 100644 index 00000000000..c0d7ed62218 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="bar.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_cauto.py b/packages/python/plotly/plotly/validators/bar/marker/_cauto.py new file mode 100644 index 00000000000..631e670298f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="bar.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_cmax.py b/packages/python/plotly/plotly/validators/bar/marker/_cmax.py new file mode 100644 index 00000000000..2574c4d0cfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="bar.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_cmid.py b/packages/python/plotly/plotly/validators/bar/marker/_cmid.py new file mode 100644 index 00000000000..1e66f0fd7d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="bar.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_cmin.py b/packages/python/plotly/plotly/validators/bar/marker/_cmin.py new file mode 100644 index 00000000000..bf30bf6b26b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="bar.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_color.py b/packages/python/plotly/plotly/validators/bar/marker/_color.py new file mode 100644 index 00000000000..aa78b5463e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="bar.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "bar.marker.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/bar/marker/_coloraxis.py new file mode 100644 index 00000000000..cc973c77132 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="bar.marker", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_colorbar.py b/packages/python/plotly/plotly/validators/bar/marker/_colorbar.py new file mode 100644 index 00000000000..79f69f48cbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="bar.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.bar.mar + ker.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.bar.marker.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of bar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.bar.marker.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + bar.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + bar.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_colorscale.py b/packages/python/plotly/plotly/validators/bar/marker/_colorscale.py new file mode 100644 index 00000000000..69303daf28d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="bar.marker", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/bar/marker/_colorsrc.py new file mode 100644 index 00000000000..8e3d2ef1768 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="bar.marker", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_line.py b/packages/python/plotly/plotly/validators/bar/marker/_line.py new file mode 100644 index 00000000000..8cdb5593af1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="bar.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_opacity.py b/packages/python/plotly/plotly/validators/bar/marker/_opacity.py new file mode 100644 index 00000000000..8c260bbc512 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="bar.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/bar/marker/_opacitysrc.py new file mode 100644 index 00000000000..270beefb470 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_opacitysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="opacitysrc", parent_name="bar.marker", **kwargs): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_reversescale.py b/packages/python/plotly/plotly/validators/bar/marker/_reversescale.py new file mode 100644 index 00000000000..9b42ae8a282 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="bar.marker", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/_showscale.py b/packages/python/plotly/plotly/validators/bar/marker/_showscale.py new file mode 100644 index 00000000000..42744c2fb6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="bar.marker", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/__init__.py index 4d6a4abb93f..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/__init__.py @@ -1,761 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="bar.marker.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="bar.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="bar.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="bar.marker.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="bar.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="bar.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="bar.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="bar.marker.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="bar.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="bar.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="bar.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="bar.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="bar.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="bar.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="bar.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="bar.marker.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="bar.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="bar.marker.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="bar.marker.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="bar.marker.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="bar.marker.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="bar.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="bar.marker.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="bar.marker.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="bar.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="bar.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="bar.marker.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="bar.marker.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="bar.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="bar.marker.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="bar.marker.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="bar.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..89e72b81205 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="bar.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..8f0f52152b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="bar.marker.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..c4cdb76a345 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="bar.marker.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..13c7b0be952 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="bar.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..2c53fbfd14b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="bar.marker.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_len.py new file mode 100644 index 00000000000..8528a13ae3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="bar.marker.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..b1e780cf574 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="bar.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..a655bf9a2cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="bar.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..f3cbd87e92e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="bar.marker.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..6ef7b42e1ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="bar.marker.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..175cb8a86b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="bar.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..8765708cdd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="bar.marker.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..44b8cc5908f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="bar.marker.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..b02ac744814 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="bar.marker.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..1002ef5023e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="bar.marker.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..18e6ed1f00b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="bar.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..0081d2ce389 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="bar.marker.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..baa9233c3dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="bar.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..73f011373f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..30e3c52855b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..78d66ed52b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..4b9df58dad5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..d122cfe451e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="bar.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..c4baf0162ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..f74f98f60f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="bar.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..2923008dae0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..a564eb5b910 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..0847f129029 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="bar.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..b48fd7f1239 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="bar.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..80574c2445f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="bar.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..bf60934c76b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="bar.marker.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..1c2204d1568 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..58e3fcfc130 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..f6200e28421 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="bar.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_title.py new file mode 100644 index 00000000000..0e862219410 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="bar.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_x.py new file mode 100644 index 00000000000..db254ff5aa3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="bar.marker.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..86a47fcc3ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="bar.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..b45e52e820e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="bar.marker.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_y.py new file mode 100644 index 00000000000..b2aa44fb2f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="bar.marker.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..f66f6a9d305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="bar.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..2b353b1862c --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="bar.marker.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/__init__.py index 9cfe21cf019..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="bar.marker.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="bar.marker.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.marker.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..5fd9807c3ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.marker.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..5d4a342f099 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="bar.marker.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..241782a171d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="bar.marker.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py index dbed4ff4cc7..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="bar.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="bar.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="bar.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="bar.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="bar.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..1c3a4a9ecf4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="bar.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..4d1e4e84a04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="bar.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..3686a43d68e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="bar.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..352f0514c2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="bar.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..1918defd55b --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="bar.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/__init__.py index b66173a54d1..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="bar.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="bar.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="bar.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..5e936b5a081 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="bar.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..535b43037d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="bar.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..f2a132416da --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="bar.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/__init__.py index daa8a19ebf3..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/__init__.py @@ -1,55 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="bar.marker.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="bar.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="bar.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..fd4b9b105fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="bar.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..b021db486aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="bar.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..3813efc8acc --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="bar.marker.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py index ab5b7407141..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py @@ -1,187 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="widthsrc", parent_name="bar.marker.line", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="bar.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="bar.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="bar.marker.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="bar.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="bar.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="bar.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "bar.marker.line.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="bar.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="bar.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="bar.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="bar.marker.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="bar.marker.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/bar/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..214b4d7e487 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="bar.marker.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/bar/marker/line/_cauto.py new file mode 100644 index 00000000000..adcd362c5cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="bar.marker.line", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/bar/marker/line/_cmax.py new file mode 100644 index 00000000000..6d2641ed6f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="bar.marker.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/bar/marker/line/_cmid.py new file mode 100644 index 00000000000..d530147b4aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="bar.marker.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/bar/marker/line/_cmin.py new file mode 100644 index 00000000000..485fcc54622 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="bar.marker.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_color.py b/packages/python/plotly/plotly/validators/bar/marker/line/_color.py new file mode 100644 index 00000000000..6adeb31c848 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="bar.marker.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "bar.marker.line.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/bar/marker/line/_coloraxis.py new file mode 100644 index 00000000000..bcebdfcdf19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="bar.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/bar/marker/line/_colorscale.py new file mode 100644 index 00000000000..f1fc46ebc71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="bar.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/bar/marker/line/_colorsrc.py new file mode 100644 index 00000000000..679ec3690f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="bar.marker.line", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/bar/marker/line/_reversescale.py new file mode 100644 index 00000000000..19ac08ce217 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="bar.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_width.py b/packages/python/plotly/plotly/validators/bar/marker/line/_width.py new file mode 100644 index 00000000000..cabd2b85375 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="bar.marker.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/bar/marker/line/_widthsrc.py new file mode 100644 index 00000000000..298faf191a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/marker/line/_widthsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="widthsrc", parent_name="bar.marker.line", **kwargs): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/__init__.py index 9effadf7701..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/bar/outsidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="bar.outsidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="bar.outsidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="bar.outsidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="bar.outsidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="bar.outsidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.outsidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/_color.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_color.py new file mode 100644 index 00000000000..00cd1b99f22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_colorsrc.py new file mode 100644 index 00000000000..e8900e89769 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="bar.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/_family.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_family.py new file mode 100644 index 00000000000..b781cdb6269 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="bar.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_familysrc.py new file mode 100644 index 00000000000..47c36a8d580 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="bar.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/_size.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_size.py new file mode 100644 index 00000000000..880154a6e75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="bar.outsidetextfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/outsidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_sizesrc.py new file mode 100644 index 00000000000..c4d8b563534 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/outsidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="bar.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/__init__.py b/packages/python/plotly/plotly/validators/bar/selected/__init__.py index d965d7bed75..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/bar/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/selected/__init__.py @@ -1,40 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="bar.selected", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="bar.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/_marker.py b/packages/python/plotly/plotly/validators/bar/selected/_marker.py new file mode 100644 index 00000000000..d0fd8327306 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/selected/_marker.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="bar.selected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/_textfont.py b/packages/python/plotly/plotly/validators/bar/selected/_textfont.py new file mode 100644 index 00000000000..a2d2e210475 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/selected/_textfont.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="bar.selected", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/bar/selected/marker/__init__.py index be2358bbec0..772f2b07352 100644 --- a/packages/python/plotly/plotly/validators/bar/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/selected/marker/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="bar.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/marker/_color.py b/packages/python/plotly/plotly/validators/bar/selected/marker/_color.py new file mode 100644 index 00000000000..14934b57f9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/bar/selected/marker/_opacity.py new file mode 100644 index 00000000000..1b60a252838 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="bar.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/bar/selected/textfont/__init__.py index 92d5879e018..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/bar/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/selected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.selected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/bar/selected/textfont/_color.py new file mode 100644 index 00000000000..92d5879e018 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/selected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.selected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/stream/__init__.py b/packages/python/plotly/plotly/validators/bar/stream/__init__.py index b58ee49dbdb..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/bar/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="bar.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="bar.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/bar/stream/_maxpoints.py new file mode 100644 index 00000000000..c51a596b188 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="bar.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/stream/_token.py b/packages/python/plotly/plotly/validators/bar/stream/_token.py new file mode 100644 index 00000000000..3cf4816147f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="bar.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/__init__.py b/packages/python/plotly/plotly/validators/bar/textfont/__init__.py index 785f50ea192..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/bar/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/textfont/__init__.py @@ -1,88 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="bar.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="bar.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="familysrc", parent_name="bar.textfont", **kwargs): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="bar.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="bar.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="bar.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/_color.py b/packages/python/plotly/plotly/validators/bar/textfont/_color.py new file mode 100644 index 00000000000..0da0f020a7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="bar.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/bar/textfont/_colorsrc.py new file mode 100644 index 00000000000..21fd56e2302 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/textfont/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="bar.textfont", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/_family.py b/packages/python/plotly/plotly/validators/bar/textfont/_family.py new file mode 100644 index 00000000000..d392beebd6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/textfont/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="bar.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/bar/textfont/_familysrc.py new file mode 100644 index 00000000000..f063337bf44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/textfont/_familysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="familysrc", parent_name="bar.textfont", **kwargs): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/_size.py b/packages/python/plotly/plotly/validators/bar/textfont/_size.py new file mode 100644 index 00000000000..c8952a7c1b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="bar.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/bar/textfont/_sizesrc.py new file mode 100644 index 00000000000..58a888769be --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/textfont/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="bar.textfont", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/__init__.py b/packages/python/plotly/plotly/validators/bar/unselected/__init__.py index e6f2c42291f..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/bar/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/unselected/__init__.py @@ -1,43 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="bar.unselected", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="bar.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/_marker.py b/packages/python/plotly/plotly/validators/bar/unselected/_marker.py new file mode 100644 index 00000000000..542118c5aa6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/unselected/_marker.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="bar.unselected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/_textfont.py b/packages/python/plotly/plotly/validators/bar/unselected/_textfont.py new file mode 100644 index 00000000000..d6cd4f5b553 --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/unselected/_textfont.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="bar.unselected", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/bar/unselected/marker/__init__.py index 5ada327fe94..772f2b07352 100644 --- a/packages/python/plotly/plotly/validators/bar/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/unselected/marker/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="bar.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/bar/unselected/marker/_color.py new file mode 100644 index 00000000000..11aebb88f6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/bar/unselected/marker/_opacity.py new file mode 100644 index 00000000000..5fe2476f48e --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="bar.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/bar/unselected/textfont/__init__.py index 1bc89eea0df..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/bar/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/unselected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="bar.unselected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/bar/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/bar/unselected/textfont/_color.py new file mode 100644 index 00000000000..1bc89eea0df --- /dev/null +++ b/packages/python/plotly/plotly/validators/bar/unselected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="bar.unselected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/__init__.py b/packages/python/plotly/plotly/validators/barpolar/__init__.py index 2fc0d4f6f35..842dfa599ff 100644 --- a/packages/python/plotly/plotly/validators/barpolar/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/__init__.py @@ -1,793 +1,98 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="widthsrc", parent_name="barpolar", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="barpolar", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="barpolar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="barpolar", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.barpolar.unselecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.unselecte - d.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="barpolar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="barpolar", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="thetaunit", parent_name="barpolar", **kwargs): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["radians", "degrees", "gradians"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="thetasrc", parent_name="barpolar", **kwargs): - super(ThetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="theta0", parent_name="barpolar", **kwargs): - super(Theta0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="theta", parent_name="barpolar", **kwargs): - super(ThetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="barpolar", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="barpolar", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="barpolar", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "polar"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="barpolar", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="barpolar", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="barpolar", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="barpolar", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.barpolar.selected. - Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.selected. - Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="rsrc", parent_name="barpolar", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class R0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="r0", parent_name="barpolar", **kwargs): - super(R0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="r", parent_name="barpolar", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="barpolar", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="offsetsrc", parent_name="barpolar", **kwargs): - super(OffsetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="offset", parent_name="barpolar", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="barpolar", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="barpolar", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="barpolar", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="barpolar", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.barpolar.marker.Co - lorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.barpolar.marker.Li - ne` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="barpolar", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="barpolar", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="barpolar", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="barpolar", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="barpolar", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="barpolar", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="barpolar", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="barpolar", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="barpolar", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="barpolar", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["r", "theta", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtheta", parent_name="barpolar", **kwargs): - super(DthetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DrValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dr", parent_name="barpolar", **kwargs): - super(DrValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="barpolar", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="barpolar", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BasesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="basesrc", parent_name="barpolar", **kwargs): - super(BasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaseValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="base", parent_name="barpolar", **kwargs): - super(BaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._thetaunit import ThetaunitValidator + from ._thetasrc import ThetasrcValidator + from ._theta0 import Theta0Validator + from ._theta import ThetaValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._rsrc import RsrcValidator + from ._r0 import R0Validator + from ._r import RValidator + from ._opacity import OpacityValidator + from ._offsetsrc import OffsetsrcValidator + from ._offset import OffsetValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dtheta import DthetaValidator + from ._dr import DrValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._basesrc import BasesrcValidator + from ._base import BaseValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._thetaunit.ThetaunitValidator", + "._thetasrc.ThetasrcValidator", + "._theta0.Theta0Validator", + "._theta.ThetaValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r0.R0Validator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._offsetsrc.OffsetsrcValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dtheta.DthetaValidator", + "._dr.DrValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._basesrc.BasesrcValidator", + "._base.BaseValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_base.py b/packages/python/plotly/plotly/validators/barpolar/_base.py new file mode 100644 index 00000000000..af27c5e4716 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_base.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BaseValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="base", parent_name="barpolar", **kwargs): + super(BaseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_basesrc.py b/packages/python/plotly/plotly/validators/barpolar/_basesrc.py new file mode 100644 index 00000000000..cfa0e840803 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_basesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BasesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="basesrc", parent_name="barpolar", **kwargs): + super(BasesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_customdata.py b/packages/python/plotly/plotly/validators/barpolar/_customdata.py new file mode 100644 index 00000000000..214d14703f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="barpolar", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_customdatasrc.py b/packages/python/plotly/plotly/validators/barpolar/_customdatasrc.py new file mode 100644 index 00000000000..17d3a5e2c53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="barpolar", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_dr.py b/packages/python/plotly/plotly/validators/barpolar/_dr.py new file mode 100644 index 00000000000..8530466cd87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_dr.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DrValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dr", parent_name="barpolar", **kwargs): + super(DrValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_dtheta.py b/packages/python/plotly/plotly/validators/barpolar/_dtheta.py new file mode 100644 index 00000000000..0fe0cb49b6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_dtheta.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtheta", parent_name="barpolar", **kwargs): + super(DthetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hoverinfo.py b/packages/python/plotly/plotly/validators/barpolar/_hoverinfo.py new file mode 100644 index 00000000000..e26ca466441 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="barpolar", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["r", "theta", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/barpolar/_hoverinfosrc.py new file mode 100644 index 00000000000..6e9fde0afe8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="barpolar", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hoverlabel.py b/packages/python/plotly/plotly/validators/barpolar/_hoverlabel.py new file mode 100644 index 00000000000..d8b48c2cfd9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="barpolar", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hovertemplate.py b/packages/python/plotly/plotly/validators/barpolar/_hovertemplate.py new file mode 100644 index 00000000000..3b2b6e6f6a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="barpolar", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/barpolar/_hovertemplatesrc.py new file mode 100644 index 00000000000..6aac0c26611 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="barpolar", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hovertext.py b/packages/python/plotly/plotly/validators/barpolar/_hovertext.py new file mode 100644 index 00000000000..ebd30412ae8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="barpolar", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_hovertextsrc.py b/packages/python/plotly/plotly/validators/barpolar/_hovertextsrc.py new file mode 100644 index 00000000000..d23bbb7e7ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="barpolar", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_ids.py b/packages/python/plotly/plotly/validators/barpolar/_ids.py new file mode 100644 index 00000000000..6718b04978e --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="barpolar", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_idssrc.py b/packages/python/plotly/plotly/validators/barpolar/_idssrc.py new file mode 100644 index 00000000000..b3854a9a562 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="barpolar", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_legendgroup.py b/packages/python/plotly/plotly/validators/barpolar/_legendgroup.py new file mode 100644 index 00000000000..12e6fd06ae7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="barpolar", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_marker.py b/packages/python/plotly/plotly/validators/barpolar/_marker.py new file mode 100644 index 00000000000..3ada20c3c62 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_marker.py @@ -0,0 +1,111 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="barpolar", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.barpolar.marker.Co + lorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.barpolar.marker.Li + ne` instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_meta.py b/packages/python/plotly/plotly/validators/barpolar/_meta.py new file mode 100644 index 00000000000..831f61db73b --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="barpolar", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_metasrc.py b/packages/python/plotly/plotly/validators/barpolar/_metasrc.py new file mode 100644 index 00000000000..e30b2b0a753 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="barpolar", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_name.py b/packages/python/plotly/plotly/validators/barpolar/_name.py new file mode 100644 index 00000000000..757c162f5cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="barpolar", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_offset.py b/packages/python/plotly/plotly/validators/barpolar/_offset.py new file mode 100644 index 00000000000..bf1e9a9a034 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_offset.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="offset", parent_name="barpolar", **kwargs): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_offsetsrc.py b/packages/python/plotly/plotly/validators/barpolar/_offsetsrc.py new file mode 100644 index 00000000000..26977336ef9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_offsetsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="offsetsrc", parent_name="barpolar", **kwargs): + super(OffsetsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_opacity.py b/packages/python/plotly/plotly/validators/barpolar/_opacity.py new file mode 100644 index 00000000000..1e64a88fd29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="barpolar", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_r.py b/packages/python/plotly/plotly/validators/barpolar/_r.py new file mode 100644 index 00000000000..57b4f4deb70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="r", parent_name="barpolar", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_r0.py b/packages/python/plotly/plotly/validators/barpolar/_r0.py new file mode 100644 index 00000000000..fddc120b4be --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_r0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class R0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="r0", parent_name="barpolar", **kwargs): + super(R0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_rsrc.py b/packages/python/plotly/plotly/validators/barpolar/_rsrc.py new file mode 100644 index 00000000000..0cc4bb6b276 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_rsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="rsrc", parent_name="barpolar", **kwargs): + super(RsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_selected.py b/packages/python/plotly/plotly/validators/barpolar/_selected.py new file mode 100644 index 00000000000..fb9e498f438 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="barpolar", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.barpolar.selected. + Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.barpolar.selected. + Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_selectedpoints.py b/packages/python/plotly/plotly/validators/barpolar/_selectedpoints.py new file mode 100644 index 00000000000..b4b0732ab8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="barpolar", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_showlegend.py b/packages/python/plotly/plotly/validators/barpolar/_showlegend.py new file mode 100644 index 00000000000..8dfa7f66d46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="barpolar", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_stream.py b/packages/python/plotly/plotly/validators/barpolar/_stream.py new file mode 100644 index 00000000000..47565009235 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="barpolar", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_subplot.py b/packages/python/plotly/plotly/validators/barpolar/_subplot.py new file mode 100644 index 00000000000..e79bf568a9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="barpolar", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "polar"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_text.py b/packages/python/plotly/plotly/validators/barpolar/_text.py new file mode 100644 index 00000000000..0c0dd10187f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="barpolar", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_textsrc.py b/packages/python/plotly/plotly/validators/barpolar/_textsrc.py new file mode 100644 index 00000000000..681a816ef76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="barpolar", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_theta.py b/packages/python/plotly/plotly/validators/barpolar/_theta.py new file mode 100644 index 00000000000..ef269c6c019 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_theta.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="theta", parent_name="barpolar", **kwargs): + super(ThetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_theta0.py b/packages/python/plotly/plotly/validators/barpolar/_theta0.py new file mode 100644 index 00000000000..8444ce2807c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_theta0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="theta0", parent_name="barpolar", **kwargs): + super(Theta0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_thetasrc.py b/packages/python/plotly/plotly/validators/barpolar/_thetasrc.py new file mode 100644 index 00000000000..c0297fab895 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_thetasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="thetasrc", parent_name="barpolar", **kwargs): + super(ThetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_thetaunit.py b/packages/python/plotly/plotly/validators/barpolar/_thetaunit.py new file mode 100644 index 00000000000..18833c1c7dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_thetaunit.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="thetaunit", parent_name="barpolar", **kwargs): + super(ThetaunitValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["radians", "degrees", "gradians"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_uid.py b/packages/python/plotly/plotly/validators/barpolar/_uid.py new file mode 100644 index 00000000000..a5704a1c13d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="barpolar", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_uirevision.py b/packages/python/plotly/plotly/validators/barpolar/_uirevision.py new file mode 100644 index 00000000000..7b5e55ca9b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="barpolar", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_unselected.py b/packages/python/plotly/plotly/validators/barpolar/_unselected.py new file mode 100644 index 00000000000..04f13c68253 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="barpolar", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.barpolar.unselecte + d.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.barpolar.unselecte + d.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_visible.py b/packages/python/plotly/plotly/validators/barpolar/_visible.py new file mode 100644 index 00000000000..718ffc87a2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="barpolar", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_width.py b/packages/python/plotly/plotly/validators/barpolar/_width.py new file mode 100644 index 00000000000..8c898e96dec --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="barpolar", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/_widthsrc.py b/packages/python/plotly/plotly/validators/barpolar/_widthsrc.py new file mode 100644 index 00000000000..20a836c63a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/_widthsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="widthsrc", parent_name="barpolar", **kwargs): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/__init__.py index 94280ab81a7..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/__init__.py @@ -1,180 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="barpolar.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="barpolar.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="barpolar.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="barpolar.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="barpolar.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="barpolar.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="barpolar.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="barpolar.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="barpolar.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_align.py new file mode 100644 index 00000000000..74cbecb30f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="barpolar.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..bc6745d7c49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="barpolar.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..6f4e51bb678 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="barpolar.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..63613a8953f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="barpolar.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..8d51aeee5b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="barpolar.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..3bf1e6d103f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="barpolar.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_font.py new file mode 100644 index 00000000000..f4722e902cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="barpolar.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_namelength.py new file mode 100644 index 00000000000..de070203a49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="barpolar.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..dbb6c76af6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="barpolar.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/__init__.py index 4bd7f161992..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="barpolar.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="barpolar.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="barpolar.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="barpolar.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="barpolar.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="barpolar.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_color.py new file mode 100644 index 00000000000..904c9114a4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="barpolar.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..87f6f400929 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="barpolar.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_family.py new file mode 100644 index 00000000000..606c6dfc931 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="barpolar.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b50290f89b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="barpolar.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_size.py new file mode 100644 index 00000000000..28438af3c41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="barpolar.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..e8f40770c55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="barpolar.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/__init__.py index 167a7433255..bcbbad4466a 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/__init__.py @@ -1,541 +1,42 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="barpolar.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="barpolar.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="barpolar.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="barpolar.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="barpolar.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="barpolar.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="barpolar.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="barpolar.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.barpola - r.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.barpolar.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - barpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.barpolar.marker.co - lorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - barpolar.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - barpolar.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="barpolar.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="barpolar.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "barpolar.marker.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="barpolar.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="barpolar.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="barpolar.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="barpolar.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="barpolar.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/barpolar/marker/_autocolorscale.py new file mode 100644 index 00000000000..819b02d2e89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="barpolar.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_cauto.py b/packages/python/plotly/plotly/validators/barpolar/marker/_cauto.py new file mode 100644 index 00000000000..21965fcfd40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="barpolar.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_cmax.py b/packages/python/plotly/plotly/validators/barpolar/marker/_cmax.py new file mode 100644 index 00000000000..72484546658 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="barpolar.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_cmid.py b/packages/python/plotly/plotly/validators/barpolar/marker/_cmid.py new file mode 100644 index 00000000000..7ef70e6a5ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="barpolar.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_cmin.py b/packages/python/plotly/plotly/validators/barpolar/marker/_cmin.py new file mode 100644 index 00000000000..5a8c81f3853 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="barpolar.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_color.py b/packages/python/plotly/plotly/validators/barpolar/marker/_color.py new file mode 100644 index 00000000000..f33d502b670 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="barpolar.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "barpolar.marker.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/barpolar/marker/_coloraxis.py new file mode 100644 index 00000000000..5f2f951ace4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="barpolar.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_colorbar.py b/packages/python/plotly/plotly/validators/barpolar/marker/_colorbar.py new file mode 100644 index 00000000000..f9855120dff --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="barpolar.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.barpola + r.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.barpolar.marker.colorbar.tickformatstopdefaul + ts), sets the default property values to use + for elements of + barpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.barpolar.marker.co + lorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + barpolar.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + barpolar.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_colorscale.py b/packages/python/plotly/plotly/validators/barpolar/marker/_colorscale.py new file mode 100644 index 00000000000..a7307a5449d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="barpolar.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/barpolar/marker/_colorsrc.py new file mode 100644 index 00000000000..a9771f4153c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="barpolar.marker", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_line.py b/packages/python/plotly/plotly/validators/barpolar/marker/_line.py new file mode 100644 index 00000000000..61705617a7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="barpolar.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_opacity.py b/packages/python/plotly/plotly/validators/barpolar/marker/_opacity.py new file mode 100644 index 00000000000..706a0c4cc84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="barpolar.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/barpolar/marker/_opacitysrc.py new file mode 100644 index 00000000000..52b9926b7d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="barpolar.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_reversescale.py b/packages/python/plotly/plotly/validators/barpolar/marker/_reversescale.py new file mode 100644 index 00000000000..3a65f734d22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="barpolar.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/_showscale.py b/packages/python/plotly/plotly/validators/barpolar/marker/_showscale.py new file mode 100644 index 00000000000..2f86edef1ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="barpolar.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/__init__.py index 056f06e4cc7..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/__init__.py @@ -1,810 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="barpolar.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="barpolar.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..3e7e391596c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..5fd268ef719 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..ae16df6916a --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..28785aaeb10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..15e025ae3af --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_len.py new file mode 100644 index 00000000000..32c733ae7c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..6445ff82264 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..313ad252bc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..d8db6bcda76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..df758d29ad0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..9fcf2f5bceb --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..3fb6ebec266 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..de1e2840fb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..5dc277c60c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..f1bf77c4de6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..21f21a323c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..dc70b4e7939 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..36bfbfa4db1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..6c9d0d49798 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..355e938a8ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..56703ea0f7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..904a7b42dfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..3e8cd33c036 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..6c40f9f801f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..7d8c190fa7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..aa1f9f90c5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..b0c5417e265 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..101bf393fd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..f4d65d27c6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..d2a7fdcab06 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..cb232007802 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..80029e6859f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..bd1ee07f461 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="barpolar.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..b3df442f4b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_title.py new file mode 100644 index 00000000000..203522ee3bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_x.py new file mode 100644 index 00000000000..b8a23d47f94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..13a45f197be --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..1e39cb33b5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_y.py new file mode 100644 index 00000000000..1189a0304aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..9910fb16781 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..1e2179c3c55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="barpolar.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py index f5e29a30f28..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="barpolar.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="barpolar.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="barpolar.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..e73a994cba9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="barpolar.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..7858a1e8042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="barpolar.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..c9dd802a44c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="barpolar.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py index 01c3aad7f93..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="barpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="barpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="barpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="barpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="barpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..3d500b8a8f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="barpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..e374568b588 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="barpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..b32fb718e59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="barpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..c1fb6151289 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="barpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..c7c303df311 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="barpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/__init__.py index 9d8d7b317f2..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="barpolar.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="barpolar.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="barpolar.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..28784e1e082 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="barpolar.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..ed985dd9ce6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="barpolar.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..25606f239cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="barpolar.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py index 0cd23bea5eb..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="barpolar.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="barpolar.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="barpolar.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..e77c6aaa4df --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="barpolar.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..d5fc7fc7691 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="barpolar.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..b646c86ecf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="barpolar.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/__init__.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/__init__.py index 3023c561544..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/barpolar/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/__init__.py @@ -1,204 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="barpolar.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="barpolar.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="barpolar.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="barpolar.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="barpolar.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="barpolar.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="barpolar.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "barpolar.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="barpolar.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="barpolar.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="barpolar.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="barpolar.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="barpolar.marker.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..56ae9856f07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="barpolar.marker.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cauto.py new file mode 100644 index 00000000000..476270cabef --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="barpolar.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmax.py new file mode 100644 index 00000000000..58c3716d175 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="barpolar.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmid.py new file mode 100644 index 00000000000..784c5171805 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="barpolar.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmin.py new file mode 100644 index 00000000000..b00d2cd8d7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="barpolar.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_color.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_color.py new file mode 100644 index 00000000000..11da8c5d808 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="barpolar.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "barpolar.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_coloraxis.py new file mode 100644 index 00000000000..6c1d240843b --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="barpolar.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_colorscale.py new file mode 100644 index 00000000000..0e242df9fee --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="barpolar.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_colorsrc.py new file mode 100644 index 00000000000..1919509231a --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="barpolar.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_reversescale.py new file mode 100644 index 00000000000..741a0e20322 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="barpolar.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_width.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_width.py new file mode 100644 index 00000000000..0ddce916ffe --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="barpolar.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/barpolar/marker/line/_widthsrc.py new file mode 100644 index 00000000000..f3f07298c70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="barpolar.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/__init__.py b/packages/python/plotly/plotly/validators/barpolar/selected/__init__.py index 07b17d3b569..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/barpolar/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/selected/__init__.py @@ -1,42 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="barpolar.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="barpolar.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/_marker.py b/packages/python/plotly/plotly/validators/barpolar/selected/_marker.py new file mode 100644 index 00000000000..b69dca8649f --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/selected/_marker.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="barpolar.selected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/_textfont.py b/packages/python/plotly/plotly/validators/barpolar/selected/_textfont.py new file mode 100644 index 00000000000..01ceaa309d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="barpolar.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/barpolar/selected/marker/__init__.py index 56a56fb028e..772f2b07352 100644 --- a/packages/python/plotly/plotly/validators/barpolar/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/selected/marker/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="barpolar.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="barpolar.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/marker/_color.py b/packages/python/plotly/plotly/validators/barpolar/selected/marker/_color.py new file mode 100644 index 00000000000..17b4c3d5965 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="barpolar.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/barpolar/selected/marker/_opacity.py new file mode 100644 index 00000000000..df1f0675428 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="barpolar.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/barpolar/selected/textfont/__init__.py index fae2fafded2..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/barpolar/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/selected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="barpolar.selected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/barpolar/selected/textfont/_color.py new file mode 100644 index 00000000000..fae2fafded2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/selected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="barpolar.selected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/stream/__init__.py b/packages/python/plotly/plotly/validators/barpolar/stream/__init__.py index 89c66714430..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/barpolar/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="barpolar.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="barpolar.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/barpolar/stream/_maxpoints.py new file mode 100644 index 00000000000..03322849fdf --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="barpolar.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/stream/_token.py b/packages/python/plotly/plotly/validators/barpolar/stream/_token.py new file mode 100644 index 00000000000..bae16c69c3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="barpolar.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/__init__.py b/packages/python/plotly/plotly/validators/barpolar/unselected/__init__.py index 2a72023fe85..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/barpolar/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/__init__.py @@ -1,47 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="barpolar.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="barpolar.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/_marker.py b/packages/python/plotly/plotly/validators/barpolar/unselected/_marker.py new file mode 100644 index 00000000000..0fd3603987c --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="barpolar.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/_textfont.py b/packages/python/plotly/plotly/validators/barpolar/unselected/_textfont.py new file mode 100644 index 00000000000..f4a2a04c439 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="barpolar.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/barpolar/unselected/marker/__init__.py index af3e1dcc49f..772f2b07352 100644 --- a/packages/python/plotly/plotly/validators/barpolar/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/marker/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="barpolar.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="barpolar.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/barpolar/unselected/marker/_color.py new file mode 100644 index 00000000000..aef67c53ea1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="barpolar.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/barpolar/unselected/marker/_opacity.py new file mode 100644 index 00000000000..ea9f2835bb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="barpolar.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/__init__.py index 3ac35becaae..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="barpolar.unselected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/_color.py new file mode 100644 index 00000000000..3ac35becaae --- /dev/null +++ b/packages/python/plotly/plotly/validators/barpolar/unselected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="barpolar.unselected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/__init__.py b/packages/python/plotly/plotly/validators/box/__init__.py index f87303961f3..a6e656b3623 100644 --- a/packages/python/plotly/plotly/validators/box/__init__.py +++ b/packages/python/plotly/plotly/validators/box/__init__.py @@ -1,1150 +1,152 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="box", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="box", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="box", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="box", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="box", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="box", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="box", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="box", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="box", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="box", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="box", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WhiskerwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="whiskerwidth", parent_name="box", **kwargs): - super(WhiskerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="box", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UpperfencesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="upperfencesrc", parent_name="box", **kwargs): - super(UpperfencesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UpperfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="upperfence", parent_name="box", **kwargs): - super(UpperfenceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="box", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.box.unselected.Mar - ker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="box", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="box", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="box", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="box", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="box", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="box", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="box", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="box", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.box.selected.Marke - r` instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SdsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sdsrc", parent_name="box", **kwargs): - super(SdsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SdValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="sd", parent_name="box", **kwargs): - super(SdValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class QuartilemethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="quartilemethod", parent_name="box", **kwargs): - super(QuartilemethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["linear", "exclusive", "inclusive"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Q3SrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="q3src", parent_name="box", **kwargs): - super(Q3SrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Q3Validator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="q3", parent_name="box", **kwargs): - super(Q3Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Q1SrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="q1src", parent_name="box", **kwargs): - super(Q1SrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Q1Validator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="q1", parent_name="box", **kwargs): - super(Q1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PointposValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pointpos", parent_name="box", **kwargs): - super(PointposValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="box", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="box", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="offsetgroup", parent_name="box", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NotchwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="notchwidth", parent_name="box", **kwargs): - super(NotchwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 0.5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NotchspansrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="notchspansrc", parent_name="box", **kwargs): - super(NotchspansrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NotchspanValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="notchspan", parent_name="box", **kwargs): - super(NotchspanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NotchedValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="notched", parent_name="box", **kwargs): - super(NotchedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="box", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="box", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="box", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MediansrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="mediansrc", parent_name="box", **kwargs): - super(MediansrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MedianValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="median", parent_name="box", **kwargs): - super(MedianValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MeansrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="meansrc", parent_name="box", **kwargs): - super(MeansrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MeanValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="mean", parent_name="box", **kwargs): - super(MeanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="box", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.box.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LowerfencesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="lowerfencesrc", parent_name="box", **kwargs): - super(LowerfencesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LowerfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lowerfence", parent_name="box", **kwargs): - super(LowerfenceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="box", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="box", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class JitterValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="jitter", parent_name="box", **kwargs): - super(JitterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="box", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="box", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="box", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="box", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="box", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="box", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoveron", parent_name="box", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - flags=kwargs.pop("flags", ["boxes", "points"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="box", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="box", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="box", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="box", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="box", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="box", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="box", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="box", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxpointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="boxpoints", parent_name="box", **kwargs): - super(BoxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["all", "outliers", "suspectedoutliers", False] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxmeanValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="boxmean", parent_name="box", **kwargs): - super(BoxmeanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, "sd", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="alignmentgroup", parent_name="box", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._width import WidthValidator + from ._whiskerwidth import WhiskerwidthValidator + from ._visible import VisibleValidator + from ._upperfencesrc import UpperfencesrcValidator + from ._upperfence import UpperfenceValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._sdsrc import SdsrcValidator + from ._sd import SdValidator + from ._quartilemethod import QuartilemethodValidator + from ._q3src import Q3SrcValidator + from ._q3 import Q3Validator + from ._q1src import Q1SrcValidator + from ._q1 import Q1Validator + from ._pointpos import PointposValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._offsetgroup import OffsetgroupValidator + from ._notchwidth import NotchwidthValidator + from ._notchspansrc import NotchspansrcValidator + from ._notchspan import NotchspanValidator + from ._notched import NotchedValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._mediansrc import MediansrcValidator + from ._median import MedianValidator + from ._meansrc import MeansrcValidator + from ._mean import MeanValidator + from ._marker import MarkerValidator + from ._lowerfencesrc import LowerfencesrcValidator + from ._lowerfence import LowerfenceValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._jitter import JitterValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._boxpoints import BoxpointsValidator + from ._boxmean import BoxmeanValidator + from ._alignmentgroup import AlignmentgroupValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._width.WidthValidator", + "._whiskerwidth.WhiskerwidthValidator", + "._visible.VisibleValidator", + "._upperfencesrc.UpperfencesrcValidator", + "._upperfence.UpperfenceValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._sdsrc.SdsrcValidator", + "._sd.SdValidator", + "._quartilemethod.QuartilemethodValidator", + "._q3src.Q3SrcValidator", + "._q3.Q3Validator", + "._q1src.Q1SrcValidator", + "._q1.Q1Validator", + "._pointpos.PointposValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._notchwidth.NotchwidthValidator", + "._notchspansrc.NotchspansrcValidator", + "._notchspan.NotchspanValidator", + "._notched.NotchedValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._mediansrc.MediansrcValidator", + "._median.MedianValidator", + "._meansrc.MeansrcValidator", + "._mean.MeanValidator", + "._marker.MarkerValidator", + "._lowerfencesrc.LowerfencesrcValidator", + "._lowerfence.LowerfenceValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._jitter.JitterValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._boxpoints.BoxpointsValidator", + "._boxmean.BoxmeanValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/_alignmentgroup.py b/packages/python/plotly/plotly/validators/box/_alignmentgroup.py new file mode 100644 index 00000000000..a77a1caaa2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_alignmentgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="alignmentgroup", parent_name="box", **kwargs): + super(AlignmentgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_boxmean.py b/packages/python/plotly/plotly/validators/box/_boxmean.py new file mode 100644 index 00000000000..05c5ccf2724 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_boxmean.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BoxmeanValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="boxmean", parent_name="box", **kwargs): + super(BoxmeanValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, "sd", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_boxpoints.py b/packages/python/plotly/plotly/validators/box/_boxpoints.py new file mode 100644 index 00000000000..de7070c75cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_boxpoints.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BoxpointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="boxpoints", parent_name="box", **kwargs): + super(BoxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["all", "outliers", "suspectedoutliers", False] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_customdata.py b/packages/python/plotly/plotly/validators/box/_customdata.py new file mode 100644 index 00000000000..f41cd763f29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="box", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_customdatasrc.py b/packages/python/plotly/plotly/validators/box/_customdatasrc.py new file mode 100644 index 00000000000..c3804e79bbe --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="box", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_dx.py b/packages/python/plotly/plotly/validators/box/_dx.py new file mode 100644 index 00000000000..6c41848232a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_dx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="box", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_dy.py b/packages/python/plotly/plotly/validators/box/_dy.py new file mode 100644 index 00000000000..0284e018bbe --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_dy.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="box", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_fillcolor.py b/packages/python/plotly/plotly/validators/box/_fillcolor.py new file mode 100644 index 00000000000..27c68b37a52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="box", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hoverinfo.py b/packages/python/plotly/plotly/validators/box/_hoverinfo.py new file mode 100644 index 00000000000..8ad9ad6074d --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="box", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/box/_hoverinfosrc.py new file mode 100644 index 00000000000..f170a72a42d --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="box", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hoverlabel.py b/packages/python/plotly/plotly/validators/box/_hoverlabel.py new file mode 100644 index 00000000000..726269ccfe9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="box", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hoveron.py b/packages/python/plotly/plotly/validators/box/_hoveron.py new file mode 100644 index 00000000000..cf2517c3c84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hoveron.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoveron", parent_name="box", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + flags=kwargs.pop("flags", ["boxes", "points"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hovertemplate.py b/packages/python/plotly/plotly/validators/box/_hovertemplate.py new file mode 100644 index 00000000000..a73d12d61fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="box", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/box/_hovertemplatesrc.py new file mode 100644 index 00000000000..028843a91e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="box", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hovertext.py b/packages/python/plotly/plotly/validators/box/_hovertext.py new file mode 100644 index 00000000000..93a23be23f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="box", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_hovertextsrc.py b/packages/python/plotly/plotly/validators/box/_hovertextsrc.py new file mode 100644 index 00000000000..1f64f8035f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="box", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_ids.py b/packages/python/plotly/plotly/validators/box/_ids.py new file mode 100644 index 00000000000..ecfdcee367f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="box", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_idssrc.py b/packages/python/plotly/plotly/validators/box/_idssrc.py new file mode 100644 index 00000000000..cb8e8d0141a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="box", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_jitter.py b/packages/python/plotly/plotly/validators/box/_jitter.py new file mode 100644 index 00000000000..f489ae389c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_jitter.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class JitterValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="jitter", parent_name="box", **kwargs): + super(JitterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_legendgroup.py b/packages/python/plotly/plotly/validators/box/_legendgroup.py new file mode 100644 index 00000000000..ab80557279c --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="box", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_line.py b/packages/python/plotly/plotly/validators/box/_line.py new file mode 100644 index 00000000000..14bbcadb53f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_line.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="box", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_lowerfence.py b/packages/python/plotly/plotly/validators/box/_lowerfence.py new file mode 100644 index 00000000000..04c62bd8fa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_lowerfence.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LowerfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lowerfence", parent_name="box", **kwargs): + super(LowerfenceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_lowerfencesrc.py b/packages/python/plotly/plotly/validators/box/_lowerfencesrc.py new file mode 100644 index 00000000000..37d0b3119af --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_lowerfencesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LowerfencesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="lowerfencesrc", parent_name="box", **kwargs): + super(LowerfencesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_marker.py b/packages/python/plotly/plotly/validators/box/_marker.py new file mode 100644 index 00000000000..1e236c13286 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_marker.py @@ -0,0 +1,38 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="box", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + line + :class:`plotly.graph_objects.box.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_mean.py b/packages/python/plotly/plotly/validators/box/_mean.py new file mode 100644 index 00000000000..598fb73c397 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_mean.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MeanValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="mean", parent_name="box", **kwargs): + super(MeanValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_meansrc.py b/packages/python/plotly/plotly/validators/box/_meansrc.py new file mode 100644 index 00000000000..8903c9aaf9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_meansrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MeansrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="meansrc", parent_name="box", **kwargs): + super(MeansrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_median.py b/packages/python/plotly/plotly/validators/box/_median.py new file mode 100644 index 00000000000..e440d29418d --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_median.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MedianValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="median", parent_name="box", **kwargs): + super(MedianValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_mediansrc.py b/packages/python/plotly/plotly/validators/box/_mediansrc.py new file mode 100644 index 00000000000..b29453d1073 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_mediansrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MediansrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="mediansrc", parent_name="box", **kwargs): + super(MediansrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_meta.py b/packages/python/plotly/plotly/validators/box/_meta.py new file mode 100644 index 00000000000..1f21821eb46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="box", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_metasrc.py b/packages/python/plotly/plotly/validators/box/_metasrc.py new file mode 100644 index 00000000000..202a7c96cfe --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="box", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_name.py b/packages/python/plotly/plotly/validators/box/_name.py new file mode 100644 index 00000000000..d5990278092 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="box", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_notched.py b/packages/python/plotly/plotly/validators/box/_notched.py new file mode 100644 index 00000000000..ce74948850a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_notched.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NotchedValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="notched", parent_name="box", **kwargs): + super(NotchedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_notchspan.py b/packages/python/plotly/plotly/validators/box/_notchspan.py new file mode 100644 index 00000000000..ded005c6fc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_notchspan.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NotchspanValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="notchspan", parent_name="box", **kwargs): + super(NotchspanValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_notchspansrc.py b/packages/python/plotly/plotly/validators/box/_notchspansrc.py new file mode 100644 index 00000000000..290db564b08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_notchspansrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NotchspansrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="notchspansrc", parent_name="box", **kwargs): + super(NotchspansrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_notchwidth.py b/packages/python/plotly/plotly/validators/box/_notchwidth.py new file mode 100644 index 00000000000..b119148b92e --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_notchwidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NotchwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="notchwidth", parent_name="box", **kwargs): + super(NotchwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 0.5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_offsetgroup.py b/packages/python/plotly/plotly/validators/box/_offsetgroup.py new file mode 100644 index 00000000000..8b6c0083c38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_offsetgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="offsetgroup", parent_name="box", **kwargs): + super(OffsetgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_opacity.py b/packages/python/plotly/plotly/validators/box/_opacity.py new file mode 100644 index 00000000000..fe5b5197c1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="box", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_orientation.py b/packages/python/plotly/plotly/validators/box/_orientation.py new file mode 100644 index 00000000000..86a8aa97834 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="box", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_pointpos.py b/packages/python/plotly/plotly/validators/box/_pointpos.py new file mode 100644 index 00000000000..761a002974f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_pointpos.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PointposValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pointpos", parent_name="box", **kwargs): + super(PointposValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_q1.py b/packages/python/plotly/plotly/validators/box/_q1.py new file mode 100644 index 00000000000..061fc64151e --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_q1.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Q1Validator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="q1", parent_name="box", **kwargs): + super(Q1Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_q1src.py b/packages/python/plotly/plotly/validators/box/_q1src.py new file mode 100644 index 00000000000..a49f2582dda --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_q1src.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Q1SrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="q1src", parent_name="box", **kwargs): + super(Q1SrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_q3.py b/packages/python/plotly/plotly/validators/box/_q3.py new file mode 100644 index 00000000000..d9fd1d3df3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_q3.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Q3Validator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="q3", parent_name="box", **kwargs): + super(Q3Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_q3src.py b/packages/python/plotly/plotly/validators/box/_q3src.py new file mode 100644 index 00000000000..fbec1f285a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_q3src.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Q3SrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="q3src", parent_name="box", **kwargs): + super(Q3SrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_quartilemethod.py b/packages/python/plotly/plotly/validators/box/_quartilemethod.py new file mode 100644 index 00000000000..57d422a924c --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_quartilemethod.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class QuartilemethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="quartilemethod", parent_name="box", **kwargs): + super(QuartilemethodValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["linear", "exclusive", "inclusive"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_sd.py b/packages/python/plotly/plotly/validators/box/_sd.py new file mode 100644 index 00000000000..7b1e240400a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_sd.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SdValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="sd", parent_name="box", **kwargs): + super(SdValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_sdsrc.py b/packages/python/plotly/plotly/validators/box/_sdsrc.py new file mode 100644 index 00000000000..0d95374a027 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_sdsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SdsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sdsrc", parent_name="box", **kwargs): + super(SdsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_selected.py b/packages/python/plotly/plotly/validators/box/_selected.py new file mode 100644 index 00000000000..68686da534f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_selected.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="box", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.box.selected.Marke + r` instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_selectedpoints.py b/packages/python/plotly/plotly/validators/box/_selectedpoints.py new file mode 100644 index 00000000000..d9fd3581444 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="box", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_showlegend.py b/packages/python/plotly/plotly/validators/box/_showlegend.py new file mode 100644 index 00000000000..87a98f8dddf --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="box", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_stream.py b/packages/python/plotly/plotly/validators/box/_stream.py new file mode 100644 index 00000000000..f8fe6081ff7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="box", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_text.py b/packages/python/plotly/plotly/validators/box/_text.py new file mode 100644 index 00000000000..fe17f2cc814 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="box", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_textsrc.py b/packages/python/plotly/plotly/validators/box/_textsrc.py new file mode 100644 index 00000000000..88038aa6e1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="box", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_uid.py b/packages/python/plotly/plotly/validators/box/_uid.py new file mode 100644 index 00000000000..3a17242162f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="box", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_uirevision.py b/packages/python/plotly/plotly/validators/box/_uirevision.py new file mode 100644 index 00000000000..ffc3948eeac --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="box", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_unselected.py b/packages/python/plotly/plotly/validators/box/_unselected.py new file mode 100644 index 00000000000..305db528fa0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_unselected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="box", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.box.unselected.Mar + ker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_upperfence.py b/packages/python/plotly/plotly/validators/box/_upperfence.py new file mode 100644 index 00000000000..3bfec0f5a57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_upperfence.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UpperfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="upperfence", parent_name="box", **kwargs): + super(UpperfenceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_upperfencesrc.py b/packages/python/plotly/plotly/validators/box/_upperfencesrc.py new file mode 100644 index 00000000000..f69fbf6c019 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_upperfencesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UpperfencesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="upperfencesrc", parent_name="box", **kwargs): + super(UpperfencesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_visible.py b/packages/python/plotly/plotly/validators/box/_visible.py new file mode 100644 index 00000000000..abfee3d2f92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="box", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_whiskerwidth.py b/packages/python/plotly/plotly/validators/box/_whiskerwidth.py new file mode 100644 index 00000000000..cf857e7234a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_whiskerwidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WhiskerwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="whiskerwidth", parent_name="box", **kwargs): + super(WhiskerwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_width.py b/packages/python/plotly/plotly/validators/box/_width.py new file mode 100644 index 00000000000..5803e1908ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="box", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_x.py b/packages/python/plotly/plotly/validators/box/_x.py new file mode 100644 index 00000000000..77503c4d8e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="box", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_x0.py b/packages/python/plotly/plotly/validators/box/_x0.py new file mode 100644 index 00000000000..0a24ada87bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="box", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_xaxis.py b/packages/python/plotly/plotly/validators/box/_xaxis.py new file mode 100644 index 00000000000..7d9bc8f7fa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="box", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_xcalendar.py b/packages/python/plotly/plotly/validators/box/_xcalendar.py new file mode 100644 index 00000000000..b05de9619ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="box", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_xsrc.py b/packages/python/plotly/plotly/validators/box/_xsrc.py new file mode 100644 index 00000000000..27a1567fad5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="box", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_y.py b/packages/python/plotly/plotly/validators/box/_y.py new file mode 100644 index 00000000000..af10f900900 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="box", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_y0.py b/packages/python/plotly/plotly/validators/box/_y0.py new file mode 100644 index 00000000000..72822c5e17f --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="box", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_yaxis.py b/packages/python/plotly/plotly/validators/box/_yaxis.py new file mode 100644 index 00000000000..4da8cac1afb --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="box", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_ycalendar.py b/packages/python/plotly/plotly/validators/box/_ycalendar.py new file mode 100644 index 00000000000..c89071bb527 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="box", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/_ysrc.py b/packages/python/plotly/plotly/validators/box/_ysrc.py new file mode 100644 index 00000000000..c948461e68b --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="box", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/box/hoverlabel/__init__.py index 0062e61c3e2..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/box/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/__init__.py @@ -1,174 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="box.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="box.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="box.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="box.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="box.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="box.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="box.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="box.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="box.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_align.py new file mode 100644 index 00000000000..b15c60b4e1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="box.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..75ae1f84f2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="box.hoverlabel", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..bc9572ac94c --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="box.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..98202517ae0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="box.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..1722fa713be --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="box.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..e7bb945afb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="box.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_font.py new file mode 100644 index 00000000000..06cdf80ccf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="box.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_namelength.py new file mode 100644 index 00000000000..ade18267cfc --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="box.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..4c93508082c --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="box.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/__init__.py index 8eaac4a4b67..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/box/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="box.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="box.hoverlabel.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="box.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="box.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="box.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="box.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_color.py new file mode 100644 index 00000000000..783dc0c55c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="box.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..02ef71d95f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="box.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_family.py new file mode 100644 index 00000000000..e468ed4107a --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="box.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..e22807d8d85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="box.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_size.py new file mode 100644 index 00000000000..84ef6b6a7b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="box.hoverlabel.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..065d35b9295 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="box.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/line/__init__.py b/packages/python/plotly/plotly/validators/box/line/__init__.py index 7886f024a27..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/box/line/__init__.py +++ b/packages/python/plotly/plotly/validators/box/line/__init__.py @@ -1,27 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="box.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="box.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/box/line/_color.py b/packages/python/plotly/plotly/validators/box/line/_color.py new file mode 100644 index 00000000000..709dad6459b --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="box.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/line/_width.py b/packages/python/plotly/plotly/validators/box/line/_width.py new file mode 100644 index 00000000000..26ee0f4cd94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="box.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/__init__.py b/packages/python/plotly/plotly/validators/box/marker/__init__.py index 3676b0b4adf..c79e8fe46e2 100644 --- a/packages/python/plotly/plotly/validators/box/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/box/marker/__init__.py @@ -1,398 +1,24 @@ -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="box.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="box.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="outliercolor", parent_name="box.marker", **kwargs): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="box.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="box.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="box.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbol import SymbolValidator + from ._size import SizeValidator + from ._outliercolor import OutliercolorValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbol.SymbolValidator", + "._size.SizeValidator", + "._outliercolor.OutliercolorValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/_color.py b/packages/python/plotly/plotly/validators/box/marker/_color.py new file mode 100644 index 00000000000..f47eab51e47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="box.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/_line.py b/packages/python/plotly/plotly/validators/box/marker/_line.py new file mode 100644 index 00000000000..4c29919ccce --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/_line.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="box.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + outliercolor + Sets the border line color of the outlier + sample points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the + outlier sample points. + width + Sets the width (in px) of the lines bounding + the marker points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/_opacity.py b/packages/python/plotly/plotly/validators/box/marker/_opacity.py new file mode 100644 index 00000000000..723024fc35e --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="box.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/_outliercolor.py b/packages/python/plotly/plotly/validators/box/marker/_outliercolor.py new file mode 100644 index 00000000000..a226eab4c4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/_outliercolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="outliercolor", parent_name="box.marker", **kwargs): + super(OutliercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/_size.py b/packages/python/plotly/plotly/validators/box/marker/_size.py new file mode 100644 index 00000000000..07177815219 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="box.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/_symbol.py b/packages/python/plotly/plotly/validators/box/marker/_symbol.py new file mode 100644 index 00000000000..ed99cd6bedc --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="box.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/line/__init__.py b/packages/python/plotly/plotly/validators/box/marker/line/__init__.py index 5fa1798689f..f2cb10d010e 100644 --- a/packages/python/plotly/plotly/validators/box/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/box/marker/line/__init__.py @@ -1,62 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="box.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlierwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlierwidth", parent_name="box.marker.line", **kwargs - ): - super(OutlierwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outliercolor", parent_name="box.marker.line", **kwargs - ): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="box.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._outlierwidth import OutlierwidthValidator + from ._outliercolor import OutliercolorValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._outlierwidth.OutlierwidthValidator", + "._outliercolor.OutliercolorValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/line/_color.py b/packages/python/plotly/plotly/validators/box/marker/line/_color.py new file mode 100644 index 00000000000..4a047398530 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="box.marker.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/line/_outliercolor.py b/packages/python/plotly/plotly/validators/box/marker/line/_outliercolor.py new file mode 100644 index 00000000000..6d3dd0e9278 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/line/_outliercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outliercolor", parent_name="box.marker.line", **kwargs + ): + super(OutliercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/line/_outlierwidth.py b/packages/python/plotly/plotly/validators/box/marker/line/_outlierwidth.py new file mode 100644 index 00000000000..5c2b9a9ecdb --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/line/_outlierwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlierwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlierwidth", parent_name="box.marker.line", **kwargs + ): + super(OutlierwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/marker/line/_width.py b/packages/python/plotly/plotly/validators/box/marker/line/_width.py new file mode 100644 index 00000000000..071f9b62c01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/marker/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="box.marker.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/selected/__init__.py b/packages/python/plotly/plotly/validators/box/selected/__init__.py index 2471ec83aed..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/box/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/box/selected/__init__.py @@ -1,22 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="box.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/box/selected/_marker.py b/packages/python/plotly/plotly/validators/box/selected/_marker.py new file mode 100644 index 00000000000..2471ec83aed --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/selected/_marker.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="box.selected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/box/selected/marker/__init__.py index 405168af7a8..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/box/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/box/selected/marker/__init__.py @@ -1,47 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="box.selected.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="box.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="box.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/selected/marker/_color.py b/packages/python/plotly/plotly/validators/box/selected/marker/_color.py new file mode 100644 index 00000000000..8a4d47272a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="box.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/box/selected/marker/_opacity.py new file mode 100644 index 00000000000..35aae56f406 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="box.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/selected/marker/_size.py b/packages/python/plotly/plotly/validators/box/selected/marker/_size.py new file mode 100644 index 00000000000..ad1e48719d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/selected/marker/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="box.selected.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/stream/__init__.py b/packages/python/plotly/plotly/validators/box/stream/__init__.py index 870615edf4b..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/box/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/box/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="box.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="box.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/box/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/box/stream/_maxpoints.py new file mode 100644 index 00000000000..afef2c6937b --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="box.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/stream/_token.py b/packages/python/plotly/plotly/validators/box/stream/_token.py new file mode 100644 index 00000000000..11f7ba3705b --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="box.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/unselected/__init__.py b/packages/python/plotly/plotly/validators/box/unselected/__init__.py index d13778126ff..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/box/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/box/unselected/__init__.py @@ -1,25 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="box.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/box/unselected/_marker.py b/packages/python/plotly/plotly/validators/box/unselected/_marker.py new file mode 100644 index 00000000000..d13778126ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/unselected/_marker.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="box.unselected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/box/unselected/marker/__init__.py index a66317e5739..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/box/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/box/unselected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="box.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="box.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="box.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/box/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/box/unselected/marker/_color.py new file mode 100644 index 00000000000..f7964c20979 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="box.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/box/unselected/marker/_opacity.py new file mode 100644 index 00000000000..8baf6a23446 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="box.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/box/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/box/unselected/marker/_size.py new file mode 100644 index 00000000000..1c6156c2a34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/box/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="box.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/__init__.py b/packages/python/plotly/plotly/validators/candlestick/__init__.py index 037e8fd16e7..17d79bc8b73 100644 --- a/packages/python/plotly/plotly/validators/candlestick/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/__init__.py @@ -1,673 +1,90 @@ -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="candlestick", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="candlestick", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="candlestick", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="candlestick", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="candlestick", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WhiskerwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="whiskerwidth", parent_name="candlestick", **kwargs): - super(WhiskerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="candlestick", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="candlestick", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="candlestick", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="candlestick", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="candlestick", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="candlestick", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="candlestick", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="candlestick", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="opensrc", parent_name="candlestick", **kwargs): - super(OpensrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="open", parent_name="candlestick", **kwargs): - super(OpenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="candlestick", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="candlestick", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="candlestick", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="candlestick", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="lowsrc", parent_name="candlestick", **kwargs): - super(LowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LowValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="low", parent_name="candlestick", **kwargs): - super(LowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="candlestick", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - width - Sets the width (in px) of line bounding the - box(es). Note that this style setting can also - be set per direction via - `increasing.line.width` and - `decreasing.line.width`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="candlestick", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="increasing", parent_name="candlestick", **kwargs): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Increasing"), - data_docs=kwargs.pop( - "data_docs", - """ - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.increa - sing.Line` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="candlestick", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="candlestick", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="candlestick", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="candlestick", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="candlestick", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - split - Show hover information (open, close, high, low) - in separate labels. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="candlestick", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="candlestick", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="highsrc", parent_name="candlestick", **kwargs): - super(HighsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="high", parent_name="candlestick", **kwargs): - super(HighValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="decreasing", parent_name="candlestick", **kwargs): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Decreasing"), - data_docs=kwargs.pop( - "data_docs", - """ - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.decrea - sing.Line` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="candlestick", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="candlestick", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="closesrc", parent_name="candlestick", **kwargs): - super(ClosesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CloseValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="close", parent_name="candlestick", **kwargs): - super(CloseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yaxis import YaxisValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._whiskerwidth import WhiskerwidthValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._opensrc import OpensrcValidator + from ._open import OpenValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lowsrc import LowsrcValidator + from ._low import LowValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._increasing import IncreasingValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._highsrc import HighsrcValidator + from ._high import HighValidator + from ._decreasing import DecreasingValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._closesrc import ClosesrcValidator + from ._close import CloseValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._whiskerwidth.WhiskerwidthValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._opensrc.OpensrcValidator", + "._open.OpenValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lowsrc.LowsrcValidator", + "._low.LowValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._increasing.IncreasingValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._highsrc.HighsrcValidator", + "._high.HighValidator", + "._decreasing.DecreasingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._closesrc.ClosesrcValidator", + "._close.CloseValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_close.py b/packages/python/plotly/plotly/validators/candlestick/_close.py new file mode 100644 index 00000000000..bf73bb2cdc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_close.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CloseValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="close", parent_name="candlestick", **kwargs): + super(CloseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_closesrc.py b/packages/python/plotly/plotly/validators/candlestick/_closesrc.py new file mode 100644 index 00000000000..9bfc5222dce --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_closesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="closesrc", parent_name="candlestick", **kwargs): + super(ClosesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_customdata.py b/packages/python/plotly/plotly/validators/candlestick/_customdata.py new file mode 100644 index 00000000000..a6731ec0afc --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="candlestick", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_customdatasrc.py b/packages/python/plotly/plotly/validators/candlestick/_customdatasrc.py new file mode 100644 index 00000000000..764623720dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="candlestick", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_decreasing.py b/packages/python/plotly/plotly/validators/candlestick/_decreasing.py new file mode 100644 index 00000000000..3b66e9ac41c --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_decreasing.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="decreasing", parent_name="candlestick", **kwargs): + super(DecreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Decreasing"), + data_docs=kwargs.pop( + "data_docs", + """ + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + line + :class:`plotly.graph_objects.candlestick.decrea + sing.Line` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_high.py b/packages/python/plotly/plotly/validators/candlestick/_high.py new file mode 100644 index 00000000000..7827ad7175c --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_high.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HighValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="high", parent_name="candlestick", **kwargs): + super(HighValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_highsrc.py b/packages/python/plotly/plotly/validators/candlestick/_highsrc.py new file mode 100644 index 00000000000..5a4542042a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_highsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HighsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="highsrc", parent_name="candlestick", **kwargs): + super(HighsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_hoverinfo.py b/packages/python/plotly/plotly/validators/candlestick/_hoverinfo.py new file mode 100644 index 00000000000..664b30d681f --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="candlestick", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/candlestick/_hoverinfosrc.py new file mode 100644 index 00000000000..04b3e931562 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="candlestick", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_hoverlabel.py b/packages/python/plotly/plotly/validators/candlestick/_hoverlabel.py new file mode 100644 index 00000000000..bbbeda60509 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_hoverlabel.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="candlestick", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + split + Show hover information (open, close, high, low) + in separate labels. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_hovertext.py b/packages/python/plotly/plotly/validators/candlestick/_hovertext.py new file mode 100644 index 00000000000..00b67fc7419 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="candlestick", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_hovertextsrc.py b/packages/python/plotly/plotly/validators/candlestick/_hovertextsrc.py new file mode 100644 index 00000000000..fda431d1fff --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="candlestick", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_ids.py b/packages/python/plotly/plotly/validators/candlestick/_ids.py new file mode 100644 index 00000000000..649099e3a01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="candlestick", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_idssrc.py b/packages/python/plotly/plotly/validators/candlestick/_idssrc.py new file mode 100644 index 00000000000..0d95acf7df0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="candlestick", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_increasing.py b/packages/python/plotly/plotly/validators/candlestick/_increasing.py new file mode 100644 index 00000000000..d2007ee3495 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_increasing.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="increasing", parent_name="candlestick", **kwargs): + super(IncreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Increasing"), + data_docs=kwargs.pop( + "data_docs", + """ + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + line + :class:`plotly.graph_objects.candlestick.increa + sing.Line` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_legendgroup.py b/packages/python/plotly/plotly/validators/candlestick/_legendgroup.py new file mode 100644 index 00000000000..d36f9b656b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="candlestick", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_line.py b/packages/python/plotly/plotly/validators/candlestick/_line.py new file mode 100644 index 00000000000..76e6fdb93e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_line.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="candlestick", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + width + Sets the width (in px) of line bounding the + box(es). Note that this style setting can also + be set per direction via + `increasing.line.width` and + `decreasing.line.width`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_low.py b/packages/python/plotly/plotly/validators/candlestick/_low.py new file mode 100644 index 00000000000..fd4e9dccb4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_low.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LowValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="low", parent_name="candlestick", **kwargs): + super(LowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_lowsrc.py b/packages/python/plotly/plotly/validators/candlestick/_lowsrc.py new file mode 100644 index 00000000000..8659fdb261a --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_lowsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="lowsrc", parent_name="candlestick", **kwargs): + super(LowsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_meta.py b/packages/python/plotly/plotly/validators/candlestick/_meta.py new file mode 100644 index 00000000000..5489a00f76e --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="candlestick", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_metasrc.py b/packages/python/plotly/plotly/validators/candlestick/_metasrc.py new file mode 100644 index 00000000000..59c67009a13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="candlestick", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_name.py b/packages/python/plotly/plotly/validators/candlestick/_name.py new file mode 100644 index 00000000000..2d41c0acc25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="candlestick", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_opacity.py b/packages/python/plotly/plotly/validators/candlestick/_opacity.py new file mode 100644 index 00000000000..7da695fd6f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="candlestick", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_open.py b/packages/python/plotly/plotly/validators/candlestick/_open.py new file mode 100644 index 00000000000..9ae97fb20fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_open.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="open", parent_name="candlestick", **kwargs): + super(OpenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_opensrc.py b/packages/python/plotly/plotly/validators/candlestick/_opensrc.py new file mode 100644 index 00000000000..9e8eb71f18a --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_opensrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="opensrc", parent_name="candlestick", **kwargs): + super(OpensrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_selectedpoints.py b/packages/python/plotly/plotly/validators/candlestick/_selectedpoints.py new file mode 100644 index 00000000000..2659435e4ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="candlestick", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_showlegend.py b/packages/python/plotly/plotly/validators/candlestick/_showlegend.py new file mode 100644 index 00000000000..e35510ff31a --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="candlestick", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_stream.py b/packages/python/plotly/plotly/validators/candlestick/_stream.py new file mode 100644 index 00000000000..4f3211ce618 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="candlestick", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_text.py b/packages/python/plotly/plotly/validators/candlestick/_text.py new file mode 100644 index 00000000000..fd61c8af270 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="candlestick", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_textsrc.py b/packages/python/plotly/plotly/validators/candlestick/_textsrc.py new file mode 100644 index 00000000000..a5301b3709d --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="candlestick", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_uid.py b/packages/python/plotly/plotly/validators/candlestick/_uid.py new file mode 100644 index 00000000000..b5668ad7ff1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="candlestick", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_uirevision.py b/packages/python/plotly/plotly/validators/candlestick/_uirevision.py new file mode 100644 index 00000000000..235b9ae6399 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="candlestick", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_visible.py b/packages/python/plotly/plotly/validators/candlestick/_visible.py new file mode 100644 index 00000000000..c636e1781db --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="candlestick", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_whiskerwidth.py b/packages/python/plotly/plotly/validators/candlestick/_whiskerwidth.py new file mode 100644 index 00000000000..38b2567bf8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_whiskerwidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WhiskerwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="whiskerwidth", parent_name="candlestick", **kwargs): + super(WhiskerwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_x.py b/packages/python/plotly/plotly/validators/candlestick/_x.py new file mode 100644 index 00000000000..46b53ad5869 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="candlestick", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_xaxis.py b/packages/python/plotly/plotly/validators/candlestick/_xaxis.py new file mode 100644 index 00000000000..ac72b2935ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="candlestick", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_xcalendar.py b/packages/python/plotly/plotly/validators/candlestick/_xcalendar.py new file mode 100644 index 00000000000..b1bbbc295ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="candlestick", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_xsrc.py b/packages/python/plotly/plotly/validators/candlestick/_xsrc.py new file mode 100644 index 00000000000..e07b05fcebb --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="candlestick", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/_yaxis.py b/packages/python/plotly/plotly/validators/candlestick/_yaxis.py new file mode 100644 index 00000000000..b65057377f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="candlestick", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/decreasing/__init__.py b/packages/python/plotly/plotly/validators/candlestick/decreasing/__init__.py index d20f6b66104..dd52f0bed3d 100644 --- a/packages/python/plotly/plotly/validators/candlestick/decreasing/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/decreasing/__init__.py @@ -1,39 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._fillcolor import FillcolorValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="candlestick.decreasing", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="fillcolor", parent_name="candlestick.decreasing", **kwargs - ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._fillcolor.FillcolorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/decreasing/_fillcolor.py b/packages/python/plotly/plotly/validators/candlestick/decreasing/_fillcolor.py new file mode 100644 index 00000000000..e8a6bb39770 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/decreasing/_fillcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="fillcolor", parent_name="candlestick.decreasing", **kwargs + ): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/decreasing/_line.py b/packages/python/plotly/plotly/validators/candlestick/decreasing/_line.py new file mode 100644 index 00000000000..79a34ade161 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/decreasing/_line.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="candlestick.decreasing", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/decreasing/line/__init__.py b/packages/python/plotly/plotly/validators/candlestick/decreasing/line/__init__.py index befb9a59f65..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/candlestick/decreasing/line/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/decreasing/line/__init__.py @@ -1,31 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="candlestick.decreasing.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="candlestick.decreasing.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/decreasing/line/_color.py b/packages/python/plotly/plotly/validators/candlestick/decreasing/line/_color.py new file mode 100644 index 00000000000..defb5f37bbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/decreasing/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="candlestick.decreasing.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/decreasing/line/_width.py b/packages/python/plotly/plotly/validators/candlestick/decreasing/line/_width.py new file mode 100644 index 00000000000..7ec12f513d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/decreasing/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="candlestick.decreasing.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/__init__.py index d5e9fe3cbc5..bfe4e0a5a95 100644 --- a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/__init__.py @@ -1,204 +1,32 @@ -import _plotly_utils.basevalidators - - -class SplitValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="split", parent_name="candlestick.hoverlabel", **kwargs - ): - super(SplitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="candlestick.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="candlestick.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="candlestick.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="candlestick.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="candlestick.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="candlestick.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="candlestick.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="candlestick.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="candlestick.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._split import SplitValidator + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._split.SplitValidator", + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_align.py new file mode 100644 index 00000000000..02d0466722c --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="candlestick.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..35093f962dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="candlestick.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..a1f135bb3c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="candlestick.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..5e04c9410dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="candlestick.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..eefdd1dea97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="candlestick.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..8321d894cf2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="candlestick.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_font.py new file mode 100644 index 00000000000..8ad246a0e97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="candlestick.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_namelength.py new file mode 100644 index 00000000000..c74eed077da --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="candlestick.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..62fa475a18b --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="candlestick.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_split.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_split.py new file mode 100644 index 00000000000..9117f5b5796 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/_split.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SplitValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="split", parent_name="candlestick.hoverlabel", **kwargs + ): + super(SplitValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/__init__.py index 332023deba9..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/__init__.py @@ -1,106 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="candlestick.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="candlestick.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="candlestick.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="candlestick.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="candlestick.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="candlestick.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_color.py new file mode 100644 index 00000000000..a0a6cf133c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="candlestick.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..776709ef2c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="candlestick.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_family.py new file mode 100644 index 00000000000..3279d1676b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="candlestick.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..5358c61e523 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="candlestick.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_size.py new file mode 100644 index 00000000000..367fc8ad293 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="candlestick.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..578f502e0ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="candlestick.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/increasing/__init__.py b/packages/python/plotly/plotly/validators/candlestick/increasing/__init__.py index d3f783a3b13..dd52f0bed3d 100644 --- a/packages/python/plotly/plotly/validators/candlestick/increasing/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/increasing/__init__.py @@ -1,39 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._fillcolor import FillcolorValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="candlestick.increasing", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="fillcolor", parent_name="candlestick.increasing", **kwargs - ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._fillcolor.FillcolorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/increasing/_fillcolor.py b/packages/python/plotly/plotly/validators/candlestick/increasing/_fillcolor.py new file mode 100644 index 00000000000..78403ea3218 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/increasing/_fillcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="fillcolor", parent_name="candlestick.increasing", **kwargs + ): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/increasing/_line.py b/packages/python/plotly/plotly/validators/candlestick/increasing/_line.py new file mode 100644 index 00000000000..2278814b401 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/increasing/_line.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="candlestick.increasing", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/increasing/line/__init__.py b/packages/python/plotly/plotly/validators/candlestick/increasing/line/__init__.py index 541c3bbfcb8..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/candlestick/increasing/line/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/increasing/line/__init__.py @@ -1,31 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="candlestick.increasing.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="candlestick.increasing.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/increasing/line/_color.py b/packages/python/plotly/plotly/validators/candlestick/increasing/line/_color.py new file mode 100644 index 00000000000..581503de416 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/increasing/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="candlestick.increasing.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/increasing/line/_width.py b/packages/python/plotly/plotly/validators/candlestick/increasing/line/_width.py new file mode 100644 index 00000000000..dcb5fe786d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/increasing/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="candlestick.increasing.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/line/__init__.py b/packages/python/plotly/plotly/validators/candlestick/line/__init__.py index 36d99672eff..37bbb254042 100644 --- a/packages/python/plotly/plotly/validators/candlestick/line/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/line/__init__.py @@ -1,13 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="candlestick.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/line/_width.py b/packages/python/plotly/plotly/validators/candlestick/line/_width.py new file mode 100644 index 00000000000..36d99672eff --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="candlestick.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/stream/__init__.py b/packages/python/plotly/plotly/validators/candlestick/stream/__init__.py index bbb6bd8a93d..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/candlestick/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/candlestick/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="candlestick.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="candlestick.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/candlestick/stream/_maxpoints.py new file mode 100644 index 00000000000..5e75f6faa4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="candlestick.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/candlestick/stream/_token.py b/packages/python/plotly/plotly/validators/candlestick/stream/_token.py new file mode 100644 index 00000000000..e6ca896372d --- /dev/null +++ b/packages/python/plotly/plotly/validators/candlestick/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="candlestick.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/__init__.py b/packages/python/plotly/plotly/validators/carpet/__init__.py index 7d88750d711..152d23d10c2 100644 --- a/packages/python/plotly/plotly/validators/carpet/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/__init__.py @@ -1,922 +1,76 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="carpet", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="carpet", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="carpet", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="carpet", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="carpet", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="carpet", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="carpet", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="carpet", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="carpet", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="carpet", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="carpet", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="carpet", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="carpet", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="carpet", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="carpet", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="carpet", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="carpet", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DbValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="db", parent_name="carpet", **kwargs): - super(DbValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DaValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="da", parent_name="carpet", **kwargs): - super(DaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="carpet", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="carpet", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="carpet", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CheaterslopeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cheaterslope", parent_name="carpet", **kwargs): - super(CheaterslopeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CarpetValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="carpet", parent_name="carpet", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="bsrc", parent_name="carpet", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="baxis", parent_name="carpet", **kwargs): - super(BaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Baxis"), - data_docs=kwargs.pop( - "data_docs", - """ - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: We add one item to d3's - date formatter: "%{n}f" for fractional seconds - with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" - would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - baxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.baxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - title - :class:`plotly.graph_objects.carpet.baxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.baxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be set by the now - deprecated `titlefont` attribute. - titleoffset - Deprecated: Please use - carpet.baxis.title.offset instead. An - additional amount by which to offset the title - from the tick labels, given in pixels. Note - that this used to be set by the now deprecated - `titleoffset` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class B0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="b0", parent_name="carpet", **kwargs): - super(B0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="b", parent_name="carpet", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="asrc", parent_name="carpet", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AaxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="aaxis", parent_name="carpet", **kwargs): - super(AaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Aaxis"), - data_docs=kwargs.pop( - "data_docs", - """ - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: We add one item to d3's - date formatter: "%{n}f" for fractional seconds - with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" - would display "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - aaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.aaxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - title - :class:`plotly.graph_objects.carpet.aaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.aaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be set by the now - deprecated `titlefont` attribute. - titleoffset - Deprecated: Please use - carpet.aaxis.title.offset instead. An - additional amount by which to offset the title - from the tick labels, given in pixels. Note - that this used to be set by the now deprecated - `titleoffset` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class A0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="a0", parent_name="carpet", **kwargs): - super(A0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="a", parent_name="carpet", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._yaxis import YaxisValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._stream import StreamValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._font import FontValidator + from ._db import DbValidator + from ._da import DaValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._color import ColorValidator + from ._cheaterslope import CheaterslopeValidator + from ._carpet import CarpetValidator + from ._bsrc import BsrcValidator + from ._baxis import BaxisValidator + from ._b0 import B0Validator + from ._b import BValidator + from ._asrc import AsrcValidator + from ._aaxis import AaxisValidator + from ._a0 import A0Validator + from ._a import AValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._stream.StreamValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._font.FontValidator", + "._db.DbValidator", + "._da.DaValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._color.ColorValidator", + "._cheaterslope.CheaterslopeValidator", + "._carpet.CarpetValidator", + "._bsrc.BsrcValidator", + "._baxis.BaxisValidator", + "._b0.B0Validator", + "._b.BValidator", + "._asrc.AsrcValidator", + "._aaxis.AaxisValidator", + "._a0.A0Validator", + "._a.AValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_a.py b/packages/python/plotly/plotly/validators/carpet/_a.py new file mode 100644 index 00000000000..32ed344192b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_a.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="a", parent_name="carpet", **kwargs): + super(AValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_a0.py b/packages/python/plotly/plotly/validators/carpet/_a0.py new file mode 100644 index 00000000000..41bdca7f357 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_a0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class A0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="a0", parent_name="carpet", **kwargs): + super(A0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_aaxis.py b/packages/python/plotly/plotly/validators/carpet/_aaxis.py new file mode 100644 index 00000000000..191000b8188 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_aaxis.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class AaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="aaxis", parent_name="carpet", **kwargs): + super(AaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Aaxis"), + data_docs=kwargs.pop( + "data_docs", + """ + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at + along the final value of this axis. If True, + the end line is drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major + grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether axis labels are drawn on the + low side, the high side, both, or neither side + of the axis. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at + along the starting value of this axis. If True, + the start line is drawn on top of the grid + lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: We add one item to d3's + date formatter: "%{n}f" for fractional seconds + with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" + would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet. + aaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.carpet.aaxis.tickformatstopdefaults), sets + the default property values to use for elements + of carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + title + :class:`plotly.graph_objects.carpet.aaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.aaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be set by the now + deprecated `titlefont` attribute. + titleoffset + Deprecated: Please use + carpet.aaxis.title.offset instead. An + additional amount by which to offset the title + from the tick labels, given in pixels. Note + that this used to be set by the now deprecated + `titleoffset` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_asrc.py b/packages/python/plotly/plotly/validators/carpet/_asrc.py new file mode 100644 index 00000000000..02058b53184 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_asrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="asrc", parent_name="carpet", **kwargs): + super(AsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_b.py b/packages/python/plotly/plotly/validators/carpet/_b.py new file mode 100644 index 00000000000..f6c85f18d53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_b.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="b", parent_name="carpet", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_b0.py b/packages/python/plotly/plotly/validators/carpet/_b0.py new file mode 100644 index 00000000000..7a501853e84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_b0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class B0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b0", parent_name="carpet", **kwargs): + super(B0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_baxis.py b/packages/python/plotly/plotly/validators/carpet/_baxis.py new file mode 100644 index 00000000000..993131d2b84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_baxis.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class BaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="baxis", parent_name="carpet", **kwargs): + super(BaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Baxis"), + data_docs=kwargs.pop( + "data_docs", + """ + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at + along the final value of this axis. If True, + the end line is drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major + grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether axis labels are drawn on the + low side, the high side, both, or neither side + of the axis. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at + along the starting value of this axis. If True, + the start line is drawn on top of the grid + lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: We add one item to d3's + date formatter: "%{n}f" for fractional seconds + with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" + would display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet. + baxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.carpet.baxis.tickformatstopdefaults), sets + the default property values to use for elements + of carpet.baxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + title + :class:`plotly.graph_objects.carpet.baxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.baxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be set by the now + deprecated `titlefont` attribute. + titleoffset + Deprecated: Please use + carpet.baxis.title.offset instead. An + additional amount by which to offset the title + from the tick labels, given in pixels. Note + that this used to be set by the now deprecated + `titleoffset` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_bsrc.py b/packages/python/plotly/plotly/validators/carpet/_bsrc.py new file mode 100644 index 00000000000..dca80c25fd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_bsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="bsrc", parent_name="carpet", **kwargs): + super(BsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_carpet.py b/packages/python/plotly/plotly/validators/carpet/_carpet.py new file mode 100644 index 00000000000..54f8f6d1f1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_carpet.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CarpetValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="carpet", parent_name="carpet", **kwargs): + super(CarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_cheaterslope.py b/packages/python/plotly/plotly/validators/carpet/_cheaterslope.py new file mode 100644 index 00000000000..c52286376e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_cheaterslope.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CheaterslopeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cheaterslope", parent_name="carpet", **kwargs): + super(CheaterslopeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_color.py b/packages/python/plotly/plotly/validators/carpet/_color.py new file mode 100644 index 00000000000..dacd9bb6b86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="carpet", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_customdata.py b/packages/python/plotly/plotly/validators/carpet/_customdata.py new file mode 100644 index 00000000000..039d0fa0c59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="carpet", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_customdatasrc.py b/packages/python/plotly/plotly/validators/carpet/_customdatasrc.py new file mode 100644 index 00000000000..4fa8ade40ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="carpet", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_da.py b/packages/python/plotly/plotly/validators/carpet/_da.py new file mode 100644 index 00000000000..996483cc001 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_da.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DaValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="da", parent_name="carpet", **kwargs): + super(DaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_db.py b/packages/python/plotly/plotly/validators/carpet/_db.py new file mode 100644 index 00000000000..bc21ff6a353 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_db.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DbValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="db", parent_name="carpet", **kwargs): + super(DbValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_font.py b/packages/python/plotly/plotly/validators/carpet/_font.py new file mode 100644 index 00000000000..522a275ed34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="carpet", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_ids.py b/packages/python/plotly/plotly/validators/carpet/_ids.py new file mode 100644 index 00000000000..ce5733b4b1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_ids.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="carpet", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_idssrc.py b/packages/python/plotly/plotly/validators/carpet/_idssrc.py new file mode 100644 index 00000000000..b127eaea1d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="carpet", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_meta.py b/packages/python/plotly/plotly/validators/carpet/_meta.py new file mode 100644 index 00000000000..4d359824b2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="carpet", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_metasrc.py b/packages/python/plotly/plotly/validators/carpet/_metasrc.py new file mode 100644 index 00000000000..127ed33ff59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="carpet", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_name.py b/packages/python/plotly/plotly/validators/carpet/_name.py new file mode 100644 index 00000000000..576d842a736 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="carpet", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_opacity.py b/packages/python/plotly/plotly/validators/carpet/_opacity.py new file mode 100644 index 00000000000..ef8f02a95ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="carpet", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_stream.py b/packages/python/plotly/plotly/validators/carpet/_stream.py new file mode 100644 index 00000000000..0d010c62448 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="carpet", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_uid.py b/packages/python/plotly/plotly/validators/carpet/_uid.py new file mode 100644 index 00000000000..328efc5f85a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_uid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="carpet", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_uirevision.py b/packages/python/plotly/plotly/validators/carpet/_uirevision.py new file mode 100644 index 00000000000..cf19264faa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="carpet", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_visible.py b/packages/python/plotly/plotly/validators/carpet/_visible.py new file mode 100644 index 00000000000..c00c152e988 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="carpet", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_x.py b/packages/python/plotly/plotly/validators/carpet/_x.py new file mode 100644 index 00000000000..3ffe3b07ad6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="carpet", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_xaxis.py b/packages/python/plotly/plotly/validators/carpet/_xaxis.py new file mode 100644 index 00000000000..d10c9a9b698 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="carpet", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_xsrc.py b/packages/python/plotly/plotly/validators/carpet/_xsrc.py new file mode 100644 index 00000000000..37a4a073cbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="carpet", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_y.py b/packages/python/plotly/plotly/validators/carpet/_y.py new file mode 100644 index 00000000000..2abaa471af8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="carpet", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_yaxis.py b/packages/python/plotly/plotly/validators/carpet/_yaxis.py new file mode 100644 index 00000000000..77e7a7e2141 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="carpet", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/_ysrc.py b/packages/python/plotly/plotly/validators/carpet/_ysrc.py new file mode 100644 index 00000000000..95c42a53317 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="carpet", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/__init__.py b/packages/python/plotly/plotly/validators/carpet/aaxis/__init__.py index 207c24f3db5..38772a426f1 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/__init__.py @@ -1,895 +1,118 @@ -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="carpet.aaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="carpet.aaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - Note that this used to be set by the now - deprecated `titleoffset` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tickvalssrc", parent_name="carpet.aaxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="carpet.aaxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.aaxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="carpet.aaxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="ticksuffix", parent_name="carpet.aaxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickprefix", parent_name="carpet.aaxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="carpet.aaxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickformatstopdefaults", parent_name="carpet.aaxis", **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="carpet.aaxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickformat", parent_name="carpet.aaxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="carpet.aaxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="tickangle", parent_name="carpet.aaxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tick0", parent_name="carpet.aaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="startlinewidth", parent_name="carpet.aaxis", **kwargs - ): - super(StartlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="startlinecolor", parent_name="carpet.aaxis", **kwargs - ): - super(StartlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="startline", parent_name="carpet.aaxis", **kwargs): - super(StartlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="smoothing", parent_name="carpet.aaxis", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="carpet.aaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="carpet.aaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="carpet.aaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["start", "end", "both", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showline", parent_name="carpet.aaxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showgrid", parent_name="carpet.aaxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="carpet.aaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="carpet.aaxis", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="rangemode", parent_name="carpet.aaxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="carpet.aaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="carpet.aaxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorgridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="minorgridwidth", parent_name="carpet.aaxis", **kwargs - ): - super(MinorgridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorgridcountValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="minorgridcount", parent_name="carpet.aaxis", **kwargs - ): - super(MinorgridcountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorgridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="minorgridcolor", parent_name="carpet.aaxis", **kwargs - ): - super(MinorgridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="linewidth", parent_name="carpet.aaxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="linecolor", parent_name="carpet.aaxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="labelsuffix", parent_name="carpet.aaxis", **kwargs): - super(LabelsuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="labelprefix", parent_name="carpet.aaxis", **kwargs): - super(LabelprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="labelpadding", parent_name="carpet.aaxis", **kwargs - ): - super(LabelpaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="gridwidth", parent_name="carpet.aaxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="gridcolor", parent_name="carpet.aaxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="fixedrange", parent_name="carpet.aaxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="carpet.aaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="endlinewidth", parent_name="carpet.aaxis", **kwargs - ): - super(EndlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="endlinecolor", parent_name="carpet.aaxis", **kwargs - ): - super(EndlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="endline", parent_name="carpet.aaxis", **kwargs): - super(EndlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtick", parent_name="carpet.aaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="carpet.aaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CheatertypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="cheatertype", parent_name="carpet.aaxis", **kwargs): - super(CheatertypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["index", "value"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="carpet.aaxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["trace", "category ascending", "category descending", "array"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="carpet.aaxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="carpet.aaxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="autorange", parent_name="carpet.aaxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Arraytick0Validator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="arraytick0", parent_name="carpet.aaxis", **kwargs): - super(Arraytick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraydtickValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="arraydtick", parent_name="carpet.aaxis", **kwargs): - super(ArraydtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._startlinewidth import StartlinewidthValidator + from ._startlinecolor import StartlinecolorValidator + from ._startline import StartlineValidator + from ._smoothing import SmoothingValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._rangemode import RangemodeValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._minorgridwidth import MinorgridwidthValidator + from ._minorgridcount import MinorgridcountValidator + from ._minorgridcolor import MinorgridcolorValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._labelsuffix import LabelsuffixValidator + from ._labelprefix import LabelprefixValidator + from ._labelpadding import LabelpaddingValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._fixedrange import FixedrangeValidator + from ._exponentformat import ExponentformatValidator + from ._endlinewidth import EndlinewidthValidator + from ._endlinecolor import EndlinecolorValidator + from ._endline import EndlineValidator + from ._dtick import DtickValidator + from ._color import ColorValidator + from ._cheatertype import CheatertypeValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._autorange import AutorangeValidator + from ._arraytick0 import Arraytick0Validator + from ._arraydtick import ArraydtickValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._title.TitleValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._startlinewidth.StartlinewidthValidator", + "._startlinecolor.StartlinecolorValidator", + "._startline.StartlineValidator", + "._smoothing.SmoothingValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._minorgridwidth.MinorgridwidthValidator", + "._minorgridcount.MinorgridcountValidator", + "._minorgridcolor.MinorgridcolorValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelsuffix.LabelsuffixValidator", + "._labelprefix.LabelprefixValidator", + "._labelpadding.LabelpaddingValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._endlinewidth.EndlinewidthValidator", + "._endlinecolor.EndlinecolorValidator", + "._endline.EndlineValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._cheatertype.CheatertypeValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._autorange.AutorangeValidator", + "._arraytick0.Arraytick0Validator", + "._arraydtick.ArraydtickValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_arraydtick.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_arraydtick.py new file mode 100644 index 00000000000..49f573caa27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_arraydtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ArraydtickValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="arraydtick", parent_name="carpet.aaxis", **kwargs): + super(ArraydtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_arraytick0.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_arraytick0.py new file mode 100644 index 00000000000..b558a256f65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_arraytick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Arraytick0Validator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="arraytick0", parent_name="carpet.aaxis", **kwargs): + super(Arraytick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_autorange.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_autorange.py new file mode 100644 index 00000000000..7e40cfd921c --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_autorange.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="autorange", parent_name="carpet.aaxis", **kwargs): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryarray.py new file mode 100644 index 00000000000..9468a7f628e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="carpet.aaxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..c2e1503e9e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="carpet.aaxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryorder.py new file mode 100644 index 00000000000..3a9b379a942 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_categoryorder.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="carpet.aaxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["trace", "category ascending", "category descending", "array"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_cheatertype.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_cheatertype.py new file mode 100644 index 00000000000..35652b29bdd --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_cheatertype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CheatertypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="cheatertype", parent_name="carpet.aaxis", **kwargs): + super(CheatertypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["index", "value"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_color.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_color.py new file mode 100644 index 00000000000..10ddf4b4fc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="carpet.aaxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_dtick.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_dtick.py new file mode 100644 index 00000000000..3c6b016aff3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtick", parent_name="carpet.aaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_endline.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_endline.py new file mode 100644 index 00000000000..f32ba043e1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_endline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="endline", parent_name="carpet.aaxis", **kwargs): + super(EndlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_endlinecolor.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_endlinecolor.py new file mode 100644 index 00000000000..8fd0286383c --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_endlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="endlinecolor", parent_name="carpet.aaxis", **kwargs + ): + super(EndlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_endlinewidth.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_endlinewidth.py new file mode 100644 index 00000000000..cd6619ea826 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_endlinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="endlinewidth", parent_name="carpet.aaxis", **kwargs + ): + super(EndlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_exponentformat.py new file mode 100644 index 00000000000..cce3ece62bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="carpet.aaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_fixedrange.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_fixedrange.py new file mode 100644 index 00000000000..ec13636c588 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_fixedrange.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="fixedrange", parent_name="carpet.aaxis", **kwargs): + super(FixedrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_gridcolor.py new file mode 100644 index 00000000000..811d9f82590 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_gridcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="gridcolor", parent_name="carpet.aaxis", **kwargs): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_gridwidth.py new file mode 100644 index 00000000000..09e4533fea3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_gridwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="gridwidth", parent_name="carpet.aaxis", **kwargs): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_labelpadding.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_labelpadding.py new file mode 100644 index 00000000000..885228730e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_labelpadding.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="labelpadding", parent_name="carpet.aaxis", **kwargs + ): + super(LabelpaddingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_labelprefix.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_labelprefix.py new file mode 100644 index 00000000000..3eed0ce39cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_labelprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="labelprefix", parent_name="carpet.aaxis", **kwargs): + super(LabelprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_labelsuffix.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_labelsuffix.py new file mode 100644 index 00000000000..c7abf62a6d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_labelsuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="labelsuffix", parent_name="carpet.aaxis", **kwargs): + super(LabelsuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_linecolor.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_linecolor.py new file mode 100644 index 00000000000..eb773137120 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_linecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="linecolor", parent_name="carpet.aaxis", **kwargs): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_linewidth.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_linewidth.py new file mode 100644 index 00000000000..1ca08104f6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_linewidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="linewidth", parent_name="carpet.aaxis", **kwargs): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridcolor.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridcolor.py new file mode 100644 index 00000000000..a2a6e9c7171 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MinorgridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="minorgridcolor", parent_name="carpet.aaxis", **kwargs + ): + super(MinorgridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridcount.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridcount.py new file mode 100644 index 00000000000..334487b88bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridcount.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MinorgridcountValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="minorgridcount", parent_name="carpet.aaxis", **kwargs + ): + super(MinorgridcountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridwidth.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridwidth.py new file mode 100644 index 00000000000..8fc1f954360 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MinorgridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="minorgridwidth", parent_name="carpet.aaxis", **kwargs + ): + super(MinorgridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_nticks.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_nticks.py new file mode 100644 index 00000000000..6866358201e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="carpet.aaxis", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_range.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_range.py new file mode 100644 index 00000000000..0425e3d9717 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_range.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="carpet.aaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_rangemode.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_rangemode.py new file mode 100644 index 00000000000..8914052d3db --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_rangemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="rangemode", parent_name="carpet.aaxis", **kwargs): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_separatethousands.py new file mode 100644 index 00000000000..56c0ad8aa74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="carpet.aaxis", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_showexponent.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_showexponent.py new file mode 100644 index 00000000000..9b91893923a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="carpet.aaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_showgrid.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_showgrid.py new file mode 100644 index 00000000000..a2c1b622248 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_showgrid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showgrid", parent_name="carpet.aaxis", **kwargs): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_showline.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_showline.py new file mode 100644 index 00000000000..7a5fb7b569b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_showline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showline", parent_name="carpet.aaxis", **kwargs): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_showticklabels.py new file mode 100644 index 00000000000..d0eb0267cc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_showticklabels.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="carpet.aaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["start", "end", "both", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_showtickprefix.py new file mode 100644 index 00000000000..2ef97a99e11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="carpet.aaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_showticksuffix.py new file mode 100644 index 00000000000..f8c684a07e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="carpet.aaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_smoothing.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_smoothing.py new file mode 100644 index 00000000000..e3c486dc18a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_smoothing.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="smoothing", parent_name="carpet.aaxis", **kwargs): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_startline.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_startline.py new file mode 100644 index 00000000000..8f7834e5dcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_startline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="startline", parent_name="carpet.aaxis", **kwargs): + super(StartlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_startlinecolor.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_startlinecolor.py new file mode 100644 index 00000000000..f00cf19357d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_startlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class StartlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="startlinecolor", parent_name="carpet.aaxis", **kwargs + ): + super(StartlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_startlinewidth.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_startlinewidth.py new file mode 100644 index 00000000000..50cb36b06c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_startlinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="startlinewidth", parent_name="carpet.aaxis", **kwargs + ): + super(StartlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tick0.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tick0.py new file mode 100644 index 00000000000..9cb2d0964a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tick0", parent_name="carpet.aaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickangle.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickangle.py new file mode 100644 index 00000000000..0e7469f2a6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="tickangle", parent_name="carpet.aaxis", **kwargs): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickfont.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickfont.py new file mode 100644 index 00000000000..02b98bd14cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="carpet.aaxis", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformat.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformat.py new file mode 100644 index 00000000000..902dc744d1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickformat", parent_name="carpet.aaxis", **kwargs): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..16866b8cd5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickformatstopdefaults", parent_name="carpet.aaxis", **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformatstops.py new file mode 100644 index 00000000000..ae658cf914f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="carpet.aaxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickmode.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickmode.py new file mode 100644 index 00000000000..3914e369102 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="carpet.aaxis", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickprefix.py new file mode 100644 index 00000000000..9f5f5b3408d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickprefix", parent_name="carpet.aaxis", **kwargs): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_ticksuffix.py new file mode 100644 index 00000000000..bd9ab5d96d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_ticksuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="ticksuffix", parent_name="carpet.aaxis", **kwargs): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_ticktext.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_ticktext.py new file mode 100644 index 00000000000..f23da30a4c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="carpet.aaxis", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_ticktextsrc.py new file mode 100644 index 00000000000..755274afb00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_ticktextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.aaxis", **kwargs): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickvals.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickvals.py new file mode 100644 index 00000000000..c500d41eae2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="carpet.aaxis", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickvalssrc.py new file mode 100644 index 00000000000..7f4833eb11d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_tickvalssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tickvalssrc", parent_name="carpet.aaxis", **kwargs): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_title.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_title.py new file mode 100644 index 00000000000..4126a9eeb36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="carpet.aaxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + offset + An additional amount by which to offset the + title from the tick labels, given in pixels. + Note that this used to be set by the now + deprecated `titleoffset` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_type.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_type.py new file mode 100644 index 00000000000..6bf3c3651b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="carpet.aaxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/__init__.py index 42957fe2ed4..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="carpet.aaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="carpet.aaxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="carpet.aaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_color.py new file mode 100644 index 00000000000..bc7e1d45042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="carpet.aaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_family.py new file mode 100644 index 00000000000..ca8cdd959d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="carpet.aaxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_size.py new file mode 100644 index 00000000000..91ec8f102d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="carpet.aaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/__init__.py index a20315efda3..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/__init__.py @@ -1,91 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="value", parent_name="carpet.aaxis.tickformatstop", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="carpet.aaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="carpet.aaxis.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="carpet.aaxis.tickformatstop", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="carpet.aaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..7a832fcaafe --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="carpet.aaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..48ff91bd277 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="carpet.aaxis.tickformatstop", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..763c8961087 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="carpet.aaxis.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..3504a4aa042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="carpet.aaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..90d7a594a4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/tickformatstop/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="value", parent_name="carpet.aaxis.tickformatstop", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/__init__.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/__init__.py index 293019e8d2b..7b2848ba67c 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/__init__.py @@ -1,67 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="carpet.aaxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="offset", parent_name="carpet.aaxis.title", **kwargs - ): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="carpet.aaxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._offset import OffsetValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._offset.OffsetValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/_font.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/_font.py new file mode 100644 index 00000000000..6feb6f98088 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="carpet.aaxis.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/_offset.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/_offset.py new file mode 100644 index 00000000000..de460164673 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/_offset.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="offset", parent_name="carpet.aaxis.title", **kwargs + ): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/_text.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/_text.py new file mode 100644 index 00000000000..3fe1eb54ab6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="carpet.aaxis.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/__init__.py index 423d7b20882..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="carpet.aaxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="carpet.aaxis.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="carpet.aaxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_color.py new file mode 100644 index 00000000000..8205ee3db4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="carpet.aaxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_family.py new file mode 100644 index 00000000000..b5cfdf4f701 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="carpet.aaxis.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_size.py new file mode 100644 index 00000000000..c326aff49c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="carpet.aaxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/__init__.py b/packages/python/plotly/plotly/validators/carpet/baxis/__init__.py index 74fbc6fdebf..38772a426f1 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/__init__.py @@ -1,895 +1,118 @@ -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="carpet.baxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="carpet.baxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - Note that this used to be set by the now - deprecated `titleoffset` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tickvalssrc", parent_name="carpet.baxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="carpet.baxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.baxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="carpet.baxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="ticksuffix", parent_name="carpet.baxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickprefix", parent_name="carpet.baxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="carpet.baxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickformatstopdefaults", parent_name="carpet.baxis", **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="carpet.baxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickformat", parent_name="carpet.baxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="carpet.baxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="tickangle", parent_name="carpet.baxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tick0", parent_name="carpet.baxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="startlinewidth", parent_name="carpet.baxis", **kwargs - ): - super(StartlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="startlinecolor", parent_name="carpet.baxis", **kwargs - ): - super(StartlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="startline", parent_name="carpet.baxis", **kwargs): - super(StartlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="smoothing", parent_name="carpet.baxis", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="carpet.baxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="carpet.baxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="carpet.baxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["start", "end", "both", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showline", parent_name="carpet.baxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showgrid", parent_name="carpet.baxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="carpet.baxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="carpet.baxis", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="rangemode", parent_name="carpet.baxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="carpet.baxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="carpet.baxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorgridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="minorgridwidth", parent_name="carpet.baxis", **kwargs - ): - super(MinorgridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorgridcountValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="minorgridcount", parent_name="carpet.baxis", **kwargs - ): - super(MinorgridcountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorgridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="minorgridcolor", parent_name="carpet.baxis", **kwargs - ): - super(MinorgridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="linewidth", parent_name="carpet.baxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="linecolor", parent_name="carpet.baxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="labelsuffix", parent_name="carpet.baxis", **kwargs): - super(LabelsuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="labelprefix", parent_name="carpet.baxis", **kwargs): - super(LabelprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="labelpadding", parent_name="carpet.baxis", **kwargs - ): - super(LabelpaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="gridwidth", parent_name="carpet.baxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="gridcolor", parent_name="carpet.baxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="fixedrange", parent_name="carpet.baxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="carpet.baxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="endlinewidth", parent_name="carpet.baxis", **kwargs - ): - super(EndlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="endlinecolor", parent_name="carpet.baxis", **kwargs - ): - super(EndlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="endline", parent_name="carpet.baxis", **kwargs): - super(EndlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtick", parent_name="carpet.baxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="carpet.baxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CheatertypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="cheatertype", parent_name="carpet.baxis", **kwargs): - super(CheatertypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["index", "value"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="carpet.baxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["trace", "category ascending", "category descending", "array"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="carpet.baxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="carpet.baxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="autorange", parent_name="carpet.baxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Arraytick0Validator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="arraytick0", parent_name="carpet.baxis", **kwargs): - super(Arraytick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraydtickValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="arraydtick", parent_name="carpet.baxis", **kwargs): - super(ArraydtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._startlinewidth import StartlinewidthValidator + from ._startlinecolor import StartlinecolorValidator + from ._startline import StartlineValidator + from ._smoothing import SmoothingValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._rangemode import RangemodeValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._minorgridwidth import MinorgridwidthValidator + from ._minorgridcount import MinorgridcountValidator + from ._minorgridcolor import MinorgridcolorValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._labelsuffix import LabelsuffixValidator + from ._labelprefix import LabelprefixValidator + from ._labelpadding import LabelpaddingValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._fixedrange import FixedrangeValidator + from ._exponentformat import ExponentformatValidator + from ._endlinewidth import EndlinewidthValidator + from ._endlinecolor import EndlinecolorValidator + from ._endline import EndlineValidator + from ._dtick import DtickValidator + from ._color import ColorValidator + from ._cheatertype import CheatertypeValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._autorange import AutorangeValidator + from ._arraytick0 import Arraytick0Validator + from ._arraydtick import ArraydtickValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._title.TitleValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._startlinewidth.StartlinewidthValidator", + "._startlinecolor.StartlinecolorValidator", + "._startline.StartlineValidator", + "._smoothing.SmoothingValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._minorgridwidth.MinorgridwidthValidator", + "._minorgridcount.MinorgridcountValidator", + "._minorgridcolor.MinorgridcolorValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelsuffix.LabelsuffixValidator", + "._labelprefix.LabelprefixValidator", + "._labelpadding.LabelpaddingValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._endlinewidth.EndlinewidthValidator", + "._endlinecolor.EndlinecolorValidator", + "._endline.EndlineValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._cheatertype.CheatertypeValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._autorange.AutorangeValidator", + "._arraytick0.Arraytick0Validator", + "._arraydtick.ArraydtickValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_arraydtick.py b/packages/python/plotly/plotly/validators/carpet/baxis/_arraydtick.py new file mode 100644 index 00000000000..15ab4671e84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_arraydtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ArraydtickValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="arraydtick", parent_name="carpet.baxis", **kwargs): + super(ArraydtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_arraytick0.py b/packages/python/plotly/plotly/validators/carpet/baxis/_arraytick0.py new file mode 100644 index 00000000000..9690cd11603 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_arraytick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Arraytick0Validator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="arraytick0", parent_name="carpet.baxis", **kwargs): + super(Arraytick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_autorange.py b/packages/python/plotly/plotly/validators/carpet/baxis/_autorange.py new file mode 100644 index 00000000000..716f1df85b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_autorange.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="autorange", parent_name="carpet.baxis", **kwargs): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_categoryarray.py b/packages/python/plotly/plotly/validators/carpet/baxis/_categoryarray.py new file mode 100644 index 00000000000..f787fb4aea6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="carpet.baxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/carpet/baxis/_categoryarraysrc.py new file mode 100644 index 00000000000..0dd178995aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="carpet.baxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_categoryorder.py b/packages/python/plotly/plotly/validators/carpet/baxis/_categoryorder.py new file mode 100644 index 00000000000..2adc18a9a4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_categoryorder.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="carpet.baxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["trace", "category ascending", "category descending", "array"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_cheatertype.py b/packages/python/plotly/plotly/validators/carpet/baxis/_cheatertype.py new file mode 100644 index 00000000000..97567669e6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_cheatertype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CheatertypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="cheatertype", parent_name="carpet.baxis", **kwargs): + super(CheatertypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["index", "value"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_color.py b/packages/python/plotly/plotly/validators/carpet/baxis/_color.py new file mode 100644 index 00000000000..03a04003c94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="carpet.baxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_dtick.py b/packages/python/plotly/plotly/validators/carpet/baxis/_dtick.py new file mode 100644 index 00000000000..c03b42e05c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtick", parent_name="carpet.baxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_endline.py b/packages/python/plotly/plotly/validators/carpet/baxis/_endline.py new file mode 100644 index 00000000000..f5a4382bc0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_endline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="endline", parent_name="carpet.baxis", **kwargs): + super(EndlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_endlinecolor.py b/packages/python/plotly/plotly/validators/carpet/baxis/_endlinecolor.py new file mode 100644 index 00000000000..0a8bbc7c9c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_endlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="endlinecolor", parent_name="carpet.baxis", **kwargs + ): + super(EndlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_endlinewidth.py b/packages/python/plotly/plotly/validators/carpet/baxis/_endlinewidth.py new file mode 100644 index 00000000000..ebe4f08dd86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_endlinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="endlinewidth", parent_name="carpet.baxis", **kwargs + ): + super(EndlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_exponentformat.py b/packages/python/plotly/plotly/validators/carpet/baxis/_exponentformat.py new file mode 100644 index 00000000000..48096e5970f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="carpet.baxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_fixedrange.py b/packages/python/plotly/plotly/validators/carpet/baxis/_fixedrange.py new file mode 100644 index 00000000000..004f69f35c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_fixedrange.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="fixedrange", parent_name="carpet.baxis", **kwargs): + super(FixedrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_gridcolor.py b/packages/python/plotly/plotly/validators/carpet/baxis/_gridcolor.py new file mode 100644 index 00000000000..eb16e257e75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_gridcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="gridcolor", parent_name="carpet.baxis", **kwargs): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_gridwidth.py b/packages/python/plotly/plotly/validators/carpet/baxis/_gridwidth.py new file mode 100644 index 00000000000..bab75626e41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_gridwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="gridwidth", parent_name="carpet.baxis", **kwargs): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_labelpadding.py b/packages/python/plotly/plotly/validators/carpet/baxis/_labelpadding.py new file mode 100644 index 00000000000..7f8751ba372 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_labelpadding.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="labelpadding", parent_name="carpet.baxis", **kwargs + ): + super(LabelpaddingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_labelprefix.py b/packages/python/plotly/plotly/validators/carpet/baxis/_labelprefix.py new file mode 100644 index 00000000000..c8ca6897a8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_labelprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="labelprefix", parent_name="carpet.baxis", **kwargs): + super(LabelprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_labelsuffix.py b/packages/python/plotly/plotly/validators/carpet/baxis/_labelsuffix.py new file mode 100644 index 00000000000..3f89ef2074f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_labelsuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="labelsuffix", parent_name="carpet.baxis", **kwargs): + super(LabelsuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_linecolor.py b/packages/python/plotly/plotly/validators/carpet/baxis/_linecolor.py new file mode 100644 index 00000000000..a92426b7c47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_linecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="linecolor", parent_name="carpet.baxis", **kwargs): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_linewidth.py b/packages/python/plotly/plotly/validators/carpet/baxis/_linewidth.py new file mode 100644 index 00000000000..efac432785b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_linewidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="linewidth", parent_name="carpet.baxis", **kwargs): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridcolor.py b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridcolor.py new file mode 100644 index 00000000000..ab2557c9e0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MinorgridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="minorgridcolor", parent_name="carpet.baxis", **kwargs + ): + super(MinorgridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridcount.py b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridcount.py new file mode 100644 index 00000000000..85a0936201e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridcount.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MinorgridcountValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="minorgridcount", parent_name="carpet.baxis", **kwargs + ): + super(MinorgridcountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridwidth.py b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridwidth.py new file mode 100644 index 00000000000..8065a70f22a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MinorgridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="minorgridwidth", parent_name="carpet.baxis", **kwargs + ): + super(MinorgridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_nticks.py b/packages/python/plotly/plotly/validators/carpet/baxis/_nticks.py new file mode 100644 index 00000000000..8e126846312 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="carpet.baxis", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_range.py b/packages/python/plotly/plotly/validators/carpet/baxis/_range.py new file mode 100644 index 00000000000..3ad166e689c --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_range.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="carpet.baxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_rangemode.py b/packages/python/plotly/plotly/validators/carpet/baxis/_rangemode.py new file mode 100644 index 00000000000..93652d91e8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_rangemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="rangemode", parent_name="carpet.baxis", **kwargs): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_separatethousands.py b/packages/python/plotly/plotly/validators/carpet/baxis/_separatethousands.py new file mode 100644 index 00000000000..ce5ee004e65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="carpet.baxis", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_showexponent.py b/packages/python/plotly/plotly/validators/carpet/baxis/_showexponent.py new file mode 100644 index 00000000000..55b8ea97b7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="carpet.baxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_showgrid.py b/packages/python/plotly/plotly/validators/carpet/baxis/_showgrid.py new file mode 100644 index 00000000000..51d9630dcf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_showgrid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showgrid", parent_name="carpet.baxis", **kwargs): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_showline.py b/packages/python/plotly/plotly/validators/carpet/baxis/_showline.py new file mode 100644 index 00000000000..66fc03d8619 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_showline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showline", parent_name="carpet.baxis", **kwargs): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_showticklabels.py b/packages/python/plotly/plotly/validators/carpet/baxis/_showticklabels.py new file mode 100644 index 00000000000..e09efbec730 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_showticklabels.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="carpet.baxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["start", "end", "both", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/carpet/baxis/_showtickprefix.py new file mode 100644 index 00000000000..8a470cff288 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="carpet.baxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/carpet/baxis/_showticksuffix.py new file mode 100644 index 00000000000..859fe574891 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="carpet.baxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_smoothing.py b/packages/python/plotly/plotly/validators/carpet/baxis/_smoothing.py new file mode 100644 index 00000000000..0599ef3ae49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_smoothing.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="smoothing", parent_name="carpet.baxis", **kwargs): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_startline.py b/packages/python/plotly/plotly/validators/carpet/baxis/_startline.py new file mode 100644 index 00000000000..104a36ac266 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_startline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="startline", parent_name="carpet.baxis", **kwargs): + super(StartlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_startlinecolor.py b/packages/python/plotly/plotly/validators/carpet/baxis/_startlinecolor.py new file mode 100644 index 00000000000..020433d4beb --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_startlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class StartlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="startlinecolor", parent_name="carpet.baxis", **kwargs + ): + super(StartlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_startlinewidth.py b/packages/python/plotly/plotly/validators/carpet/baxis/_startlinewidth.py new file mode 100644 index 00000000000..bbeedabd0a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_startlinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="startlinewidth", parent_name="carpet.baxis", **kwargs + ): + super(StartlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tick0.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tick0.py new file mode 100644 index 00000000000..22d047600d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tick0", parent_name="carpet.baxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickangle.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickangle.py new file mode 100644 index 00000000000..7458bd91d0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="tickangle", parent_name="carpet.baxis", **kwargs): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickfont.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickfont.py new file mode 100644 index 00000000000..12991528162 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="carpet.baxis", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickformat.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickformat.py new file mode 100644 index 00000000000..0f1bad200f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickformat", parent_name="carpet.baxis", **kwargs): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..f25144013c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickformatstopdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickformatstopdefaults", parent_name="carpet.baxis", **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickformatstops.py new file mode 100644 index 00000000000..6cf12b9bdad --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="carpet.baxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickmode.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickmode.py new file mode 100644 index 00000000000..7398d654440 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="carpet.baxis", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickprefix.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickprefix.py new file mode 100644 index 00000000000..0bfc2aa2888 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickprefix", parent_name="carpet.baxis", **kwargs): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/carpet/baxis/_ticksuffix.py new file mode 100644 index 00000000000..7107b7614d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_ticksuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="ticksuffix", parent_name="carpet.baxis", **kwargs): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_ticktext.py b/packages/python/plotly/plotly/validators/carpet/baxis/_ticktext.py new file mode 100644 index 00000000000..b7ab62bd0a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="carpet.baxis", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/carpet/baxis/_ticktextsrc.py new file mode 100644 index 00000000000..bf10b8571db --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_ticktextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.baxis", **kwargs): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickvals.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickvals.py new file mode 100644 index 00000000000..7439a9c80d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="carpet.baxis", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/carpet/baxis/_tickvalssrc.py new file mode 100644 index 00000000000..944ee7d0181 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_tickvalssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tickvalssrc", parent_name="carpet.baxis", **kwargs): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_title.py b/packages/python/plotly/plotly/validators/carpet/baxis/_title.py new file mode 100644 index 00000000000..5dff788ad04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="carpet.baxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + offset + An additional amount by which to offset the + title from the tick labels, given in pixels. + Note that this used to be set by the now + deprecated `titleoffset` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_type.py b/packages/python/plotly/plotly/validators/carpet/baxis/_type.py new file mode 100644 index 00000000000..c9a3423bc8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="carpet.baxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/__init__.py index cdd15d36caf..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="carpet.baxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="carpet.baxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="carpet.baxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_color.py new file mode 100644 index 00000000000..c46e0c6363f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="carpet.baxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_family.py new file mode 100644 index 00000000000..476e2d06fc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="carpet.baxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_size.py new file mode 100644 index 00000000000..d605dc211db --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="carpet.baxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/__init__.py index e69095abe03..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/__init__.py @@ -1,91 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="value", parent_name="carpet.baxis.tickformatstop", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="carpet.baxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="carpet.baxis.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="carpet.baxis.tickformatstop", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="carpet.baxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..b93ab2a7e11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="carpet.baxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..974b6fc300e --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="carpet.baxis.tickformatstop", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_name.py new file mode 100644 index 00000000000..0bfabae268c --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="carpet.baxis.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..97d6e8034bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="carpet.baxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_value.py new file mode 100644 index 00000000000..2a30f9e17e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/tickformatstop/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="value", parent_name="carpet.baxis.tickformatstop", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/__init__.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/__init__.py index f4d29c87191..7b2848ba67c 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/__init__.py @@ -1,67 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="carpet.baxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="offset", parent_name="carpet.baxis.title", **kwargs - ): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="carpet.baxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._offset import OffsetValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._offset.OffsetValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/_font.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/_font.py new file mode 100644 index 00000000000..680788c725c --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="carpet.baxis.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/_offset.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/_offset.py new file mode 100644 index 00000000000..426f3343976 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/_offset.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="offset", parent_name="carpet.baxis.title", **kwargs + ): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/_text.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/_text.py new file mode 100644 index 00000000000..3cc69b7c71d --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="carpet.baxis.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/__init__.py index 9d26d0ca35a..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="carpet.baxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="carpet.baxis.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="carpet.baxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_color.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_color.py new file mode 100644 index 00000000000..06625267891 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="carpet.baxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_family.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_family.py new file mode 100644 index 00000000000..e260e70112a --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="carpet.baxis.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_size.py b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_size.py new file mode 100644 index 00000000000..324802bc6ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="carpet.baxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/font/__init__.py b/packages/python/plotly/plotly/validators/carpet/font/__init__.py index 2c4b366cfa7..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/carpet/font/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/font/__init__.py @@ -1,43 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="carpet.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="carpet.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="carpet.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/carpet/font/_color.py b/packages/python/plotly/plotly/validators/carpet/font/_color.py new file mode 100644 index 00000000000..6bdfb1cb978 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/font/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="carpet.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/font/_family.py b/packages/python/plotly/plotly/validators/carpet/font/_family.py new file mode 100644 index 00000000000..d916c378a78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/font/_family.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="carpet.font", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/font/_size.py b/packages/python/plotly/plotly/validators/carpet/font/_size.py new file mode 100644 index 00000000000..4e4e169d40f --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/font/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="carpet.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/stream/__init__.py b/packages/python/plotly/plotly/validators/carpet/stream/__init__.py index 25c635dc419..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/carpet/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="carpet.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="carpet.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/carpet/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/carpet/stream/_maxpoints.py new file mode 100644 index 00000000000..1bd47496948 --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="carpet.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/stream/_token.py b/packages/python/plotly/plotly/validators/carpet/stream/_token.py new file mode 100644 index 00000000000..774c59c6e8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/carpet/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="carpet.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/__init__.py b/packages/python/plotly/plotly/validators/choropleth/__init__.py index 9c6c21a6d1c..815b7799b23 100644 --- a/packages/python/plotly/plotly/validators/choropleth/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/__init__.py @@ -1,936 +1,100 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="choropleth", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="choropleth", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="choropleth", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="choropleth", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="choropleth", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="choropleth", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="choropleth", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="choropleth", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.choropleth.unselec - ted.Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="choropleth", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="choropleth", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="choropleth", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="choropleth", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="choropleth", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="choropleth", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="choropleth", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="choropleth", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="choropleth", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.choropleth.selecte - d.Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="choropleth", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="choropleth", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="choropleth", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="choropleth", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="choropleth", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - line - :class:`plotly.graph_objects.choropleth.marker. - Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="locationssrc", parent_name="choropleth", **kwargs): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="locations", parent_name="choropleth", **kwargs): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="locationmode", parent_name="choropleth", **kwargs): - super(LocationmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["ISO-3", "USA-states", "country names", "geojson-id"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="choropleth", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="choropleth", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="choropleth", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="choropleth", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="choropleth", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="choropleth", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="choropleth", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="choropleth", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="choropleth", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="choropleth", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["location", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="geojson", parent_name="choropleth", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GeoValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="geo", parent_name="choropleth", **kwargs): - super(GeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "geo"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="featureidkey", parent_name="choropleth", **kwargs): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="choropleth", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="choropleth", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="choropleth", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="choropleth", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - eth.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choropleth.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of choropleth.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choropleth.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - choropleth.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choropleth.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="choropleth", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="choropleth", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._reversescale import ReversescaleValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._locationmode import LocationmodeValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._geojson import GeojsonValidator + from ._geo import GeoValidator + from ._featureidkey import FeatureidkeyValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._reversescale.ReversescaleValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._locationmode.LocationmodeValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._geo.GeoValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_autocolorscale.py b/packages/python/plotly/plotly/validators/choropleth/_autocolorscale.py new file mode 100644 index 00000000000..90d4fed6ef1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="choropleth", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_coloraxis.py b/packages/python/plotly/plotly/validators/choropleth/_coloraxis.py new file mode 100644 index 00000000000..42cf07ca823 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="choropleth", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_colorbar.py b/packages/python/plotly/plotly/validators/choropleth/_colorbar.py new file mode 100644 index 00000000000..cbedc6c9326 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="choropleth", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropl + eth.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.choropleth.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of choropleth.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choropleth.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + choropleth.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + choropleth.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_colorscale.py b/packages/python/plotly/plotly/validators/choropleth/_colorscale.py new file mode 100644 index 00000000000..ad663bfba38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="choropleth", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_customdata.py b/packages/python/plotly/plotly/validators/choropleth/_customdata.py new file mode 100644 index 00000000000..7b49325d6ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="choropleth", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_customdatasrc.py b/packages/python/plotly/plotly/validators/choropleth/_customdatasrc.py new file mode 100644 index 00000000000..9d3014a3797 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="choropleth", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_featureidkey.py b/packages/python/plotly/plotly/validators/choropleth/_featureidkey.py new file mode 100644 index 00000000000..9f680b56b8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_featureidkey.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="featureidkey", parent_name="choropleth", **kwargs): + super(FeatureidkeyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_geo.py b/packages/python/plotly/plotly/validators/choropleth/_geo.py new file mode 100644 index 00000000000..3e45a66584e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_geo.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GeoValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="geo", parent_name="choropleth", **kwargs): + super(GeoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "geo"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_geojson.py b/packages/python/plotly/plotly/validators/choropleth/_geojson.py new file mode 100644 index 00000000000..69fa21d3583 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_geojson.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="geojson", parent_name="choropleth", **kwargs): + super(GeojsonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hoverinfo.py b/packages/python/plotly/plotly/validators/choropleth/_hoverinfo.py new file mode 100644 index 00000000000..e7f9303c9de --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="choropleth", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["location", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/choropleth/_hoverinfosrc.py new file mode 100644 index 00000000000..74035de2873 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="choropleth", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hoverlabel.py b/packages/python/plotly/plotly/validators/choropleth/_hoverlabel.py new file mode 100644 index 00000000000..20bc8deeda8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="choropleth", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hovertemplate.py b/packages/python/plotly/plotly/validators/choropleth/_hovertemplate.py new file mode 100644 index 00000000000..f02316965fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="choropleth", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/choropleth/_hovertemplatesrc.py new file mode 100644 index 00000000000..8052259509c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="choropleth", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hovertext.py b/packages/python/plotly/plotly/validators/choropleth/_hovertext.py new file mode 100644 index 00000000000..dbffe839ecb --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="choropleth", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_hovertextsrc.py b/packages/python/plotly/plotly/validators/choropleth/_hovertextsrc.py new file mode 100644 index 00000000000..1afd1d7b51d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="choropleth", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_ids.py b/packages/python/plotly/plotly/validators/choropleth/_ids.py new file mode 100644 index 00000000000..c3f80e59e3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="choropleth", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_idssrc.py b/packages/python/plotly/plotly/validators/choropleth/_idssrc.py new file mode 100644 index 00000000000..b1dc5d671e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="choropleth", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_legendgroup.py b/packages/python/plotly/plotly/validators/choropleth/_legendgroup.py new file mode 100644 index 00000000000..27b40794bc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="choropleth", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_locationmode.py b/packages/python/plotly/plotly/validators/choropleth/_locationmode.py new file mode 100644 index 00000000000..db5a3e2bf13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_locationmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LocationmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="locationmode", parent_name="choropleth", **kwargs): + super(LocationmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["ISO-3", "USA-states", "country names", "geojson-id"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_locations.py b/packages/python/plotly/plotly/validators/choropleth/_locations.py new file mode 100644 index 00000000000..0dabdd9336c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_locations.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="locations", parent_name="choropleth", **kwargs): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_locationssrc.py b/packages/python/plotly/plotly/validators/choropleth/_locationssrc.py new file mode 100644 index 00000000000..aba642fc51a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_locationssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="locationssrc", parent_name="choropleth", **kwargs): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_marker.py b/packages/python/plotly/plotly/validators/choropleth/_marker.py new file mode 100644 index 00000000000..459d75b735d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_marker.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="choropleth", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + line + :class:`plotly.graph_objects.choropleth.marker. + Line` instance or dict with compatible + properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_meta.py b/packages/python/plotly/plotly/validators/choropleth/_meta.py new file mode 100644 index 00000000000..cf48ba444a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="choropleth", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_metasrc.py b/packages/python/plotly/plotly/validators/choropleth/_metasrc.py new file mode 100644 index 00000000000..6272b31852f --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="choropleth", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_name.py b/packages/python/plotly/plotly/validators/choropleth/_name.py new file mode 100644 index 00000000000..b558f1c1ef5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="choropleth", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_reversescale.py b/packages/python/plotly/plotly/validators/choropleth/_reversescale.py new file mode 100644 index 00000000000..40ba2bb4fab --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="choropleth", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_selected.py b/packages/python/plotly/plotly/validators/choropleth/_selected.py new file mode 100644 index 00000000000..a027527d072 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_selected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="choropleth", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.choropleth.selecte + d.Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_selectedpoints.py b/packages/python/plotly/plotly/validators/choropleth/_selectedpoints.py new file mode 100644 index 00000000000..602a398dbad --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="choropleth", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_showlegend.py b/packages/python/plotly/plotly/validators/choropleth/_showlegend.py new file mode 100644 index 00000000000..6e49de050db --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="choropleth", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_showscale.py b/packages/python/plotly/plotly/validators/choropleth/_showscale.py new file mode 100644 index 00000000000..50b2f7a158d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="choropleth", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_stream.py b/packages/python/plotly/plotly/validators/choropleth/_stream.py new file mode 100644 index 00000000000..b4743a69918 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="choropleth", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_text.py b/packages/python/plotly/plotly/validators/choropleth/_text.py new file mode 100644 index 00000000000..8ff50537d8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="choropleth", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_textsrc.py b/packages/python/plotly/plotly/validators/choropleth/_textsrc.py new file mode 100644 index 00000000000..558947c917d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="choropleth", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_uid.py b/packages/python/plotly/plotly/validators/choropleth/_uid.py new file mode 100644 index 00000000000..e0a223cb832 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="choropleth", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_uirevision.py b/packages/python/plotly/plotly/validators/choropleth/_uirevision.py new file mode 100644 index 00000000000..e52bfda12a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="choropleth", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_unselected.py b/packages/python/plotly/plotly/validators/choropleth/_unselected.py new file mode 100644 index 00000000000..e3fda8aca1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_unselected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="choropleth", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.choropleth.unselec + ted.Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_visible.py b/packages/python/plotly/plotly/validators/choropleth/_visible.py new file mode 100644 index 00000000000..46fe04c4f9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="choropleth", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_z.py b/packages/python/plotly/plotly/validators/choropleth/_z.py new file mode 100644 index 00000000000..f14c5558833 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="choropleth", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_zauto.py b/packages/python/plotly/plotly/validators/choropleth/_zauto.py new file mode 100644 index 00000000000..19c36d4d615 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="choropleth", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_zmax.py b/packages/python/plotly/plotly/validators/choropleth/_zmax.py new file mode 100644 index 00000000000..4386d7386c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="choropleth", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_zmid.py b/packages/python/plotly/plotly/validators/choropleth/_zmid.py new file mode 100644 index 00000000000..50b631aae3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="choropleth", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_zmin.py b/packages/python/plotly/plotly/validators/choropleth/_zmin.py new file mode 100644 index 00000000000..37161818f01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="choropleth", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/_zsrc.py b/packages/python/plotly/plotly/validators/choropleth/_zsrc.py new file mode 100644 index 00000000000..efd6d96f807 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="choropleth", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/__init__.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/__init__.py index 30b9dfe19ad..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/choropleth/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/__init__.py @@ -1,761 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="choropleth.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="choropleth.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="choropleth.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="choropleth.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="choropleth.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="choropleth.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="choropleth.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="choropleth.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="choropleth.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="choropleth.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="choropleth.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="choropleth.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="choropleth.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="choropleth.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="choropleth.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="choropleth.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="choropleth.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="choropleth.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="choropleth.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="choropleth.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="choropleth.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="choropleth.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="choropleth.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="choropleth.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="choropleth.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="choropleth.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="choropleth.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="choropleth.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="choropleth.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="choropleth.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="choropleth.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="choropleth.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="choropleth.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="choropleth.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="choropleth.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="choropleth.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="choropleth.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="choropleth.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="choropleth.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="choropleth.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="choropleth.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_bgcolor.py new file mode 100644 index 00000000000..c4bb0db96ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="choropleth.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_bordercolor.py new file mode 100644 index 00000000000..344035f4e07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="choropleth.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_borderwidth.py new file mode 100644 index 00000000000..0a6cf3fef8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="choropleth.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_dtick.py new file mode 100644 index 00000000000..041c4f04383 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="choropleth.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_exponentformat.py new file mode 100644 index 00000000000..8895140b272 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="choropleth.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_len.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_len.py new file mode 100644 index 00000000000..5e8fd6bdb2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="choropleth.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_lenmode.py new file mode 100644 index 00000000000..533b08a2a9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="choropleth.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_nticks.py new file mode 100644 index 00000000000..05a1e5b261e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="choropleth.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..ed0dd3bcfa1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="choropleth.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..34d4f231dc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="choropleth.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_separatethousands.py new file mode 100644 index 00000000000..ca05b7da163 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="choropleth.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showexponent.py new file mode 100644 index 00000000000..3c99aaa38ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="choropleth.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showticklabels.py new file mode 100644 index 00000000000..fdd7b86698a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="choropleth.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..49a3b9afec8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="choropleth.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..d0bcd38544b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="choropleth.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_thickness.py new file mode 100644 index 00000000000..6a2c02763ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="choropleth.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..5c21502f31b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="choropleth.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tick0.py new file mode 100644 index 00000000000..15b68d15f2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="choropleth.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickangle.py new file mode 100644 index 00000000000..8735c420b84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="choropleth.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickcolor.py new file mode 100644 index 00000000000..72b53006bfe --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="choropleth.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickfont.py new file mode 100644 index 00000000000..ecc68c94428 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="choropleth.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformat.py new file mode 100644 index 00000000000..7ff18781e58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="choropleth.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..d8f0628aa5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="choropleth.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..085d4db7f31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="choropleth.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticklen.py new file mode 100644 index 00000000000..0144491df57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="choropleth.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickmode.py new file mode 100644 index 00000000000..fc9b11d0b00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="choropleth.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickprefix.py new file mode 100644 index 00000000000..400aa019e5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="choropleth.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticks.py new file mode 100644 index 00000000000..6a5633d23a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="choropleth.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..b92199b9c53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="choropleth.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticktext.py new file mode 100644 index 00000000000..07010b92692 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="choropleth.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..37eab025598 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="choropleth.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvals.py new file mode 100644 index 00000000000..c369e43dc5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="choropleth.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..db61ef1d02a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="choropleth.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickwidth.py new file mode 100644 index 00000000000..547ddcf6a75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="choropleth.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_title.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_title.py new file mode 100644 index 00000000000..7193755a464 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="choropleth.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_x.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_x.py new file mode 100644 index 00000000000..be1716e4292 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="choropleth.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_xanchor.py new file mode 100644 index 00000000000..b14d894a79d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="choropleth.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_xpad.py new file mode 100644 index 00000000000..0a5d6f8dd4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="choropleth.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_y.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_y.py new file mode 100644 index 00000000000..042b6cb7337 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="choropleth.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_yanchor.py new file mode 100644 index 00000000000..12f7bc0cf05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="choropleth.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ypad.py new file mode 100644 index 00000000000..a2fc56ac9b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="choropleth.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/__init__.py index 3374ef407bb..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="choropleth.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="choropleth.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="choropleth.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..a3cb5784c16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="choropleth.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..c10e3ab0555 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="choropleth.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..c40438cd8e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="choropleth.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py index 83db2bcd0f3..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="choropleth.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="choropleth.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="choropleth.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="choropleth.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="choropleth.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..161cfc9213d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="choropleth.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..3287bf690cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="choropleth.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..22661168478 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="choropleth.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..9288ad3938f --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="choropleth.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..e4b438c7ddc --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="choropleth.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/__init__.py index 1e542410256..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="choropleth.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="choropleth.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="choropleth.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_font.py new file mode 100644 index 00000000000..ce6d32789d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="choropleth.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_side.py new file mode 100644 index 00000000000..074f5d55d59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="choropleth.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_text.py new file mode 100644 index 00000000000..4c271dc67a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="choropleth.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/__init__.py index f131a35ab10..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/__init__.py @@ -1,55 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="choropleth.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="choropleth.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="choropleth.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_color.py new file mode 100644 index 00000000000..46d0b37bb4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="choropleth.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_family.py new file mode 100644 index 00000000000..91906f9621c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="choropleth.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_size.py new file mode 100644 index 00000000000..1fbb3bf60b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="choropleth.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/__init__.py index 28520c11c6f..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/__init__.py @@ -1,185 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="choropleth.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="choropleth.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="choropleth.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="choropleth.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="choropleth.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="choropleth.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="choropleth.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="choropleth.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="choropleth.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_align.py new file mode 100644 index 00000000000..5dd302eaaf9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="choropleth.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..c2de4598f3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="choropleth.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..2a354e74bfc --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="choropleth.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..34dab635cec --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="choropleth.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..def9deec2fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="choropleth.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..1ab239d9c67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="choropleth.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_font.py new file mode 100644 index 00000000000..a81aec7c7b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="choropleth.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_namelength.py new file mode 100644 index 00000000000..49b00bc5b9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="choropleth.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..003e029c90c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="choropleth.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/__init__.py index 6bd7a46628d..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/__init__.py @@ -1,103 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="choropleth.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="choropleth.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="choropleth.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="choropleth.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="choropleth.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="choropleth.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_color.py new file mode 100644 index 00000000000..76c115d4ef8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="choropleth.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..2fc43922cf0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="choropleth.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_family.py new file mode 100644 index 00000000000..ef31bfda76d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="choropleth.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b088780cbc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="choropleth.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_size.py new file mode 100644 index 00000000000..5d228f2bfa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="choropleth.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..6ed976cda3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="choropleth.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/__init__.py b/packages/python/plotly/plotly/validators/choropleth/marker/__init__.py index 51980d6bdd0..663075d7259 100644 --- a/packages/python/plotly/plotly/validators/choropleth/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/marker/__init__.py @@ -1,67 +1,18 @@ -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="choropleth.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="choropleth.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="choropleth.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/_line.py b/packages/python/plotly/plotly/validators/choropleth/marker/_line.py new file mode 100644 index 00000000000..1a675c326fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/_line.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="choropleth.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/_opacity.py b/packages/python/plotly/plotly/validators/choropleth/marker/_opacity.py new file mode 100644 index 00000000000..05d5a0795b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="choropleth.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/choropleth/marker/_opacitysrc.py new file mode 100644 index 00000000000..35483228d77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="choropleth.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/line/__init__.py b/packages/python/plotly/plotly/validators/choropleth/marker/line/__init__.py index 16f2f47d1b1..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/choropleth/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/marker/line/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="choropleth.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="choropleth.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="choropleth.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="choropleth.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/line/_color.py b/packages/python/plotly/plotly/validators/choropleth/marker/line/_color.py new file mode 100644 index 00000000000..b87608ae189 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/line/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="choropleth.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/choropleth/marker/line/_colorsrc.py new file mode 100644 index 00000000000..dcdc368f2b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="choropleth.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/line/_width.py b/packages/python/plotly/plotly/validators/choropleth/marker/line/_width.py new file mode 100644 index 00000000000..69988942256 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="choropleth.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/choropleth/marker/line/_widthsrc.py new file mode 100644 index 00000000000..cb6aaba7645 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="choropleth.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/selected/__init__.py b/packages/python/plotly/plotly/validators/choropleth/selected/__init__.py index 7ae0a85e3c6..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/choropleth/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/selected/__init__.py @@ -1,20 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="choropleth.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the marker opacity of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/selected/_marker.py b/packages/python/plotly/plotly/validators/choropleth/selected/_marker.py new file mode 100644 index 00000000000..7ae0a85e3c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/selected/_marker.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="choropleth.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the marker opacity of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/choropleth/selected/marker/__init__.py index 44df1fa4bf6..163f929070c 100644 --- a/packages/python/plotly/plotly/validators/choropleth/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/selected/marker/__init__.py @@ -1,16 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="choropleth.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/choropleth/selected/marker/_opacity.py new file mode 100644 index 00000000000..44df1fa4bf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="choropleth.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/stream/__init__.py b/packages/python/plotly/plotly/validators/choropleth/stream/__init__.py index 620fdc8ffa9..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/choropleth/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="choropleth.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="choropleth.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/choropleth/stream/_maxpoints.py new file mode 100644 index 00000000000..e198ec2a9e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="choropleth.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/stream/_token.py b/packages/python/plotly/plotly/validators/choropleth/stream/_token.py new file mode 100644 index 00000000000..2856e86e452 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="choropleth.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/unselected/__init__.py b/packages/python/plotly/plotly/validators/choropleth/unselected/__init__.py index 465e7264db1..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/choropleth/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/unselected/__init__.py @@ -1,21 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="choropleth.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/unselected/_marker.py b/packages/python/plotly/plotly/validators/choropleth/unselected/_marker.py new file mode 100644 index 00000000000..465e7264db1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/unselected/_marker.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="choropleth.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/choropleth/unselected/marker/__init__.py index 451f51b86a2..163f929070c 100644 --- a/packages/python/plotly/plotly/validators/choropleth/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/choropleth/unselected/marker/__init__.py @@ -1,19 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="choropleth.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choropleth/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/choropleth/unselected/marker/_opacity.py new file mode 100644 index 00000000000..451f51b86a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choropleth/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="choropleth.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/__init__.py index f0d65743c12..11ba8f6fce6 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/__init__.py @@ -1,976 +1,100 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="choroplethmapbox", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="choroplethmapbox", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="choroplethmapbox", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="choroplethmapbox", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="choroplethmapbox", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="choroplethmapbox", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="choroplethmapbox", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="unselected", parent_name="choroplethmapbox", **kwargs - ): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.choroplethmapbox.u - nselected.Marker` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="choroplethmapbox", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="choroplethmapbox", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="choroplethmapbox", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="choroplethmapbox", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="choroplethmapbox", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "mapbox"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="choroplethmapbox", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="choroplethmapbox", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlegend", parent_name="choroplethmapbox", **kwargs - ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="choroplethmapbox", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="selected", parent_name="choroplethmapbox", **kwargs - ): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.choroplethmapbox.s - elected.Marker` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="choroplethmapbox", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="choroplethmapbox", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="choroplethmapbox", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="choroplethmapbox", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="choroplethmapbox", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - line - :class:`plotly.graph_objects.choroplethmapbox.m - arker.Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="choroplethmapbox", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="choroplethmapbox", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="choroplethmapbox", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="choroplethmapbox", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="choroplethmapbox", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="choroplethmapbox", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertext", parent_name="choroplethmapbox", **kwargs - ): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="choroplethmapbox", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="choroplethmapbox", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="hoverlabel", parent_name="choroplethmapbox", **kwargs - ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="choroplethmapbox", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__( - self, plotly_name="hoverinfo", parent_name="choroplethmapbox", **kwargs - ): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["location", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="geojson", parent_name="choroplethmapbox", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="featureidkey", parent_name="choroplethmapbox", **kwargs - ): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="choroplethmapbox", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="customdata", parent_name="choroplethmapbox", **kwargs - ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="choroplethmapbox", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="choroplethmapbox", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - ethmapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choroplethmapbox.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - choroplethmapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmapbox.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - choroplethmapbox.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choroplethmapbox.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="choroplethmapbox", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BelowValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="below", parent_name="choroplethmapbox", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="choroplethmapbox", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._reversescale import ReversescaleValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._geojson import GeojsonValidator + from ._featureidkey import FeatureidkeyValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._below import BelowValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._reversescale.ReversescaleValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._below.BelowValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_autocolorscale.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_autocolorscale.py new file mode 100644 index 00000000000..dda30e397c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="choroplethmapbox", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_below.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_below.py new file mode 100644 index 00000000000..8d3d6950da2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_below.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BelowValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="below", parent_name="choroplethmapbox", **kwargs): + super(BelowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_coloraxis.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_coloraxis.py new file mode 100644 index 00000000000..7defcb54101 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="choroplethmapbox", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_colorbar.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_colorbar.py new file mode 100644 index 00000000000..f7189cf1777 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="choroplethmapbox", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropl + ethmapbox.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.choroplethmapbox.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + choroplethmapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmapbox.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + choroplethmapbox.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + choroplethmapbox.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_colorscale.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_colorscale.py new file mode 100644 index 00000000000..8558ae34fd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="choroplethmapbox", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_customdata.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_customdata.py new file mode 100644 index 00000000000..cd9e1438dc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_customdata.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="customdata", parent_name="choroplethmapbox", **kwargs + ): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_customdatasrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_customdatasrc.py new file mode 100644 index 00000000000..bf4555c2f70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="choroplethmapbox", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_featureidkey.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_featureidkey.py new file mode 100644 index 00000000000..94d4afd7707 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_featureidkey.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="featureidkey", parent_name="choroplethmapbox", **kwargs + ): + super(FeatureidkeyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_geojson.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_geojson.py new file mode 100644 index 00000000000..4d139fd5bd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_geojson.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="geojson", parent_name="choroplethmapbox", **kwargs): + super(GeojsonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverinfo.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverinfo.py new file mode 100644 index 00000000000..a4b04c20ddd --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverinfo.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__( + self, plotly_name="hoverinfo", parent_name="choroplethmapbox", **kwargs + ): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["location", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverinfosrc.py new file mode 100644 index 00000000000..042a0948e3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="choroplethmapbox", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverlabel.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverlabel.py new file mode 100644 index 00000000000..3862f48868b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hoverlabel.py @@ -0,0 +1,53 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="hoverlabel", parent_name="choroplethmapbox", **kwargs + ): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertemplate.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertemplate.py new file mode 100644 index 00000000000..ff71b5b81e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="choroplethmapbox", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertemplatesrc.py new file mode 100644 index 00000000000..550f2d2acad --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="choroplethmapbox", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertext.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertext.py new file mode 100644 index 00000000000..97e8a5fecbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertext.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertext", parent_name="choroplethmapbox", **kwargs + ): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertextsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertextsrc.py new file mode 100644 index 00000000000..8b35da52da7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="choroplethmapbox", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_ids.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_ids.py new file mode 100644 index 00000000000..45d3f0639c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="choroplethmapbox", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_idssrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_idssrc.py new file mode 100644 index 00000000000..8f9856714aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="choroplethmapbox", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_legendgroup.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_legendgroup.py new file mode 100644 index 00000000000..a3c838cd56d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="choroplethmapbox", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_locations.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_locations.py new file mode 100644 index 00000000000..51080df0424 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="choroplethmapbox", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_locationssrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_locationssrc.py new file mode 100644 index 00000000000..488ee913468 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="choroplethmapbox", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_marker.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_marker.py new file mode 100644 index 00000000000..48fbc5affc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_marker.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="choroplethmapbox", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + line + :class:`plotly.graph_objects.choroplethmapbox.m + arker.Line` instance or dict with compatible + properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_meta.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_meta.py new file mode 100644 index 00000000000..5f6dd38ed44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="choroplethmapbox", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_metasrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_metasrc.py new file mode 100644 index 00000000000..bdbfbbb026d --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="choroplethmapbox", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_name.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_name.py new file mode 100644 index 00000000000..7bada84af04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="choroplethmapbox", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_reversescale.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_reversescale.py new file mode 100644 index 00000000000..0c14a885d1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="choroplethmapbox", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_selected.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_selected.py new file mode 100644 index 00000000000..326b9d1ed89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_selected.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="selected", parent_name="choroplethmapbox", **kwargs + ): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.choroplethmapbox.s + elected.Marker` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_selectedpoints.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_selectedpoints.py new file mode 100644 index 00000000000..4d23edd0f31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="choroplethmapbox", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_showlegend.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_showlegend.py new file mode 100644 index 00000000000..6938b067b0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_showlegend.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlegend", parent_name="choroplethmapbox", **kwargs + ): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_showscale.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_showscale.py new file mode 100644 index 00000000000..e1a7fd473ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="choroplethmapbox", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_stream.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_stream.py new file mode 100644 index 00000000000..3583df9f8e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="choroplethmapbox", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_subplot.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_subplot.py new file mode 100644 index 00000000000..d7932c38e13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="choroplethmapbox", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "mapbox"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_text.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_text.py new file mode 100644 index 00000000000..4c775e82bf4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="choroplethmapbox", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_textsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_textsrc.py new file mode 100644 index 00000000000..5c9a308ece9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="choroplethmapbox", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_uid.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_uid.py new file mode 100644 index 00000000000..2fe0355ef36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="choroplethmapbox", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_uirevision.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_uirevision.py new file mode 100644 index 00000000000..486839bd0ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="choroplethmapbox", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_unselected.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_unselected.py new file mode 100644 index 00000000000..9939b9c2ffc --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_unselected.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="unselected", parent_name="choroplethmapbox", **kwargs + ): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.choroplethmapbox.u + nselected.Marker` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_visible.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_visible.py new file mode 100644 index 00000000000..f8e0d32bb90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="choroplethmapbox", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_z.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_z.py new file mode 100644 index 00000000000..34c4688a118 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="choroplethmapbox", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_zauto.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_zauto.py new file mode 100644 index 00000000000..c82ff5f39f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="choroplethmapbox", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_zmax.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_zmax.py new file mode 100644 index 00000000000..27d7079efe0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="choroplethmapbox", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_zmid.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_zmid.py new file mode 100644 index 00000000000..0392780722f --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="choroplethmapbox", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_zmin.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_zmin.py new file mode 100644 index 00000000000..6294fec6b8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="choroplethmapbox", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/_zsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/_zsrc.py new file mode 100644 index 00000000000..c6380e500df --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="choroplethmapbox", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/__init__.py index 3c3b2996db5..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/__init__.py @@ -1,819 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="choroplethmapbox.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="choroplethmapbox.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py new file mode 100644 index 00000000000..b36556fbbee --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py new file mode 100644 index 00000000000..db85b2dc4df --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py new file mode 100644 index 00000000000..fc351359d3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_dtick.py new file mode 100644 index 00000000000..c0c1cd9ac70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py new file mode 100644 index 00000000000..fd766ab5e5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_len.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_len.py new file mode 100644 index 00000000000..f013ede9d8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_lenmode.py new file mode 100644 index 00000000000..d5194b65e46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_nticks.py new file mode 100644 index 00000000000..aac20a8d4dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..d4e6ae7600a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..6306fe8937c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py new file mode 100644 index 00000000000..9df85029b6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showexponent.py new file mode 100644 index 00000000000..091f691bf74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py new file mode 100644 index 00000000000..d7247d27cde --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..a8a515e4344 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..4928606e54f --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_thickness.py new file mode 100644 index 00000000000..f6955a394f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..2d09f20b290 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tick0.py new file mode 100644 index 00000000000..01b662b9996 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickangle.py new file mode 100644 index 00000000000..898e9edcf07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py new file mode 100644 index 00000000000..b1202a0a2e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickfont.py new file mode 100644 index 00000000000..a29f55e2fd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformat.py new file mode 100644 index 00000000000..0e0b1a49f55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..ba479c3f169 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..aac97dbb588 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticklen.py new file mode 100644 index 00000000000..bb07892dbb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickmode.py new file mode 100644 index 00000000000..78c78acad71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py new file mode 100644 index 00000000000..b81faa3fd8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticks.py new file mode 100644 index 00000000000..dcffe1ca514 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..005639c3ae3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticktext.py new file mode 100644 index 00000000000..cb9744392d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..ef2016e82d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickvals.py new file mode 100644 index 00000000000..70ac47fcd99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..e2210884b50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="choroplethmapbox.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py new file mode 100644 index 00000000000..633f5225ae5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_title.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_title.py new file mode 100644 index 00000000000..7fa7c3822a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_x.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_x.py new file mode 100644 index 00000000000..93098e25319 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_xanchor.py new file mode 100644 index 00000000000..0f69bd4a7a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_xpad.py new file mode 100644 index 00000000000..bb80e520f1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_y.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_y.py new file mode 100644 index 00000000000..73ce3178038 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_yanchor.py new file mode 100644 index 00000000000..6cf3a228c6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ypad.py new file mode 100644 index 00000000000..93d54bc9070 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="choroplethmapbox.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py index f08ae82bf85..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="choroplethmapbox.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="choroplethmapbox.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="choroplethmapbox.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..2838199add7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="choroplethmapbox.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..a15bf0906be --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="choroplethmapbox.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..e5c8f21c8b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="choroplethmapbox.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py index 12db5b44ce2..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="choroplethmapbox.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="choroplethmapbox.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="choroplethmapbox.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="choroplethmapbox.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="choroplethmapbox.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..d6e202b35d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="choroplethmapbox.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..b91cb7ba3d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="choroplethmapbox.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..48376c2d1db --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="choroplethmapbox.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..707e8bca2be --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="choroplethmapbox.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..3b56b907cd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="choroplethmapbox.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/__init__.py index 2905709c65d..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="choroplethmapbox.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="choroplethmapbox.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="choroplethmapbox.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_font.py new file mode 100644 index 00000000000..da9807d0f43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="choroplethmapbox.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_side.py new file mode 100644 index 00000000000..7e375764eac --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="choroplethmapbox.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_text.py new file mode 100644 index 00000000000..ba893602b12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="choroplethmapbox.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py index 4eaabc05a8f..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="choroplethmapbox.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="choroplethmapbox.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="choroplethmapbox.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py new file mode 100644 index 00000000000..09204e624f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="choroplethmapbox.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py new file mode 100644 index 00000000000..65cf6d7e365 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="choroplethmapbox.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py new file mode 100644 index 00000000000..24c6290d489 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="choroplethmapbox.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/__init__.py index dee74d3ad0e..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/__init__.py @@ -1,200 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="choroplethmapbox.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="namelength", - parent_name="choroplethmapbox.hoverlabel", - **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="choroplethmapbox.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="choroplethmapbox.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="choroplethmapbox.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bgcolorsrc", - parent_name="choroplethmapbox.hoverlabel", - **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="choroplethmapbox.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="alignsrc", - parent_name="choroplethmapbox.hoverlabel", - **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="choroplethmapbox.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_align.py new file mode 100644 index 00000000000..8be02a3b41a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="choroplethmapbox.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..5b0930c2fff --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="alignsrc", + parent_name="choroplethmapbox.hoverlabel", + **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..af69e869fb4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="choroplethmapbox.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..81db881a20e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bgcolorsrc", + parent_name="choroplethmapbox.hoverlabel", + **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..2540a4aaa58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="choroplethmapbox.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..8fdd898ce66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="choroplethmapbox.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_font.py new file mode 100644 index 00000000000..a1aa59639db --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="choroplethmapbox.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py new file mode 100644 index 00000000000..c2394cf3a85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="namelength", + parent_name="choroplethmapbox.hoverlabel", + **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..f64e6b52186 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="choroplethmapbox.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py index 4c507b14d4b..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py @@ -1,118 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="choroplethmapbox.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="choroplethmapbox.hoverlabel.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="choroplethmapbox.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="choroplethmapbox.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="choroplethmapbox.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="choroplethmapbox.hoverlabel.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py new file mode 100644 index 00000000000..a76cc18aefe --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="choroplethmapbox.hoverlabel.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..100c7ea6da7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="choroplethmapbox.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py new file mode 100644 index 00000000000..ebe73ffe066 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="choroplethmapbox.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..7566344e752 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="choroplethmapbox.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py new file mode 100644 index 00000000000..e90cd2d0428 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="choroplethmapbox.hoverlabel.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..666d77b1d47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="choroplethmapbox.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/__init__.py index 467f9f145bd..663075d7259 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/__init__.py @@ -1,69 +1,18 @@ -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="choroplethmapbox.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="choroplethmapbox.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="choroplethmapbox.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_line.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_line.py new file mode 100644 index 00000000000..180e41e8482 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_line.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="choroplethmapbox.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_opacity.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_opacity.py new file mode 100644 index 00000000000..6f249975d9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="choroplethmapbox.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_opacitysrc.py new file mode 100644 index 00000000000..3db0725fca1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="choroplethmapbox.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/__init__.py index 04a728a68f0..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/__init__.py @@ -1,71 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="widthsrc", - parent_name="choroplethmapbox.marker.line", - **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="choroplethmapbox.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="choroplethmapbox.marker.line", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="choroplethmapbox.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_color.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_color.py new file mode 100644 index 00000000000..10da4f2ce84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="choroplethmapbox.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py new file mode 100644 index 00000000000..26f92718574 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="choroplethmapbox.marker.line", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_width.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_width.py new file mode 100644 index 00000000000..1f23be413a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="choroplethmapbox.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py new file mode 100644 index 00000000000..e3779db3027 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="widthsrc", + parent_name="choroplethmapbox.marker.line", + **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/selected/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/__init__.py index 2cc8f589091..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/__init__.py @@ -1,20 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="choroplethmapbox.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the marker opacity of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/selected/_marker.py b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/_marker.py new file mode 100644 index 00000000000..2cc8f589091 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/_marker.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="choroplethmapbox.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the marker opacity of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/__init__.py index beddb7ff90e..163f929070c 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/__init__.py @@ -1,19 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="choroplethmapbox.selected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/_opacity.py new file mode 100644 index 00000000000..beddb7ff90e --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/selected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="choroplethmapbox.selected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/stream/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/stream/__init__.py index 633487cbe9b..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="choroplethmapbox.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="choroplethmapbox.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_maxpoints.py new file mode 100644 index 00000000000..cd645b17728 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="choroplethmapbox.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_token.py b/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_token.py new file mode 100644 index 00000000000..1c377682872 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="choroplethmapbox.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/__init__.py index 5578c3bf2c0..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/__init__.py @@ -1,21 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="choroplethmapbox.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/_marker.py b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/_marker.py new file mode 100644 index 00000000000..5578c3bf2c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/_marker.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="choroplethmapbox.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/__init__.py index 508c4f654e0..163f929070c 100644 --- a/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/__init__.py @@ -1,19 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="choroplethmapbox.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py new file mode 100644 index 00000000000..508c4f654e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="choroplethmapbox.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/__init__.py b/packages/python/plotly/plotly/validators/cone/__init__.py index 73b7b320661..be7c78c5bbf 100644 --- a/packages/python/plotly/plotly/validators/cone/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/__init__.py @@ -1,1041 +1,114 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="cone", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="cone", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="cone", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="cone", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="cone", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="cone", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="wsrc", parent_name="cone", **kwargs): - super(WsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="w", parent_name="cone", **kwargs): - super(WValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="vsrc", parent_name="cone", **kwargs): - super(VsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="cone", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="v", parent_name="cone", **kwargs): - super(VValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="usrc", parent_name="cone", **kwargs): - super(UsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="cone", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="cone", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="u", parent_name="cone", **kwargs): - super(UValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="cone", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="cone", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="cone", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizeref", parent_name="cone", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="sizemode", parent_name="cone", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["scaled", "absolute"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="cone", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="cone", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="cone", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="cone", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="cone", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="cone", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="cone", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="cone", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lightposition", parent_name="cone", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lightposition"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lighting", parent_name="cone", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lighting"), - data_docs=kwargs.pop( - "data_docs", - """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="cone", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="cone", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="cone", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="cone", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="cone", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="cone", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="cone", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="cone", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="cone", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="cone", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop( - "flags", ["x", "y", "z", "u", "v", "w", "norm", "text", "name"] - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="cone", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="cone", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="cone", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="cone", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.cone.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.cone.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of cone.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.cone.colorbar.Titl - e` instance or dict with compatible properties - titlefont - Deprecated: Please use cone.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use cone.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="cone", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="cone", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="cone", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="cone", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="cone", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="cone", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="anchor", parent_name="cone", **kwargs): - super(AnchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["tip", "tail", "cm", "center"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._x import XValidator + from ._wsrc import WsrcValidator + from ._w import WValidator + from ._vsrc import VsrcValidator + from ._visible import VisibleValidator + from ._v import VValidator + from ._usrc import UsrcValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._u import UValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lightposition import LightpositionValidator + from ._lighting import LightingValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator + from ._anchor import AnchorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + "._wsrc.WsrcValidator", + "._w.WValidator", + "._vsrc.VsrcValidator", + "._visible.VisibleValidator", + "._v.VValidator", + "._usrc.UsrcValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._u.UValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anchor.AnchorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/cone/_anchor.py b/packages/python/plotly/plotly/validators/cone/_anchor.py new file mode 100644 index 00000000000..99fb322d6fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_anchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="anchor", parent_name="cone", **kwargs): + super(AnchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["tip", "tail", "cm", "center"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_autocolorscale.py b/packages/python/plotly/plotly/validators/cone/_autocolorscale.py new file mode 100644 index 00000000000..927db6d8258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="cone", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_cauto.py b/packages/python/plotly/plotly/validators/cone/_cauto.py new file mode 100644 index 00000000000..3b8305d396f --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="cone", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_cmax.py b/packages/python/plotly/plotly/validators/cone/_cmax.py new file mode 100644 index 00000000000..50139418e32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="cone", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_cmid.py b/packages/python/plotly/plotly/validators/cone/_cmid.py new file mode 100644 index 00000000000..52fa2830678 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="cone", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_cmin.py b/packages/python/plotly/plotly/validators/cone/_cmin.py new file mode 100644 index 00000000000..679cd33e500 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="cone", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_coloraxis.py b/packages/python/plotly/plotly/validators/cone/_coloraxis.py new file mode 100644 index 00000000000..e51bd6290da --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="cone", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_colorbar.py b/packages/python/plotly/plotly/validators/cone/_colorbar.py new file mode 100644 index 00000000000..7a872f08992 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_colorbar.py @@ -0,0 +1,224 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="cone", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.cone.co + lorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.cone.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of cone.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.cone.colorbar.Titl + e` instance or dict with compatible properties + titlefont + Deprecated: Please use cone.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use cone.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_colorscale.py b/packages/python/plotly/plotly/validators/cone/_colorscale.py new file mode 100644 index 00000000000..0224dd7118b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="cone", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_customdata.py b/packages/python/plotly/plotly/validators/cone/_customdata.py new file mode 100644 index 00000000000..81369915a16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="cone", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_customdatasrc.py b/packages/python/plotly/plotly/validators/cone/_customdatasrc.py new file mode 100644 index 00000000000..5a0a4816182 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="cone", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hoverinfo.py b/packages/python/plotly/plotly/validators/cone/_hoverinfo.py new file mode 100644 index 00000000000..a91941de05e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hoverinfo.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="cone", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", ["x", "y", "z", "u", "v", "w", "norm", "text", "name"] + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/cone/_hoverinfosrc.py new file mode 100644 index 00000000000..8d592b77e47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="cone", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hoverlabel.py b/packages/python/plotly/plotly/validators/cone/_hoverlabel.py new file mode 100644 index 00000000000..c85280b5ec6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="cone", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hovertemplate.py b/packages/python/plotly/plotly/validators/cone/_hovertemplate.py new file mode 100644 index 00000000000..af6348f3e01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="cone", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/cone/_hovertemplatesrc.py new file mode 100644 index 00000000000..01c79e80b24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="cone", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hovertext.py b/packages/python/plotly/plotly/validators/cone/_hovertext.py new file mode 100644 index 00000000000..e40fae2444b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="cone", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_hovertextsrc.py b/packages/python/plotly/plotly/validators/cone/_hovertextsrc.py new file mode 100644 index 00000000000..82768a43bfa --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="cone", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_ids.py b/packages/python/plotly/plotly/validators/cone/_ids.py new file mode 100644 index 00000000000..bffd79bee69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="cone", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_idssrc.py b/packages/python/plotly/plotly/validators/cone/_idssrc.py new file mode 100644 index 00000000000..2e14baa44a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="cone", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_legendgroup.py b/packages/python/plotly/plotly/validators/cone/_legendgroup.py new file mode 100644 index 00000000000..062aef5f23f --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="cone", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_lighting.py b/packages/python/plotly/plotly/validators/cone/_lighting.py new file mode 100644 index 00000000000..7a5275e0f29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_lighting.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lighting", parent_name="cone", **kwargs): + super(LightingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lighting"), + data_docs=kwargs.pop( + "data_docs", + """ + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_lightposition.py b/packages/python/plotly/plotly/validators/cone/_lightposition.py new file mode 100644 index 00000000000..85555245765 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_lightposition.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lightposition", parent_name="cone", **kwargs): + super(LightpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lightposition"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_meta.py b/packages/python/plotly/plotly/validators/cone/_meta.py new file mode 100644 index 00000000000..e724645bb86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="cone", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_metasrc.py b/packages/python/plotly/plotly/validators/cone/_metasrc.py new file mode 100644 index 00000000000..f2062b18709 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="cone", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_name.py b/packages/python/plotly/plotly/validators/cone/_name.py new file mode 100644 index 00000000000..21fc1fb9b0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="cone", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_opacity.py b/packages/python/plotly/plotly/validators/cone/_opacity.py new file mode 100644 index 00000000000..c02118a6287 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="cone", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_reversescale.py b/packages/python/plotly/plotly/validators/cone/_reversescale.py new file mode 100644 index 00000000000..1fd1f831398 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="cone", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_scene.py b/packages/python/plotly/plotly/validators/cone/_scene.py new file mode 100644 index 00000000000..730b34d9c6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="cone", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_showlegend.py b/packages/python/plotly/plotly/validators/cone/_showlegend.py new file mode 100644 index 00000000000..f7a3a96b619 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="cone", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_showscale.py b/packages/python/plotly/plotly/validators/cone/_showscale.py new file mode 100644 index 00000000000..2e4897ab75c --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="cone", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_sizemode.py b/packages/python/plotly/plotly/validators/cone/_sizemode.py new file mode 100644 index 00000000000..967b2bf7a47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_sizemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="sizemode", parent_name="cone", **kwargs): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["scaled", "absolute"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_sizeref.py b/packages/python/plotly/plotly/validators/cone/_sizeref.py new file mode 100644 index 00000000000..c5ba0514cd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_sizeref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizeref", parent_name="cone", **kwargs): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_stream.py b/packages/python/plotly/plotly/validators/cone/_stream.py new file mode 100644 index 00000000000..ba114738ee0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="cone", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_text.py b/packages/python/plotly/plotly/validators/cone/_text.py new file mode 100644 index 00000000000..9622b83b7fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="cone", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_textsrc.py b/packages/python/plotly/plotly/validators/cone/_textsrc.py new file mode 100644 index 00000000000..c266b02bc90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="cone", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_u.py b/packages/python/plotly/plotly/validators/cone/_u.py new file mode 100644 index 00000000000..9d58adf8ef8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_u.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="u", parent_name="cone", **kwargs): + super(UValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_uid.py b/packages/python/plotly/plotly/validators/cone/_uid.py new file mode 100644 index 00000000000..ad316f68f53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="cone", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_uirevision.py b/packages/python/plotly/plotly/validators/cone/_uirevision.py new file mode 100644 index 00000000000..e7536a256a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="cone", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_usrc.py b/packages/python/plotly/plotly/validators/cone/_usrc.py new file mode 100644 index 00000000000..84ac29d2163 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_usrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="usrc", parent_name="cone", **kwargs): + super(UsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_v.py b/packages/python/plotly/plotly/validators/cone/_v.py new file mode 100644 index 00000000000..57dc9cd8f4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_v.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="v", parent_name="cone", **kwargs): + super(VValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_visible.py b/packages/python/plotly/plotly/validators/cone/_visible.py new file mode 100644 index 00000000000..8e54c4382c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="cone", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_vsrc.py b/packages/python/plotly/plotly/validators/cone/_vsrc.py new file mode 100644 index 00000000000..cbc8f4a7ff7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_vsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="vsrc", parent_name="cone", **kwargs): + super(VsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_w.py b/packages/python/plotly/plotly/validators/cone/_w.py new file mode 100644 index 00000000000..e12936388cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_w.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="w", parent_name="cone", **kwargs): + super(WValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_wsrc.py b/packages/python/plotly/plotly/validators/cone/_wsrc.py new file mode 100644 index 00000000000..0a4c1fa114f --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_wsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="wsrc", parent_name="cone", **kwargs): + super(WsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_x.py b/packages/python/plotly/plotly/validators/cone/_x.py new file mode 100644 index 00000000000..8b7dfd1d1fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="cone", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_xsrc.py b/packages/python/plotly/plotly/validators/cone/_xsrc.py new file mode 100644 index 00000000000..f52ffc9a765 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="cone", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_y.py b/packages/python/plotly/plotly/validators/cone/_y.py new file mode 100644 index 00000000000..8ba803d9cfa --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="cone", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_ysrc.py b/packages/python/plotly/plotly/validators/cone/_ysrc.py new file mode 100644 index 00000000000..49cc974b671 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="cone", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_z.py b/packages/python/plotly/plotly/validators/cone/_z.py new file mode 100644 index 00000000000..13e6dbe151e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="cone", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/_zsrc.py b/packages/python/plotly/plotly/validators/cone/_zsrc.py new file mode 100644 index 00000000000..359798a1ca3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="cone", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/__init__.py b/packages/python/plotly/plotly/validators/cone/colorbar/__init__.py index f4dc8b5bf8c..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/cone/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/colorbar/__init__.py @@ -1,716 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="cone.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="cone.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="cone.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="cone.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="cone.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="cone.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="cone.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tickwidth", parent_name="cone.colorbar", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="cone.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="cone.colorbar", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="cone.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="cone.colorbar", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="ticksuffix", parent_name="cone.colorbar", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="cone.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickprefix", parent_name="cone.colorbar", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="cone.colorbar", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="cone.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="cone.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="cone.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickformat", parent_name="cone.colorbar", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="cone.colorbar", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="tickcolor", parent_name="cone.colorbar", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="tickangle", parent_name="cone.colorbar", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="cone.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="cone.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="thickness", parent_name="cone.colorbar", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="cone.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="cone.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="cone.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="cone.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="cone.colorbar", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="cone.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="cone.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="cone.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="cone.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="cone.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="cone.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="cone.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="cone.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="cone.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="cone.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/cone/colorbar/_bgcolor.py new file mode 100644 index 00000000000..e61136dd652 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="cone.colorbar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/cone/colorbar/_bordercolor.py new file mode 100644 index 00000000000..39b0aede5f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="cone.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/cone/colorbar/_borderwidth.py new file mode 100644 index 00000000000..39360689079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="cone.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/cone/colorbar/_dtick.py new file mode 100644 index 00000000000..53d5b603748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="cone.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/cone/colorbar/_exponentformat.py new file mode 100644 index 00000000000..2882270f1b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="cone.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_len.py b/packages/python/plotly/plotly/validators/cone/colorbar/_len.py new file mode 100644 index 00000000000..2a8fc855d43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="cone.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/cone/colorbar/_lenmode.py new file mode 100644 index 00000000000..89ac848835b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="cone.colorbar", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/cone/colorbar/_nticks.py new file mode 100644 index 00000000000..e8c55f68d79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="cone.colorbar", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/cone/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..56c1f3e2119 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="cone.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/cone/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..1963d3cb4ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="cone.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/cone/colorbar/_separatethousands.py new file mode 100644 index 00000000000..355595bb72b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="cone.colorbar", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/cone/colorbar/_showexponent.py new file mode 100644 index 00000000000..aee4696290d --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="cone.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/cone/colorbar/_showticklabels.py new file mode 100644 index 00000000000..b67ab65eeb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="cone.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/cone/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..6a5539c9611 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="cone.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/cone/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..5b0a71e2c2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="cone.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/cone/colorbar/_thickness.py new file mode 100644 index 00000000000..d3e5e39c09a --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_thickness.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="thickness", parent_name="cone.colorbar", **kwargs): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/cone/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..6cab2691381 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="cone.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tick0.py new file mode 100644 index 00000000000..7e5723c0d4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="cone.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickangle.py new file mode 100644 index 00000000000..3f76b28fc88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="tickangle", parent_name="cone.colorbar", **kwargs): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickcolor.py new file mode 100644 index 00000000000..43222a6022b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="tickcolor", parent_name="cone.colorbar", **kwargs): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickfont.py new file mode 100644 index 00000000000..ce66d7fe5c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="cone.colorbar", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickformat.py new file mode 100644 index 00000000000..73960c03ea3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickformat", parent_name="cone.colorbar", **kwargs): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..7c1daac6406 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="cone.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..ab857a3a1db --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="cone.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/cone/colorbar/_ticklen.py new file mode 100644 index 00000000000..760a90e1237 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="cone.colorbar", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickmode.py new file mode 100644 index 00000000000..0ca981e2c0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="cone.colorbar", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickprefix.py new file mode 100644 index 00000000000..17e79bb9914 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickprefix", parent_name="cone.colorbar", **kwargs): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/cone/colorbar/_ticks.py new file mode 100644 index 00000000000..3a6839d5c54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="cone.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/cone/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..a21004fd554 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_ticksuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="ticksuffix", parent_name="cone.colorbar", **kwargs): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/cone/colorbar/_ticktext.py new file mode 100644 index 00000000000..d003ffcdcc0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="cone.colorbar", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/cone/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..fef538cd7aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="cone.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickvals.py new file mode 100644 index 00000000000..1d80905460b --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="cone.colorbar", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..8b29c9755af --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="cone.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/cone/colorbar/_tickwidth.py new file mode 100644 index 00000000000..aecd2c6d0a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_tickwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tickwidth", parent_name="cone.colorbar", **kwargs): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_title.py b/packages/python/plotly/plotly/validators/cone/colorbar/_title.py new file mode 100644 index 00000000000..b70548c41e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="cone.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_x.py b/packages/python/plotly/plotly/validators/cone/colorbar/_x.py new file mode 100644 index 00000000000..46537921eb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="cone.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/cone/colorbar/_xanchor.py new file mode 100644 index 00000000000..4b441bc295d --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="cone.colorbar", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/cone/colorbar/_xpad.py new file mode 100644 index 00000000000..a914d2e7fa8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="cone.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_y.py b/packages/python/plotly/plotly/validators/cone/colorbar/_y.py new file mode 100644 index 00000000000..2d9c096708e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="cone.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/cone/colorbar/_yanchor.py new file mode 100644 index 00000000000..99dc4dc2542 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="cone.colorbar", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/cone/colorbar/_ypad.py new file mode 100644 index 00000000000..6b2d3554963 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="cone.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/__init__.py index 359e530f74a..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="cone.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="cone.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="cone.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..0bfb6578fa7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="cone.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..23e6c662ef0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="cone.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..6d1b04ceaca --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="cone.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/__init__.py index 60aea7e6412..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/__init__.py @@ -1,94 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="value", parent_name="cone.colorbar.tickformatstop", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="cone.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="cone.colorbar.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="cone.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="cone.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..acb3796876e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="cone.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a2f702b8ba5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="cone.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..34accf4091f --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="cone.colorbar.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..98b2833dd46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="cone.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..6ebe5868607 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/tickformatstop/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="value", parent_name="cone.colorbar.tickformatstop", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/__init__.py index c642af6365a..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/cone/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/__init__.py @@ -1,66 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="cone.colorbar.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="side", parent_name="cone.colorbar.title", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="cone.colorbar.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/_font.py new file mode 100644 index 00000000000..527029cf005 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="cone.colorbar.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/_side.py new file mode 100644 index 00000000000..b27dee0d0ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/_side.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="cone.colorbar.title", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/_text.py new file mode 100644 index 00000000000..2c0a8e51766 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="cone.colorbar.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/__init__.py index 7ff498ea637..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/cone/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="cone.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="cone.colorbar.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="cone.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_color.py new file mode 100644 index 00000000000..f70d5a15ee6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="cone.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_family.py new file mode 100644 index 00000000000..0298bfa2aae --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="cone.colorbar.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_size.py new file mode 100644 index 00000000000..dce33c9deb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="cone.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/__init__.py index d3beaba08c1..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/cone/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/__init__.py @@ -1,174 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="cone.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="cone.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="cone.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="cone.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="cone.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="cone.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="cone.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="cone.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="cone.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_align.py new file mode 100644 index 00000000000..772f1c61a53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="cone.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..92f0afd9291 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="cone.hoverlabel", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..ea615ce913a --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="cone.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..437dc879e80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="cone.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..78e1e431c5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="cone.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..41481eec3fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="cone.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_font.py new file mode 100644 index 00000000000..6b383021d01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="cone.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_namelength.py new file mode 100644 index 00000000000..8585565262d --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="cone.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3200dcb1392 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="cone.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/__init__.py index 198c8f81f2f..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="cone.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="cone.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="cone.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="cone.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="cone.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="cone.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_color.py new file mode 100644 index 00000000000..f8d3c636fd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="cone.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..770459dab58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="cone.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_family.py new file mode 100644 index 00000000000..231404ebe5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="cone.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..46cbd78a5d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="cone.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_size.py new file mode 100644 index 00000000000..291bcc14460 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="cone.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..6a4e77b481d --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="cone.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/__init__.py b/packages/python/plotly/plotly/validators/cone/lighting/__init__.py index 8fa4e648a63..12f1cf66154 100644 --- a/packages/python/plotly/plotly/validators/cone/lighting/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/lighting/__init__.py @@ -1,114 +1,26 @@ -import _plotly_utils.basevalidators - - -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="vertexnormalsepsilon", parent_name="cone.lighting", **kwargs - ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="specular", parent_name="cone.lighting", **kwargs): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="roughness", parent_name="cone.lighting", **kwargs): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fresnel", parent_name="cone.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="facenormalsepsilon", parent_name="cone.lighting", **kwargs - ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="diffuse", parent_name="cone.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ambient", parent_name="cone.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._vertexnormalsepsilon import VertexnormalsepsilonValidator + from ._specular import SpecularValidator + from ._roughness import RoughnessValidator + from ._fresnel import FresnelValidator + from ._facenormalsepsilon import FacenormalsepsilonValidator + from ._diffuse import DiffuseValidator + from ._ambient import AmbientValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_ambient.py b/packages/python/plotly/plotly/validators/cone/lighting/_ambient.py new file mode 100644 index 00000000000..814f96b6a91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_ambient.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ambient", parent_name="cone.lighting", **kwargs): + super(AmbientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_diffuse.py b/packages/python/plotly/plotly/validators/cone/lighting/_diffuse.py new file mode 100644 index 00000000000..0a0b63234c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_diffuse.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="diffuse", parent_name="cone.lighting", **kwargs): + super(DiffuseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_facenormalsepsilon.py b/packages/python/plotly/plotly/validators/cone/lighting/_facenormalsepsilon.py new file mode 100644 index 00000000000..0d7b7b0496e --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_facenormalsepsilon.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="facenormalsepsilon", parent_name="cone.lighting", **kwargs + ): + super(FacenormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_fresnel.py b/packages/python/plotly/plotly/validators/cone/lighting/_fresnel.py new file mode 100644 index 00000000000..436f3f7c20a --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_fresnel.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fresnel", parent_name="cone.lighting", **kwargs): + super(FresnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_roughness.py b/packages/python/plotly/plotly/validators/cone/lighting/_roughness.py new file mode 100644 index 00000000000..e508ba2a165 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_roughness.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="roughness", parent_name="cone.lighting", **kwargs): + super(RoughnessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_specular.py b/packages/python/plotly/plotly/validators/cone/lighting/_specular.py new file mode 100644 index 00000000000..d975989dc51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_specular.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="specular", parent_name="cone.lighting", **kwargs): + super(SpecularValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lighting/_vertexnormalsepsilon.py b/packages/python/plotly/plotly/validators/cone/lighting/_vertexnormalsepsilon.py new file mode 100644 index 00000000000..e4056cd8255 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lighting/_vertexnormalsepsilon.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="vertexnormalsepsilon", parent_name="cone.lighting", **kwargs + ): + super(VertexnormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lightposition/__init__.py b/packages/python/plotly/plotly/validators/cone/lightposition/__init__.py index fb41b1ae6ae..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/cone/lightposition/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/lightposition/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="z", parent_name="cone.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="cone.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="cone.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/cone/lightposition/_x.py b/packages/python/plotly/plotly/validators/cone/lightposition/_x.py new file mode 100644 index 00000000000..2e1ea022745 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lightposition/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="cone.lightposition", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lightposition/_y.py b/packages/python/plotly/plotly/validators/cone/lightposition/_y.py new file mode 100644 index 00000000000..b71b15fa532 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lightposition/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="cone.lightposition", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/lightposition/_z.py b/packages/python/plotly/plotly/validators/cone/lightposition/_z.py new file mode 100644 index 00000000000..89ff49aafe7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/lightposition/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="z", parent_name="cone.lightposition", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/stream/__init__.py b/packages/python/plotly/plotly/validators/cone/stream/__init__.py index 2975fadd5c4..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/cone/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/cone/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="cone.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="cone.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/cone/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/cone/stream/_maxpoints.py new file mode 100644 index 00000000000..ee254d9bed4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="cone.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/cone/stream/_token.py b/packages/python/plotly/plotly/validators/cone/stream/_token.py new file mode 100644 index 00000000000..87d50c6ee79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/cone/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="cone.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/__init__.py b/packages/python/plotly/plotly/validators/contour/__init__.py index 120582d912a..abc1fab928f 100644 --- a/packages/python/plotly/plotly/validators/contour/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/__init__.py @@ -1,1236 +1,128 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="contour", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="contour", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="contour", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="contour", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="zhoverformat", parent_name="contour", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="contour", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="contour", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ytype", parent_name="contour", **kwargs): - super(YtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="contour", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="contour", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="contour", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="contour", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="contour", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xtype", parent_name="contour", **kwargs): - super(XtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="contour", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="contour", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="contour", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="contour", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="contour", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="contour", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="contour", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="contour", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="transpose", parent_name="contour", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="contour", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="contour", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="contour", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="contour", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="contour", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="contour", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="contour", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="ncontours", parent_name="contour", **kwargs): - super(NcontoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="contour", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="contour", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="contour", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="contour", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="contour", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="contour", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="contour", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="contour", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="hovertext", parent_name="contour", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="contour", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="contour", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverongapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="hoverongaps", parent_name="contour", **kwargs): - super(HoverongapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="contour", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="contour", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="contour", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="contour", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "contour.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="contour", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="contour", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="contour", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="contour", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contours", parent_name="contour", **kwargs): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contours"), - data_docs=kwargs.pop( - "data_docs", - """ - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="contour", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="contour", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="contour", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contour.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of contour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contour.colorbar.T - itle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - contour.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - contour.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="contour", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocontour", parent_name="contour", **kwargs): - super(AutocontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="contour", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zhoverformat import ZhoverformatValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._ytype import YtypeValidator + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xtype import XtypeValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._transpose import TransposeValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._ncontours import NcontoursValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverongaps import HoverongapsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contours import ContoursValidator + from ._connectgaps import ConnectgapsValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._autocontour import AutocontourValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ytype.YtypeValidator", + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xtype.XtypeValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._ncontours.NcontoursValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverongaps.HoverongapsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._connectgaps.ConnectgapsValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocontour.AutocontourValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/_autocolorscale.py b/packages/python/plotly/plotly/validators/contour/_autocolorscale.py new file mode 100644 index 00000000000..f1e77a5ae52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="contour", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_autocontour.py b/packages/python/plotly/plotly/validators/contour/_autocontour.py new file mode 100644 index 00000000000..07c0b940fe4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_autocontour.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocontour", parent_name="contour", **kwargs): + super(AutocontourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_coloraxis.py b/packages/python/plotly/plotly/validators/contour/_coloraxis.py new file mode 100644 index 00000000000..478e8efb9e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="contour", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_colorbar.py b/packages/python/plotly/plotly/validators/contour/_colorbar.py new file mode 100644 index 00000000000..a083cb499b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="contour", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour + .colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.contour.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of contour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contour.colorbar.T + itle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + contour.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + contour.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_colorscale.py b/packages/python/plotly/plotly/validators/contour/_colorscale.py new file mode 100644 index 00000000000..e1a61d5c79e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="contour", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_connectgaps.py b/packages/python/plotly/plotly/validators/contour/_connectgaps.py new file mode 100644 index 00000000000..718aedef998 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="contour", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_contours.py b/packages/python/plotly/plotly/validators/contour/_contours.py new file mode 100644 index 00000000000..a9a14cad68e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_contours.py @@ -0,0 +1,79 @@ +import _plotly_utils.basevalidators + + +class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contours", parent_name="contour", **kwargs): + super(ContoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contours"), + data_docs=kwargs.pop( + "data_docs", + """ + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "heatmap", + a heatmap gradient coloring is applied between + each contour level. If "lines", coloring is + done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_customdata.py b/packages/python/plotly/plotly/validators/contour/_customdata.py new file mode 100644 index 00000000000..8863c829b67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="contour", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_customdatasrc.py b/packages/python/plotly/plotly/validators/contour/_customdatasrc.py new file mode 100644 index 00000000000..cf4ac25c0d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="contour", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_dx.py b/packages/python/plotly/plotly/validators/contour/_dx.py new file mode 100644 index 00000000000..853644655d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_dx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="contour", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_dy.py b/packages/python/plotly/plotly/validators/contour/_dy.py new file mode 100644 index 00000000000..40394576fb2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_dy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="contour", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_fillcolor.py b/packages/python/plotly/plotly/validators/contour/_fillcolor.py new file mode 100644 index 00000000000..c376399d324 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_fillcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="contour", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "contour.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hoverinfo.py b/packages/python/plotly/plotly/validators/contour/_hoverinfo.py new file mode 100644 index 00000000000..00eb2980122 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="contour", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/contour/_hoverinfosrc.py new file mode 100644 index 00000000000..00d4037c6c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="contour", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hoverlabel.py b/packages/python/plotly/plotly/validators/contour/_hoverlabel.py new file mode 100644 index 00000000000..5a0e8688d5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="contour", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hoverongaps.py b/packages/python/plotly/plotly/validators/contour/_hoverongaps.py new file mode 100644 index 00000000000..8562d57b182 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hoverongaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverongapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="hoverongaps", parent_name="contour", **kwargs): + super(HoverongapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hovertemplate.py b/packages/python/plotly/plotly/validators/contour/_hovertemplate.py new file mode 100644 index 00000000000..f26ad80d671 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="contour", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/contour/_hovertemplatesrc.py new file mode 100644 index 00000000000..3725c5abc10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="contour", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hovertext.py b/packages/python/plotly/plotly/validators/contour/_hovertext.py new file mode 100644 index 00000000000..e6cf7ecd7e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hovertext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="hovertext", parent_name="contour", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_hovertextsrc.py b/packages/python/plotly/plotly/validators/contour/_hovertextsrc.py new file mode 100644 index 00000000000..e3bf70171b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="contour", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_ids.py b/packages/python/plotly/plotly/validators/contour/_ids.py new file mode 100644 index 00000000000..750930ffa22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="contour", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_idssrc.py b/packages/python/plotly/plotly/validators/contour/_idssrc.py new file mode 100644 index 00000000000..c64a20c0444 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="contour", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_legendgroup.py b/packages/python/plotly/plotly/validators/contour/_legendgroup.py new file mode 100644 index 00000000000..cd3897705c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="contour", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_line.py b/packages/python/plotly/plotly/validators/contour/_line.py new file mode 100644 index 00000000000..a4490255a1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_line.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="contour", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_meta.py b/packages/python/plotly/plotly/validators/contour/_meta.py new file mode 100644 index 00000000000..03e01828506 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="contour", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_metasrc.py b/packages/python/plotly/plotly/validators/contour/_metasrc.py new file mode 100644 index 00000000000..8cdb5f8780d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="contour", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_name.py b/packages/python/plotly/plotly/validators/contour/_name.py new file mode 100644 index 00000000000..40aaa03ac8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="contour", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_ncontours.py b/packages/python/plotly/plotly/validators/contour/_ncontours.py new file mode 100644 index 00000000000..02a372c8c8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_ncontours.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="ncontours", parent_name="contour", **kwargs): + super(NcontoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_opacity.py b/packages/python/plotly/plotly/validators/contour/_opacity.py new file mode 100644 index 00000000000..897acb7d512 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="contour", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_reversescale.py b/packages/python/plotly/plotly/validators/contour/_reversescale.py new file mode 100644 index 00000000000..9b60ec837b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="contour", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_showlegend.py b/packages/python/plotly/plotly/validators/contour/_showlegend.py new file mode 100644 index 00000000000..027bb54302f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="contour", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_showscale.py b/packages/python/plotly/plotly/validators/contour/_showscale.py new file mode 100644 index 00000000000..cd170a9a57d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="contour", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_stream.py b/packages/python/plotly/plotly/validators/contour/_stream.py new file mode 100644 index 00000000000..6f269281a2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="contour", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_text.py b/packages/python/plotly/plotly/validators/contour/_text.py new file mode 100644 index 00000000000..a444a11bb64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="contour", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_textsrc.py b/packages/python/plotly/plotly/validators/contour/_textsrc.py new file mode 100644 index 00000000000..8f192fff55b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="contour", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_transpose.py b/packages/python/plotly/plotly/validators/contour/_transpose.py new file mode 100644 index 00000000000..4cd741ea729 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_transpose.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="transpose", parent_name="contour", **kwargs): + super(TransposeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_uid.py b/packages/python/plotly/plotly/validators/contour/_uid.py new file mode 100644 index 00000000000..696c1ed451b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="contour", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_uirevision.py b/packages/python/plotly/plotly/validators/contour/_uirevision.py new file mode 100644 index 00000000000..dbdb41fe69a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="contour", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_visible.py b/packages/python/plotly/plotly/validators/contour/_visible.py new file mode 100644 index 00000000000..b12c425593e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="contour", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_x.py b/packages/python/plotly/plotly/validators/contour/_x.py new file mode 100644 index 00000000000..b62d4a40658 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_x.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="contour", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_x0.py b/packages/python/plotly/plotly/validators/contour/_x0.py new file mode 100644 index 00000000000..1320ba723d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_x0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="contour", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_xaxis.py b/packages/python/plotly/plotly/validators/contour/_xaxis.py new file mode 100644 index 00000000000..f983786bde0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="contour", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_xcalendar.py b/packages/python/plotly/plotly/validators/contour/_xcalendar.py new file mode 100644 index 00000000000..ce9792f1d8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="contour", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_xsrc.py b/packages/python/plotly/plotly/validators/contour/_xsrc.py new file mode 100644 index 00000000000..a6833f7ef5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="contour", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_xtype.py b/packages/python/plotly/plotly/validators/contour/_xtype.py new file mode 100644 index 00000000000..86df0da5867 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_xtype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xtype", parent_name="contour", **kwargs): + super(XtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_y.py b/packages/python/plotly/plotly/validators/contour/_y.py new file mode 100644 index 00000000000..f52bade34ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_y.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="contour", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_y0.py b/packages/python/plotly/plotly/validators/contour/_y0.py new file mode 100644 index 00000000000..590335a2f3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_y0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="contour", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_yaxis.py b/packages/python/plotly/plotly/validators/contour/_yaxis.py new file mode 100644 index 00000000000..dc2d458307d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="contour", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_ycalendar.py b/packages/python/plotly/plotly/validators/contour/_ycalendar.py new file mode 100644 index 00000000000..3f52b146e99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="contour", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_ysrc.py b/packages/python/plotly/plotly/validators/contour/_ysrc.py new file mode 100644 index 00000000000..fe0373a22ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="contour", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_ytype.py b/packages/python/plotly/plotly/validators/contour/_ytype.py new file mode 100644 index 00000000000..2f172a1cb10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_ytype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ytype", parent_name="contour", **kwargs): + super(YtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_z.py b/packages/python/plotly/plotly/validators/contour/_z.py new file mode 100644 index 00000000000..b0d5be62135 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="contour", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_zauto.py b/packages/python/plotly/plotly/validators/contour/_zauto.py new file mode 100644 index 00000000000..581a00ed31a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="contour", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_zhoverformat.py b/packages/python/plotly/plotly/validators/contour/_zhoverformat.py new file mode 100644 index 00000000000..3218776b57e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_zhoverformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="zhoverformat", parent_name="contour", **kwargs): + super(ZhoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_zmax.py b/packages/python/plotly/plotly/validators/contour/_zmax.py new file mode 100644 index 00000000000..9d503eb2b30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="contour", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_zmid.py b/packages/python/plotly/plotly/validators/contour/_zmid.py new file mode 100644 index 00000000000..ad48dc86c71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="contour", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_zmin.py b/packages/python/plotly/plotly/validators/contour/_zmin.py new file mode 100644 index 00000000000..e75077260d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="contour", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/_zsrc.py b/packages/python/plotly/plotly/validators/contour/_zsrc.py new file mode 100644 index 00000000000..02d685a2561 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="contour", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/__init__.py b/packages/python/plotly/plotly/validators/contour/colorbar/__init__.py index f2321c55327..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/contour/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/colorbar/__init__.py @@ -1,738 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="contour.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="contour.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="contour.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="contour.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="contour.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="contour.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="contour.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="contour.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="contour.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="contour.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="contour.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="contour.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="contour.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="contour.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="contour.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="contour.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="contour.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="contour.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="contour.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="contour.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="contour.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="contour.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="contour.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="contour.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="contour.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="contour.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="contour.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="contour.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="contour.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="contour.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="contour.colorbar", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="contour.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="contour.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="contour.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="contour.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="contour.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="contour.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="contour.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="contour.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="contour.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="contour.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/contour/colorbar/_bgcolor.py new file mode 100644 index 00000000000..a870f5f87cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="contour.colorbar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/contour/colorbar/_bordercolor.py new file mode 100644 index 00000000000..282f544d3aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="contour.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/contour/colorbar/_borderwidth.py new file mode 100644 index 00000000000..df85a61928c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="contour.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/contour/colorbar/_dtick.py new file mode 100644 index 00000000000..041a130e3e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="contour.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/contour/colorbar/_exponentformat.py new file mode 100644 index 00000000000..ef12af3bb88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="contour.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_len.py b/packages/python/plotly/plotly/validators/contour/colorbar/_len.py new file mode 100644 index 00000000000..de308cec2a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="contour.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/contour/colorbar/_lenmode.py new file mode 100644 index 00000000000..9ac4f1fe869 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="contour.colorbar", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/contour/colorbar/_nticks.py new file mode 100644 index 00000000000..56d4abfefe0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="contour.colorbar", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/contour/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..77c99352e5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="contour.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/contour/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..db562806893 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="contour.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/contour/colorbar/_separatethousands.py new file mode 100644 index 00000000000..60154a31e30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="contour.colorbar", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/contour/colorbar/_showexponent.py new file mode 100644 index 00000000000..e567a8f8911 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="contour.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/contour/colorbar/_showticklabels.py new file mode 100644 index 00000000000..5ba4f70237a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="contour.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/contour/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..d32ee2bcf1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="contour.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/contour/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..6376a2e25e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="contour.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/contour/colorbar/_thickness.py new file mode 100644 index 00000000000..c79f3af4f25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="contour.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/contour/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..b07b5a092b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="contour.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tick0.py new file mode 100644 index 00000000000..f087a5b5f39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="contour.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickangle.py new file mode 100644 index 00000000000..479177a0404 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="contour.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickcolor.py new file mode 100644 index 00000000000..4c12e876f73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="contour.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickfont.py new file mode 100644 index 00000000000..db2b1bacc64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="contour.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickformat.py new file mode 100644 index 00000000000..12652acee3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="contour.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..3466e8d9670 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="contour.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..853d1a3d616 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="contour.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/contour/colorbar/_ticklen.py new file mode 100644 index 00000000000..35ce5bc1545 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="contour.colorbar", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickmode.py new file mode 100644 index 00000000000..1ea667ec58c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="contour.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickprefix.py new file mode 100644 index 00000000000..0672aba08fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="contour.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/contour/colorbar/_ticks.py new file mode 100644 index 00000000000..bdd5ce5788a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="contour.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/contour/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..5329660362f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="contour.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/contour/colorbar/_ticktext.py new file mode 100644 index 00000000000..43b9827a692 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="contour.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/contour/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..58731945192 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="contour.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickvals.py new file mode 100644 index 00000000000..f8307f14052 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="contour.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..97f48b9e4f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="contour.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/contour/colorbar/_tickwidth.py new file mode 100644 index 00000000000..b57c8cbe6a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="contour.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_title.py b/packages/python/plotly/plotly/validators/contour/colorbar/_title.py new file mode 100644 index 00000000000..bd96febb021 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="contour.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_x.py b/packages/python/plotly/plotly/validators/contour/colorbar/_x.py new file mode 100644 index 00000000000..e2c519d84d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="contour.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/contour/colorbar/_xanchor.py new file mode 100644 index 00000000000..996cbbbc0b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="contour.colorbar", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/contour/colorbar/_xpad.py new file mode 100644 index 00000000000..7b0de6004bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="contour.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_y.py b/packages/python/plotly/plotly/validators/contour/colorbar/_y.py new file mode 100644 index 00000000000..d7492f407d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="contour.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/contour/colorbar/_yanchor.py new file mode 100644 index 00000000000..a52b75c478f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="contour.colorbar", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/contour/colorbar/_ypad.py new file mode 100644 index 00000000000..edfedc3afe3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="contour.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/__init__.py index fa5b297d3bc..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="contour.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="contour.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="contour.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..3f42bb8dbe4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="contour.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..51f55e1f54f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="contour.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..8d476c4e38c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="contour.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/__init__.py index 9bc2a637b63..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="contour.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="contour.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="contour.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="contour.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="contour.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..e32b3b4aba4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="contour.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..bff9b959357 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="contour.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..22b14e3bd52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="contour.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..09248373cac --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="contour.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..ae18174d2db --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="contour.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/__init__.py index 26eda99b926..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/contour/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="contour.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="contour.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="contour.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/_font.py new file mode 100644 index 00000000000..7a6339cb60d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="contour.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/_side.py new file mode 100644 index 00000000000..151ecc52c95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="contour.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/_text.py new file mode 100644 index 00000000000..beba87cb2f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="contour.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/__init__.py index 9c786f237d2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/contour/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="contour.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="contour.colorbar.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="contour.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_color.py new file mode 100644 index 00000000000..42f7e593bee --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="contour.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_family.py new file mode 100644 index 00000000000..60f4b43857d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="contour.colorbar.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_size.py new file mode 100644 index 00000000000..2b6383a8a7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="contour.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/__init__.py b/packages/python/plotly/plotly/validators/contour/contours/__init__.py index 654bfaad098..4ffb01aee3d 100644 --- a/packages/python/plotly/plotly/validators/contour/contours/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/contours/__init__.py @@ -1,213 +1,34 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="value", parent_name="contour.contours", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="contour.contours", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["levels", "constraint"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="start", parent_name="contour.contours", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="contour.contours", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlines", parent_name="contour.contours", **kwargs - ): - super(ShowlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlabels", parent_name="contour.contours", **kwargs - ): - super(ShowlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="operation", parent_name="contour.contours", **kwargs - ): - super(OperationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "=", - "<", - ">=", - ">", - "<=", - "[]", - "()", - "[)", - "(]", - "][", - ")(", - "](", - ")[", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="labelformat", parent_name="contour.contours", **kwargs - ): - super(LabelformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="labelfont", parent_name="contour.contours", **kwargs - ): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Labelfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="end", parent_name="contour.contours", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="coloring", parent_name="contour.contours", **kwargs - ): - super(ColoringValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fill", "heatmap", "lines", "none"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._type import TypeValidator + from ._start import StartValidator + from ._size import SizeValidator + from ._showlines import ShowlinesValidator + from ._showlabels import ShowlabelsValidator + from ._operation import OperationValidator + from ._labelformat import LabelformatValidator + from ._labelfont import LabelfontValidator + from ._end import EndValidator + from ._coloring import ColoringValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._type.TypeValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._showlines.ShowlinesValidator", + "._showlabels.ShowlabelsValidator", + "._operation.OperationValidator", + "._labelformat.LabelformatValidator", + "._labelfont.LabelfontValidator", + "._end.EndValidator", + "._coloring.ColoringValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_coloring.py b/packages/python/plotly/plotly/validators/contour/contours/_coloring.py new file mode 100644 index 00000000000..12605ae715a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_coloring.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="coloring", parent_name="contour.contours", **kwargs + ): + super(ColoringValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fill", "heatmap", "lines", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_end.py b/packages/python/plotly/plotly/validators/contour/contours/_end.py new file mode 100644 index 00000000000..b486888ab6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_end.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="end", parent_name="contour.contours", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_labelfont.py b/packages/python/plotly/plotly/validators/contour/contours/_labelfont.py new file mode 100644 index 00000000000..0b000716646 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_labelfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="labelfont", parent_name="contour.contours", **kwargs + ): + super(LabelfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Labelfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_labelformat.py b/packages/python/plotly/plotly/validators/contour/contours/_labelformat.py new file mode 100644 index 00000000000..e4bb82f63c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_labelformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="labelformat", parent_name="contour.contours", **kwargs + ): + super(LabelformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_operation.py b/packages/python/plotly/plotly/validators/contour/contours/_operation.py new file mode 100644 index 00000000000..6794c79ac15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_operation.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="operation", parent_name="contour.contours", **kwargs + ): + super(OperationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "=", + "<", + ">=", + ">", + "<=", + "[]", + "()", + "[)", + "(]", + "][", + ")(", + "](", + ")[", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_showlabels.py b/packages/python/plotly/plotly/validators/contour/contours/_showlabels.py new file mode 100644 index 00000000000..d5862f73e76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_showlabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlabels", parent_name="contour.contours", **kwargs + ): + super(ShowlabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_showlines.py b/packages/python/plotly/plotly/validators/contour/contours/_showlines.py new file mode 100644 index 00000000000..ee822c1b721 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_showlines.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlines", parent_name="contour.contours", **kwargs + ): + super(ShowlinesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_size.py b/packages/python/plotly/plotly/validators/contour/contours/_size.py new file mode 100644 index 00000000000..2875e66ba35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="contour.contours", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_start.py b/packages/python/plotly/plotly/validators/contour/contours/_start.py new file mode 100644 index 00000000000..a89a024dd43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_start.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="start", parent_name="contour.contours", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_type.py b/packages/python/plotly/plotly/validators/contour/contours/_type.py new file mode 100644 index 00000000000..64c7470a842 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="contour.contours", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["levels", "constraint"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/_value.py b/packages/python/plotly/plotly/validators/contour/contours/_value.py new file mode 100644 index 00000000000..9d8492c9983 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/_value.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="value", parent_name="contour.contours", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/labelfont/__init__.py b/packages/python/plotly/plotly/validators/contour/contours/labelfont/__init__.py index 531839c2867..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/contour/contours/labelfont/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/contours/labelfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="contour.contours.labelfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="contour.contours.labelfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="contour.contours.labelfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/labelfont/_color.py b/packages/python/plotly/plotly/validators/contour/contours/labelfont/_color.py new file mode 100644 index 00000000000..36ce2dfb16b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/labelfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="contour.contours.labelfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/labelfont/_family.py b/packages/python/plotly/plotly/validators/contour/contours/labelfont/_family.py new file mode 100644 index 00000000000..39bbf4eea52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/labelfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="contour.contours.labelfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/contours/labelfont/_size.py b/packages/python/plotly/plotly/validators/contour/contours/labelfont/_size.py new file mode 100644 index 00000000000..ea65cfdb07c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/contours/labelfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="contour.contours.labelfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/__init__.py index 494d8f33b34..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/contour/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="contour.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="contour.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="contour.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="contour.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="contour.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="contour.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="contour.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="contour.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="contour.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_align.py new file mode 100644 index 00000000000..7e2624a2b6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="contour.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..46fb95b7b61 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="contour.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..4e0848e9a45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="contour.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..46f1cd3baef --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="contour.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..68f3c241d1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="contour.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..7c29ec37173 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="contour.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_font.py new file mode 100644 index 00000000000..8c7b32e9d0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="contour.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_namelength.py new file mode 100644 index 00000000000..8c37bc8878d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="contour.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..bc879665aa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="contour.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/__init__.py index 47bc4bff755..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="contour.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="contour.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="contour.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="contour.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="contour.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="contour.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_color.py new file mode 100644 index 00000000000..ec8dc31b1e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="contour.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..40d9a1bfa34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="contour.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_family.py new file mode 100644 index 00000000000..22aa4fc1db2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="contour.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..f437713bf0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="contour.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_size.py new file mode 100644 index 00000000000..bcdf9b6dbf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="contour.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..ef6cc2ecc3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="contour.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/line/__init__.py b/packages/python/plotly/plotly/validators/contour/line/__init__.py index 44eb4b5fa50..a7e94c9a18d 100644 --- a/packages/python/plotly/plotly/validators/contour/line/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/line/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="contour.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style+colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="smoothing", parent_name="contour.line", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="contour.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="contour.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style+colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contour/line/_color.py b/packages/python/plotly/plotly/validators/contour/line/_color.py new file mode 100644 index 00000000000..396e8eddbdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="contour.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style+colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/line/_dash.py b/packages/python/plotly/plotly/validators/contour/line/_dash.py new file mode 100644 index 00000000000..b3e8dd9f0c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="contour.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/line/_smoothing.py b/packages/python/plotly/plotly/validators/contour/line/_smoothing.py new file mode 100644 index 00000000000..a8be6f1db0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/line/_smoothing.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="smoothing", parent_name="contour.line", **kwargs): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/line/_width.py b/packages/python/plotly/plotly/validators/contour/line/_width.py new file mode 100644 index 00000000000..db08aad8fc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="contour.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style+colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/stream/__init__.py b/packages/python/plotly/plotly/validators/contour/stream/__init__.py index 42a8346a1b6..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/contour/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="contour.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="contour.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/contour/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/contour/stream/_maxpoints.py new file mode 100644 index 00000000000..10d52778070 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="contour.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contour/stream/_token.py b/packages/python/plotly/plotly/validators/contour/stream/_token.py new file mode 100644 index 00000000000..d0a0a478423 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contour/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="contour.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/__init__.py index e64b9eaab37..f45833f6189 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/__init__.py @@ -1,1036 +1,110 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="contourcarpet", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="contourcarpet", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="contourcarpet", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="contourcarpet", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="contourcarpet", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="contourcarpet", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="contourcarpet", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="contourcarpet", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="contourcarpet", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="contourcarpet", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="contourcarpet", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="transpose", parent_name="contourcarpet", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="contourcarpet", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="contourcarpet", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="contourcarpet", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="contourcarpet", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="contourcarpet", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="contourcarpet", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="contourcarpet", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="ncontours", parent_name="contourcarpet", **kwargs): - super(NcontoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="contourcarpet", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="contourcarpet", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="contourcarpet", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="contourcarpet", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="contourcarpet", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="contourcarpet", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="contourcarpet", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="contourcarpet", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="hovertext", parent_name="contourcarpet", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="contourcarpet", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "contourcarpet.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DbValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="db", parent_name="contourcarpet", **kwargs): - super(DbValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DaValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="da", parent_name="contourcarpet", **kwargs): - super(DaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="contourcarpet", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="contourcarpet", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contours", parent_name="contourcarpet", **kwargs): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contours"), - data_docs=kwargs.pop( - "data_docs", - """ - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "lines", - coloring is done on the contour lines. If - "none", no coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="contourcarpet", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="contourcarpet", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - carpet.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contourcarpet.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - contourcarpet.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contourcarpet.colo - rbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - contourcarpet.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - contourcarpet.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="contourcarpet", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CarpetValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="carpet", parent_name="contourcarpet", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="btype", parent_name="contourcarpet", **kwargs): - super(BtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="bsrc", parent_name="contourcarpet", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class B0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="b0", parent_name="contourcarpet", **kwargs): - super(B0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="b", parent_name="contourcarpet", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocontour", parent_name="contourcarpet", **kwargs - ): - super(AutocontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="contourcarpet", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="atype", parent_name="contourcarpet", **kwargs): - super(AtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="asrc", parent_name="contourcarpet", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class A0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="a0", parent_name="contourcarpet", **kwargs): - super(A0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="a", parent_name="contourcarpet", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._yaxis import YaxisValidator + from ._xaxis import XaxisValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._transpose import TransposeValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._ncontours import NcontoursValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._fillcolor import FillcolorValidator + from ._db import DbValidator + from ._da import DaValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contours import ContoursValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._carpet import CarpetValidator + from ._btype import BtypeValidator + from ._bsrc import BsrcValidator + from ._b0 import B0Validator + from ._b import BValidator + from ._autocontour import AutocontourValidator + from ._autocolorscale import AutocolorscaleValidator + from ._atype import AtypeValidator + from ._asrc import AsrcValidator + from ._a0 import A0Validator + from ._a import AValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._ncontours.NcontoursValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._fillcolor.FillcolorValidator", + "._db.DbValidator", + "._da.DaValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._carpet.CarpetValidator", + "._btype.BtypeValidator", + "._bsrc.BsrcValidator", + "._b0.B0Validator", + "._b.BValidator", + "._autocontour.AutocontourValidator", + "._autocolorscale.AutocolorscaleValidator", + "._atype.AtypeValidator", + "._asrc.AsrcValidator", + "._a0.A0Validator", + "._a.AValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_a.py b/packages/python/plotly/plotly/validators/contourcarpet/_a.py new file mode 100644 index 00000000000..24d95cf6520 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_a.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="a", parent_name="contourcarpet", **kwargs): + super(AValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_a0.py b/packages/python/plotly/plotly/validators/contourcarpet/_a0.py new file mode 100644 index 00000000000..32d92a8e2c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_a0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class A0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="a0", parent_name="contourcarpet", **kwargs): + super(A0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_asrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_asrc.py new file mode 100644 index 00000000000..57a2d0d58e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_asrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="asrc", parent_name="contourcarpet", **kwargs): + super(AsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_atype.py b/packages/python/plotly/plotly/validators/contourcarpet/_atype.py new file mode 100644 index 00000000000..ec68cd4f20b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_atype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="atype", parent_name="contourcarpet", **kwargs): + super(AtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_autocolorscale.py b/packages/python/plotly/plotly/validators/contourcarpet/_autocolorscale.py new file mode 100644 index 00000000000..2f4f3ca34ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="contourcarpet", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_autocontour.py b/packages/python/plotly/plotly/validators/contourcarpet/_autocontour.py new file mode 100644 index 00000000000..d94ae82a034 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_autocontour.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocontour", parent_name="contourcarpet", **kwargs + ): + super(AutocontourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_b.py b/packages/python/plotly/plotly/validators/contourcarpet/_b.py new file mode 100644 index 00000000000..fb0036d4134 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_b.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="b", parent_name="contourcarpet", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_b0.py b/packages/python/plotly/plotly/validators/contourcarpet/_b0.py new file mode 100644 index 00000000000..028d11969e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_b0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class B0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="b0", parent_name="contourcarpet", **kwargs): + super(B0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_bsrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_bsrc.py new file mode 100644 index 00000000000..7c5af4ac9fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_bsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="bsrc", parent_name="contourcarpet", **kwargs): + super(BsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_btype.py b/packages/python/plotly/plotly/validators/contourcarpet/_btype.py new file mode 100644 index 00000000000..9d4350007c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_btype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="btype", parent_name="contourcarpet", **kwargs): + super(BtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_carpet.py b/packages/python/plotly/plotly/validators/contourcarpet/_carpet.py new file mode 100644 index 00000000000..ad77faf0490 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_carpet.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CarpetValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="carpet", parent_name="contourcarpet", **kwargs): + super(CarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_coloraxis.py b/packages/python/plotly/plotly/validators/contourcarpet/_coloraxis.py new file mode 100644 index 00000000000..db4de30d889 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="contourcarpet", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_colorbar.py b/packages/python/plotly/plotly/validators/contourcarpet/_colorbar.py new file mode 100644 index 00000000000..16c9f061e80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="contourcarpet", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour + carpet.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.contourcarpet.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + contourcarpet.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contourcarpet.colo + rbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + contourcarpet.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + contourcarpet.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_colorscale.py b/packages/python/plotly/plotly/validators/contourcarpet/_colorscale.py new file mode 100644 index 00000000000..1760cc481c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="contourcarpet", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_contours.py b/packages/python/plotly/plotly/validators/contourcarpet/_contours.py new file mode 100644 index 00000000000..c9f00882a60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_contours.py @@ -0,0 +1,77 @@ +import _plotly_utils.basevalidators + + +class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contours", parent_name="contourcarpet", **kwargs): + super(ContoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contours"), + data_docs=kwargs.pop( + "data_docs", + """ + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "lines", + coloring is done on the contour lines. If + "none", no coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_customdata.py b/packages/python/plotly/plotly/validators/contourcarpet/_customdata.py new file mode 100644 index 00000000000..4b22b439127 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="contourcarpet", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_customdatasrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_customdatasrc.py new file mode 100644 index 00000000000..3a59a45a2af --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="contourcarpet", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_da.py b/packages/python/plotly/plotly/validators/contourcarpet/_da.py new file mode 100644 index 00000000000..cba5b889197 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_da.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DaValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="da", parent_name="contourcarpet", **kwargs): + super(DaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_db.py b/packages/python/plotly/plotly/validators/contourcarpet/_db.py new file mode 100644 index 00000000000..2ffa059d615 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_db.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DbValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="db", parent_name="contourcarpet", **kwargs): + super(DbValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_fillcolor.py b/packages/python/plotly/plotly/validators/contourcarpet/_fillcolor.py new file mode 100644 index 00000000000..ee6ed3ec830 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_fillcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="contourcarpet", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "contourcarpet.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_hovertext.py b/packages/python/plotly/plotly/validators/contourcarpet/_hovertext.py new file mode 100644 index 00000000000..91f50d3d4c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_hovertext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="hovertext", parent_name="contourcarpet", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_hovertextsrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_hovertextsrc.py new file mode 100644 index 00000000000..d1892be564c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="contourcarpet", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_ids.py b/packages/python/plotly/plotly/validators/contourcarpet/_ids.py new file mode 100644 index 00000000000..a93760ca46c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="contourcarpet", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_idssrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_idssrc.py new file mode 100644 index 00000000000..2d5676dd9e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="contourcarpet", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_legendgroup.py b/packages/python/plotly/plotly/validators/contourcarpet/_legendgroup.py new file mode 100644 index 00000000000..21f0ab34600 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="contourcarpet", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_line.py b/packages/python/plotly/plotly/validators/contourcarpet/_line.py new file mode 100644 index 00000000000..3c6463c98af --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_line.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="contourcarpet", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_meta.py b/packages/python/plotly/plotly/validators/contourcarpet/_meta.py new file mode 100644 index 00000000000..9c48c451f25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="contourcarpet", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_metasrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_metasrc.py new file mode 100644 index 00000000000..93b83b7fdf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="contourcarpet", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_name.py b/packages/python/plotly/plotly/validators/contourcarpet/_name.py new file mode 100644 index 00000000000..c423e351c38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="contourcarpet", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_ncontours.py b/packages/python/plotly/plotly/validators/contourcarpet/_ncontours.py new file mode 100644 index 00000000000..e1d8735f024 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_ncontours.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="ncontours", parent_name="contourcarpet", **kwargs): + super(NcontoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_opacity.py b/packages/python/plotly/plotly/validators/contourcarpet/_opacity.py new file mode 100644 index 00000000000..a32e7231fbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="contourcarpet", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_reversescale.py b/packages/python/plotly/plotly/validators/contourcarpet/_reversescale.py new file mode 100644 index 00000000000..8155af22135 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="contourcarpet", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_showlegend.py b/packages/python/plotly/plotly/validators/contourcarpet/_showlegend.py new file mode 100644 index 00000000000..cd26d2b4a4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="contourcarpet", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_showscale.py b/packages/python/plotly/plotly/validators/contourcarpet/_showscale.py new file mode 100644 index 00000000000..3d299de5d57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="contourcarpet", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_stream.py b/packages/python/plotly/plotly/validators/contourcarpet/_stream.py new file mode 100644 index 00000000000..e73ae142f25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="contourcarpet", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_text.py b/packages/python/plotly/plotly/validators/contourcarpet/_text.py new file mode 100644 index 00000000000..f4b5d000ff6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="contourcarpet", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_textsrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_textsrc.py new file mode 100644 index 00000000000..52ca4574a6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="contourcarpet", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_transpose.py b/packages/python/plotly/plotly/validators/contourcarpet/_transpose.py new file mode 100644 index 00000000000..3d4f6a6b9bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_transpose.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="transpose", parent_name="contourcarpet", **kwargs): + super(TransposeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_uid.py b/packages/python/plotly/plotly/validators/contourcarpet/_uid.py new file mode 100644 index 00000000000..698ea23b426 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="contourcarpet", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_uirevision.py b/packages/python/plotly/plotly/validators/contourcarpet/_uirevision.py new file mode 100644 index 00000000000..318d88d7ce7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="contourcarpet", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_visible.py b/packages/python/plotly/plotly/validators/contourcarpet/_visible.py new file mode 100644 index 00000000000..3b0b51658bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="contourcarpet", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_xaxis.py b/packages/python/plotly/plotly/validators/contourcarpet/_xaxis.py new file mode 100644 index 00000000000..b65a1409785 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="contourcarpet", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_yaxis.py b/packages/python/plotly/plotly/validators/contourcarpet/_yaxis.py new file mode 100644 index 00000000000..5d0c9df8b08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="contourcarpet", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_z.py b/packages/python/plotly/plotly/validators/contourcarpet/_z.py new file mode 100644 index 00000000000..ee8ded17e77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="contourcarpet", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_zauto.py b/packages/python/plotly/plotly/validators/contourcarpet/_zauto.py new file mode 100644 index 00000000000..1a6ee47625f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="contourcarpet", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_zmax.py b/packages/python/plotly/plotly/validators/contourcarpet/_zmax.py new file mode 100644 index 00000000000..d1a4d4928a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="contourcarpet", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_zmid.py b/packages/python/plotly/plotly/validators/contourcarpet/_zmid.py new file mode 100644 index 00000000000..d7a84ae8c93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="contourcarpet", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_zmin.py b/packages/python/plotly/plotly/validators/contourcarpet/_zmin.py new file mode 100644 index 00000000000..19e9d26619e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="contourcarpet", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/_zsrc.py b/packages/python/plotly/plotly/validators/contourcarpet/_zsrc.py new file mode 100644 index 00000000000..b3f546d6f27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="contourcarpet", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/__init__.py index 4a415590bba..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/__init__.py @@ -1,785 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="contourcarpet.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="contourcarpet.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="contourcarpet.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="contourcarpet.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="contourcarpet.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="contourcarpet.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="contourcarpet.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="contourcarpet.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="contourcarpet.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="contourcarpet.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="contourcarpet.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="contourcarpet.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="contourcarpet.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="contourcarpet.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="contourcarpet.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="contourcarpet.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="contourcarpet.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="contourcarpet.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="contourcarpet.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="contourcarpet.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_bgcolor.py new file mode 100644 index 00000000000..cb7617f9e1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="contourcarpet.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_bordercolor.py new file mode 100644 index 00000000000..2a473c20bda --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="contourcarpet.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_borderwidth.py new file mode 100644 index 00000000000..c3c6482f9c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="contourcarpet.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_dtick.py new file mode 100644 index 00000000000..1073449dd1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="contourcarpet.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_exponentformat.py new file mode 100644 index 00000000000..de172df664d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_len.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_len.py new file mode 100644 index 00000000000..a157a16d50e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="contourcarpet.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_lenmode.py new file mode 100644 index 00000000000..526dbd9c50d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="contourcarpet.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_nticks.py new file mode 100644 index 00000000000..0e591cdeb77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="contourcarpet.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..15596b65a65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="contourcarpet.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..904b797f70e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="contourcarpet.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_separatethousands.py new file mode 100644 index 00000000000..830212d308f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showexponent.py new file mode 100644 index 00000000000..3716e08daec --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="contourcarpet.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showticklabels.py new file mode 100644 index 00000000000..a234e89229e --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..5fbfc8a34ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..138105a17ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_thickness.py new file mode 100644 index 00000000000..b6d82dcfae5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="contourcarpet.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..e7bf3882a54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tick0.py new file mode 100644 index 00000000000..05b4fe15c3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="contourcarpet.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickangle.py new file mode 100644 index 00000000000..c7454079a56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickcolor.py new file mode 100644 index 00000000000..cdb8f88082c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickfont.py new file mode 100644 index 00000000000..0638caec7a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformat.py new file mode 100644 index 00000000000..2fdb84986fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..d6d89b2efb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..05337079ae0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="contourcarpet.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticklen.py new file mode 100644 index 00000000000..1421a071b48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickmode.py new file mode 100644 index 00000000000..94702521c53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickprefix.py new file mode 100644 index 00000000000..eb3447b3092 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticks.py new file mode 100644 index 00000000000..96e862adb07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..7d202650d29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticktext.py new file mode 100644 index 00000000000..a73de465889 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..7f091712a71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickvals.py new file mode 100644 index 00000000000..9ded588c43d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..8e2ad55e273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickwidth.py new file mode 100644 index 00000000000..d0992796d53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_title.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_title.py new file mode 100644 index 00000000000..7c1ae0b634d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="contourcarpet.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_x.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_x.py new file mode 100644 index 00000000000..d3cdc807cce --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="contourcarpet.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_xanchor.py new file mode 100644 index 00000000000..0fab04a7d4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="contourcarpet.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_xpad.py new file mode 100644 index 00000000000..4273c8c937f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="contourcarpet.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_y.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_y.py new file mode 100644 index 00000000000..8e85e06c598 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="contourcarpet.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_yanchor.py new file mode 100644 index 00000000000..21020f93a6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="contourcarpet.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ypad.py new file mode 100644 index 00000000000..29798f7eb57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="contourcarpet.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py index 0ab06b32ad8..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="contourcarpet.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="contourcarpet.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="contourcarpet.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..0c8c11009cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="contourcarpet.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..86daa9b2f08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="contourcarpet.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..500faf55f42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="contourcarpet.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py index 9c89fa75eda..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="contourcarpet.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="contourcarpet.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="contourcarpet.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="contourcarpet.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="contourcarpet.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..33e3efc5fdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="contourcarpet.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..35e307e825c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="contourcarpet.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..af8d4c63d6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="contourcarpet.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..2f06b8b49ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="contourcarpet.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..ae5d02aed1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="contourcarpet.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/__init__.py index 65b74f6827e..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="contourcarpet.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="contourcarpet.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="contourcarpet.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_font.py new file mode 100644 index 00000000000..1bf1a18a9cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="contourcarpet.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_side.py new file mode 100644 index 00000000000..caa2c53448b --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="contourcarpet.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_text.py new file mode 100644 index 00000000000..e624964dddf --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="contourcarpet.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/__init__.py index 196393d4d19..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="contourcarpet.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="contourcarpet.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="contourcarpet.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_color.py new file mode 100644 index 00000000000..d7132162f00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="contourcarpet.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_family.py new file mode 100644 index 00000000000..8d893412cda --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="contourcarpet.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_size.py new file mode 100644 index 00000000000..14f3e6ac3ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="contourcarpet.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/__init__.py index 804529ec334..4ffb01aee3d 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/contours/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/__init__.py @@ -1,223 +1,34 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="value", parent_name="contourcarpet.contours", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="contourcarpet.contours", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["levels", "constraint"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="start", parent_name="contourcarpet.contours", **kwargs - ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="contourcarpet.contours", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlines", parent_name="contourcarpet.contours", **kwargs - ): - super(ShowlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlabels", parent_name="contourcarpet.contours", **kwargs - ): - super(ShowlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="operation", parent_name="contourcarpet.contours", **kwargs - ): - super(OperationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "=", - "<", - ">=", - ">", - "<=", - "[]", - "()", - "[)", - "(]", - "][", - ")(", - "](", - ")[", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="labelformat", parent_name="contourcarpet.contours", **kwargs - ): - super(LabelformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="labelfont", parent_name="contourcarpet.contours", **kwargs - ): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Labelfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="end", parent_name="contourcarpet.contours", **kwargs - ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="coloring", parent_name="contourcarpet.contours", **kwargs - ): - super(ColoringValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fill", "lines", "none"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._type import TypeValidator + from ._start import StartValidator + from ._size import SizeValidator + from ._showlines import ShowlinesValidator + from ._showlabels import ShowlabelsValidator + from ._operation import OperationValidator + from ._labelformat import LabelformatValidator + from ._labelfont import LabelfontValidator + from ._end import EndValidator + from ._coloring import ColoringValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._type.TypeValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._showlines.ShowlinesValidator", + "._showlabels.ShowlabelsValidator", + "._operation.OperationValidator", + "._labelformat.LabelformatValidator", + "._labelfont.LabelfontValidator", + "._end.EndValidator", + "._coloring.ColoringValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_coloring.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_coloring.py new file mode 100644 index 00000000000..fdb9a259e0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_coloring.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="coloring", parent_name="contourcarpet.contours", **kwargs + ): + super(ColoringValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fill", "lines", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_end.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_end.py new file mode 100644 index 00000000000..7666fa1f528 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_end.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="end", parent_name="contourcarpet.contours", **kwargs + ): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_labelfont.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_labelfont.py new file mode 100644 index 00000000000..5751b895c35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_labelfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="labelfont", parent_name="contourcarpet.contours", **kwargs + ): + super(LabelfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Labelfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_labelformat.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_labelformat.py new file mode 100644 index 00000000000..b5dee508498 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_labelformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="labelformat", parent_name="contourcarpet.contours", **kwargs + ): + super(LabelformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_operation.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_operation.py new file mode 100644 index 00000000000..24c978c0102 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_operation.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="operation", parent_name="contourcarpet.contours", **kwargs + ): + super(OperationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "=", + "<", + ">=", + ">", + "<=", + "[]", + "()", + "[)", + "(]", + "][", + ")(", + "](", + ")[", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_showlabels.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_showlabels.py new file mode 100644 index 00000000000..e2392cf955c --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_showlabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlabels", parent_name="contourcarpet.contours", **kwargs + ): + super(ShowlabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_showlines.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_showlines.py new file mode 100644 index 00000000000..4b8ab98b0c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_showlines.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlines", parent_name="contourcarpet.contours", **kwargs + ): + super(ShowlinesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_size.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_size.py new file mode 100644 index 00000000000..230de87864a --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="contourcarpet.contours", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_start.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_start.py new file mode 100644 index 00000000000..1261905f8ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_start.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="start", parent_name="contourcarpet.contours", **kwargs + ): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_type.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_type.py new file mode 100644 index 00000000000..1574a280da9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="contourcarpet.contours", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["levels", "constraint"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/_value.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/_value.py new file mode 100644 index 00000000000..b0ee22553ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="value", parent_name="contourcarpet.contours", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/__init__.py index c81c9ce64d4..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="contourcarpet.contours.labelfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="contourcarpet.contours.labelfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="contourcarpet.contours.labelfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_color.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_color.py new file mode 100644 index 00000000000..e8cc12046d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="contourcarpet.contours.labelfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_family.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_family.py new file mode 100644 index 00000000000..b35d5294f90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="contourcarpet.contours.labelfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_size.py b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_size.py new file mode 100644 index 00000000000..3646e2500b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="contourcarpet.contours.labelfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py index 5fc239431b4..a7e94c9a18d 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py @@ -1,62 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="contourcarpet.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style+colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="smoothing", parent_name="contourcarpet.line", **kwargs - ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="contourcarpet.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="contourcarpet.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style+colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/line/_color.py b/packages/python/plotly/plotly/validators/contourcarpet/line/_color.py new file mode 100644 index 00000000000..04d26e1fb89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="contourcarpet.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style+colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/line/_dash.py b/packages/python/plotly/plotly/validators/contourcarpet/line/_dash.py new file mode 100644 index 00000000000..c6287746714 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="contourcarpet.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/line/_smoothing.py b/packages/python/plotly/plotly/validators/contourcarpet/line/_smoothing.py new file mode 100644 index 00000000000..e859a695460 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/line/_smoothing.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="smoothing", parent_name="contourcarpet.line", **kwargs + ): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/line/_width.py b/packages/python/plotly/plotly/validators/contourcarpet/line/_width.py new file mode 100644 index 00000000000..7f391f3d6ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="contourcarpet.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style+colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/stream/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/stream/__init__.py index 5668175ae73..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="contourcarpet.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="contourcarpet.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/contourcarpet/stream/_maxpoints.py new file mode 100644 index 00000000000..99f96fa4a88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="contourcarpet.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/stream/_token.py b/packages/python/plotly/plotly/validators/contourcarpet/stream/_token.py new file mode 100644 index 00000000000..6d92ea97a89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/contourcarpet/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="contourcarpet.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/__init__.py index 0f60b2ed013..61b6cd2c34e 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/__init__.py @@ -1,905 +1,98 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="densitymapbox", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="densitymapbox", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="densitymapbox", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="densitymapbox", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="densitymapbox", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="densitymapbox", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="densitymapbox", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="densitymapbox", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="densitymapbox", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="densitymapbox", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="densitymapbox", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="densitymapbox", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "mapbox"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="densitymapbox", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="densitymapbox", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="densitymapbox", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="densitymapbox", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RadiussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="radiussrc", parent_name="densitymapbox", **kwargs): - super(RadiussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="radius", parent_name="densitymapbox", **kwargs): - super(RadiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="densitymapbox", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="densitymapbox", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="densitymapbox", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="densitymapbox", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="lonsrc", parent_name="densitymapbox", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lon", parent_name="densitymapbox", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="densitymapbox", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="latsrc", parent_name="densitymapbox", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lat", parent_name="densitymapbox", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="densitymapbox", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="densitymapbox", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="densitymapbox", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="densitymapbox", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="densitymapbox", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="densitymapbox", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="densitymapbox", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="densitymapbox", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="densitymapbox", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["lon", "lat", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="densitymapbox", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="densitymapbox", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="densitymapbox", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="densitymapbox", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.density - mapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.densitymapbox.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - densitymapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymapbox.colo - rbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - densitymapbox.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - densitymapbox.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="densitymapbox", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BelowValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="below", parent_name="densitymapbox", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="densitymapbox", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._reversescale import ReversescaleValidator + from ._radiussrc import RadiussrcValidator + from ._radius import RadiusValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lonsrc import LonsrcValidator + from ._lon import LonValidator + from ._legendgroup import LegendgroupValidator + from ._latsrc import LatsrcValidator + from ._lat import LatValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._below import BelowValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._radiussrc.RadiussrcValidator", + "._radius.RadiusValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._legendgroup.LegendgroupValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._below.BelowValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_autocolorscale.py b/packages/python/plotly/plotly/validators/densitymapbox/_autocolorscale.py new file mode 100644 index 00000000000..ff3947ad434 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="densitymapbox", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_below.py b/packages/python/plotly/plotly/validators/densitymapbox/_below.py new file mode 100644 index 00000000000..fa0644a2862 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_below.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BelowValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="below", parent_name="densitymapbox", **kwargs): + super(BelowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_coloraxis.py b/packages/python/plotly/plotly/validators/densitymapbox/_coloraxis.py new file mode 100644 index 00000000000..99c88798b05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="densitymapbox", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_colorbar.py b/packages/python/plotly/plotly/validators/densitymapbox/_colorbar.py new file mode 100644 index 00000000000..78e73b30146 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="densitymapbox", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.density + mapbox.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.densitymapbox.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + densitymapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymapbox.colo + rbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + densitymapbox.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + densitymapbox.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_colorscale.py b/packages/python/plotly/plotly/validators/densitymapbox/_colorscale.py new file mode 100644 index 00000000000..a12f353fdf2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="densitymapbox", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_customdata.py b/packages/python/plotly/plotly/validators/densitymapbox/_customdata.py new file mode 100644 index 00000000000..ec6f692183d --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="densitymapbox", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_customdatasrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_customdatasrc.py new file mode 100644 index 00000000000..60fd20f1617 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="densitymapbox", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hoverinfo.py b/packages/python/plotly/plotly/validators/densitymapbox/_hoverinfo.py new file mode 100644 index 00000000000..372a79ae4ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="densitymapbox", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["lon", "lat", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_hoverinfosrc.py new file mode 100644 index 00000000000..a69c36e1d34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="densitymapbox", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hoverlabel.py b/packages/python/plotly/plotly/validators/densitymapbox/_hoverlabel.py new file mode 100644 index 00000000000..1f63bd9bb75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="densitymapbox", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hovertemplate.py b/packages/python/plotly/plotly/validators/densitymapbox/_hovertemplate.py new file mode 100644 index 00000000000..392522b2191 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="densitymapbox", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_hovertemplatesrc.py new file mode 100644 index 00000000000..409a754f31a --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="densitymapbox", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hovertext.py b/packages/python/plotly/plotly/validators/densitymapbox/_hovertext.py new file mode 100644 index 00000000000..113d90d0499 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="densitymapbox", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_hovertextsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_hovertextsrc.py new file mode 100644 index 00000000000..41b8e5c6f2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="densitymapbox", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_ids.py b/packages/python/plotly/plotly/validators/densitymapbox/_ids.py new file mode 100644 index 00000000000..adda417deae --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="densitymapbox", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_idssrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_idssrc.py new file mode 100644 index 00000000000..a67ffbda829 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="densitymapbox", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_lat.py b/packages/python/plotly/plotly/validators/densitymapbox/_lat.py new file mode 100644 index 00000000000..bd9c3b8342b --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_lat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lat", parent_name="densitymapbox", **kwargs): + super(LatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_latsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_latsrc.py new file mode 100644 index 00000000000..0a036e11480 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_latsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="latsrc", parent_name="densitymapbox", **kwargs): + super(LatsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_legendgroup.py b/packages/python/plotly/plotly/validators/densitymapbox/_legendgroup.py new file mode 100644 index 00000000000..f5ce680c421 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="densitymapbox", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_lon.py b/packages/python/plotly/plotly/validators/densitymapbox/_lon.py new file mode 100644 index 00000000000..f068bb60dd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_lon.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lon", parent_name="densitymapbox", **kwargs): + super(LonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_lonsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_lonsrc.py new file mode 100644 index 00000000000..686b67f01b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_lonsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="lonsrc", parent_name="densitymapbox", **kwargs): + super(LonsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_meta.py b/packages/python/plotly/plotly/validators/densitymapbox/_meta.py new file mode 100644 index 00000000000..70d5011bec6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="densitymapbox", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_metasrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_metasrc.py new file mode 100644 index 00000000000..b44680dc3b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="densitymapbox", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_name.py b/packages/python/plotly/plotly/validators/densitymapbox/_name.py new file mode 100644 index 00000000000..ab5737aeec8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="densitymapbox", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_opacity.py b/packages/python/plotly/plotly/validators/densitymapbox/_opacity.py new file mode 100644 index 00000000000..24b0abcb20a --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="densitymapbox", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_radius.py b/packages/python/plotly/plotly/validators/densitymapbox/_radius.py new file mode 100644 index 00000000000..7a8c571c29b --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_radius.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="radius", parent_name="densitymapbox", **kwargs): + super(RadiusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_radiussrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_radiussrc.py new file mode 100644 index 00000000000..22a116d23b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_radiussrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RadiussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="radiussrc", parent_name="densitymapbox", **kwargs): + super(RadiussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_reversescale.py b/packages/python/plotly/plotly/validators/densitymapbox/_reversescale.py new file mode 100644 index 00000000000..8d58f146511 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="densitymapbox", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_showlegend.py b/packages/python/plotly/plotly/validators/densitymapbox/_showlegend.py new file mode 100644 index 00000000000..78882f7e0f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="densitymapbox", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_showscale.py b/packages/python/plotly/plotly/validators/densitymapbox/_showscale.py new file mode 100644 index 00000000000..6c59327dc56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="densitymapbox", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_stream.py b/packages/python/plotly/plotly/validators/densitymapbox/_stream.py new file mode 100644 index 00000000000..d8a20dd8407 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="densitymapbox", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_subplot.py b/packages/python/plotly/plotly/validators/densitymapbox/_subplot.py new file mode 100644 index 00000000000..dde0a2e2512 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="densitymapbox", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "mapbox"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_text.py b/packages/python/plotly/plotly/validators/densitymapbox/_text.py new file mode 100644 index 00000000000..2c3c457273e --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="densitymapbox", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_textsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_textsrc.py new file mode 100644 index 00000000000..3c5763bb1b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="densitymapbox", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_uid.py b/packages/python/plotly/plotly/validators/densitymapbox/_uid.py new file mode 100644 index 00000000000..7a70dc62216 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="densitymapbox", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_uirevision.py b/packages/python/plotly/plotly/validators/densitymapbox/_uirevision.py new file mode 100644 index 00000000000..98775e68f74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="densitymapbox", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_visible.py b/packages/python/plotly/plotly/validators/densitymapbox/_visible.py new file mode 100644 index 00000000000..4b1b027de84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="densitymapbox", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_z.py b/packages/python/plotly/plotly/validators/densitymapbox/_z.py new file mode 100644 index 00000000000..2177b8ff4c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="densitymapbox", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_zauto.py b/packages/python/plotly/plotly/validators/densitymapbox/_zauto.py new file mode 100644 index 00000000000..3978067eb0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="densitymapbox", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_zmax.py b/packages/python/plotly/plotly/validators/densitymapbox/_zmax.py new file mode 100644 index 00000000000..8ea32f4b084 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="densitymapbox", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_zmid.py b/packages/python/plotly/plotly/validators/densitymapbox/_zmid.py new file mode 100644 index 00000000000..eff525cb065 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="densitymapbox", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_zmin.py b/packages/python/plotly/plotly/validators/densitymapbox/_zmin.py new file mode 100644 index 00000000000..0ed2c47cb36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="densitymapbox", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/_zsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/_zsrc.py new file mode 100644 index 00000000000..c1e724cad97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="densitymapbox", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/__init__.py index 5c2199683a4..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/__init__.py @@ -1,785 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="densitymapbox.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="densitymapbox.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="densitymapbox.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="densitymapbox.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="densitymapbox.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="densitymapbox.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="densitymapbox.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="densitymapbox.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="densitymapbox.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="densitymapbox.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="densitymapbox.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="densitymapbox.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="densitymapbox.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="densitymapbox.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="densitymapbox.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="densitymapbox.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="densitymapbox.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="densitymapbox.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="densitymapbox.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="densitymapbox.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_bgcolor.py new file mode 100644 index 00000000000..68e6a92b1a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="densitymapbox.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_bordercolor.py new file mode 100644 index 00000000000..8d16986885b --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="densitymapbox.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_borderwidth.py new file mode 100644 index 00000000000..5ec4c15d1dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="densitymapbox.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_dtick.py new file mode 100644 index 00000000000..cc68f0a648f --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="densitymapbox.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_exponentformat.py new file mode 100644 index 00000000000..63794a68fa0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_len.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_len.py new file mode 100644 index 00000000000..b9db52157d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="densitymapbox.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_lenmode.py new file mode 100644 index 00000000000..2446e97f204 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="densitymapbox.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_nticks.py new file mode 100644 index 00000000000..c084c9c8c80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="densitymapbox.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..671e8689837 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="densitymapbox.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..da281403c03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="densitymapbox.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_separatethousands.py new file mode 100644 index 00000000000..d075f6e4b21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showexponent.py new file mode 100644 index 00000000000..c3013299295 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="densitymapbox.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showticklabels.py new file mode 100644 index 00000000000..23ef0354f31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..bb505c2f0f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..ec274f99984 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_thickness.py new file mode 100644 index 00000000000..fb99cacbaed --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="densitymapbox.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..be955e70049 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tick0.py new file mode 100644 index 00000000000..eab3744d451 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="densitymapbox.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickangle.py new file mode 100644 index 00000000000..dd06c712864 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickcolor.py new file mode 100644 index 00000000000..e9a262c5770 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickfont.py new file mode 100644 index 00000000000..95994530d56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformat.py new file mode 100644 index 00000000000..4c0cb68bb6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..3d56762210b --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..8dd891fb536 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="densitymapbox.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticklen.py new file mode 100644 index 00000000000..79b2286b68a --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickmode.py new file mode 100644 index 00000000000..1d92ab63d83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickprefix.py new file mode 100644 index 00000000000..313bd8bcc01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticks.py new file mode 100644 index 00000000000..2d0773f9a13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..46ff0d8df74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticktext.py new file mode 100644 index 00000000000..8d6caf33adf --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..f65b71f86e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvals.py new file mode 100644 index 00000000000..b3e617e6dc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..c70f35c2851 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py new file mode 100644 index 00000000000..9492201cff2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_title.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_title.py new file mode 100644 index 00000000000..df66aa1fdb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="densitymapbox.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_x.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_x.py new file mode 100644 index 00000000000..acf0d336bf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="densitymapbox.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_xanchor.py new file mode 100644 index 00000000000..a99665ceb1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="densitymapbox.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_xpad.py new file mode 100644 index 00000000000..ba4d604451e --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="densitymapbox.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_y.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_y.py new file mode 100644 index 00000000000..8f33d54ad75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="densitymapbox.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_yanchor.py new file mode 100644 index 00000000000..daae6e7e362 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="densitymapbox.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ypad.py new file mode 100644 index 00000000000..bf4f750252c --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="densitymapbox.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py index baeeb7480d2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="densitymapbox.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="densitymapbox.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="densitymapbox.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..124a779ed51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="densitymapbox.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..5573f934ee9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="densitymapbox.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..1a411a3a213 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="densitymapbox.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py index 876b0ea5191..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="densitymapbox.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="densitymapbox.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="densitymapbox.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="densitymapbox.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="densitymapbox.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..5f2ce393cd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="densitymapbox.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a45e0a0c831 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="densitymapbox.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..7ecfd15491d --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="densitymapbox.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..1ef5234a167 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="densitymapbox.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..0a0010de77b --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="densitymapbox.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/__init__.py index d0218520e03..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="densitymapbox.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="densitymapbox.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="densitymapbox.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_font.py new file mode 100644 index 00000000000..d10768d027d --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="densitymapbox.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_side.py new file mode 100644 index 00000000000..cea84daa1a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="densitymapbox.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_text.py new file mode 100644 index 00000000000..ecf2ddb93f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="densitymapbox.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/__init__.py index 6e13ebfc4dd..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="densitymapbox.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="densitymapbox.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="densitymapbox.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_color.py new file mode 100644 index 00000000000..0c1a0f81019 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="densitymapbox.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_family.py new file mode 100644 index 00000000000..069e5b67201 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="densitymapbox.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_size.py new file mode 100644 index 00000000000..f75ae5dd4cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="densitymapbox.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/__init__.py index 7a4f4d1fabc..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/__init__.py @@ -1,191 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="densitymapbox.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="densitymapbox.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="densitymapbox.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="densitymapbox.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="densitymapbox.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="densitymapbox.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="densitymapbox.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="densitymapbox.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="densitymapbox.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_align.py new file mode 100644 index 00000000000..72fa903e114 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="densitymapbox.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..4132fa32c79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="densitymapbox.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..5e2e3969dca --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="densitymapbox.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..3150f744fc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="densitymapbox.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..1ba18b9aebc --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="densitymapbox.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..9b16514775c --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="densitymapbox.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_font.py new file mode 100644 index 00000000000..9197e9935de --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="densitymapbox.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f7cf07f2037 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="densitymapbox.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3bc90ead283 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="densitymapbox.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/__init__.py index efc9a62b00e..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/__init__.py @@ -1,112 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="densitymapbox.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="densitymapbox.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="densitymapbox.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="densitymapbox.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="densitymapbox.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="densitymapbox.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_color.py new file mode 100644 index 00000000000..a4f4c3ad549 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="densitymapbox.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..aa7869fa30e --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="densitymapbox.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_family.py new file mode 100644 index 00000000000..5972f76a422 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="densitymapbox.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..44db78e98e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="densitymapbox.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_size.py new file mode 100644 index 00000000000..f60ef3f7c76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="densitymapbox.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..451f1cf6642 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="densitymapbox.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/stream/__init__.py b/packages/python/plotly/plotly/validators/densitymapbox/stream/__init__.py index b385d94c929..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/densitymapbox/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/densitymapbox/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="densitymapbox.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="densitymapbox.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/densitymapbox/stream/_maxpoints.py new file mode 100644 index 00000000000..9cd57ad8079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="densitymapbox.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/densitymapbox/stream/_token.py b/packages/python/plotly/plotly/validators/densitymapbox/stream/_token.py new file mode 100644 index 00000000000..a645b7b390e --- /dev/null +++ b/packages/python/plotly/plotly/validators/densitymapbox/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="densitymapbox.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/frame/__init__.py b/packages/python/plotly/plotly/validators/frame/__init__.py index 9996514cc12..b51698dfc85 100644 --- a/packages/python/plotly/plotly/validators/frame/__init__.py +++ b/packages/python/plotly/plotly/validators/frame/__init__.py @@ -1,76 +1,24 @@ -import _plotly_utils.basevalidators - - -class TracesValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="traces", parent_name="frame", **kwargs): - super(TracesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="frame", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import plotly.validators - - -class LayoutValidator(plotly.validators.LayoutValidator): - def __init__(self, plotly_name="layout", parent_name="frame", **kwargs): - super(LayoutValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - role=kwargs.pop("role", "object"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="group", parent_name="frame", **kwargs): - super(GroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import plotly.validators - - -class DataValidator(plotly.validators.DataValidator): - def __init__(self, plotly_name="data", parent_name="frame", **kwargs): - super(DataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - role=kwargs.pop("role", "object"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaseframeValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="baseframe", parent_name="frame", **kwargs): - super(BaseframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._traces import TracesValidator + from ._name import NameValidator + from ._layout import LayoutValidator + from ._group import GroupValidator + from ._data import DataValidator + from ._baseframe import BaseframeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._traces.TracesValidator", + "._name.NameValidator", + "._layout.LayoutValidator", + "._group.GroupValidator", + "._data.DataValidator", + "._baseframe.BaseframeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/frame/_baseframe.py b/packages/python/plotly/plotly/validators/frame/_baseframe.py new file mode 100644 index 00000000000..66e2216c434 --- /dev/null +++ b/packages/python/plotly/plotly/validators/frame/_baseframe.py @@ -0,0 +1,11 @@ +import _plotly_utils.basevalidators + + +class BaseframeValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="baseframe", parent_name="frame", **kwargs): + super(BaseframeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/frame/_data.py b/packages/python/plotly/plotly/validators/frame/_data.py new file mode 100644 index 00000000000..7e5d5f987b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/frame/_data.py @@ -0,0 +1,11 @@ +import plotly.validators + + +class DataValidator(plotly.validators.DataValidator): + def __init__(self, plotly_name="data", parent_name="frame", **kwargs): + super(DataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + role=kwargs.pop("role", "object"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/frame/_group.py b/packages/python/plotly/plotly/validators/frame/_group.py new file mode 100644 index 00000000000..31a9df20608 --- /dev/null +++ b/packages/python/plotly/plotly/validators/frame/_group.py @@ -0,0 +1,11 @@ +import _plotly_utils.basevalidators + + +class GroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="group", parent_name="frame", **kwargs): + super(GroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/frame/_layout.py b/packages/python/plotly/plotly/validators/frame/_layout.py new file mode 100644 index 00000000000..dfbfe01d4af --- /dev/null +++ b/packages/python/plotly/plotly/validators/frame/_layout.py @@ -0,0 +1,11 @@ +import plotly.validators + + +class LayoutValidator(plotly.validators.LayoutValidator): + def __init__(self, plotly_name="layout", parent_name="frame", **kwargs): + super(LayoutValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + role=kwargs.pop("role", "object"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/frame/_name.py b/packages/python/plotly/plotly/validators/frame/_name.py new file mode 100644 index 00000000000..29fe49d7db8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/frame/_name.py @@ -0,0 +1,11 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="frame", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/frame/_traces.py b/packages/python/plotly/plotly/validators/frame/_traces.py new file mode 100644 index 00000000000..a5cb501c7c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/frame/_traces.py @@ -0,0 +1,11 @@ +import _plotly_utils.basevalidators + + +class TracesValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="traces", parent_name="frame", **kwargs): + super(TracesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/__init__.py b/packages/python/plotly/plotly/validators/funnel/__init__.py index 6da3adcb8e9..4b4a0e57956 100644 --- a/packages/python/plotly/plotly/validators/funnel/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/__init__.py @@ -1,1051 +1,118 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="funnel", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="funnel", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="funnel", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="funnel", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="funnel", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="funnel", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="funnel", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="funnel", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="funnel", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="funnel", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="funnel", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="funnel", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="texttemplatesrc", parent_name="funnel", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="funnel", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="funnel", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textpositionsrc", parent_name="funnel", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="funnel", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="textinfo", parent_name="funnel", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "plot"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop( - "flags", - [ - "label", - "text", - "percent initial", - "percent previous", - "percent total", - "value", - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="funnel", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="textangle", parent_name="funnel", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="funnel", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="funnel", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="funnel", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="funnel", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="outsidetextfont", parent_name="funnel", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="funnel", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="funnel", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="offsetgroup", parent_name="funnel", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="offset", parent_name="funnel", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="funnel", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="funnel", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="funnel", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="funnel", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.funnel.marker.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.funnel.marker.Line - ` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="funnel", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="insidetextfont", parent_name="funnel", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="insidetextanchor", parent_name="funnel", **kwargs): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["end", "middle", "start"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="funnel", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="funnel", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="funnel", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="funnel", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="funnel", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="funnel", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="funnel", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="funnel", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="funnel", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop( - "flags", - [ - "name", - "x", - "y", - "text", - "percent initial", - "percent previous", - "percent total", - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="funnel", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="funnel", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="funnel", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="funnel", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="constraintext", parent_name="funnel", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "both", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="connector", parent_name="funnel", **kwargs): - super(ConnectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Connector"), - data_docs=kwargs.pop( - "data_docs", - """ - fillcolor - Sets the fill color. - line - :class:`plotly.graph_objects.funnel.connector.L - ine` instance or dict with compatible - properties - visible - Determines if connector regions and lines are - drawn. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cliponaxis", parent_name="funnel", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="alignmentgroup", parent_name="funnel", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textinfo import TextinfoValidator + from ._textfont import TextfontValidator + from ._textangle import TextangleValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._outsidetextfont import OutsidetextfontValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._offsetgroup import OffsetgroupValidator + from ._offset import OffsetValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._insidetextfont import InsidetextfontValidator + from ._insidetextanchor import InsidetextanchorValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._constraintext import ConstraintextValidator + from ._connector import ConnectorValidator + from ._cliponaxis import CliponaxisValidator + from ._alignmentgroup import AlignmentgroupValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._constraintext.ConstraintextValidator", + "._connector.ConnectorValidator", + "._cliponaxis.CliponaxisValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_alignmentgroup.py b/packages/python/plotly/plotly/validators/funnel/_alignmentgroup.py new file mode 100644 index 00000000000..a86031a782d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_alignmentgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="alignmentgroup", parent_name="funnel", **kwargs): + super(AlignmentgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_cliponaxis.py b/packages/python/plotly/plotly/validators/funnel/_cliponaxis.py new file mode 100644 index 00000000000..be7fc1ab5c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_cliponaxis.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cliponaxis", parent_name="funnel", **kwargs): + super(CliponaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_connector.py b/packages/python/plotly/plotly/validators/funnel/_connector.py new file mode 100644 index 00000000000..7bd872daaa1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_connector.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="connector", parent_name="funnel", **kwargs): + super(ConnectorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Connector"), + data_docs=kwargs.pop( + "data_docs", + """ + fillcolor + Sets the fill color. + line + :class:`plotly.graph_objects.funnel.connector.L + ine` instance or dict with compatible + properties + visible + Determines if connector regions and lines are + drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_constraintext.py b/packages/python/plotly/plotly/validators/funnel/_constraintext.py new file mode 100644 index 00000000000..f117c8d00d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_constraintext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="constraintext", parent_name="funnel", **kwargs): + super(ConstraintextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "both", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_customdata.py b/packages/python/plotly/plotly/validators/funnel/_customdata.py new file mode 100644 index 00000000000..953b98cfaee --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="funnel", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_customdatasrc.py b/packages/python/plotly/plotly/validators/funnel/_customdatasrc.py new file mode 100644 index 00000000000..209089829e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="funnel", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_dx.py b/packages/python/plotly/plotly/validators/funnel/_dx.py new file mode 100644 index 00000000000..a8918b2ec55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_dx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="funnel", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_dy.py b/packages/python/plotly/plotly/validators/funnel/_dy.py new file mode 100644 index 00000000000..cb9a7aae317 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_dy.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="funnel", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hoverinfo.py b/packages/python/plotly/plotly/validators/funnel/_hoverinfo.py new file mode 100644 index 00000000000..9ce8d29e8a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hoverinfo.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="funnel", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", + [ + "name", + "x", + "y", + "text", + "percent initial", + "percent previous", + "percent total", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/funnel/_hoverinfosrc.py new file mode 100644 index 00000000000..7966f7e50c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="funnel", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hoverlabel.py b/packages/python/plotly/plotly/validators/funnel/_hoverlabel.py new file mode 100644 index 00000000000..d3a4d2ecf26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="funnel", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hovertemplate.py b/packages/python/plotly/plotly/validators/funnel/_hovertemplate.py new file mode 100644 index 00000000000..a67c5bb7569 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="funnel", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/funnel/_hovertemplatesrc.py new file mode 100644 index 00000000000..9181d092ef4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="funnel", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hovertext.py b/packages/python/plotly/plotly/validators/funnel/_hovertext.py new file mode 100644 index 00000000000..2491495c80a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="funnel", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_hovertextsrc.py b/packages/python/plotly/plotly/validators/funnel/_hovertextsrc.py new file mode 100644 index 00000000000..545ad48b55f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="funnel", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_ids.py b/packages/python/plotly/plotly/validators/funnel/_ids.py new file mode 100644 index 00000000000..a75270d74d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="funnel", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_idssrc.py b/packages/python/plotly/plotly/validators/funnel/_idssrc.py new file mode 100644 index 00000000000..2f407f1bfad --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="funnel", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_insidetextanchor.py b/packages/python/plotly/plotly/validators/funnel/_insidetextanchor.py new file mode 100644 index 00000000000..ff8f66638df --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_insidetextanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="insidetextanchor", parent_name="funnel", **kwargs): + super(InsidetextanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["end", "middle", "start"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_insidetextfont.py b/packages/python/plotly/plotly/validators/funnel/_insidetextfont.py new file mode 100644 index 00000000000..4320b47f10c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_insidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="funnel", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_legendgroup.py b/packages/python/plotly/plotly/validators/funnel/_legendgroup.py new file mode 100644 index 00000000000..fddc26e0f1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="funnel", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_marker.py b/packages/python/plotly/plotly/validators/funnel/_marker.py new file mode 100644 index 00000000000..5b748984f95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_marker.py @@ -0,0 +1,111 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="funnel", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.funnel.marker.Colo + rBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.funnel.marker.Line + ` instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_meta.py b/packages/python/plotly/plotly/validators/funnel/_meta.py new file mode 100644 index 00000000000..c72ab25b258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="funnel", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_metasrc.py b/packages/python/plotly/plotly/validators/funnel/_metasrc.py new file mode 100644 index 00000000000..d2a86286ec2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="funnel", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_name.py b/packages/python/plotly/plotly/validators/funnel/_name.py new file mode 100644 index 00000000000..cdf62e15196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="funnel", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_offset.py b/packages/python/plotly/plotly/validators/funnel/_offset.py new file mode 100644 index 00000000000..bf33b3d1580 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_offset.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="offset", parent_name="funnel", **kwargs): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_offsetgroup.py b/packages/python/plotly/plotly/validators/funnel/_offsetgroup.py new file mode 100644 index 00000000000..ce9d5e90599 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_offsetgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="offsetgroup", parent_name="funnel", **kwargs): + super(OffsetgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_opacity.py b/packages/python/plotly/plotly/validators/funnel/_opacity.py new file mode 100644 index 00000000000..e45420e8485 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="funnel", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_orientation.py b/packages/python/plotly/plotly/validators/funnel/_orientation.py new file mode 100644 index 00000000000..39caa9c038d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="funnel", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_outsidetextfont.py b/packages/python/plotly/plotly/validators/funnel/_outsidetextfont.py new file mode 100644 index 00000000000..868e2bfe069 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_outsidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="outsidetextfont", parent_name="funnel", **kwargs): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_selectedpoints.py b/packages/python/plotly/plotly/validators/funnel/_selectedpoints.py new file mode 100644 index 00000000000..12f651acbd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="funnel", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_showlegend.py b/packages/python/plotly/plotly/validators/funnel/_showlegend.py new file mode 100644 index 00000000000..cea8262690f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="funnel", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_stream.py b/packages/python/plotly/plotly/validators/funnel/_stream.py new file mode 100644 index 00000000000..87ce774d07f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="funnel", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_text.py b/packages/python/plotly/plotly/validators/funnel/_text.py new file mode 100644 index 00000000000..0bfe6627288 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="funnel", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_textangle.py b/packages/python/plotly/plotly/validators/funnel/_textangle.py new file mode 100644 index 00000000000..bbb2032875f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_textangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="textangle", parent_name="funnel", **kwargs): + super(TextangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_textfont.py b/packages/python/plotly/plotly/validators/funnel/_textfont.py new file mode 100644 index 00000000000..bbdadb3b13a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="funnel", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_textinfo.py b/packages/python/plotly/plotly/validators/funnel/_textinfo.py new file mode 100644 index 00000000000..41c3b7da51f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_textinfo.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="funnel", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "percent initial", + "percent previous", + "percent total", + "value", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_textposition.py b/packages/python/plotly/plotly/validators/funnel/_textposition.py new file mode 100644 index 00000000000..e1c875f6ba1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_textposition.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="funnel", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_textpositionsrc.py b/packages/python/plotly/plotly/validators/funnel/_textpositionsrc.py new file mode 100644 index 00000000000..508ce69f25e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_textpositionsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textpositionsrc", parent_name="funnel", **kwargs): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_textsrc.py b/packages/python/plotly/plotly/validators/funnel/_textsrc.py new file mode 100644 index 00000000000..24de06b48f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="funnel", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_texttemplate.py b/packages/python/plotly/plotly/validators/funnel/_texttemplate.py new file mode 100644 index 00000000000..f7ad53c0fc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="funnel", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/funnel/_texttemplatesrc.py new file mode 100644 index 00000000000..b14358ed575 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_texttemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="funnel", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_uid.py b/packages/python/plotly/plotly/validators/funnel/_uid.py new file mode 100644 index 00000000000..b59f487f6dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="funnel", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_uirevision.py b/packages/python/plotly/plotly/validators/funnel/_uirevision.py new file mode 100644 index 00000000000..b466dc5e5cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="funnel", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_visible.py b/packages/python/plotly/plotly/validators/funnel/_visible.py new file mode 100644 index 00000000000..98d717736ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="funnel", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_width.py b/packages/python/plotly/plotly/validators/funnel/_width.py new file mode 100644 index 00000000000..52882bcffec --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="funnel", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_x.py b/packages/python/plotly/plotly/validators/funnel/_x.py new file mode 100644 index 00000000000..61eda8f8c32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="funnel", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_x0.py b/packages/python/plotly/plotly/validators/funnel/_x0.py new file mode 100644 index 00000000000..2e808d322de --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="funnel", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_xaxis.py b/packages/python/plotly/plotly/validators/funnel/_xaxis.py new file mode 100644 index 00000000000..d19700990e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="funnel", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_xsrc.py b/packages/python/plotly/plotly/validators/funnel/_xsrc.py new file mode 100644 index 00000000000..38dbc93d5ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="funnel", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_y.py b/packages/python/plotly/plotly/validators/funnel/_y.py new file mode 100644 index 00000000000..018a0d3941a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="funnel", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_y0.py b/packages/python/plotly/plotly/validators/funnel/_y0.py new file mode 100644 index 00000000000..5ff310fdf77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="funnel", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_yaxis.py b/packages/python/plotly/plotly/validators/funnel/_yaxis.py new file mode 100644 index 00000000000..c5b0c182b83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="funnel", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/_ysrc.py b/packages/python/plotly/plotly/validators/funnel/_ysrc.py new file mode 100644 index 00000000000..cbc6fbd1196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="funnel", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/__init__.py b/packages/python/plotly/plotly/validators/funnel/connector/__init__.py index f31c75b1be7..9c448c3acf2 100644 --- a/packages/python/plotly/plotly/validators/funnel/connector/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/connector/__init__.py @@ -1,55 +1,18 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="funnel.connector", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="funnel.connector", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="fillcolor", parent_name="funnel.connector", **kwargs - ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._line import LineValidator + from ._fillcolor import FillcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._line.LineValidator", + "._fillcolor.FillcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/_fillcolor.py b/packages/python/plotly/plotly/validators/funnel/connector/_fillcolor.py new file mode 100644 index 00000000000..296dc5ebb2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/connector/_fillcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="fillcolor", parent_name="funnel.connector", **kwargs + ): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/_line.py b/packages/python/plotly/plotly/validators/funnel/connector/_line.py new file mode 100644 index 00000000000..c00aa64dd97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/connector/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="funnel.connector", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/_visible.py b/packages/python/plotly/plotly/validators/funnel/connector/_visible.py new file mode 100644 index 00000000000..496dd9a1df0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/connector/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="funnel.connector", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/line/__init__.py b/packages/python/plotly/plotly/validators/funnel/connector/line/__init__.py index ec157116826..ac8bd485063 100644 --- a/packages/python/plotly/plotly/validators/funnel/connector/line/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/connector/line/__init__.py @@ -1,50 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="funnel.connector.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="dash", parent_name="funnel.connector.line", **kwargs - ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnel.connector.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/line/_color.py b/packages/python/plotly/plotly/validators/funnel/connector/line/_color.py new file mode 100644 index 00000000000..f5859adc32e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/connector/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnel.connector.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/line/_dash.py b/packages/python/plotly/plotly/validators/funnel/connector/line/_dash.py new file mode 100644 index 00000000000..6dfa7174a0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/connector/line/_dash.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="dash", parent_name="funnel.connector.line", **kwargs + ): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/connector/line/_width.py b/packages/python/plotly/plotly/validators/funnel/connector/line/_width.py new file mode 100644 index 00000000000..fc19908a2a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/connector/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="funnel.connector.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/__init__.py index 8fa5a5c3a71..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/funnel/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="funnel.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="funnel.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="funnel.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="funnel.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="funnel.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="funnel.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="funnel.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="funnel.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="funnel.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_align.py new file mode 100644 index 00000000000..c47c0405ba7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="funnel.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..2841a7e557e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="funnel.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..466fcc72b14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="funnel.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..ee8e9428299 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="funnel.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..28d44cff2b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="funnel.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..17d56b1154f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="funnel.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_font.py new file mode 100644 index 00000000000..8b648e20f17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="funnel.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_namelength.py new file mode 100644 index 00000000000..46773ddbfea --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="funnel.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..fd8d9ece209 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="funnel.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py index 4a1c4bcf5e6..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnel.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="funnel.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnel.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnel.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnel.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnel.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_color.py new file mode 100644 index 00000000000..d87df753630 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnel.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..4a4bd89b2d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnel.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_family.py new file mode 100644 index 00000000000..51511789db2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnel.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..fc659702e88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnel.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_size.py new file mode 100644 index 00000000000..57782598c7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="funnel.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..318e2aad88d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnel.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/__init__.py index 02055167d27..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnel/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnel.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="funnel.insidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnel.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnel.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnel.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnel.insidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_color.py new file mode 100644 index 00000000000..c03d5b53e9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnel.insidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..0c79405c6f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnel.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_family.py new file mode 100644 index 00000000000..b63f8b116ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnel.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..82b1a74d97f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnel.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_size.py new file mode 100644 index 00000000000..fa9d92e8d80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="funnel.insidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..7c1846c21e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnel.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/__init__.py index 0aecdad2f54..bcbbad4466a 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/__init__.py @@ -1,533 +1,42 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="funnel.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="funnel.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="opacitysrc", parent_name="funnel.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="funnel.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="funnel.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="funnel.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="funnel.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="funnel.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.funnel. - marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.funnel.marker.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - funnel.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.funnel.marker.colo - rbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - funnel.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - funnel.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="funnel.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="funnel.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "funnel.marker.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="funnel.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="funnel.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="funnel.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="funnel.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="funnel.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/funnel/marker/_autocolorscale.py new file mode 100644 index 00000000000..a004b7be522 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="funnel.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_cauto.py b/packages/python/plotly/plotly/validators/funnel/marker/_cauto.py new file mode 100644 index 00000000000..e71540b67ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="funnel.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_cmax.py b/packages/python/plotly/plotly/validators/funnel/marker/_cmax.py new file mode 100644 index 00000000000..26d7d729717 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="funnel.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_cmid.py b/packages/python/plotly/plotly/validators/funnel/marker/_cmid.py new file mode 100644 index 00000000000..024717ec7bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="funnel.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_cmin.py b/packages/python/plotly/plotly/validators/funnel/marker/_cmin.py new file mode 100644 index 00000000000..d19c534fae0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="funnel.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_color.py b/packages/python/plotly/plotly/validators/funnel/marker/_color.py new file mode 100644 index 00000000000..601e9fb1b2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="funnel.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "funnel.marker.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/funnel/marker/_coloraxis.py new file mode 100644 index 00000000000..cf13ab8d8fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="funnel.marker", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_colorbar.py b/packages/python/plotly/plotly/validators/funnel/marker/_colorbar.py new file mode 100644 index 00000000000..a3f691e41f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="funnel.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.funnel. + marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.funnel.marker.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + funnel.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.funnel.marker.colo + rbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + funnel.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + funnel.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_colorscale.py b/packages/python/plotly/plotly/validators/funnel/marker/_colorscale.py new file mode 100644 index 00000000000..34219eda31c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="funnel.marker", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/funnel/marker/_colorsrc.py new file mode 100644 index 00000000000..148bd820c6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="funnel.marker", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_line.py b/packages/python/plotly/plotly/validators/funnel/marker/_line.py new file mode 100644 index 00000000000..c9687a9bfd9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="funnel.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_opacity.py b/packages/python/plotly/plotly/validators/funnel/marker/_opacity.py new file mode 100644 index 00000000000..cb21e028a62 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="funnel.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/funnel/marker/_opacitysrc.py new file mode 100644 index 00000000000..6d849b27056 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_opacitysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="opacitysrc", parent_name="funnel.marker", **kwargs): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_reversescale.py b/packages/python/plotly/plotly/validators/funnel/marker/_reversescale.py new file mode 100644 index 00000000000..8907a614344 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="funnel.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/_showscale.py b/packages/python/plotly/plotly/validators/funnel/marker/_showscale.py new file mode 100644 index 00000000000..5311b563c5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="funnel.marker", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/__init__.py index 7d3a7ad40ae..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/__init__.py @@ -1,785 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="funnel.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="funnel.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="funnel.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="funnel.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="funnel.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="funnel.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="funnel.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="funnel.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="funnel.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="funnel.marker.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="funnel.marker.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="funnel.marker.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="funnel.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="funnel.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="funnel.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="funnel.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="funnel.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="funnel.marker.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="funnel.marker.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="funnel.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..3f5ca59a7e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="funnel.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..7fae7500c87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="funnel.marker.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..d059eeecd69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="funnel.marker.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..e2b5d18f204 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="funnel.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..8366de40a0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_len.py new file mode 100644 index 00000000000..ee36ca7d62b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="funnel.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..09f2409f13b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="funnel.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..f7d8584fb77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="funnel.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..0d7eece0fca --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="funnel.marker.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..58205dce057 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="funnel.marker.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..8d976555f40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..db8f614cbcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="funnel.marker.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..ba5034d3775 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..6798e4e617b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..4f75218d1a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..bc284ad893c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="funnel.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..3dafb316489 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..6a807b39953 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="funnel.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..d3666a51ebf --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..28f92fbb52c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..2e6ec2e61af --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..21e19c299df --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..c1bf8ddcd9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..1aa1db267d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="funnel.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..44a2094f055 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..b90afb8ff82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..d80a8d8842c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..7630d800218 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..bc1859cdc6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..99e29d19448 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..cb391e1ee41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..81f3054a3ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..baf03688acf --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..6979a3e23ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_title.py new file mode 100644 index 00000000000..10abf637d42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="funnel.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_x.py new file mode 100644 index 00000000000..dd69f742c66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="funnel.marker.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..8f660592b19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="funnel.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..33c3d3b5344 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="funnel.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_y.py new file mode 100644 index 00000000000..853f39101b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="funnel.marker.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..7320e527cb0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="funnel.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..84959fdbda6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="funnel.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py index 3a07b44d9ce..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="funnel.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="funnel.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="funnel.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..819c98467a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="funnel.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..2481f4ecb31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="funnel.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..cb79b28692e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="funnel.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py index 41ef3171bab..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="funnel.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="funnel.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="funnel.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="funnel.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="funnel.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..bfb63e9a90d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="funnel.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..ffc24f85efc --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="funnel.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..33a121118e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="funnel.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..9272b7b512a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="funnel.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..51cb1ffa480 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="funnel.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/__init__.py index ebdd60d05a1..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="funnel.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="funnel.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..43fe7c62022 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="funnel.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..b0526d8d9d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="funnel.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..8b40a50c36c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/__init__.py index cee4036ea98..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="funnel.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="funnel.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="funnel.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..563f7869c69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="funnel.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..5fe0981044a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="funnel.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..6080a920d46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="funnel.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/__init__.py b/packages/python/plotly/plotly/validators/funnel/marker/line/__init__.py index ff53d9f3324..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/funnel/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/__init__.py @@ -1,192 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="funnel.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="funnel.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="funnel.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnel.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="funnel.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="funnel.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="funnel.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "funnel.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="funnel.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="funnel.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="funnel.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="funnel.marker.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="funnel.marker.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..fa27904649b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="funnel.marker.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_cauto.py new file mode 100644 index 00000000000..05cf7e55a16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="funnel.marker.line", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_cmax.py new file mode 100644 index 00000000000..f929a834378 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="funnel.marker.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_cmid.py new file mode 100644 index 00000000000..b80688e0734 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="funnel.marker.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_cmin.py new file mode 100644 index 00000000000..52edd465f18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="funnel.marker.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_color.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_color.py new file mode 100644 index 00000000000..e57356221b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_color.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="funnel.marker.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "funnel.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_coloraxis.py new file mode 100644 index 00000000000..154fa52d6a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="funnel.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_colorscale.py new file mode 100644 index 00000000000..02829877695 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="funnel.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_colorsrc.py new file mode 100644 index 00000000000..f517260ef7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnel.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_reversescale.py new file mode 100644 index 00000000000..2f94af1c658 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="funnel.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_width.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_width.py new file mode 100644 index 00000000000..f3e1ebce03a --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="funnel.marker.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/funnel/marker/line/_widthsrc.py new file mode 100644 index 00000000000..b3acff9f950 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="funnel.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/__init__.py index 246a480bbd3..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnel.outsidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="funnel.outsidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnel.outsidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnel.outsidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnel.outsidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnel.outsidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_color.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_color.py new file mode 100644 index 00000000000..eba587d069c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnel.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_colorsrc.py new file mode 100644 index 00000000000..7a9a733d8ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnel.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_family.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_family.py new file mode 100644 index 00000000000..21052e133df --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnel.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_familysrc.py new file mode 100644 index 00000000000..c4b5fc4a7f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnel.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_size.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_size.py new file mode 100644 index 00000000000..93295128efb --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="funnel.outsidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_sizesrc.py new file mode 100644 index 00000000000..0b8c60604f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnel.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/stream/__init__.py b/packages/python/plotly/plotly/validators/funnel/stream/__init__.py index 0cb32d4d0f1..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/funnel/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="funnel.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="funnel.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/funnel/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/funnel/stream/_maxpoints.py new file mode 100644 index 00000000000..05cf71dfdc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="funnel.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/stream/_token.py b/packages/python/plotly/plotly/validators/funnel/stream/_token.py new file mode 100644 index 00000000000..bbe051cf089 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="funnel.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/__init__.py b/packages/python/plotly/plotly/validators/funnel/textfont/__init__.py index 9e910206475..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnel/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/textfont/__init__.py @@ -1,90 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="funnel.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="funnel.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnel.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="funnel.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="funnel.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="funnel.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/_color.py b/packages/python/plotly/plotly/validators/funnel/textfont/_color.py new file mode 100644 index 00000000000..00137ab60ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="funnel.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/funnel/textfont/_colorsrc.py new file mode 100644 index 00000000000..ad9638cf20b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/textfont/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="funnel.textfont", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/_family.py b/packages/python/plotly/plotly/validators/funnel/textfont/_family.py new file mode 100644 index 00000000000..f72d638bd51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/textfont/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="funnel.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/funnel/textfont/_familysrc.py new file mode 100644 index 00000000000..d9d30cd1ddc --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnel.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/_size.py b/packages/python/plotly/plotly/validators/funnel/textfont/_size.py new file mode 100644 index 00000000000..4c52b0f6a66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="funnel.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnel/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/funnel/textfont/_sizesrc.py new file mode 100644 index 00000000000..8459c25d252 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnel/textfont/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="funnel.textfont", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/__init__.py index 6f2ceae3bf4..9d45b821f6d 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/__init__.py @@ -1,782 +1,96 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="funnelarea", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuessrc", parent_name="funnelarea", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="funnelarea", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="funnelarea", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="funnelarea", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="funnelarea", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - position - Specifies the location of the `title`. Note - that the title's position used to be set by the - now deprecated `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no - title is displayed. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="funnelarea", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="funnelarea", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="funnelarea", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="funnelarea", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="funnelarea", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="textinfo", parent_name="funnelarea", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["label", "text", "value", "percent"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="funnelarea", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="funnelarea", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="funnelarea", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="funnelarea", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="scalegroup", parent_name="funnelarea", **kwargs): - super(ScalegroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="funnelarea", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="funnelarea", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="funnelarea", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="funnelarea", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="funnelarea", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - line - :class:`plotly.graph_objects.funnelarea.marker. - Line` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="funnelarea", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="labelssrc", parent_name="funnelarea", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="labels", parent_name="funnelarea", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Label0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="label0", parent_name="funnelarea", **kwargs): - super(Label0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="insidetextfont", parent_name="funnelarea", **kwargs - ): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="funnelarea", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="funnelarea", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="funnelarea", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="funnelarea", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="funnelarea", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="funnelarea", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="funnelarea", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="funnelarea", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="funnelarea", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["label", "text", "value", "percent", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="funnelarea", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this funnelarea - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this funnelarea trace - . - x - Sets the horizontal domain of this funnelarea - trace (in plot fraction). - y - Sets the vertical domain of this funnelarea - trace (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DlabelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dlabel", parent_name="funnelarea", **kwargs): - super(DlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="funnelarea", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="funnelarea", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaseratioValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="baseratio", parent_name="funnelarea", **kwargs): - super(BaseratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AspectratioValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="aspectratio", parent_name="funnelarea", **kwargs): - super(AspectratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._title import TitleValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textinfo import TextinfoValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._scalegroup import ScalegroupValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._labelssrc import LabelssrcValidator + from ._labels import LabelsValidator + from ._label0 import Label0Validator + from ._insidetextfont import InsidetextfontValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._domain import DomainValidator + from ._dlabel import DlabelValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._baseratio import BaseratioValidator + from ._aspectratio import AspectratioValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._title.TitleValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._scalegroup.ScalegroupValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._label0.Label0Validator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._dlabel.DlabelValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._baseratio.BaseratioValidator", + "._aspectratio.AspectratioValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_aspectratio.py b/packages/python/plotly/plotly/validators/funnelarea/_aspectratio.py new file mode 100644 index 00000000000..6e08f3c54ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_aspectratio.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AspectratioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="aspectratio", parent_name="funnelarea", **kwargs): + super(AspectratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_baseratio.py b/packages/python/plotly/plotly/validators/funnelarea/_baseratio.py new file mode 100644 index 00000000000..89bbe3e9d55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_baseratio.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BaseratioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="baseratio", parent_name="funnelarea", **kwargs): + super(BaseratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_customdata.py b/packages/python/plotly/plotly/validators/funnelarea/_customdata.py new file mode 100644 index 00000000000..d2efa883c32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="funnelarea", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_customdatasrc.py b/packages/python/plotly/plotly/validators/funnelarea/_customdatasrc.py new file mode 100644 index 00000000000..c25b69c00fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="funnelarea", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_dlabel.py b/packages/python/plotly/plotly/validators/funnelarea/_dlabel.py new file mode 100644 index 00000000000..eda0fb08170 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_dlabel.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DlabelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dlabel", parent_name="funnelarea", **kwargs): + super(DlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_domain.py b/packages/python/plotly/plotly/validators/funnelarea/_domain.py new file mode 100644 index 00000000000..4b599bafa5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_domain.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="funnelarea", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this funnelarea + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this funnelarea trace + . + x + Sets the horizontal domain of this funnelarea + trace (in plot fraction). + y + Sets the vertical domain of this funnelarea + trace (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hoverinfo.py b/packages/python/plotly/plotly/validators/funnelarea/_hoverinfo.py new file mode 100644 index 00000000000..b90f4ed25a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="funnelarea", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["label", "text", "value", "percent", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/funnelarea/_hoverinfosrc.py new file mode 100644 index 00000000000..8061e0c85ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="funnelarea", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hoverlabel.py b/packages/python/plotly/plotly/validators/funnelarea/_hoverlabel.py new file mode 100644 index 00000000000..21e35ed42cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="funnelarea", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hovertemplate.py b/packages/python/plotly/plotly/validators/funnelarea/_hovertemplate.py new file mode 100644 index 00000000000..50a7f361090 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="funnelarea", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/funnelarea/_hovertemplatesrc.py new file mode 100644 index 00000000000..f1b46b5c30b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="funnelarea", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hovertext.py b/packages/python/plotly/plotly/validators/funnelarea/_hovertext.py new file mode 100644 index 00000000000..2b2dff3f585 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="funnelarea", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_hovertextsrc.py b/packages/python/plotly/plotly/validators/funnelarea/_hovertextsrc.py new file mode 100644 index 00000000000..68c19c47f45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="funnelarea", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_ids.py b/packages/python/plotly/plotly/validators/funnelarea/_ids.py new file mode 100644 index 00000000000..4da8398b98e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="funnelarea", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_idssrc.py b/packages/python/plotly/plotly/validators/funnelarea/_idssrc.py new file mode 100644 index 00000000000..c5a02505570 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="funnelarea", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_insidetextfont.py b/packages/python/plotly/plotly/validators/funnelarea/_insidetextfont.py new file mode 100644 index 00000000000..723a7731f8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_insidetextfont.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="insidetextfont", parent_name="funnelarea", **kwargs + ): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_label0.py b/packages/python/plotly/plotly/validators/funnelarea/_label0.py new file mode 100644 index 00000000000..d64ce92f914 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_label0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Label0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="label0", parent_name="funnelarea", **kwargs): + super(Label0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_labels.py b/packages/python/plotly/plotly/validators/funnelarea/_labels.py new file mode 100644 index 00000000000..bfdbba3c589 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_labels.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="labels", parent_name="funnelarea", **kwargs): + super(LabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_labelssrc.py b/packages/python/plotly/plotly/validators/funnelarea/_labelssrc.py new file mode 100644 index 00000000000..7da3fdbb583 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_labelssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelssrc", parent_name="funnelarea", **kwargs): + super(LabelssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_legendgroup.py b/packages/python/plotly/plotly/validators/funnelarea/_legendgroup.py new file mode 100644 index 00000000000..cd8947f0d15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="funnelarea", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_marker.py b/packages/python/plotly/plotly/validators/funnelarea/_marker.py new file mode 100644 index 00000000000..02d43a81db4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="funnelarea", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + colors + Sets the color of each sector. If not + specified, the default trace color set is used + to pick the sector colors. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + line + :class:`plotly.graph_objects.funnelarea.marker. + Line` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_meta.py b/packages/python/plotly/plotly/validators/funnelarea/_meta.py new file mode 100644 index 00000000000..3fa079924fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="funnelarea", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_metasrc.py b/packages/python/plotly/plotly/validators/funnelarea/_metasrc.py new file mode 100644 index 00000000000..d7e13600271 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="funnelarea", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_name.py b/packages/python/plotly/plotly/validators/funnelarea/_name.py new file mode 100644 index 00000000000..45e294941bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="funnelarea", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_opacity.py b/packages/python/plotly/plotly/validators/funnelarea/_opacity.py new file mode 100644 index 00000000000..c928efcb59e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="funnelarea", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_scalegroup.py b/packages/python/plotly/plotly/validators/funnelarea/_scalegroup.py new file mode 100644 index 00000000000..6d74d116931 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_scalegroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="scalegroup", parent_name="funnelarea", **kwargs): + super(ScalegroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_showlegend.py b/packages/python/plotly/plotly/validators/funnelarea/_showlegend.py new file mode 100644 index 00000000000..415c4eb55f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="funnelarea", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_stream.py b/packages/python/plotly/plotly/validators/funnelarea/_stream.py new file mode 100644 index 00000000000..47204573876 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="funnelarea", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_text.py b/packages/python/plotly/plotly/validators/funnelarea/_text.py new file mode 100644 index 00000000000..e6cbbe27f6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="funnelarea", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_textfont.py b/packages/python/plotly/plotly/validators/funnelarea/_textfont.py new file mode 100644 index 00000000000..e793fba3fd9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="funnelarea", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_textinfo.py b/packages/python/plotly/plotly/validators/funnelarea/_textinfo.py new file mode 100644 index 00000000000..8f8bc870d95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_textinfo.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="funnelarea", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["label", "text", "value", "percent"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_textposition.py b/packages/python/plotly/plotly/validators/funnelarea/_textposition.py new file mode 100644 index 00000000000..480f1c279a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_textposition.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="funnelarea", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_textpositionsrc.py b/packages/python/plotly/plotly/validators/funnelarea/_textpositionsrc.py new file mode 100644 index 00000000000..ed95e7bc9e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="funnelarea", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_textsrc.py b/packages/python/plotly/plotly/validators/funnelarea/_textsrc.py new file mode 100644 index 00000000000..c64ec560965 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="funnelarea", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_texttemplate.py b/packages/python/plotly/plotly/validators/funnelarea/_texttemplate.py new file mode 100644 index 00000000000..31fc8412895 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="funnelarea", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/funnelarea/_texttemplatesrc.py new file mode 100644 index 00000000000..3614af866fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="funnelarea", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_title.py b/packages/python/plotly/plotly/validators/funnelarea/_title.py new file mode 100644 index 00000000000..3c538d1dc21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_title.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="funnelarea", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + position + Specifies the location of the `title`. Note + that the title's position used to be set by the + now deprecated `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no + title is displayed. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_uid.py b/packages/python/plotly/plotly/validators/funnelarea/_uid.py new file mode 100644 index 00000000000..bdde951d38b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="funnelarea", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_uirevision.py b/packages/python/plotly/plotly/validators/funnelarea/_uirevision.py new file mode 100644 index 00000000000..a8c97cdddea --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="funnelarea", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_values.py b/packages/python/plotly/plotly/validators/funnelarea/_values.py new file mode 100644 index 00000000000..4851ccc564f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="funnelarea", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_valuessrc.py b/packages/python/plotly/plotly/validators/funnelarea/_valuessrc.py new file mode 100644 index 00000000000..2dd945506e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_valuessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="funnelarea", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/_visible.py b/packages/python/plotly/plotly/validators/funnelarea/_visible.py new file mode 100644 index 00000000000..ce861beefc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="funnelarea", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/domain/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/domain/__init__.py index aa8229ad141..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="funnelarea.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="funnelarea.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="funnelarea.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="funnelarea.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/domain/_column.py b/packages/python/plotly/plotly/validators/funnelarea/domain/_column.py new file mode 100644 index 00000000000..751b7974559 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="funnelarea.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/domain/_row.py b/packages/python/plotly/plotly/validators/funnelarea/domain/_row.py new file mode 100644 index 00000000000..cc8fa14c451 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="funnelarea.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/domain/_x.py b/packages/python/plotly/plotly/validators/funnelarea/domain/_x.py new file mode 100644 index 00000000000..a1cec02c486 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="funnelarea.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/domain/_y.py b/packages/python/plotly/plotly/validators/funnelarea/domain/_y.py new file mode 100644 index 00000000000..9fa6b998184 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="funnelarea.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/__init__.py index d299b43ab32..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/__init__.py @@ -1,185 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="funnelarea.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="funnelarea.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_align.py new file mode 100644 index 00000000000..3fa4d81d2bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..fec5f8f919b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..217f48ed19b --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..b6dc295909d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..cf7848f1626 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..198ef4b5497 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="funnelarea.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_font.py new file mode 100644 index 00000000000..f62aca19660 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_namelength.py new file mode 100644 index 00000000000..98c325a2fa3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..be16c7b1e41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="funnelarea.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/__init__.py index fce1cbc4028..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/__init__.py @@ -1,103 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnelarea.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="funnelarea.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="funnelarea.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnelarea.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnelarea.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnelarea.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_color.py new file mode 100644 index 00000000000..67b26f36875 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnelarea.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..bc5b83774f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnelarea.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_family.py new file mode 100644 index 00000000000..8545389bc18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnelarea.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..bfcfd9ec608 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="funnelarea.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_size.py new file mode 100644 index 00000000000..4595d7fecc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="funnelarea.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..48fb1144fbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnelarea.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/__init__.py index 2051767931c..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnelarea.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="funnelarea.insidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnelarea.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnelarea.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnelarea.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnelarea.insidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_color.py new file mode 100644 index 00000000000..28db2f4e9c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnelarea.insidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..ae04265c4d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnelarea.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_family.py new file mode 100644 index 00000000000..28004c6f101 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnelarea.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..00356617b48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnelarea.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_size.py new file mode 100644 index 00000000000..5a4d252854e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="funnelarea.insidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..51de4e8a8d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnelarea.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/marker/__init__.py index 2b991133ddc..1577e0e840b 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/__init__.py @@ -1,58 +1,18 @@ -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="funnelarea.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorssrc", parent_name="funnelarea.marker", **kwargs - ): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="colors", parent_name="funnelarea.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._colorssrc import ColorssrcValidator + from ._colors import ColorsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colors.ColorsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/_colors.py b/packages/python/plotly/plotly/validators/funnelarea/marker/_colors.py new file mode 100644 index 00000000000..9c70adbd970 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/_colors.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="colors", parent_name="funnelarea.marker", **kwargs): + super(ColorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/_colorssrc.py b/packages/python/plotly/plotly/validators/funnelarea/marker/_colorssrc.py new file mode 100644 index 00000000000..d14e324daa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/_colorssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorssrc", parent_name="funnelarea.marker", **kwargs + ): + super(ColorssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/_line.py b/packages/python/plotly/plotly/validators/funnelarea/marker/_line.py new file mode 100644 index 00000000000..25bd9107c50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/_line.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="funnelarea.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/line/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/marker/line/__init__.py index 4fc4e109159..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/line/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="funnelarea.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="funnelarea.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnelarea.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnelarea.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/line/_color.py b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_color.py new file mode 100644 index 00000000000..9985d0f3fe1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnelarea.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_colorsrc.py new file mode 100644 index 00000000000..f941edcab7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnelarea.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/line/_width.py b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_width.py new file mode 100644 index 00000000000..803016bb21d --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="funnelarea.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_widthsrc.py new file mode 100644 index 00000000000..c21b504fbc0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="funnelarea.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/stream/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/stream/__init__.py index 481157f79d6..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="funnelarea.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="funnelarea.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/funnelarea/stream/_maxpoints.py new file mode 100644 index 00000000000..0b5d2c1c9c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="funnelarea.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/stream/_token.py b/packages/python/plotly/plotly/validators/funnelarea/stream/_token.py new file mode 100644 index 00000000000..8fafb636323 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="funnelarea.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/__init__.py index 3dfe81fd499..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnelarea.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="funnelarea.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnelarea.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnelarea.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnelarea.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnelarea.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/_color.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/_color.py new file mode 100644 index 00000000000..9f02348ebd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnelarea.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/_colorsrc.py new file mode 100644 index 00000000000..d5eea67d904 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnelarea.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/_family.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/_family.py new file mode 100644 index 00000000000..6d8ef341702 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnelarea.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/_familysrc.py new file mode 100644 index 00000000000..141eddb76e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnelarea.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/_size.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/_size.py new file mode 100644 index 00000000000..ae6ab1e2d0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="funnelarea.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/funnelarea/textfont/_sizesrc.py new file mode 100644 index 00000000000..f36bacc09b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnelarea.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/title/__init__.py index 889a21af5ad..e46144d81ce 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/title/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/title/__init__.py @@ -1,77 +1,18 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="funnelarea.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="position", parent_name="funnelarea.title", **kwargs - ): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top left", "top center", "top right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="funnelarea.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._position import PositionValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._text.TextValidator", + "._position.PositionValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/_font.py b/packages/python/plotly/plotly/validators/funnelarea/title/_font.py new file mode 100644 index 00000000000..7a9c1148ca6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="funnelarea.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/_position.py b/packages/python/plotly/plotly/validators/funnelarea/title/_position.py new file mode 100644 index 00000000000..891a22c923f --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/_position.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="position", parent_name="funnelarea.title", **kwargs + ): + super(PositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top left", "top center", "top right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/_text.py b/packages/python/plotly/plotly/validators/funnelarea/title/_text.py new file mode 100644 index 00000000000..f1d37836c12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="funnelarea.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/__init__.py index 017ab277ee8..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="funnelarea.title.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="funnelarea.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="funnelarea.title.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="funnelarea.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="funnelarea.title.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="funnelarea.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/_color.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/_color.py new file mode 100644 index 00000000000..01aaa786944 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="funnelarea.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/_colorsrc.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/_colorsrc.py new file mode 100644 index 00000000000..e05687833d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="funnelarea.title.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/_family.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/_family.py new file mode 100644 index 00000000000..78b70a2da7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="funnelarea.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/_familysrc.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/_familysrc.py new file mode 100644 index 00000000000..2d3de526ecc --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="funnelarea.title.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/_size.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/_size.py new file mode 100644 index 00000000000..1a42d9db61c --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="funnelarea.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/funnelarea/title/font/_sizesrc.py b/packages/python/plotly/plotly/validators/funnelarea/title/font/_sizesrc.py new file mode 100644 index 00000000000..988da524c02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/funnelarea/title/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="funnelarea.title.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/__init__.py b/packages/python/plotly/plotly/validators/heatmap/__init__.py index c7449d17506..f7f251b7a48 100644 --- a/packages/python/plotly/plotly/validators/heatmap/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/__init__.py @@ -1,1120 +1,124 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="heatmap", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="zsmooth", parent_name="heatmap", **kwargs): - super(ZsmoothValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fast", "best", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="heatmap", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="heatmap", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="heatmap", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="zhoverformat", parent_name="heatmap", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="heatmap", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="heatmap", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ytype", parent_name="heatmap", **kwargs): - super(YtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="heatmap", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ygap", parent_name="heatmap", **kwargs): - super(YgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="heatmap", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="heatmap", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="heatmap", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="heatmap", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xtype", parent_name="heatmap", **kwargs): - super(XtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="heatmap", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xgap", parent_name="heatmap", **kwargs): - super(XgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="heatmap", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="heatmap", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="heatmap", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="heatmap", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="heatmap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="heatmap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="heatmap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="transpose", parent_name="heatmap", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="heatmap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="heatmap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="heatmap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="heatmap", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="heatmap", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="heatmap", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="heatmap", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="heatmap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="heatmap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="heatmap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="heatmap", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="heatmap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="heatmap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="heatmap", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="hovertext", parent_name="heatmap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="heatmap", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="heatmap", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverongapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="hoverongaps", parent_name="heatmap", **kwargs): - super(HoverongapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="heatmap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="heatmap", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="heatmap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="heatmap", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="heatmap", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="heatmap", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="heatmap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="heatmap", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="heatmap", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="heatmap", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmap.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmap.colorbar.T - itle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - heatmap.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - heatmap.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="heatmap", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="heatmap", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zsmooth import ZsmoothValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zhoverformat import ZhoverformatValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._ytype import YtypeValidator + from ._ysrc import YsrcValidator + from ._ygap import YgapValidator + from ._ycalendar import YcalendarValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xtype import XtypeValidator + from ._xsrc import XsrcValidator + from ._xgap import XgapValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._transpose import TransposeValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverongaps import HoverongapsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zsmooth.ZsmoothValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ytype.YtypeValidator", + "._ysrc.YsrcValidator", + "._ygap.YgapValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xtype.XtypeValidator", + "._xsrc.XsrcValidator", + "._xgap.XgapValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverongaps.HoverongapsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_autocolorscale.py b/packages/python/plotly/plotly/validators/heatmap/_autocolorscale.py new file mode 100644 index 00000000000..71dd7f53a89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="heatmap", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_coloraxis.py b/packages/python/plotly/plotly/validators/heatmap/_coloraxis.py new file mode 100644 index 00000000000..fe0fb177de0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="heatmap", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_colorbar.py b/packages/python/plotly/plotly/validators/heatmap/_colorbar.py new file mode 100644 index 00000000000..6f617a4e5a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="heatmap", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmap + .colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.heatmap.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of heatmap.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmap.colorbar.T + itle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + heatmap.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + heatmap.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_colorscale.py b/packages/python/plotly/plotly/validators/heatmap/_colorscale.py new file mode 100644 index 00000000000..3a664a2c576 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="heatmap", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_connectgaps.py b/packages/python/plotly/plotly/validators/heatmap/_connectgaps.py new file mode 100644 index 00000000000..a2480e630f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="heatmap", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_customdata.py b/packages/python/plotly/plotly/validators/heatmap/_customdata.py new file mode 100644 index 00000000000..40e2b1d0a5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="heatmap", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_customdatasrc.py b/packages/python/plotly/plotly/validators/heatmap/_customdatasrc.py new file mode 100644 index 00000000000..afb3a09f576 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="heatmap", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_dx.py b/packages/python/plotly/plotly/validators/heatmap/_dx.py new file mode 100644 index 00000000000..27b4975d3aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_dx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="heatmap", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_dy.py b/packages/python/plotly/plotly/validators/heatmap/_dy.py new file mode 100644 index 00000000000..98215c16c76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_dy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="heatmap", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hoverinfo.py b/packages/python/plotly/plotly/validators/heatmap/_hoverinfo.py new file mode 100644 index 00000000000..8813c0aa647 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="heatmap", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/heatmap/_hoverinfosrc.py new file mode 100644 index 00000000000..c3b436263bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="heatmap", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hoverlabel.py b/packages/python/plotly/plotly/validators/heatmap/_hoverlabel.py new file mode 100644 index 00000000000..a6ab3be3c93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="heatmap", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hoverongaps.py b/packages/python/plotly/plotly/validators/heatmap/_hoverongaps.py new file mode 100644 index 00000000000..694521a4e03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hoverongaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverongapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="hoverongaps", parent_name="heatmap", **kwargs): + super(HoverongapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hovertemplate.py b/packages/python/plotly/plotly/validators/heatmap/_hovertemplate.py new file mode 100644 index 00000000000..b78c1fcc015 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="heatmap", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/heatmap/_hovertemplatesrc.py new file mode 100644 index 00000000000..447d1c2caa6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="heatmap", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hovertext.py b/packages/python/plotly/plotly/validators/heatmap/_hovertext.py new file mode 100644 index 00000000000..d3ca8f04aab --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hovertext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="hovertext", parent_name="heatmap", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_hovertextsrc.py b/packages/python/plotly/plotly/validators/heatmap/_hovertextsrc.py new file mode 100644 index 00000000000..b606b673916 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="heatmap", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_ids.py b/packages/python/plotly/plotly/validators/heatmap/_ids.py new file mode 100644 index 00000000000..9de5f9b2b59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="heatmap", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_idssrc.py b/packages/python/plotly/plotly/validators/heatmap/_idssrc.py new file mode 100644 index 00000000000..a191d4fe362 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="heatmap", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_legendgroup.py b/packages/python/plotly/plotly/validators/heatmap/_legendgroup.py new file mode 100644 index 00000000000..f52f8668b21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="heatmap", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_meta.py b/packages/python/plotly/plotly/validators/heatmap/_meta.py new file mode 100644 index 00000000000..9a32fd34389 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="heatmap", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_metasrc.py b/packages/python/plotly/plotly/validators/heatmap/_metasrc.py new file mode 100644 index 00000000000..fdde50bf022 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="heatmap", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_name.py b/packages/python/plotly/plotly/validators/heatmap/_name.py new file mode 100644 index 00000000000..0de2de6c755 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="heatmap", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_opacity.py b/packages/python/plotly/plotly/validators/heatmap/_opacity.py new file mode 100644 index 00000000000..b50791d91a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="heatmap", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_reversescale.py b/packages/python/plotly/plotly/validators/heatmap/_reversescale.py new file mode 100644 index 00000000000..b0a837189f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="heatmap", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_showlegend.py b/packages/python/plotly/plotly/validators/heatmap/_showlegend.py new file mode 100644 index 00000000000..e29f8f1597b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="heatmap", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_showscale.py b/packages/python/plotly/plotly/validators/heatmap/_showscale.py new file mode 100644 index 00000000000..64df38c7657 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="heatmap", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_stream.py b/packages/python/plotly/plotly/validators/heatmap/_stream.py new file mode 100644 index 00000000000..3cef1614d44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="heatmap", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_text.py b/packages/python/plotly/plotly/validators/heatmap/_text.py new file mode 100644 index 00000000000..5746b4644c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="heatmap", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_textsrc.py b/packages/python/plotly/plotly/validators/heatmap/_textsrc.py new file mode 100644 index 00000000000..e147fad3c35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="heatmap", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_transpose.py b/packages/python/plotly/plotly/validators/heatmap/_transpose.py new file mode 100644 index 00000000000..5720252a267 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_transpose.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="transpose", parent_name="heatmap", **kwargs): + super(TransposeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_uid.py b/packages/python/plotly/plotly/validators/heatmap/_uid.py new file mode 100644 index 00000000000..41f58b73c9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="heatmap", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_uirevision.py b/packages/python/plotly/plotly/validators/heatmap/_uirevision.py new file mode 100644 index 00000000000..4ea7eb18d0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="heatmap", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_visible.py b/packages/python/plotly/plotly/validators/heatmap/_visible.py new file mode 100644 index 00000000000..dfe77b9aba0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="heatmap", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_x.py b/packages/python/plotly/plotly/validators/heatmap/_x.py new file mode 100644 index 00000000000..44b1bc1c6c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_x.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="heatmap", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_x0.py b/packages/python/plotly/plotly/validators/heatmap/_x0.py new file mode 100644 index 00000000000..1cd435b1c0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_x0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="heatmap", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_xaxis.py b/packages/python/plotly/plotly/validators/heatmap/_xaxis.py new file mode 100644 index 00000000000..7e359153c19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="heatmap", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_xcalendar.py b/packages/python/plotly/plotly/validators/heatmap/_xcalendar.py new file mode 100644 index 00000000000..0de002ec44e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="heatmap", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_xgap.py b/packages/python/plotly/plotly/validators/heatmap/_xgap.py new file mode 100644 index 00000000000..6e9486b2254 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_xgap.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xgap", parent_name="heatmap", **kwargs): + super(XgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_xsrc.py b/packages/python/plotly/plotly/validators/heatmap/_xsrc.py new file mode 100644 index 00000000000..0eb47e7d276 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="heatmap", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_xtype.py b/packages/python/plotly/plotly/validators/heatmap/_xtype.py new file mode 100644 index 00000000000..0968ba364f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_xtype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xtype", parent_name="heatmap", **kwargs): + super(XtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_y.py b/packages/python/plotly/plotly/validators/heatmap/_y.py new file mode 100644 index 00000000000..2e6853bd4f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_y.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="heatmap", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_y0.py b/packages/python/plotly/plotly/validators/heatmap/_y0.py new file mode 100644 index 00000000000..8312c47ef02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_y0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="heatmap", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_yaxis.py b/packages/python/plotly/plotly/validators/heatmap/_yaxis.py new file mode 100644 index 00000000000..805592cdd24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="heatmap", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_ycalendar.py b/packages/python/plotly/plotly/validators/heatmap/_ycalendar.py new file mode 100644 index 00000000000..d7cb0ebf46e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="heatmap", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_ygap.py b/packages/python/plotly/plotly/validators/heatmap/_ygap.py new file mode 100644 index 00000000000..8fddc22a982 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_ygap.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ygap", parent_name="heatmap", **kwargs): + super(YgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_ysrc.py b/packages/python/plotly/plotly/validators/heatmap/_ysrc.py new file mode 100644 index 00000000000..61d8d6438bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="heatmap", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_ytype.py b/packages/python/plotly/plotly/validators/heatmap/_ytype.py new file mode 100644 index 00000000000..e684ea1a073 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_ytype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ytype", parent_name="heatmap", **kwargs): + super(YtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_z.py b/packages/python/plotly/plotly/validators/heatmap/_z.py new file mode 100644 index 00000000000..751e0d6f6e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="heatmap", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zauto.py b/packages/python/plotly/plotly/validators/heatmap/_zauto.py new file mode 100644 index 00000000000..aeb64dee4c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="heatmap", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zhoverformat.py b/packages/python/plotly/plotly/validators/heatmap/_zhoverformat.py new file mode 100644 index 00000000000..4fd03c38937 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zhoverformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="zhoverformat", parent_name="heatmap", **kwargs): + super(ZhoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zmax.py b/packages/python/plotly/plotly/validators/heatmap/_zmax.py new file mode 100644 index 00000000000..2fff4f9229e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="heatmap", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zmid.py b/packages/python/plotly/plotly/validators/heatmap/_zmid.py new file mode 100644 index 00000000000..3e3e864f94a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="heatmap", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zmin.py b/packages/python/plotly/plotly/validators/heatmap/_zmin.py new file mode 100644 index 00000000000..a605d2b60c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="heatmap", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zsmooth.py b/packages/python/plotly/plotly/validators/heatmap/_zsmooth.py new file mode 100644 index 00000000000..b027c915422 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zsmooth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="zsmooth", parent_name="heatmap", **kwargs): + super(ZsmoothValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fast", "best", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/_zsrc.py b/packages/python/plotly/plotly/validators/heatmap/_zsrc.py new file mode 100644 index 00000000000..5638be3234e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="heatmap", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/__init__.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/__init__.py index bdfcafb2fa2..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/heatmap/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/__init__.py @@ -1,738 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="heatmap.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="heatmap.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="heatmap.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="heatmap.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="heatmap.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="heatmap.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="heatmap.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="heatmap.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="heatmap.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="heatmap.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="heatmap.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="heatmap.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="heatmap.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="heatmap.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="heatmap.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="heatmap.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="heatmap.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="heatmap.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="heatmap.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="heatmap.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="heatmap.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="heatmap.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="heatmap.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="heatmap.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="heatmap.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="heatmap.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="heatmap.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="heatmap.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="heatmap.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="heatmap.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="heatmap.colorbar", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="heatmap.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="heatmap.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="heatmap.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="heatmap.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="heatmap.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="heatmap.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="heatmap.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="heatmap.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="heatmap.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="heatmap.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_bgcolor.py new file mode 100644 index 00000000000..326ba33fe95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="heatmap.colorbar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_bordercolor.py new file mode 100644 index 00000000000..fca79bb1b1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="heatmap.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_borderwidth.py new file mode 100644 index 00000000000..9ef0274a10f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="heatmap.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_dtick.py new file mode 100644 index 00000000000..7257977e235 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="heatmap.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_exponentformat.py new file mode 100644 index 00000000000..511c468ffdb --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="heatmap.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_len.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_len.py new file mode 100644 index 00000000000..6ed4427963b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="heatmap.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_lenmode.py new file mode 100644 index 00000000000..c09079394d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="heatmap.colorbar", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_nticks.py new file mode 100644 index 00000000000..7f14d51aef3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="heatmap.colorbar", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..626971c71a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="heatmap.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..60842424935 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="heatmap.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_separatethousands.py new file mode 100644 index 00000000000..052a1e1b2e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="heatmap.colorbar", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showexponent.py new file mode 100644 index 00000000000..df72d8d9e96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="heatmap.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showticklabels.py new file mode 100644 index 00000000000..224331f724a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="heatmap.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..eb77e0c94d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="heatmap.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..0f48994a169 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="heatmap.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_thickness.py new file mode 100644 index 00000000000..af5c95c77e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="heatmap.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..1fcaa0f4d1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="heatmap.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tick0.py new file mode 100644 index 00000000000..4dc008996a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="heatmap.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickangle.py new file mode 100644 index 00000000000..3626516c882 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="heatmap.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickcolor.py new file mode 100644 index 00000000000..5686e7eb971 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="heatmap.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickfont.py new file mode 100644 index 00000000000..cac03fadd46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="heatmap.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformat.py new file mode 100644 index 00000000000..12637c834aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="heatmap.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..c3a6d4d9905 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="heatmap.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..04cb1e2e621 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="heatmap.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticklen.py new file mode 100644 index 00000000000..d80fea1ab49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="heatmap.colorbar", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickmode.py new file mode 100644 index 00000000000..a9954e596e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="heatmap.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickprefix.py new file mode 100644 index 00000000000..f83d7dc1ad1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="heatmap.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticks.py new file mode 100644 index 00000000000..ee874bc775e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="heatmap.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..d5592012269 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="heatmap.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticktext.py new file mode 100644 index 00000000000..390834c3448 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="heatmap.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..7eb5c825cfa --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="heatmap.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickvals.py new file mode 100644 index 00000000000..8efe577e4da --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="heatmap.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..05c7e1d936e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="heatmap.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickwidth.py new file mode 100644 index 00000000000..0eae3bd579b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="heatmap.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_title.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_title.py new file mode 100644 index 00000000000..6882c296b97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="heatmap.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_x.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_x.py new file mode 100644 index 00000000000..c2ce4b6e971 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="heatmap.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_xanchor.py new file mode 100644 index 00000000000..90c767d3b5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="heatmap.colorbar", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_xpad.py new file mode 100644 index 00000000000..1202db4ba35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="heatmap.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_y.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_y.py new file mode 100644 index 00000000000..9866f40b6c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="heatmap.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_yanchor.py new file mode 100644 index 00000000000..4f2cec823e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="heatmap.colorbar", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ypad.py new file mode 100644 index 00000000000..719ce0fd09b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="heatmap.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/__init__.py index 703d7c151a0..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="heatmap.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="heatmap.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="heatmap.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..a60501ca58d --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="heatmap.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..1ca9d8917f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="heatmap.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..7a7b93763d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="heatmap.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py index 6e3878c62d9..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="heatmap.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="heatmap.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="heatmap.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="heatmap.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="heatmap.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..6d433020f71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="heatmap.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a7d986a1534 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="heatmap.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..eb4bbcd2e5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="heatmap.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..15250c90f73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="heatmap.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..3c942d0f92f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="heatmap.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/__init__.py index 7911714e7f8..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="heatmap.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="heatmap.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="heatmap.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_font.py new file mode 100644 index 00000000000..573d071d9cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="heatmap.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_side.py new file mode 100644 index 00000000000..be66e8dc30d --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="heatmap.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_text.py new file mode 100644 index 00000000000..d2939e0d51a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="heatmap.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/__init__.py index eea748ca2c2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="heatmap.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="heatmap.colorbar.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="heatmap.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_color.py new file mode 100644 index 00000000000..b487048b01d --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="heatmap.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_family.py new file mode 100644 index 00000000000..751e7f861a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="heatmap.colorbar.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_size.py new file mode 100644 index 00000000000..72a94874747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="heatmap.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/__init__.py index 3184eccdf3a..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="heatmap.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="heatmap.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="heatmap.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="heatmap.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="heatmap.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="heatmap.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="heatmap.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="heatmap.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="heatmap.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_align.py new file mode 100644 index 00000000000..88a4f8a8fe7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="heatmap.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..48d20fc8d77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="heatmap.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..5f7f29e6d52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="heatmap.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..07968027522 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="heatmap.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..06f011a6723 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="heatmap.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..b346781f6be --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="heatmap.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_font.py new file mode 100644 index 00000000000..54a779f69da --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="heatmap.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f7bc4f2af65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="heatmap.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..ca2bd0e7b5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="heatmap.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/__init__.py index 23d9f9d65c5..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="heatmap.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="heatmap.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="heatmap.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="heatmap.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="heatmap.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="heatmap.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_color.py new file mode 100644 index 00000000000..402134d3ee8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="heatmap.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..3e9a40dc46c --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="heatmap.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_family.py new file mode 100644 index 00000000000..976ee2d8bc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="heatmap.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..0c57c0fc0f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="heatmap.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_size.py new file mode 100644 index 00000000000..964335a38a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="heatmap.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..697ab2361ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="heatmap.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/stream/__init__.py b/packages/python/plotly/plotly/validators/heatmap/stream/__init__.py index e1a56db263f..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/heatmap/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmap/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="heatmap.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="heatmap.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/heatmap/stream/_maxpoints.py new file mode 100644 index 00000000000..9511c4ce22f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="heatmap.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmap/stream/_token.py b/packages/python/plotly/plotly/validators/heatmap/stream/_token.py new file mode 100644 index 00000000000..000f59a7069 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmap/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="heatmap.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/__init__.py index 8596d07c506..47c7037349a 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/__init__.py @@ -1,878 +1,96 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="heatmapgl", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="heatmapgl", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="heatmapgl", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="heatmapgl", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="heatmapgl", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="heatmapgl", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ytype", parent_name="heatmapgl", **kwargs): - super(YtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="heatmapgl", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="heatmapgl", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="heatmapgl", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="heatmapgl", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xtype", parent_name="heatmapgl", **kwargs): - super(XtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["array", "scaled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="heatmapgl", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="heatmapgl", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="heatmapgl", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="heatmapgl", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="heatmapgl", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="heatmapgl", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="heatmapgl", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="transpose", parent_name="heatmapgl", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="heatmapgl", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="heatmapgl", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="heatmapgl", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="heatmapgl", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="heatmapgl", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="heatmapgl", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="heatmapgl", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="heatmapgl", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="heatmapgl", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="heatmapgl", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="heatmapgl", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="heatmapgl", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="heatmapgl", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="heatmapgl", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="heatmapgl", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="heatmapgl", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="heatmapgl", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="heatmapgl", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="heatmapgl", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="heatmapgl", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap - gl.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmapgl.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmapgl.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmapgl.colorbar - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - heatmapgl.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - heatmapgl.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="heatmapgl", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="heatmapgl", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._ytype import YtypeValidator + from ._ysrc import YsrcValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xtype import XtypeValidator + from ._xsrc import XsrcValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._transpose import TransposeValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ytype.YtypeValidator", + "._ysrc.YsrcValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xtype.XtypeValidator", + "._xsrc.XsrcValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_autocolorscale.py b/packages/python/plotly/plotly/validators/heatmapgl/_autocolorscale.py new file mode 100644 index 00000000000..dfc9aef7cba --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="heatmapgl", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_coloraxis.py b/packages/python/plotly/plotly/validators/heatmapgl/_coloraxis.py new file mode 100644 index 00000000000..aa9553092de --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="heatmapgl", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_colorbar.py b/packages/python/plotly/plotly/validators/heatmapgl/_colorbar.py new file mode 100644 index 00000000000..d7c826788dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="heatmapgl", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.heatmap + gl.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.heatmapgl.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of heatmapgl.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.heatmapgl.colorbar + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + heatmapgl.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + heatmapgl.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_colorscale.py b/packages/python/plotly/plotly/validators/heatmapgl/_colorscale.py new file mode 100644 index 00000000000..858ab3e921c --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="heatmapgl", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_customdata.py b/packages/python/plotly/plotly/validators/heatmapgl/_customdata.py new file mode 100644 index 00000000000..b16d3d3d5bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="heatmapgl", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_customdatasrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_customdatasrc.py new file mode 100644 index 00000000000..ffc09ce2acd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="heatmapgl", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_dx.py b/packages/python/plotly/plotly/validators/heatmapgl/_dx.py new file mode 100644 index 00000000000..61a4436aec8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_dx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="heatmapgl", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_dy.py b/packages/python/plotly/plotly/validators/heatmapgl/_dy.py new file mode 100644 index 00000000000..6e39b405a04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_dy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="heatmapgl", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_hoverinfo.py b/packages/python/plotly/plotly/validators/heatmapgl/_hoverinfo.py new file mode 100644 index 00000000000..70f8c465841 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="heatmapgl", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_hoverinfosrc.py new file mode 100644 index 00000000000..d23c80fec1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="heatmapgl", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_hoverlabel.py b/packages/python/plotly/plotly/validators/heatmapgl/_hoverlabel.py new file mode 100644 index 00000000000..7b302040f5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="heatmapgl", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_ids.py b/packages/python/plotly/plotly/validators/heatmapgl/_ids.py new file mode 100644 index 00000000000..54e9e024d9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="heatmapgl", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_idssrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_idssrc.py new file mode 100644 index 00000000000..46d806eaebd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="heatmapgl", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_meta.py b/packages/python/plotly/plotly/validators/heatmapgl/_meta.py new file mode 100644 index 00000000000..a579e277af5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="heatmapgl", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_metasrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_metasrc.py new file mode 100644 index 00000000000..46a30a0c962 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="heatmapgl", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_name.py b/packages/python/plotly/plotly/validators/heatmapgl/_name.py new file mode 100644 index 00000000000..59507c9a08a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="heatmapgl", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_opacity.py b/packages/python/plotly/plotly/validators/heatmapgl/_opacity.py new file mode 100644 index 00000000000..86a1e2f3aa3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="heatmapgl", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_reversescale.py b/packages/python/plotly/plotly/validators/heatmapgl/_reversescale.py new file mode 100644 index 00000000000..50e4a017478 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="heatmapgl", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_showscale.py b/packages/python/plotly/plotly/validators/heatmapgl/_showscale.py new file mode 100644 index 00000000000..e0340999a9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="heatmapgl", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_stream.py b/packages/python/plotly/plotly/validators/heatmapgl/_stream.py new file mode 100644 index 00000000000..17210633f40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="heatmapgl", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_text.py b/packages/python/plotly/plotly/validators/heatmapgl/_text.py new file mode 100644 index 00000000000..416859ee6f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="heatmapgl", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_textsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_textsrc.py new file mode 100644 index 00000000000..215f5c28e4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="heatmapgl", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_transpose.py b/packages/python/plotly/plotly/validators/heatmapgl/_transpose.py new file mode 100644 index 00000000000..3b29d4f18a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_transpose.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="transpose", parent_name="heatmapgl", **kwargs): + super(TransposeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_uid.py b/packages/python/plotly/plotly/validators/heatmapgl/_uid.py new file mode 100644 index 00000000000..1e23049cb77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="heatmapgl", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_uirevision.py b/packages/python/plotly/plotly/validators/heatmapgl/_uirevision.py new file mode 100644 index 00000000000..db326c78639 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="heatmapgl", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_visible.py b/packages/python/plotly/plotly/validators/heatmapgl/_visible.py new file mode 100644 index 00000000000..450e9315266 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="heatmapgl", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_x.py b/packages/python/plotly/plotly/validators/heatmapgl/_x.py new file mode 100644 index 00000000000..70c7c831119 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_x.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="heatmapgl", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_x0.py b/packages/python/plotly/plotly/validators/heatmapgl/_x0.py new file mode 100644 index 00000000000..c3b9740c22b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_x0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="heatmapgl", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_xaxis.py b/packages/python/plotly/plotly/validators/heatmapgl/_xaxis.py new file mode 100644 index 00000000000..47149a69899 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="heatmapgl", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_xsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_xsrc.py new file mode 100644 index 00000000000..f7f390d5380 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="heatmapgl", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_xtype.py b/packages/python/plotly/plotly/validators/heatmapgl/_xtype.py new file mode 100644 index 00000000000..d5b902ff655 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_xtype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xtype", parent_name="heatmapgl", **kwargs): + super(XtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_y.py b/packages/python/plotly/plotly/validators/heatmapgl/_y.py new file mode 100644 index 00000000000..04fa76e9168 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_y.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="heatmapgl", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_y0.py b/packages/python/plotly/plotly/validators/heatmapgl/_y0.py new file mode 100644 index 00000000000..14964b2688f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_y0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="heatmapgl", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_yaxis.py b/packages/python/plotly/plotly/validators/heatmapgl/_yaxis.py new file mode 100644 index 00000000000..e059b8cba17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="heatmapgl", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_ysrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_ysrc.py new file mode 100644 index 00000000000..1c7fa150102 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="heatmapgl", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_ytype.py b/packages/python/plotly/plotly/validators/heatmapgl/_ytype.py new file mode 100644 index 00000000000..ac148b93189 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_ytype.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ytype", parent_name="heatmapgl", **kwargs): + super(YtypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["array", "scaled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_z.py b/packages/python/plotly/plotly/validators/heatmapgl/_z.py new file mode 100644 index 00000000000..775747785b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="heatmapgl", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_zauto.py b/packages/python/plotly/plotly/validators/heatmapgl/_zauto.py new file mode 100644 index 00000000000..0ec5dd65bd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="heatmapgl", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_zmax.py b/packages/python/plotly/plotly/validators/heatmapgl/_zmax.py new file mode 100644 index 00000000000..43ba2680b7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="heatmapgl", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_zmid.py b/packages/python/plotly/plotly/validators/heatmapgl/_zmid.py new file mode 100644 index 00000000000..c84faee7b67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="heatmapgl", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_zmin.py b/packages/python/plotly/plotly/validators/heatmapgl/_zmin.py new file mode 100644 index 00000000000..4435191a7fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="heatmapgl", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/_zsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/_zsrc.py new file mode 100644 index 00000000000..f8cbaefac25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="heatmapgl", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/__init__.py index 71e87cbfd5c..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/__init__.py @@ -1,753 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="heatmapgl.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="heatmapgl.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="heatmapgl.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="heatmapgl.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="heatmapgl.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="heatmapgl.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="heatmapgl.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="heatmapgl.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="heatmapgl.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="heatmapgl.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="heatmapgl.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="heatmapgl.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="heatmapgl.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="heatmapgl.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="heatmapgl.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="heatmapgl.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="heatmapgl.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="heatmapgl.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="heatmapgl.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="heatmapgl.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="heatmapgl.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="heatmapgl.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_bgcolor.py new file mode 100644 index 00000000000..0de77317190 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="heatmapgl.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_bordercolor.py new file mode 100644 index 00000000000..6848b14952e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="heatmapgl.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_borderwidth.py new file mode 100644 index 00000000000..e832c113487 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="heatmapgl.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_dtick.py new file mode 100644 index 00000000000..cb364e36666 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="heatmapgl.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_exponentformat.py new file mode 100644 index 00000000000..953f43f6f1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_len.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_len.py new file mode 100644 index 00000000000..ef8a042f09c --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="heatmapgl.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_lenmode.py new file mode 100644 index 00000000000..77a8536c2fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="heatmapgl.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_nticks.py new file mode 100644 index 00000000000..03a1be9c705 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="heatmapgl.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..d37bce196d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="heatmapgl.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..3a4ae188c02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="heatmapgl.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_separatethousands.py new file mode 100644 index 00000000000..9bcfbe00c73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="heatmapgl.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showexponent.py new file mode 100644 index 00000000000..d26825ad0ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showticklabels.py new file mode 100644 index 00000000000..53b41c5da08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..9e20963b30a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..592017a7684 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_thickness.py new file mode 100644 index 00000000000..b5af33e7831 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..97b1aa47b08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="heatmapgl.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tick0.py new file mode 100644 index 00000000000..d2eac87eaee --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="heatmapgl.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickangle.py new file mode 100644 index 00000000000..1e6887ef617 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickcolor.py new file mode 100644 index 00000000000..d18a63f8549 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickfont.py new file mode 100644 index 00000000000..4f8f8384e11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformat.py new file mode 100644 index 00000000000..7ee78cd8bd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..e4307b24ed3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="heatmapgl.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..b8fa49a66f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticklen.py new file mode 100644 index 00000000000..c5302d917c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickmode.py new file mode 100644 index 00000000000..b0c6a380bef --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickprefix.py new file mode 100644 index 00000000000..71a9ab93080 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticks.py new file mode 100644 index 00000000000..b2ecda3efc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="heatmapgl.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..777243006bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticktext.py new file mode 100644 index 00000000000..29f4b921eba --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..1112fca9e56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickvals.py new file mode 100644 index 00000000000..d27d8539862 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..4f55ac11cc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickwidth.py new file mode 100644 index 00000000000..58b4eca2b48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="heatmapgl.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_title.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_title.py new file mode 100644 index 00000000000..bf90cf9fb54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="heatmapgl.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_x.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_x.py new file mode 100644 index 00000000000..837e0cdc39a --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="heatmapgl.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_xanchor.py new file mode 100644 index 00000000000..508385e8d97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="heatmapgl.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_xpad.py new file mode 100644 index 00000000000..f62cbe04885 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="heatmapgl.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_y.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_y.py new file mode 100644 index 00000000000..daaa2a9f5cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="heatmapgl.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_yanchor.py new file mode 100644 index 00000000000..d5ddae6eaf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="heatmapgl.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ypad.py new file mode 100644 index 00000000000..bb5627fe126 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="heatmapgl.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/__init__.py index f1714b87119..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="heatmapgl.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="heatmapgl.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="heatmapgl.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..242bcbb8670 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="heatmapgl.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..a463d451f18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="heatmapgl.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..9373d5ae263 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="heatmapgl.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/__init__.py index 282402fb1d2..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="heatmapgl.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="heatmapgl.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="heatmapgl.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="heatmapgl.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="heatmapgl.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..b981cfdee64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="heatmapgl.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a356e8cff3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="heatmapgl.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..cfd526ec4e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="heatmapgl.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..c3287fd5dc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="heatmapgl.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..35da20abf05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="heatmapgl.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/__init__.py index b3a60adb52c..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="heatmapgl.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="heatmapgl.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="heatmapgl.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_font.py new file mode 100644 index 00000000000..c79e2c5920f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="heatmapgl.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_side.py new file mode 100644 index 00000000000..7a956ae5b4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="heatmapgl.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_text.py new file mode 100644 index 00000000000..f59db8c1d8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="heatmapgl.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/__init__.py index 339c347a1a1..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="heatmapgl.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="heatmapgl.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="heatmapgl.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_color.py new file mode 100644 index 00000000000..d8396ce53c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="heatmapgl.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_family.py new file mode 100644 index 00000000000..ae7df34cdf2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="heatmapgl.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_size.py new file mode 100644 index 00000000000..97473187abc --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="heatmapgl.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/__init__.py index 46338a8d3fa..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/__init__.py @@ -1,182 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="heatmapgl.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_align.py new file mode 100644 index 00000000000..ca5ea6d445b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..42e93bedd38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..98ba9b1c499 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..a09d07223b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..68eb44bdcb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..38ee09a6f8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_font.py new file mode 100644 index 00000000000..6d64b412390 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_namelength.py new file mode 100644 index 00000000000..fdd9d616daa --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..9ba10f699e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="heatmapgl.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/__init__.py index 4e6feb2f004..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="heatmapgl.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="heatmapgl.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="heatmapgl.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="heatmapgl.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="heatmapgl.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="heatmapgl.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_color.py new file mode 100644 index 00000000000..71d57848dff --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="heatmapgl.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..22b1eae3e57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="heatmapgl.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_family.py new file mode 100644 index 00000000000..f00c62b444e --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="heatmapgl.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..8b498b35bcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="heatmapgl.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_size.py new file mode 100644 index 00000000000..168026b4b18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="heatmapgl.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..f673903a705 --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="heatmapgl.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/stream/__init__.py b/packages/python/plotly/plotly/validators/heatmapgl/stream/__init__.py index 2c1843175f1..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/heatmapgl/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/heatmapgl/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="heatmapgl.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="heatmapgl.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/heatmapgl/stream/_maxpoints.py new file mode 100644 index 00000000000..f8774dd8d4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="heatmapgl.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/heatmapgl/stream/_token.py b/packages/python/plotly/plotly/validators/heatmapgl/stream/_token.py new file mode 100644 index 00000000000..b863616a21f --- /dev/null +++ b/packages/python/plotly/plotly/validators/heatmapgl/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="heatmapgl.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/__init__.py b/packages/python/plotly/plotly/validators/histogram/__init__.py index 02fe1c3afd2..b673cf3b1e9 100644 --- a/packages/python/plotly/plotly/validators/histogram/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/__init__.py @@ -1,1184 +1,112 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="histogram", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="histogram", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YBinsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="ybins", parent_name="histogram", **kwargs): - super(YBinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "YBins"), - data_docs=kwargs.pop( - "data_docs", - """ - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="histogram", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="histogram", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="histogram", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="histogram", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XBinsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="xbins", parent_name="histogram", **kwargs): - super(XBinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "XBins"), - data_docs=kwargs.pop( - "data_docs", - """ - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="histogram", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="histogram", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="histogram", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="histogram", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.histogram.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.unselect - ed.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="histogram", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="histogram", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="histogram", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="histogram", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="histogram", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="histogram", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="histogram", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="histogram", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.histogram.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.selected - .Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="histogram", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="histogram", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="offsetgroup", parent_name="histogram", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nbinsy", parent_name="histogram", **kwargs): - super(NbinsyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nbinsx", parent_name="histogram", **kwargs): - super(NbinsxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="histogram", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="histogram", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="histogram", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="histogram", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.histogram.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="histogram", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="histogram", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="histogram", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="histogram", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="histogram", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="histogram", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="histogram", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="histogram", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="histogram", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="histogram", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="histnorm", parent_name="histogram", **kwargs): - super(HistnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - ["", "percent", "probability", "density", "probability density"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="histfunc", parent_name="histogram", **kwargs): - super(HistfuncValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorYValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_y", parent_name="histogram", **kwargs): - super(ErrorYValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorY"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorXValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_x", parent_name="histogram", **kwargs): - super(ErrorXValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorX"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="histogram", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="histogram", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CumulativeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="cumulative", parent_name="histogram", **kwargs): - super(CumulativeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Cumulative"), - data_docs=kwargs.pop( - "data_docs", - """ - currentbin - Only applies if cumulative is enabled. Sets - whether the current bin is included, excluded, - or has half of its value included in the - current cumulative value. "include" is the - default for compatibility with various other - tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half- - bin bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If - "increasing" (default) we sum all prior bins, - so the result increases from left to right. If - "decreasing" we sum later bins so the result - decreases from left to right. - enabled - If true, display the cumulative distribution by - summing the binned values. Use the `direction` - and `centralbin` attributes to tune the - accumulation method. Note: in this mode, the - "density" `histnorm` settings behave the same - as their equivalents without "density": "" and - "density" both rise to the number of data - points, and "probability" and *probability - density* both rise to the number of sample - points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="bingroup", parent_name="histogram", **kwargs): - super(BingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autobiny", parent_name="histogram", **kwargs): - super(AutobinyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autobinx", parent_name="histogram", **kwargs): - super(AutobinxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="alignmentgroup", parent_name="histogram", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._ybins import YbinsValidator + from ._yaxis import YaxisValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xbins import XbinsValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._offsetgroup import OffsetgroupValidator + from ._nbinsy import NbinsyValidator + from ._nbinsx import NbinsxValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._histnorm import HistnormValidator + from ._histfunc import HistfuncValidator + from ._error_y import Error_YValidator + from ._error_x import Error_XValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._cumulative import CumulativeValidator + from ._bingroup import BingroupValidator + from ._autobiny import AutobinyValidator + from ._autobinx import AutobinxValidator + from ._alignmentgroup import AlignmentgroupValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._ybins.YbinsValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xbins.XbinsValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._nbinsy.NbinsyValidator", + "._nbinsx.NbinsxValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._histnorm.HistnormValidator", + "._histfunc.HistfuncValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._cumulative.CumulativeValidator", + "._bingroup.BingroupValidator", + "._autobiny.AutobinyValidator", + "._autobinx.AutobinxValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_alignmentgroup.py b/packages/python/plotly/plotly/validators/histogram/_alignmentgroup.py new file mode 100644 index 00000000000..1fba90141ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_alignmentgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="alignmentgroup", parent_name="histogram", **kwargs): + super(AlignmentgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_autobinx.py b/packages/python/plotly/plotly/validators/histogram/_autobinx.py new file mode 100644 index 00000000000..3cb35bd082e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_autobinx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autobinx", parent_name="histogram", **kwargs): + super(AutobinxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_autobiny.py b/packages/python/plotly/plotly/validators/histogram/_autobiny.py new file mode 100644 index 00000000000..5c114509b64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_autobiny.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autobiny", parent_name="histogram", **kwargs): + super(AutobinyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_bingroup.py b/packages/python/plotly/plotly/validators/histogram/_bingroup.py new file mode 100644 index 00000000000..33fb5ece7cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_bingroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="bingroup", parent_name="histogram", **kwargs): + super(BingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_cumulative.py b/packages/python/plotly/plotly/validators/histogram/_cumulative.py new file mode 100644 index 00000000000..f1a86eb6c40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_cumulative.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class CumulativeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="cumulative", parent_name="histogram", **kwargs): + super(CumulativeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Cumulative"), + data_docs=kwargs.pop( + "data_docs", + """ + currentbin + Only applies if cumulative is enabled. Sets + whether the current bin is included, excluded, + or has half of its value included in the + current cumulative value. "include" is the + default for compatibility with various other + tools, however it introduces a half-bin bias to + the results. "exclude" makes the opposite half- + bin bias, and "half" removes it. + direction + Only applies if cumulative is enabled. If + "increasing" (default) we sum all prior bins, + so the result increases from left to right. If + "decreasing" we sum later bins so the result + decreases from left to right. + enabled + If true, display the cumulative distribution by + summing the binned values. Use the `direction` + and `centralbin` attributes to tune the + accumulation method. Note: in this mode, the + "density" `histnorm` settings behave the same + as their equivalents without "density": "" and + "density" both rise to the number of data + points, and "probability" and *probability + density* both rise to the number of sample + points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_customdata.py b/packages/python/plotly/plotly/validators/histogram/_customdata.py new file mode 100644 index 00000000000..608ca111b24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="histogram", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_customdatasrc.py b/packages/python/plotly/plotly/validators/histogram/_customdatasrc.py new file mode 100644 index 00000000000..8a2885647d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="histogram", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_error_x.py b/packages/python/plotly/plotly/validators/histogram/_error_x.py new file mode 100644 index 00000000000..fe844c36e86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_error_x.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_x", parent_name="histogram", **kwargs): + super(Error_XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorX"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_error_y.py b/packages/python/plotly/plotly/validators/histogram/_error_y.py new file mode 100644 index 00000000000..cb02b5a25e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_error_y.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_y", parent_name="histogram", **kwargs): + super(Error_YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorY"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_histfunc.py b/packages/python/plotly/plotly/validators/histogram/_histfunc.py new file mode 100644 index 00000000000..8e0cd7ad6d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_histfunc.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="histfunc", parent_name="histogram", **kwargs): + super(HistfuncValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_histnorm.py b/packages/python/plotly/plotly/validators/histogram/_histnorm.py new file mode 100644 index 00000000000..fa2a664c9a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_histnorm.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="histnorm", parent_name="histogram", **kwargs): + super(HistnormValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + ["", "percent", "probability", "density", "probability density"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hoverinfo.py b/packages/python/plotly/plotly/validators/histogram/_hoverinfo.py new file mode 100644 index 00000000000..6e7763980f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="histogram", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/histogram/_hoverinfosrc.py new file mode 100644 index 00000000000..28e36cf495e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="histogram", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hoverlabel.py b/packages/python/plotly/plotly/validators/histogram/_hoverlabel.py new file mode 100644 index 00000000000..c33872e9eb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="histogram", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hovertemplate.py b/packages/python/plotly/plotly/validators/histogram/_hovertemplate.py new file mode 100644 index 00000000000..ff813ef4105 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="histogram", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/histogram/_hovertemplatesrc.py new file mode 100644 index 00000000000..8cbebc518fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="histogram", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hovertext.py b/packages/python/plotly/plotly/validators/histogram/_hovertext.py new file mode 100644 index 00000000000..2e8ba912fc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="histogram", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_hovertextsrc.py b/packages/python/plotly/plotly/validators/histogram/_hovertextsrc.py new file mode 100644 index 00000000000..ebba5b4c4da --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="histogram", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_ids.py b/packages/python/plotly/plotly/validators/histogram/_ids.py new file mode 100644 index 00000000000..dc461cd4d42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="histogram", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_idssrc.py b/packages/python/plotly/plotly/validators/histogram/_idssrc.py new file mode 100644 index 00000000000..b335795fc23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="histogram", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_legendgroup.py b/packages/python/plotly/plotly/validators/histogram/_legendgroup.py new file mode 100644 index 00000000000..e5b8453e6fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="histogram", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_marker.py b/packages/python/plotly/plotly/validators/histogram/_marker.py new file mode 100644 index 00000000000..ec8cee106af --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_marker.py @@ -0,0 +1,112 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="histogram", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.histogram.marker.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.histogram.marker.L + ine` instance or dict with compatible + properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_meta.py b/packages/python/plotly/plotly/validators/histogram/_meta.py new file mode 100644 index 00000000000..8edc0db2ce0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="histogram", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_metasrc.py b/packages/python/plotly/plotly/validators/histogram/_metasrc.py new file mode 100644 index 00000000000..3449f0c5885 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="histogram", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_name.py b/packages/python/plotly/plotly/validators/histogram/_name.py new file mode 100644 index 00000000000..7aa7b8cb095 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="histogram", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_nbinsx.py b/packages/python/plotly/plotly/validators/histogram/_nbinsx.py new file mode 100644 index 00000000000..c4066e3bd75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_nbinsx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nbinsx", parent_name="histogram", **kwargs): + super(NbinsxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_nbinsy.py b/packages/python/plotly/plotly/validators/histogram/_nbinsy.py new file mode 100644 index 00000000000..06176991896 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_nbinsy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nbinsy", parent_name="histogram", **kwargs): + super(NbinsyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_offsetgroup.py b/packages/python/plotly/plotly/validators/histogram/_offsetgroup.py new file mode 100644 index 00000000000..d60cb9195a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_offsetgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="offsetgroup", parent_name="histogram", **kwargs): + super(OffsetgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_opacity.py b/packages/python/plotly/plotly/validators/histogram/_opacity.py new file mode 100644 index 00000000000..649f26c1dea --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="histogram", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_orientation.py b/packages/python/plotly/plotly/validators/histogram/_orientation.py new file mode 100644 index 00000000000..27d36fc3e5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="histogram", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_selected.py b/packages/python/plotly/plotly/validators/histogram/_selected.py new file mode 100644 index 00000000000..3296944df3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="histogram", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.histogram.selected + .Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.histogram.selected + .Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_selectedpoints.py b/packages/python/plotly/plotly/validators/histogram/_selectedpoints.py new file mode 100644 index 00000000000..b6ca0f32488 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="histogram", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_showlegend.py b/packages/python/plotly/plotly/validators/histogram/_showlegend.py new file mode 100644 index 00000000000..b9c54d73dd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="histogram", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_stream.py b/packages/python/plotly/plotly/validators/histogram/_stream.py new file mode 100644 index 00000000000..33f00351ecd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="histogram", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_text.py b/packages/python/plotly/plotly/validators/histogram/_text.py new file mode 100644 index 00000000000..f808b3ae5b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="histogram", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_textsrc.py b/packages/python/plotly/plotly/validators/histogram/_textsrc.py new file mode 100644 index 00000000000..4a8531c1e19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="histogram", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_uid.py b/packages/python/plotly/plotly/validators/histogram/_uid.py new file mode 100644 index 00000000000..f05444b0928 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="histogram", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_uirevision.py b/packages/python/plotly/plotly/validators/histogram/_uirevision.py new file mode 100644 index 00000000000..7f03838614d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="histogram", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_unselected.py b/packages/python/plotly/plotly/validators/histogram/_unselected.py new file mode 100644 index 00000000000..0c53b341ab7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="histogram", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.histogram.unselect + ed.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.histogram.unselect + ed.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_visible.py b/packages/python/plotly/plotly/validators/histogram/_visible.py new file mode 100644 index 00000000000..a14ff3d4a0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="histogram", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_x.py b/packages/python/plotly/plotly/validators/histogram/_x.py new file mode 100644 index 00000000000..39b34d7c75d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="histogram", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_xaxis.py b/packages/python/plotly/plotly/validators/histogram/_xaxis.py new file mode 100644 index 00000000000..c0a061ed6b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="histogram", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_xbins.py b/packages/python/plotly/plotly/validators/histogram/_xbins.py new file mode 100644 index 00000000000..dd216f7b3b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_xbins.py @@ -0,0 +1,60 @@ +import _plotly_utils.basevalidators + + +class XbinsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="xbins", parent_name="histogram", **kwargs): + super(XbinsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "XBins"), + data_docs=kwargs.pop( + "data_docs", + """ + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). If multiple non-overlaying histograms + share a subplot, the first explicit `size` is + used and all others discarded. If no `size` is + provided,the sample data from all traces is + combined to determine `size` as described + above. + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. If multiple non- + overlaying histograms share a subplot, the + first explicit `start` is used exactly and all + others are shifted down (if necessary) to + differ from that one by an integer number of + bins. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_xcalendar.py b/packages/python/plotly/plotly/validators/histogram/_xcalendar.py new file mode 100644 index 00000000000..c95eebc537b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="histogram", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_xsrc.py b/packages/python/plotly/plotly/validators/histogram/_xsrc.py new file mode 100644 index 00000000000..aac8e40defa --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="histogram", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_y.py b/packages/python/plotly/plotly/validators/histogram/_y.py new file mode 100644 index 00000000000..4fbdc2131da --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="histogram", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_yaxis.py b/packages/python/plotly/plotly/validators/histogram/_yaxis.py new file mode 100644 index 00000000000..f9b197fd129 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="histogram", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_ybins.py b/packages/python/plotly/plotly/validators/histogram/_ybins.py new file mode 100644 index 00000000000..b8783219ef5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_ybins.py @@ -0,0 +1,60 @@ +import _plotly_utils.basevalidators + + +class YbinsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="ybins", parent_name="histogram", **kwargs): + super(YbinsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "YBins"), + data_docs=kwargs.pop( + "data_docs", + """ + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). If multiple non-overlaying histograms + share a subplot, the first explicit `size` is + used and all others discarded. If no `size` is + provided,the sample data from all traces is + combined to determine `size` as described + above. + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. If multiple non- + overlaying histograms share a subplot, the + first explicit `start` is used exactly and all + others are shifted down (if necessary) to + differ from that one by an integer number of + bins. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_ycalendar.py b/packages/python/plotly/plotly/validators/histogram/_ycalendar.py new file mode 100644 index 00000000000..e0d83430ab6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="histogram", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/_ysrc.py b/packages/python/plotly/plotly/validators/histogram/_ysrc.py new file mode 100644 index 00000000000..9a59fd4da0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="histogram", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/cumulative/__init__.py b/packages/python/plotly/plotly/validators/histogram/cumulative/__init__.py index 360758a160d..01385f01ddd 100644 --- a/packages/python/plotly/plotly/validators/histogram/cumulative/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/cumulative/__init__.py @@ -1,48 +1,18 @@ -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="histogram.cumulative", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="direction", parent_name="histogram.cumulative", **kwargs - ): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["increasing", "decreasing"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CurrentbinValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="currentbin", parent_name="histogram.cumulative", **kwargs - ): - super(CurrentbinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["include", "exclude", "half"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._enabled import EnabledValidator + from ._direction import DirectionValidator + from ._currentbin import CurrentbinValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._enabled.EnabledValidator", + "._direction.DirectionValidator", + "._currentbin.CurrentbinValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/cumulative/_currentbin.py b/packages/python/plotly/plotly/validators/histogram/cumulative/_currentbin.py new file mode 100644 index 00000000000..eb8fc69648a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/cumulative/_currentbin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CurrentbinValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="currentbin", parent_name="histogram.cumulative", **kwargs + ): + super(CurrentbinValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["include", "exclude", "half"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/cumulative/_direction.py b/packages/python/plotly/plotly/validators/histogram/cumulative/_direction.py new file mode 100644 index 00000000000..4983dc3d604 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/cumulative/_direction.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="direction", parent_name="histogram.cumulative", **kwargs + ): + super(DirectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["increasing", "decreasing"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/cumulative/_enabled.py b/packages/python/plotly/plotly/validators/histogram/cumulative/_enabled.py new file mode 100644 index 00000000000..8f2d9b88cde --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/cumulative/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="histogram.cumulative", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/__init__.py b/packages/python/plotly/plotly/validators/histogram/error_x/__init__.py index 20d0a37685f..e4688233f0f 100644 --- a/packages/python/plotly/plotly/validators/histogram/error_x/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/error_x/__init__.py @@ -1,235 +1,42 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="histogram.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="histogram.error_x", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="histogram.error_x", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="histogram.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="histogram.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="histogram.error_x", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="histogram.error_x", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="histogram.error_x", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="histogram.error_x", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CopyYstyleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="copy_ystyle", parent_name="histogram.error_x", **kwargs - ): - super(CopyYstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="histogram.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="histogram.error_x", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="histogram.error_x", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="histogram.error_x", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="histogram.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._copy_ystyle import Copy_YstyleValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_array.py b/packages/python/plotly/plotly/validators/histogram/error_x/_array.py new file mode 100644 index 00000000000..c74078bb7eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="histogram.error_x", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_arrayminus.py b/packages/python/plotly/plotly/validators/histogram/error_x/_arrayminus.py new file mode 100644 index 00000000000..b51a0fb7955 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="histogram.error_x", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_arrayminussrc.py b/packages/python/plotly/plotly/validators/histogram/error_x/_arrayminussrc.py new file mode 100644 index 00000000000..0204ab42f99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="histogram.error_x", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_arraysrc.py b/packages/python/plotly/plotly/validators/histogram/error_x/_arraysrc.py new file mode 100644 index 00000000000..d3ff7a09d05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="histogram.error_x", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_color.py b/packages/python/plotly/plotly/validators/histogram/error_x/_color.py new file mode 100644 index 00000000000..0c247f59453 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="histogram.error_x", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_copy_ystyle.py b/packages/python/plotly/plotly/validators/histogram/error_x/_copy_ystyle.py new file mode 100644 index 00000000000..273df7d2a03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_copy_ystyle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="copy_ystyle", parent_name="histogram.error_x", **kwargs + ): + super(Copy_YstyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_symmetric.py b/packages/python/plotly/plotly/validators/histogram/error_x/_symmetric.py new file mode 100644 index 00000000000..7e330217c12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="histogram.error_x", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_thickness.py b/packages/python/plotly/plotly/validators/histogram/error_x/_thickness.py new file mode 100644 index 00000000000..75ee1184110 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="histogram.error_x", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_traceref.py b/packages/python/plotly/plotly/validators/histogram/error_x/_traceref.py new file mode 100644 index 00000000000..b6cf5c1e476 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="histogram.error_x", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_tracerefminus.py b/packages/python/plotly/plotly/validators/histogram/error_x/_tracerefminus.py new file mode 100644 index 00000000000..a57e4937e89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="histogram.error_x", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_type.py b/packages/python/plotly/plotly/validators/histogram/error_x/_type.py new file mode 100644 index 00000000000..12d961d367b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="histogram.error_x", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_value.py b/packages/python/plotly/plotly/validators/histogram/error_x/_value.py new file mode 100644 index 00000000000..5b2f73ff852 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="histogram.error_x", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_valueminus.py b/packages/python/plotly/plotly/validators/histogram/error_x/_valueminus.py new file mode 100644 index 00000000000..c45c5ca4fde --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="histogram.error_x", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_visible.py b/packages/python/plotly/plotly/validators/histogram/error_x/_visible.py new file mode 100644 index 00000000000..b1e140d3962 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="histogram.error_x", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_x/_width.py b/packages/python/plotly/plotly/validators/histogram/error_x/_width.py new file mode 100644 index 00000000000..8b3e63502f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_x/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="histogram.error_x", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/__init__.py b/packages/python/plotly/plotly/validators/histogram/error_y/__init__.py index 6e4f4e2a9a1..0a508f0c655 100644 --- a/packages/python/plotly/plotly/validators/histogram/error_y/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/error_y/__init__.py @@ -1,219 +1,40 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="histogram.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="histogram.error_y", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="histogram.error_y", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="histogram.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="histogram.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="histogram.error_y", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="histogram.error_y", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="histogram.error_y", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="histogram.error_y", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="histogram.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="histogram.error_y", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="histogram.error_y", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="histogram.error_y", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="histogram.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_array.py b/packages/python/plotly/plotly/validators/histogram/error_y/_array.py new file mode 100644 index 00000000000..926ecdf3976 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="histogram.error_y", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_arrayminus.py b/packages/python/plotly/plotly/validators/histogram/error_y/_arrayminus.py new file mode 100644 index 00000000000..6efcccdebf7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="histogram.error_y", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_arrayminussrc.py b/packages/python/plotly/plotly/validators/histogram/error_y/_arrayminussrc.py new file mode 100644 index 00000000000..d7666e3b3dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="histogram.error_y", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_arraysrc.py b/packages/python/plotly/plotly/validators/histogram/error_y/_arraysrc.py new file mode 100644 index 00000000000..82619c20f78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="histogram.error_y", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_color.py b/packages/python/plotly/plotly/validators/histogram/error_y/_color.py new file mode 100644 index 00000000000..a0a5c59d9d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="histogram.error_y", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_symmetric.py b/packages/python/plotly/plotly/validators/histogram/error_y/_symmetric.py new file mode 100644 index 00000000000..7b29961c58f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="histogram.error_y", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_thickness.py b/packages/python/plotly/plotly/validators/histogram/error_y/_thickness.py new file mode 100644 index 00000000000..0c8ee0e2b9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="histogram.error_y", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_traceref.py b/packages/python/plotly/plotly/validators/histogram/error_y/_traceref.py new file mode 100644 index 00000000000..50e5e260251 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="histogram.error_y", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_tracerefminus.py b/packages/python/plotly/plotly/validators/histogram/error_y/_tracerefminus.py new file mode 100644 index 00000000000..0128845bbfb --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="histogram.error_y", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_type.py b/packages/python/plotly/plotly/validators/histogram/error_y/_type.py new file mode 100644 index 00000000000..921dcf19522 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="histogram.error_y", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_value.py b/packages/python/plotly/plotly/validators/histogram/error_y/_value.py new file mode 100644 index 00000000000..675a07da4ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="histogram.error_y", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_valueminus.py b/packages/python/plotly/plotly/validators/histogram/error_y/_valueminus.py new file mode 100644 index 00000000000..c122e4cbb28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="histogram.error_y", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_visible.py b/packages/python/plotly/plotly/validators/histogram/error_y/_visible.py new file mode 100644 index 00000000000..a240b024a35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="histogram.error_y", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/error_y/_width.py b/packages/python/plotly/plotly/validators/histogram/error_y/_width.py new file mode 100644 index 00000000000..8e6569a368c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/error_y/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="histogram.error_y", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/__init__.py index 650b7706486..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/histogram/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/__init__.py @@ -1,182 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="histogram.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="histogram.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="histogram.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="histogram.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="histogram.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="histogram.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="histogram.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="histogram.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="histogram.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_align.py new file mode 100644 index 00000000000..65b67f28df5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="histogram.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..8a6677e2fc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="histogram.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..0295abca82b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="histogram.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..aa0b5b6fc3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="histogram.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..aa2a632eebd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="histogram.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..5cf3c1b53ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="histogram.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_font.py new file mode 100644 index 00000000000..84efd0557c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="histogram.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_namelength.py new file mode 100644 index 00000000000..d69da5f51b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="histogram.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..6fb1c05926a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="histogram.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/__init__.py index c24f3003c50..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="histogram.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="histogram.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="histogram.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="histogram.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="histogram.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_color.py new file mode 100644 index 00000000000..64537834198 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..6b0fdcae933 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="histogram.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_family.py new file mode 100644 index 00000000000..db4692d17f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="histogram.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..1224806030e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="histogram.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_size.py new file mode 100644 index 00000000000..dce47df42e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="histogram.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..93bc8c7b584 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="histogram.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/__init__.py index e87cf22ed7a..bcbbad4466a 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/__init__.py @@ -1,547 +1,42 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="histogram.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="histogram.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="histogram.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="histogram.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="histogram.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="histogram.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="histogram.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="histogram.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - histogram.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram.marker.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - histogram.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="histogram.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="histogram.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "histogram.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="histogram.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="histogram.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="histogram.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="histogram.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="histogram.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/histogram/marker/_autocolorscale.py new file mode 100644 index 00000000000..8ea531c028f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="histogram.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_cauto.py b/packages/python/plotly/plotly/validators/histogram/marker/_cauto.py new file mode 100644 index 00000000000..7582066e698 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="histogram.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_cmax.py b/packages/python/plotly/plotly/validators/histogram/marker/_cmax.py new file mode 100644 index 00000000000..536414284d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="histogram.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_cmid.py b/packages/python/plotly/plotly/validators/histogram/marker/_cmid.py new file mode 100644 index 00000000000..d9a87b38e7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="histogram.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_cmin.py b/packages/python/plotly/plotly/validators/histogram/marker/_cmin.py new file mode 100644 index 00000000000..6c7b01ad16e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="histogram.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_color.py b/packages/python/plotly/plotly/validators/histogram/marker/_color.py new file mode 100644 index 00000000000..78dff74fa83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_color.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="histogram.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "histogram.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/histogram/marker/_coloraxis.py new file mode 100644 index 00000000000..8d1684dbb42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="histogram.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_colorbar.py b/packages/python/plotly/plotly/validators/histogram/marker/_colorbar.py new file mode 100644 index 00000000000..b7e65e8fcde --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="histogram.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogr + am.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram.marker.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + histogram.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram.marker.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + histogram.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_colorscale.py b/packages/python/plotly/plotly/validators/histogram/marker/_colorscale.py new file mode 100644 index 00000000000..22425b81313 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="histogram.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram/marker/_colorsrc.py new file mode 100644 index 00000000000..e16899568c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="histogram.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_line.py b/packages/python/plotly/plotly/validators/histogram/marker/_line.py new file mode 100644 index 00000000000..adcd5090b41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="histogram.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_opacity.py b/packages/python/plotly/plotly/validators/histogram/marker/_opacity.py new file mode 100644 index 00000000000..334847c4a80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="histogram.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/histogram/marker/_opacitysrc.py new file mode 100644 index 00000000000..76081fc27d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="histogram.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_reversescale.py b/packages/python/plotly/plotly/validators/histogram/marker/_reversescale.py new file mode 100644 index 00000000000..651e129948d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="histogram.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/_showscale.py b/packages/python/plotly/plotly/validators/histogram/marker/_showscale.py new file mode 100644 index 00000000000..c5c17d59cf2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="histogram.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/__init__.py index ed799f5b5a6..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/__init__.py @@ -1,819 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="histogram.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="histogram.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="histogram.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="histogram.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="histogram.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="histogram.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="histogram.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="histogram.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="histogram.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="histogram.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="histogram.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="histogram.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="histogram.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="histogram.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="histogram.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..d869c64f258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="histogram.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..ca2d328a37f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..0aff8080a0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..c0cd43b8d24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="histogram.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..18b7687d571 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_len.py new file mode 100644 index 00000000000..2c88f65e4f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="histogram.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..1231e2da6b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="histogram.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..ca0ff7ff8a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="histogram.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..7ec28cae80d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..55dbe25d952 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..114c95fd5a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..b27a3ad6e70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..3340fdf85c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..a9851ee8d33 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..6b743471b87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..137bce3e353 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="histogram.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..6debd722bc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..a9884b01300 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="histogram.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..8e485278360 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..88c1482f81e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..cfa44b208f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..29eaaff5f46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..3c6343131b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..1ff1860673a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..47603c31e51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..f5d728140ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..cb408ef1d54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..85e911eef22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..d2afaf20f91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..024f574a4c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..f53e0b67e33 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..fe9dad559b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..ce015fb66c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="histogram.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..cac7b32817a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_title.py new file mode 100644 index 00000000000..d635f1075fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="histogram.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_x.py new file mode 100644 index 00000000000..17a81b13620 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="histogram.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..8fb14c8b3cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="histogram.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..1fa31202cac --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="histogram.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_y.py new file mode 100644 index 00000000000..7389fac68a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="histogram.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..affdd512b08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="histogram.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..f3ffde0134a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="histogram.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py index 768cb41a960..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..8ca7e9b2b31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..95856be9c5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..888c5940041 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py index 4c6cd105a42..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="histogram.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="histogram.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="histogram.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="histogram.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="histogram.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..464dfe9ba74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="histogram.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..ee12900aae3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="histogram.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..09684d72093 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="histogram.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..bc185862130 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="histogram.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..46d4d142416 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="histogram.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/__init__.py index f01e3c2736b..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="histogram.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="histogram.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="histogram.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..95136ec8bf7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="histogram.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..3c507b2f7d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="histogram.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..dbb14f46142 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="histogram.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/__init__.py index 805c358337f..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..fb1cb897386 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..a6246d74e5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..f46d20878e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/__init__.py b/packages/python/plotly/plotly/validators/histogram/marker/line/__init__.py index 3f4c95f5330..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/histogram/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/__init__.py @@ -1,207 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="histogram.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="histogram.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="histogram.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="histogram.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="histogram.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="histogram.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "histogram.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="histogram.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="histogram.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="histogram.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="histogram.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="histogram.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..ac2a21532fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="histogram.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_cauto.py new file mode 100644 index 00000000000..d46c2953aab --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="histogram.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_cmax.py new file mode 100644 index 00000000000..31598dc71d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="histogram.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_cmid.py new file mode 100644 index 00000000000..b16108bdaa8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="histogram.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_cmin.py new file mode 100644 index 00000000000..0732b33a2e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="histogram.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_color.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_color.py new file mode 100644 index 00000000000..681c821984e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "histogram.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_coloraxis.py new file mode 100644 index 00000000000..110e296940a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="histogram.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_colorscale.py new file mode 100644 index 00000000000..8d29478a9d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="histogram.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_colorsrc.py new file mode 100644 index 00000000000..d0d11f6b2ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="histogram.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_reversescale.py new file mode 100644 index 00000000000..51ca1e2148b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="histogram.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_width.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_width.py new file mode 100644 index 00000000000..18e6c0c023c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="histogram.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/histogram/marker/line/_widthsrc.py new file mode 100644 index 00000000000..831cdbee279 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="histogram.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/__init__.py b/packages/python/plotly/plotly/validators/histogram/selected/__init__.py index 7b4ddac3c11..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/histogram/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/selected/__init__.py @@ -1,44 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="histogram.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="histogram.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/_marker.py b/packages/python/plotly/plotly/validators/histogram/selected/_marker.py new file mode 100644 index 00000000000..527ccc6bbf9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/selected/_marker.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="histogram.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/_textfont.py b/packages/python/plotly/plotly/validators/histogram/selected/_textfont.py new file mode 100644 index 00000000000..4d460405a9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="histogram.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/histogram/selected/marker/__init__.py index 27c9d5044fc..772f2b07352 100644 --- a/packages/python/plotly/plotly/validators/histogram/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/selected/marker/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="histogram.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/marker/_color.py b/packages/python/plotly/plotly/validators/histogram/selected/marker/_color.py new file mode 100644 index 00000000000..7c5b9053246 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/histogram/selected/marker/_opacity.py new file mode 100644 index 00000000000..1d31396734e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="histogram.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/histogram/selected/textfont/__init__.py index ea8fda12e17..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/histogram/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/selected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram.selected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/histogram/selected/textfont/_color.py new file mode 100644 index 00000000000..ea8fda12e17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/selected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram.selected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/stream/__init__.py b/packages/python/plotly/plotly/validators/histogram/stream/__init__.py index f3a3b54d19b..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/histogram/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="histogram.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="histogram.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/histogram/stream/_maxpoints.py new file mode 100644 index 00000000000..0c257ac6d17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="histogram.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/stream/_token.py b/packages/python/plotly/plotly/validators/histogram/stream/_token.py new file mode 100644 index 00000000000..cb46634028e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="histogram.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/__init__.py b/packages/python/plotly/plotly/validators/histogram/unselected/__init__.py index 486a2c57960..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/histogram/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/unselected/__init__.py @@ -1,47 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="histogram.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="histogram.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/_marker.py b/packages/python/plotly/plotly/validators/histogram/unselected/_marker.py new file mode 100644 index 00000000000..5554a3f29c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/unselected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="histogram.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/_textfont.py b/packages/python/plotly/plotly/validators/histogram/unselected/_textfont.py new file mode 100644 index 00000000000..7fce2d68357 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="histogram.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/histogram/unselected/marker/__init__.py index f9dfff67e97..772f2b07352 100644 --- a/packages/python/plotly/plotly/validators/histogram/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/unselected/marker/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="histogram.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/histogram/unselected/marker/_color.py new file mode 100644 index 00000000000..6c8bc9a771a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/histogram/unselected/marker/_opacity.py new file mode 100644 index 00000000000..ad5aadc7fff --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="histogram.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/histogram/unselected/textfont/__init__.py index 8f941220d85..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/histogram/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/unselected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram.unselected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/histogram/unselected/textfont/_color.py new file mode 100644 index 00000000000..8f941220d85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/unselected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram.unselected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/xbins/__init__.py b/packages/python/plotly/plotly/validators/histogram/xbins/__init__.py index 53c0c8184c8..c00e4e78187 100644 --- a/packages/python/plotly/plotly/validators/histogram/xbins/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/xbins/__init__.py @@ -1,40 +1,14 @@ -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="start", parent_name="histogram.xbins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="size", parent_name="histogram.xbins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="end", parent_name="histogram.xbins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._start import StartValidator + from ._size import SizeValidator + from ._end import EndValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/xbins/_end.py b/packages/python/plotly/plotly/validators/histogram/xbins/_end.py new file mode 100644 index 00000000000..08561f1e0c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/xbins/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="end", parent_name="histogram.xbins", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/xbins/_size.py b/packages/python/plotly/plotly/validators/histogram/xbins/_size.py new file mode 100644 index 00000000000..21b33612e49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/xbins/_size.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="size", parent_name="histogram.xbins", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/xbins/_start.py b/packages/python/plotly/plotly/validators/histogram/xbins/_start.py new file mode 100644 index 00000000000..5d68dacb774 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/xbins/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="start", parent_name="histogram.xbins", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/ybins/__init__.py b/packages/python/plotly/plotly/validators/histogram/ybins/__init__.py index 9a9e2ec562d..c00e4e78187 100644 --- a/packages/python/plotly/plotly/validators/histogram/ybins/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram/ybins/__init__.py @@ -1,40 +1,14 @@ -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="start", parent_name="histogram.ybins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="size", parent_name="histogram.ybins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="end", parent_name="histogram.ybins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._start import StartValidator + from ._size import SizeValidator + from ._end import EndValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram/ybins/_end.py b/packages/python/plotly/plotly/validators/histogram/ybins/_end.py new file mode 100644 index 00000000000..a6108ea5819 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/ybins/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="end", parent_name="histogram.ybins", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/ybins/_size.py b/packages/python/plotly/plotly/validators/histogram/ybins/_size.py new file mode 100644 index 00000000000..e249ff30645 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/ybins/_size.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="size", parent_name="histogram.ybins", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram/ybins/_start.py b/packages/python/plotly/plotly/validators/histogram/ybins/_start.py new file mode 100644 index 00000000000..452bae8f27b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram/ybins/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="start", parent_name="histogram.ybins", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/__init__.py index 618fafe3cc6..bb6f623c7ee 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/__init__.py @@ -1,1199 +1,122 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="histogram2d", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="zsmooth", parent_name="histogram2d", **kwargs): - super(ZsmoothValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fast", "best", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="histogram2d", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="histogram2d", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="histogram2d", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="zhoverformat", parent_name="histogram2d", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="histogram2d", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="histogram2d", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="histogram2d", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ygap", parent_name="histogram2d", **kwargs): - super(YgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="histogram2d", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YBinsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="ybins", parent_name="histogram2d", **kwargs): - super(YBinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "YBins"), - data_docs=kwargs.pop( - "data_docs", - """ - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YbingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="ybingroup", parent_name="histogram2d", **kwargs): - super(YbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="histogram2d", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="histogram2d", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="histogram2d", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xgap", parent_name="histogram2d", **kwargs): - super(XgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="histogram2d", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XBinsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="xbins", parent_name="histogram2d", **kwargs): - super(XBinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "XBins"), - data_docs=kwargs.pop( - "data_docs", - """ - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XbingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="xbingroup", parent_name="histogram2d", **kwargs): - super(XbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="histogram2d", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="histogram2d", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="histogram2d", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="histogram2d", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="histogram2d", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="histogram2d", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="histogram2d", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="histogram2d", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="histogram2d", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="histogram2d", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nbinsy", parent_name="histogram2d", **kwargs): - super(NbinsyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nbinsx", parent_name="histogram2d", **kwargs): - super(NbinsxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="histogram2d", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="histogram2d", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="histogram2d", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="histogram2d", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="histogram2d", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="histogram2d", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="histogram2d", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="histogram2d", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="histogram2d", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="histogram2d", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="histogram2d", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="histogram2d", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="histnorm", parent_name="histogram2d", **kwargs): - super(HistnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - ["", "percent", "probability", "density", "probability density"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="histfunc", parent_name="histogram2d", **kwargs): - super(HistfuncValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="histogram2d", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="histogram2d", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="histogram2d", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="histogram2d", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2d.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2d.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - histogram2d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2d.colorb - ar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - histogram2d.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram2d.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="histogram2d", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="bingroup", parent_name="histogram2d", **kwargs): - super(BingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="histogram2d", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autobiny", parent_name="histogram2d", **kwargs): - super(AutobinyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autobinx", parent_name="histogram2d", **kwargs): - super(AutobinxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zsmooth import ZsmoothValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zhoverformat import ZhoverformatValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._ygap import YgapValidator + from ._ycalendar import YcalendarValidator + from ._ybins import YbinsValidator + from ._ybingroup import YbingroupValidator + from ._yaxis import YaxisValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xgap import XgapValidator + from ._xcalendar import XcalendarValidator + from ._xbins import XbinsValidator + from ._xbingroup import XbingroupValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._nbinsy import NbinsyValidator + from ._nbinsx import NbinsxValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._histnorm import HistnormValidator + from ._histfunc import HistfuncValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._bingroup import BingroupValidator + from ._autocolorscale import AutocolorscaleValidator + from ._autobiny import AutobinyValidator + from ._autobinx import AutobinxValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zsmooth.ZsmoothValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._ygap.YgapValidator", + "._ycalendar.YcalendarValidator", + "._ybins.YbinsValidator", + "._ybingroup.YbingroupValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xgap.XgapValidator", + "._xcalendar.XcalendarValidator", + "._xbins.XbinsValidator", + "._xbingroup.XbingroupValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._nbinsy.NbinsyValidator", + "._nbinsx.NbinsxValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._histnorm.HistnormValidator", + "._histfunc.HistfuncValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._bingroup.BingroupValidator", + "._autocolorscale.AutocolorscaleValidator", + "._autobiny.AutobinyValidator", + "._autobinx.AutobinxValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_autobinx.py b/packages/python/plotly/plotly/validators/histogram2d/_autobinx.py new file mode 100644 index 00000000000..a395048e471 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_autobinx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autobinx", parent_name="histogram2d", **kwargs): + super(AutobinxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_autobiny.py b/packages/python/plotly/plotly/validators/histogram2d/_autobiny.py new file mode 100644 index 00000000000..e3501a54ee7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_autobiny.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autobiny", parent_name="histogram2d", **kwargs): + super(AutobinyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_autocolorscale.py b/packages/python/plotly/plotly/validators/histogram2d/_autocolorscale.py new file mode 100644 index 00000000000..3162a578774 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="histogram2d", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_bingroup.py b/packages/python/plotly/plotly/validators/histogram2d/_bingroup.py new file mode 100644 index 00000000000..6699f11930c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_bingroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="bingroup", parent_name="histogram2d", **kwargs): + super(BingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_coloraxis.py b/packages/python/plotly/plotly/validators/histogram2d/_coloraxis.py new file mode 100644 index 00000000000..720ffeb76f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="histogram2d", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_colorbar.py b/packages/python/plotly/plotly/validators/histogram2d/_colorbar.py new file mode 100644 index 00000000000..9b96330ef38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="histogram2d", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogr + am2d.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram2d.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of + histogram2d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2d.colorb + ar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + histogram2d.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram2d.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_colorscale.py b/packages/python/plotly/plotly/validators/histogram2d/_colorscale.py new file mode 100644 index 00000000000..9723c8efc3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="histogram2d", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_customdata.py b/packages/python/plotly/plotly/validators/histogram2d/_customdata.py new file mode 100644 index 00000000000..594238a6fb0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="histogram2d", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_customdatasrc.py b/packages/python/plotly/plotly/validators/histogram2d/_customdatasrc.py new file mode 100644 index 00000000000..db90d32e51e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="histogram2d", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_histfunc.py b/packages/python/plotly/plotly/validators/histogram2d/_histfunc.py new file mode 100644 index 00000000000..d73ddc9c035 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_histfunc.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="histfunc", parent_name="histogram2d", **kwargs): + super(HistfuncValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_histnorm.py b/packages/python/plotly/plotly/validators/histogram2d/_histnorm.py new file mode 100644 index 00000000000..28388bebe44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_histnorm.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="histnorm", parent_name="histogram2d", **kwargs): + super(HistnormValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + ["", "percent", "probability", "density", "probability density"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_hoverinfo.py b/packages/python/plotly/plotly/validators/histogram2d/_hoverinfo.py new file mode 100644 index 00000000000..d1862bb68f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="histogram2d", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/histogram2d/_hoverinfosrc.py new file mode 100644 index 00000000000..69121ade265 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="histogram2d", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_hoverlabel.py b/packages/python/plotly/plotly/validators/histogram2d/_hoverlabel.py new file mode 100644 index 00000000000..4e72bc8060b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="histogram2d", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_hovertemplate.py b/packages/python/plotly/plotly/validators/histogram2d/_hovertemplate.py new file mode 100644 index 00000000000..171bbc63d93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="histogram2d", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/histogram2d/_hovertemplatesrc.py new file mode 100644 index 00000000000..eda1d428cab --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="histogram2d", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_ids.py b/packages/python/plotly/plotly/validators/histogram2d/_ids.py new file mode 100644 index 00000000000..c2e487ea94d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="histogram2d", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_idssrc.py b/packages/python/plotly/plotly/validators/histogram2d/_idssrc.py new file mode 100644 index 00000000000..14459cac813 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="histogram2d", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_legendgroup.py b/packages/python/plotly/plotly/validators/histogram2d/_legendgroup.py new file mode 100644 index 00000000000..8b1e962b32e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="histogram2d", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_marker.py b/packages/python/plotly/plotly/validators/histogram2d/_marker.py new file mode 100644 index 00000000000..3a0285e9e57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_marker.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="histogram2d", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_meta.py b/packages/python/plotly/plotly/validators/histogram2d/_meta.py new file mode 100644 index 00000000000..4f400b9c135 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="histogram2d", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_metasrc.py b/packages/python/plotly/plotly/validators/histogram2d/_metasrc.py new file mode 100644 index 00000000000..ca01fbe8606 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="histogram2d", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_name.py b/packages/python/plotly/plotly/validators/histogram2d/_name.py new file mode 100644 index 00000000000..0f3b9df8f4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="histogram2d", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_nbinsx.py b/packages/python/plotly/plotly/validators/histogram2d/_nbinsx.py new file mode 100644 index 00000000000..40e3d4e834c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_nbinsx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nbinsx", parent_name="histogram2d", **kwargs): + super(NbinsxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_nbinsy.py b/packages/python/plotly/plotly/validators/histogram2d/_nbinsy.py new file mode 100644 index 00000000000..b18db54aa31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_nbinsy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nbinsy", parent_name="histogram2d", **kwargs): + super(NbinsyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_opacity.py b/packages/python/plotly/plotly/validators/histogram2d/_opacity.py new file mode 100644 index 00000000000..ebb192cb493 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="histogram2d", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_reversescale.py b/packages/python/plotly/plotly/validators/histogram2d/_reversescale.py new file mode 100644 index 00000000000..34689850c9c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="histogram2d", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_showlegend.py b/packages/python/plotly/plotly/validators/histogram2d/_showlegend.py new file mode 100644 index 00000000000..62ef64fee24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="histogram2d", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_showscale.py b/packages/python/plotly/plotly/validators/histogram2d/_showscale.py new file mode 100644 index 00000000000..e729ee9fdfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="histogram2d", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_stream.py b/packages/python/plotly/plotly/validators/histogram2d/_stream.py new file mode 100644 index 00000000000..f4500661d91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="histogram2d", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_uid.py b/packages/python/plotly/plotly/validators/histogram2d/_uid.py new file mode 100644 index 00000000000..544c3975414 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="histogram2d", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_uirevision.py b/packages/python/plotly/plotly/validators/histogram2d/_uirevision.py new file mode 100644 index 00000000000..1d2fff6b3d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="histogram2d", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_visible.py b/packages/python/plotly/plotly/validators/histogram2d/_visible.py new file mode 100644 index 00000000000..8c9d1b75b86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="histogram2d", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_x.py b/packages/python/plotly/plotly/validators/histogram2d/_x.py new file mode 100644 index 00000000000..067b2ec7755 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="histogram2d", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_xaxis.py b/packages/python/plotly/plotly/validators/histogram2d/_xaxis.py new file mode 100644 index 00000000000..2a8f856e343 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="histogram2d", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_xbingroup.py b/packages/python/plotly/plotly/validators/histogram2d/_xbingroup.py new file mode 100644 index 00000000000..a17e5512fd9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_xbingroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XbingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="xbingroup", parent_name="histogram2d", **kwargs): + super(XbingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_xbins.py b/packages/python/plotly/plotly/validators/histogram2d/_xbins.py new file mode 100644 index 00000000000..dd2912b9ece --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_xbins.py @@ -0,0 +1,50 @@ +import _plotly_utils.basevalidators + + +class XbinsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="xbins", parent_name="histogram2d", **kwargs): + super(XbinsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "XBins"), + data_docs=kwargs.pop( + "data_docs", + """ + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_xcalendar.py b/packages/python/plotly/plotly/validators/histogram2d/_xcalendar.py new file mode 100644 index 00000000000..c47be9e02d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="histogram2d", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_xgap.py b/packages/python/plotly/plotly/validators/histogram2d/_xgap.py new file mode 100644 index 00000000000..ce98ea6a5f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_xgap.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xgap", parent_name="histogram2d", **kwargs): + super(XgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_xsrc.py b/packages/python/plotly/plotly/validators/histogram2d/_xsrc.py new file mode 100644 index 00000000000..f032112fcff --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="histogram2d", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_y.py b/packages/python/plotly/plotly/validators/histogram2d/_y.py new file mode 100644 index 00000000000..b072d3ece76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="histogram2d", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_yaxis.py b/packages/python/plotly/plotly/validators/histogram2d/_yaxis.py new file mode 100644 index 00000000000..6d8af1671a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="histogram2d", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_ybingroup.py b/packages/python/plotly/plotly/validators/histogram2d/_ybingroup.py new file mode 100644 index 00000000000..7640aa9f7e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_ybingroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YbingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="ybingroup", parent_name="histogram2d", **kwargs): + super(YbingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_ybins.py b/packages/python/plotly/plotly/validators/histogram2d/_ybins.py new file mode 100644 index 00000000000..8f7c60c212b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_ybins.py @@ -0,0 +1,50 @@ +import _plotly_utils.basevalidators + + +class YbinsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="ybins", parent_name="histogram2d", **kwargs): + super(YbinsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "YBins"), + data_docs=kwargs.pop( + "data_docs", + """ + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_ycalendar.py b/packages/python/plotly/plotly/validators/histogram2d/_ycalendar.py new file mode 100644 index 00000000000..c4488c18ecc --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="histogram2d", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_ygap.py b/packages/python/plotly/plotly/validators/histogram2d/_ygap.py new file mode 100644 index 00000000000..bfc14c95aea --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_ygap.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ygap", parent_name="histogram2d", **kwargs): + super(YgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_ysrc.py b/packages/python/plotly/plotly/validators/histogram2d/_ysrc.py new file mode 100644 index 00000000000..379db72fab8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="histogram2d", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_z.py b/packages/python/plotly/plotly/validators/histogram2d/_z.py new file mode 100644 index 00000000000..b0dfa8e4148 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="histogram2d", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zauto.py b/packages/python/plotly/plotly/validators/histogram2d/_zauto.py new file mode 100644 index 00000000000..c43b0aa56c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="histogram2d", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zhoverformat.py b/packages/python/plotly/plotly/validators/histogram2d/_zhoverformat.py new file mode 100644 index 00000000000..0169ea781c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zhoverformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="zhoverformat", parent_name="histogram2d", **kwargs): + super(ZhoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zmax.py b/packages/python/plotly/plotly/validators/histogram2d/_zmax.py new file mode 100644 index 00000000000..f2067cf8dfa --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="histogram2d", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zmid.py b/packages/python/plotly/plotly/validators/histogram2d/_zmid.py new file mode 100644 index 00000000000..ffb579a159c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="histogram2d", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zmin.py b/packages/python/plotly/plotly/validators/histogram2d/_zmin.py new file mode 100644 index 00000000000..95d5072d494 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="histogram2d", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zsmooth.py b/packages/python/plotly/plotly/validators/histogram2d/_zsmooth.py new file mode 100644 index 00000000000..c2094c729c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zsmooth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="zsmooth", parent_name="histogram2d", **kwargs): + super(ZsmoothValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fast", "best", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/_zsrc.py b/packages/python/plotly/plotly/validators/histogram2d/_zsrc.py new file mode 100644 index 00000000000..02034071257 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="histogram2d", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/__init__.py index b6ee44fb3e6..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/__init__.py @@ -1,768 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="histogram2d.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="histogram2d.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="histogram2d.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="histogram2d.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="histogram2d.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="histogram2d.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="histogram2d.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="histogram2d.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="histogram2d.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="histogram2d.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="histogram2d.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="histogram2d.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="histogram2d.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="histogram2d.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="histogram2d.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="histogram2d.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="histogram2d.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="histogram2d.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="histogram2d.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="histogram2d.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="histogram2d.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="histogram2d.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="histogram2d.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="histogram2d.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="histogram2d.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="histogram2d.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="histogram2d.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="histogram2d.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="histogram2d.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="histogram2d.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="histogram2d.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="histogram2d.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="histogram2d.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_bgcolor.py new file mode 100644 index 00000000000..941a65a0fdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="histogram2d.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_bordercolor.py new file mode 100644 index 00000000000..063928b8294 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="histogram2d.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_borderwidth.py new file mode 100644 index 00000000000..84764b00348 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="histogram2d.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_dtick.py new file mode 100644 index 00000000000..9faca731c9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="histogram2d.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_exponentformat.py new file mode 100644 index 00000000000..33bbe868c1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="histogram2d.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_len.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_len.py new file mode 100644 index 00000000000..4dce4291812 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="histogram2d.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_lenmode.py new file mode 100644 index 00000000000..2915f456d84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="histogram2d.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_nticks.py new file mode 100644 index 00000000000..f485e206036 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="histogram2d.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..d174570d58a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="histogram2d.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..2c671565c02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="histogram2d.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_separatethousands.py new file mode 100644 index 00000000000..fc9ecd8315d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="histogram2d.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showexponent.py new file mode 100644 index 00000000000..04031049f4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="histogram2d.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showticklabels.py new file mode 100644 index 00000000000..95e85a492e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="histogram2d.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..290f407dd7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="histogram2d.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..f49c51df5ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="histogram2d.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thickness.py new file mode 100644 index 00000000000..43706e0d190 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="histogram2d.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..836295cfd96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="histogram2d.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tick0.py new file mode 100644 index 00000000000..298272d1779 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="histogram2d.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickangle.py new file mode 100644 index 00000000000..cd86fb02c05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickcolor.py new file mode 100644 index 00000000000..a46df2b2ef1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickfont.py new file mode 100644 index 00000000000..5ff2b15b903 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformat.py new file mode 100644 index 00000000000..844319488c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..224dda03b09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="histogram2d.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..41c9efd2d1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="histogram2d.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticklen.py new file mode 100644 index 00000000000..49273c131bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="histogram2d.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickmode.py new file mode 100644 index 00000000000..3f5614451ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickprefix.py new file mode 100644 index 00000000000..7f5a492910a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticks.py new file mode 100644 index 00000000000..5a6379a9754 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="histogram2d.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..5ff918bcf5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="histogram2d.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticktext.py new file mode 100644 index 00000000000..b6ea6408a5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="histogram2d.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..424f92c7243 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="histogram2d.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickvals.py new file mode 100644 index 00000000000..d133d68d1a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..6617abaa095 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickwidth.py new file mode 100644 index 00000000000..eb40ed0467d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="histogram2d.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_title.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_title.py new file mode 100644 index 00000000000..63ed9f30357 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="histogram2d.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_x.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_x.py new file mode 100644 index 00000000000..8bd48406755 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="histogram2d.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_xanchor.py new file mode 100644 index 00000000000..8780ec7f885 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="histogram2d.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_xpad.py new file mode 100644 index 00000000000..8866a1c58e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="histogram2d.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_y.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_y.py new file mode 100644 index 00000000000..ce557238e5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="histogram2d.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_yanchor.py new file mode 100644 index 00000000000..89d652d993e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="histogram2d.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ypad.py new file mode 100644 index 00000000000..3835b04a9b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="histogram2d.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/__init__.py index 51abcb84534..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="histogram2d.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram2d.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram2d.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..e55b6a956ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram2d.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..95d5d421a3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram2d.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..a2e4b841630 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="histogram2d.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py index ec9b74a56d5..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="histogram2d.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="histogram2d.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="histogram2d.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="histogram2d.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="histogram2d.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..06b3c331504 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="histogram2d.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..f943f7daf78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="histogram2d.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..41938b0fd07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="histogram2d.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..afc66021e57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="histogram2d.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..a63bb14723f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="histogram2d.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/__init__.py index b676e5a055f..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="histogram2d.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="histogram2d.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="histogram2d.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_font.py new file mode 100644 index 00000000000..905584ef83d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="histogram2d.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_side.py new file mode 100644 index 00000000000..fbafb516242 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="histogram2d.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_text.py new file mode 100644 index 00000000000..e6afd60ab19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="histogram2d.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/__init__.py index 145bc2c4915..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram2d.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram2d.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram2d.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_color.py new file mode 100644 index 00000000000..641c695fa1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram2d.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_family.py new file mode 100644 index 00000000000..b7fb9386513 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram2d.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_size.py new file mode 100644 index 00000000000..2676f04c57e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram2d.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/__init__.py index 458324c8794..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/__init__.py @@ -1,188 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="histogram2d.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="histogram2d.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="histogram2d.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_align.py new file mode 100644 index 00000000000..6c41970740e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..92765b8e5f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..94600735e88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..07b89c2bb73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..43c5d9692f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..e52ed40d273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="histogram2d.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_font.py new file mode 100644 index 00000000000..27fcf2822e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_namelength.py new file mode 100644 index 00000000000..796923f7066 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="histogram2d.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..a4cc4d69c8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="histogram2d.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/__init__.py index 0810951a074..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/__init__.py @@ -1,106 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="histogram2d.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="histogram2d.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="histogram2d.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="histogram2d.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="histogram2d.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram2d.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_color.py new file mode 100644 index 00000000000..5e483a88787 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram2d.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..896b6058f87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="histogram2d.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_family.py new file mode 100644 index 00000000000..e4b50a52d16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="histogram2d.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..62b020d2472 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="histogram2d.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_size.py new file mode 100644 index 00000000000..8be751d3281 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="histogram2d.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..7f2165e7255 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="histogram2d.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/marker/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/marker/__init__.py index bfbb4f0ec53..bdc564f8f76 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/marker/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="histogram2d.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="color", parent_name="histogram2d.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/marker/_color.py b/packages/python/plotly/plotly/validators/histogram2d/marker/_color.py new file mode 100644 index 00000000000..c978458df9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/marker/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="color", parent_name="histogram2d.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram2d/marker/_colorsrc.py new file mode 100644 index 00000000000..53b2b7dd87b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="histogram2d.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/stream/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/stream/__init__.py index a5a9db92f91..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="histogram2d.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="histogram2d.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/histogram2d/stream/_maxpoints.py new file mode 100644 index 00000000000..1e819d936dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="histogram2d.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/stream/_token.py b/packages/python/plotly/plotly/validators/histogram2d/stream/_token.py new file mode 100644 index 00000000000..ec42683701f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="histogram2d.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/xbins/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/xbins/__init__.py index 1bbacbe0ce9..c00e4e78187 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/xbins/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/xbins/__init__.py @@ -1,40 +1,14 @@ -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="start", parent_name="histogram2d.xbins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="size", parent_name="histogram2d.xbins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="end", parent_name="histogram2d.xbins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._start import StartValidator + from ._size import SizeValidator + from ._end import EndValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/xbins/_end.py b/packages/python/plotly/plotly/validators/histogram2d/xbins/_end.py new file mode 100644 index 00000000000..9efdc27695a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/xbins/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="end", parent_name="histogram2d.xbins", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/xbins/_size.py b/packages/python/plotly/plotly/validators/histogram2d/xbins/_size.py new file mode 100644 index 00000000000..52724dacaf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/xbins/_size.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="size", parent_name="histogram2d.xbins", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/xbins/_start.py b/packages/python/plotly/plotly/validators/histogram2d/xbins/_start.py new file mode 100644 index 00000000000..9876927c568 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/xbins/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="start", parent_name="histogram2d.xbins", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/ybins/__init__.py b/packages/python/plotly/plotly/validators/histogram2d/ybins/__init__.py index 48c8e6d3488..c00e4e78187 100644 --- a/packages/python/plotly/plotly/validators/histogram2d/ybins/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2d/ybins/__init__.py @@ -1,40 +1,14 @@ -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="start", parent_name="histogram2d.ybins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="size", parent_name="histogram2d.ybins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="end", parent_name="histogram2d.ybins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._start import StartValidator + from ._size import SizeValidator + from ._end import EndValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/ybins/_end.py b/packages/python/plotly/plotly/validators/histogram2d/ybins/_end.py new file mode 100644 index 00000000000..a0221a4db83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/ybins/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="end", parent_name="histogram2d.ybins", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/ybins/_size.py b/packages/python/plotly/plotly/validators/histogram2d/ybins/_size.py new file mode 100644 index 00000000000..acbd0e8acc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/ybins/_size.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="size", parent_name="histogram2d.ybins", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2d/ybins/_start.py b/packages/python/plotly/plotly/validators/histogram2d/ybins/_start.py new file mode 100644 index 00000000000..87bf842c1ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2d/ybins/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="start", parent_name="histogram2d.ybins", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py index 3a7221161fb..9090db70da5 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py @@ -1,1363 +1,124 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="histogram2dcontour", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmin", parent_name="histogram2dcontour", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmid", parent_name="histogram2dcontour", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zmax", parent_name="histogram2dcontour", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"zauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="zhoverformat", parent_name="histogram2dcontour", **kwargs - ): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zauto", parent_name="histogram2dcontour", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="histogram2dcontour", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="histogram2dcontour", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ycalendar", parent_name="histogram2dcontour", **kwargs - ): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YBinsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="ybins", parent_name="histogram2dcontour", **kwargs): - super(YBinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "YBins"), - data_docs=kwargs.pop( - "data_docs", - """ - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YbingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ybingroup", parent_name="histogram2dcontour", **kwargs - ): - super(YbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="histogram2dcontour", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="histogram2dcontour", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="histogram2dcontour", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xcalendar", parent_name="histogram2dcontour", **kwargs - ): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XBinsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="xbins", parent_name="histogram2dcontour", **kwargs): - super(XBinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "XBins"), - data_docs=kwargs.pop( - "data_docs", - """ - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XbingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="xbingroup", parent_name="histogram2dcontour", **kwargs - ): - super(XbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="histogram2dcontour", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="histogram2dcontour", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="visible", parent_name="histogram2dcontour", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="histogram2dcontour", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="histogram2dcontour", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="stream", parent_name="histogram2dcontour", **kwargs - ): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="histogram2dcontour", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlegend", parent_name="histogram2dcontour", **kwargs - ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="histogram2dcontour", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="histogram2dcontour", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="ncontours", parent_name="histogram2dcontour", **kwargs - ): - super(NcontoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nbinsy", parent_name="histogram2dcontour", **kwargs - ): - super(NbinsyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nbinsx", parent_name="histogram2dcontour", **kwargs - ): - super(NbinsxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="histogram2dcontour", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="metasrc", parent_name="histogram2dcontour", **kwargs - ): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="histogram2dcontour", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="histogram2dcontour", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="histogram2dcontour", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="histogram2dcontour", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="idssrc", parent_name="histogram2dcontour", **kwargs - ): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="histogram2dcontour", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="histogram2dcontour", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="histogram2dcontour", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="hoverlabel", parent_name="histogram2dcontour", **kwargs - ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="histogram2dcontour", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__( - self, plotly_name="hoverinfo", parent_name="histogram2dcontour", **kwargs - ): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="histnorm", parent_name="histogram2dcontour", **kwargs - ): - super(HistnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - ["", "percent", "probability", "density", "probability density"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="histfunc", parent_name="histogram2dcontour", **kwargs - ): - super(HistfuncValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="histogram2dcontour", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="customdata", parent_name="histogram2dcontour", **kwargs - ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="contours", parent_name="histogram2dcontour", **kwargs - ): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contours"), - data_docs=kwargs.pop( - "data_docs", - """ - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="histogram2dcontour", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="histogram2dcontour", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2dcontour.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2dcontour.colorbar.tickformatstopdef - aults), sets the default property values to use - for elements of - histogram2dcontour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2dcontour - .colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - histogram2dcontour.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram2dcontour.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="histogram2dcontour", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BingroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="bingroup", parent_name="histogram2dcontour", **kwargs - ): - super(BingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocontour", parent_name="histogram2dcontour", **kwargs - ): - super(AutocontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="histogram2dcontour", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autobiny", parent_name="histogram2dcontour", **kwargs - ): - super(AutobinyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autobinx", parent_name="histogram2dcontour", **kwargs - ): - super(AutobinxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmid import ZmidValidator + from ._zmax import ZmaxValidator + from ._zhoverformat import ZhoverformatValidator + from ._zauto import ZautoValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._ybins import YbinsValidator + from ._ybingroup import YbingroupValidator + from ._yaxis import YaxisValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xbins import XbinsValidator + from ._xbingroup import XbingroupValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._ncontours import NcontoursValidator + from ._nbinsy import NbinsyValidator + from ._nbinsx import NbinsxValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._histnorm import HistnormValidator + from ._histfunc import HistfuncValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contours import ContoursValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._bingroup import BingroupValidator + from ._autocontour import AutocontourValidator + from ._autocolorscale import AutocolorscaleValidator + from ._autobiny import AutobinyValidator + from ._autobinx import AutobinxValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._ybins.YbinsValidator", + "._ybingroup.YbingroupValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xbins.XbinsValidator", + "._xbingroup.XbingroupValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._ncontours.NcontoursValidator", + "._nbinsy.NbinsyValidator", + "._nbinsx.NbinsxValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._histnorm.HistnormValidator", + "._histfunc.HistfuncValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._bingroup.BingroupValidator", + "._autocontour.AutocontourValidator", + "._autocolorscale.AutocolorscaleValidator", + "._autobiny.AutobinyValidator", + "._autobinx.AutobinxValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_autobinx.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_autobinx.py new file mode 100644 index 00000000000..cd5f4a3a234 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_autobinx.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autobinx", parent_name="histogram2dcontour", **kwargs + ): + super(AutobinxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_autobiny.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_autobiny.py new file mode 100644 index 00000000000..11ac03d7819 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_autobiny.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autobiny", parent_name="histogram2dcontour", **kwargs + ): + super(AutobinyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_autocolorscale.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_autocolorscale.py new file mode 100644 index 00000000000..cf1e8c4f7f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="histogram2dcontour", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_autocontour.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_autocontour.py new file mode 100644 index 00000000000..20aa16a798e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_autocontour.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocontour", parent_name="histogram2dcontour", **kwargs + ): + super(AutocontourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_bingroup.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_bingroup.py new file mode 100644 index 00000000000..cd42a96b59c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_bingroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="bingroup", parent_name="histogram2dcontour", **kwargs + ): + super(BingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_coloraxis.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_coloraxis.py new file mode 100644 index 00000000000..c5f462c242b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="histogram2dcontour", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_colorbar.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_colorbar.py new file mode 100644 index 00000000000..11d3f5a1e00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="histogram2dcontour", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.histogr + am2dcontour.colorbar.Tickformatstop` instances + or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram2dcontour.colorbar.tickformatstopdef + aults), sets the default property values to use + for elements of + histogram2dcontour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.histogram2dcontour + .colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + histogram2dcontour.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram2dcontour.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_colorscale.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_colorscale.py new file mode 100644 index 00000000000..b9cfaeb093e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="histogram2dcontour", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_contours.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_contours.py new file mode 100644 index 00000000000..fdf7dc996c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_contours.py @@ -0,0 +1,81 @@ +import _plotly_utils.basevalidators + + +class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="contours", parent_name="histogram2dcontour", **kwargs + ): + super(ContoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contours"), + data_docs=kwargs.pop( + "data_docs", + """ + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "heatmap", + a heatmap gradient coloring is applied between + each contour level. If "lines", coloring is + done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_customdata.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_customdata.py new file mode 100644 index 00000000000..c0e30f77929 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_customdata.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="customdata", parent_name="histogram2dcontour", **kwargs + ): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_customdatasrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_customdatasrc.py new file mode 100644 index 00000000000..655ad585a13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="histogram2dcontour", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_histfunc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_histfunc.py new file mode 100644 index 00000000000..33daa1ed042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_histfunc.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="histfunc", parent_name="histogram2dcontour", **kwargs + ): + super(HistfuncValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_histnorm.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_histnorm.py new file mode 100644 index 00000000000..6a4fa3d1d73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_histnorm.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="histnorm", parent_name="histogram2dcontour", **kwargs + ): + super(HistnormValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + ["", "percent", "probability", "density", "probability density"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverinfo.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverinfo.py new file mode 100644 index 00000000000..0b067429738 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverinfo.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__( + self, plotly_name="hoverinfo", parent_name="histogram2dcontour", **kwargs + ): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverinfosrc.py new file mode 100644 index 00000000000..9af917e7de3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="histogram2dcontour", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverlabel.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverlabel.py new file mode 100644 index 00000000000..4b780f7ffb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_hoverlabel.py @@ -0,0 +1,53 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="hoverlabel", parent_name="histogram2dcontour", **kwargs + ): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_hovertemplate.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_hovertemplate.py new file mode 100644 index 00000000000..af1635ecbb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="histogram2dcontour", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_hovertemplatesrc.py new file mode 100644 index 00000000000..24dc8efe62d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="histogram2dcontour", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_ids.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_ids.py new file mode 100644 index 00000000000..6e23b313eed --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="histogram2dcontour", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_idssrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_idssrc.py new file mode 100644 index 00000000000..1346e9f0bac --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_idssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="idssrc", parent_name="histogram2dcontour", **kwargs + ): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_legendgroup.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_legendgroup.py new file mode 100644 index 00000000000..e13b3e40648 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="histogram2dcontour", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_line.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_line.py new file mode 100644 index 00000000000..425aea7b2ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_line.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="histogram2dcontour", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_marker.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_marker.py new file mode 100644 index 00000000000..71c1020af9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_marker.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="histogram2dcontour", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the aggregation data. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_meta.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_meta.py new file mode 100644 index 00000000000..b510a823bcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="histogram2dcontour", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_metasrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_metasrc.py new file mode 100644 index 00000000000..b813a1fedee --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_metasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="metasrc", parent_name="histogram2dcontour", **kwargs + ): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_name.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_name.py new file mode 100644 index 00000000000..1b9ce6d010b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="histogram2dcontour", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_nbinsx.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_nbinsx.py new file mode 100644 index 00000000000..c137d71b1c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_nbinsx.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nbinsx", parent_name="histogram2dcontour", **kwargs + ): + super(NbinsxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_nbinsy.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_nbinsy.py new file mode 100644 index 00000000000..9458788e675 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_nbinsy.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nbinsy", parent_name="histogram2dcontour", **kwargs + ): + super(NbinsyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_ncontours.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_ncontours.py new file mode 100644 index 00000000000..0f60be1f5b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_ncontours.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="ncontours", parent_name="histogram2dcontour", **kwargs + ): + super(NcontoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_opacity.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_opacity.py new file mode 100644 index 00000000000..526278b750f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="histogram2dcontour", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_reversescale.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_reversescale.py new file mode 100644 index 00000000000..2eb7478c150 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="histogram2dcontour", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_showlegend.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_showlegend.py new file mode 100644 index 00000000000..d355e31961e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_showlegend.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlegend", parent_name="histogram2dcontour", **kwargs + ): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_showscale.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_showscale.py new file mode 100644 index 00000000000..6930fc503a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="histogram2dcontour", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_stream.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_stream.py new file mode 100644 index 00000000000..b47f447d5ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_stream.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="stream", parent_name="histogram2dcontour", **kwargs + ): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_uid.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_uid.py new file mode 100644 index 00000000000..2e780cb14c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="histogram2dcontour", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_uirevision.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_uirevision.py new file mode 100644 index 00000000000..593b60535f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="histogram2dcontour", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_visible.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_visible.py new file mode 100644 index 00000000000..7d8ba1a5a9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_visible.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="visible", parent_name="histogram2dcontour", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_x.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_x.py new file mode 100644 index 00000000000..74a9e9e3a76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="histogram2dcontour", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_xaxis.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_xaxis.py new file mode 100644 index 00000000000..4f076a91734 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="histogram2dcontour", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_xbingroup.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_xbingroup.py new file mode 100644 index 00000000000..07d470809e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_xbingroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XbingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="xbingroup", parent_name="histogram2dcontour", **kwargs + ): + super(XbingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_xbins.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_xbins.py new file mode 100644 index 00000000000..1a5a20c6ff2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_xbins.py @@ -0,0 +1,50 @@ +import _plotly_utils.basevalidators + + +class XbinsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="xbins", parent_name="histogram2dcontour", **kwargs): + super(XbinsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "XBins"), + data_docs=kwargs.pop( + "data_docs", + """ + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_xcalendar.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_xcalendar.py new file mode 100644 index 00000000000..84108021636 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_xcalendar.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xcalendar", parent_name="histogram2dcontour", **kwargs + ): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_xsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_xsrc.py new file mode 100644 index 00000000000..52e2532e748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="histogram2dcontour", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_y.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_y.py new file mode 100644 index 00000000000..f019fa05d2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="histogram2dcontour", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_yaxis.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_yaxis.py new file mode 100644 index 00000000000..e1793d18ff4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="histogram2dcontour", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_ybingroup.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_ybingroup.py new file mode 100644 index 00000000000..1fd97181042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_ybingroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YbingroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ybingroup", parent_name="histogram2dcontour", **kwargs + ): + super(YbingroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_ybins.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_ybins.py new file mode 100644 index 00000000000..f94bcf66585 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_ybins.py @@ -0,0 +1,50 @@ +import _plotly_utils.basevalidators + + +class YbinsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="ybins", parent_name="histogram2dcontour", **kwargs): + super(YbinsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "YBins"), + data_docs=kwargs.pop( + "data_docs", + """ + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_ycalendar.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_ycalendar.py new file mode 100644 index 00000000000..87084cece52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_ycalendar.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ycalendar", parent_name="histogram2dcontour", **kwargs + ): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_ysrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_ysrc.py new file mode 100644 index 00000000000..310f2d51cfe --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="histogram2dcontour", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_z.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_z.py new file mode 100644 index 00000000000..48de2103d19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="histogram2dcontour", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_zauto.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_zauto.py new file mode 100644 index 00000000000..3735ddff243 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_zauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zauto", parent_name="histogram2dcontour", **kwargs): + super(ZautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_zhoverformat.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_zhoverformat.py new file mode 100644 index 00000000000..3cbd8a8c65a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_zhoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="zhoverformat", parent_name="histogram2dcontour", **kwargs + ): + super(ZhoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_zmax.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_zmax.py new file mode 100644 index 00000000000..817f8b18f88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_zmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmax", parent_name="histogram2dcontour", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_zmid.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_zmid.py new file mode 100644 index 00000000000..eb63bade516 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_zmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmid", parent_name="histogram2dcontour", **kwargs): + super(ZmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_zmin.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_zmin.py new file mode 100644 index 00000000000..d71ae105741 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_zmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zmin", parent_name="histogram2dcontour", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"zauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/_zsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/_zsrc.py new file mode 100644 index 00000000000..e4048ad1dc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="histogram2dcontour", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/__init__.py index db0032b7cde..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/__init__.py @@ -1,843 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="tickvals", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="ticktext", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="tickmode", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickfont", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="histogram2dcontour.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="histogram2dcontour.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py new file mode 100644 index 00000000000..e0f23be034d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py new file mode 100644 index 00000000000..6eb382f78b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py new file mode 100644 index 00000000000..611f964e191 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_dtick.py new file mode 100644 index 00000000000..c8daccfebef --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py new file mode 100644 index 00000000000..5e781ed9038 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_len.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_len.py new file mode 100644 index 00000000000..f74c2bc275b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_lenmode.py new file mode 100644 index 00000000000..a3ea0f95719 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_nticks.py new file mode 100644 index 00000000000..ebeddeb66ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..547eebd455e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..fa5b31e9368 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py new file mode 100644 index 00000000000..acd2ee04af2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showexponent.py new file mode 100644 index 00000000000..b23ceb9ad10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py new file mode 100644 index 00000000000..a6bc8dda551 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..2f1dfc1f3a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..0f143a2dda1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_thickness.py new file mode 100644 index 00000000000..8dfbc0ab736 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..cf414b452dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tick0.py new file mode 100644 index 00000000000..0b5a7e01e4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickangle.py new file mode 100644 index 00000000000..37e062c6367 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py new file mode 100644 index 00000000000..63827fb82f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickfont.py new file mode 100644 index 00000000000..e43c5a162b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickfont", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformat.py new file mode 100644 index 00000000000..7ff4233f2d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..131d48d3d11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..fd5fc2ce1b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticklen.py new file mode 100644 index 00000000000..640d03ae9ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickmode.py new file mode 100644 index 00000000000..0b6a68f42c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickmode.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="tickmode", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py new file mode 100644 index 00000000000..8eacce9868d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticks.py new file mode 100644 index 00000000000..e31210caeee --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..abef87beb55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticktext.py new file mode 100644 index 00000000000..ac456e3d774 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticktext.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="ticktext", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..dcd1ea757c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickvals.py new file mode 100644 index 00000000000..304365ea35c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickvals.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="tickvals", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..1305af20fe2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py new file mode 100644 index 00000000000..7f4613854e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="histogram2dcontour.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_title.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_title.py new file mode 100644 index 00000000000..1e939a249af --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_x.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_x.py new file mode 100644 index 00000000000..52555fe69c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_xanchor.py new file mode 100644 index 00000000000..922d1f9f91a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_xpad.py new file mode 100644 index 00000000000..88707cd4327 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_y.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_y.py new file mode 100644 index 00000000000..f25ddd0f5ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_yanchor.py new file mode 100644 index 00000000000..433a216f397 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ypad.py new file mode 100644 index 00000000000..f81fe8484a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="histogram2dcontour.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py index 249d2dc19b6..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram2dcontour.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram2dcontour.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram2dcontour.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..e777d9777f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram2dcontour.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..ec63096501e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram2dcontour.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..f422d5767f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram2dcontour.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py index 741ee03bb99..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="histogram2dcontour.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="histogram2dcontour.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="histogram2dcontour.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="histogram2dcontour.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="histogram2dcontour.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..707895c44f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="histogram2dcontour.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..bc66a59e6d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="histogram2dcontour.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..1d7e06315f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="histogram2dcontour.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..3af79720c4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="histogram2dcontour.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..e934c749661 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="histogram2dcontour.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/__init__.py index 35acc7abb74..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="histogram2dcontour.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="histogram2dcontour.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="histogram2dcontour.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_font.py new file mode 100644 index 00000000000..89b63f250fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="histogram2dcontour.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_side.py new file mode 100644 index 00000000000..3844fc1af8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="histogram2dcontour.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_text.py new file mode 100644 index 00000000000..134649603be --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="histogram2dcontour.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py index d5d8648b172..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram2dcontour.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram2dcontour.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram2dcontour.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py new file mode 100644 index 00000000000..e5ec08d5c78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram2dcontour.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py new file mode 100644 index 00000000000..52850895581 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram2dcontour.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py new file mode 100644 index 00000000000..ed0ad501993 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram2dcontour.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/__init__.py index fab7a775acb..4ffb01aee3d 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/__init__.py @@ -1,241 +1,34 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="value", parent_name="histogram2dcontour.contours", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="histogram2dcontour.contours", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["levels", "constraint"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="start", parent_name="histogram2dcontour.contours", **kwargs - ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="histogram2dcontour.contours", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showlines", - parent_name="histogram2dcontour.contours", - **kwargs - ): - super(ShowlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showlabels", - parent_name="histogram2dcontour.contours", - **kwargs - ): - super(ShowlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="operation", - parent_name="histogram2dcontour.contours", - **kwargs - ): - super(OperationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "=", - "<", - ">=", - ">", - "<=", - "[]", - "()", - "[)", - "(]", - "][", - ")(", - "](", - ")[", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="labelformat", - parent_name="histogram2dcontour.contours", - **kwargs - ): - super(LabelformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="labelfont", - parent_name="histogram2dcontour.contours", - **kwargs - ): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Labelfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="end", parent_name="histogram2dcontour.contours", **kwargs - ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="coloring", - parent_name="histogram2dcontour.contours", - **kwargs - ): - super(ColoringValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fill", "heatmap", "lines", "none"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._type import TypeValidator + from ._start import StartValidator + from ._size import SizeValidator + from ._showlines import ShowlinesValidator + from ._showlabels import ShowlabelsValidator + from ._operation import OperationValidator + from ._labelformat import LabelformatValidator + from ._labelfont import LabelfontValidator + from ._end import EndValidator + from ._coloring import ColoringValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._type.TypeValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._showlines.ShowlinesValidator", + "._showlabels.ShowlabelsValidator", + "._operation.OperationValidator", + "._labelformat.LabelformatValidator", + "._labelfont.LabelfontValidator", + "._end.EndValidator", + "._coloring.ColoringValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_coloring.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_coloring.py new file mode 100644 index 00000000000..499571871d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_coloring.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="coloring", + parent_name="histogram2dcontour.contours", + **kwargs + ): + super(ColoringValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fill", "heatmap", "lines", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_end.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_end.py new file mode 100644 index 00000000000..da36accdf76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_end.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="end", parent_name="histogram2dcontour.contours", **kwargs + ): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_labelfont.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_labelfont.py new file mode 100644 index 00000000000..413929b51d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_labelfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="labelfont", + parent_name="histogram2dcontour.contours", + **kwargs + ): + super(LabelfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Labelfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_labelformat.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_labelformat.py new file mode 100644 index 00000000000..36a3ab00160 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_labelformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="labelformat", + parent_name="histogram2dcontour.contours", + **kwargs + ): + super(LabelformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_operation.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_operation.py new file mode 100644 index 00000000000..9526bb84b12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_operation.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="operation", + parent_name="histogram2dcontour.contours", + **kwargs + ): + super(OperationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "=", + "<", + ">=", + ">", + "<=", + "[]", + "()", + "[)", + "(]", + "][", + ")(", + "](", + ")[", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_showlabels.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_showlabels.py new file mode 100644 index 00000000000..f64e8cf91ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_showlabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showlabels", + parent_name="histogram2dcontour.contours", + **kwargs + ): + super(ShowlabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_showlines.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_showlines.py new file mode 100644 index 00000000000..c2f3b2f1c1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_showlines.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showlines", + parent_name="histogram2dcontour.contours", + **kwargs + ): + super(ShowlinesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_size.py new file mode 100644 index 00000000000..2e99b220622 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="histogram2dcontour.contours", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_start.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_start.py new file mode 100644 index 00000000000..23279ffb695 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_start.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="start", parent_name="histogram2dcontour.contours", **kwargs + ): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_type.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_type.py new file mode 100644 index 00000000000..e214cc0b765 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="histogram2dcontour.contours", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["levels", "constraint"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_value.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_value.py new file mode 100644 index 00000000000..5a5cf06d7e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="value", parent_name="histogram2dcontour.contours", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py index 9d6763e51cf..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram2dcontour.contours.labelfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram2dcontour.contours.labelfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram2dcontour.contours.labelfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_color.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_color.py new file mode 100644 index 00000000000..6466a1d83e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram2dcontour.contours.labelfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_family.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_family.py new file mode 100644 index 00000000000..4f5ea801383 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram2dcontour.contours.labelfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_size.py new file mode 100644 index 00000000000..8c7fddf6869 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/contours/labelfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram2dcontour.contours.labelfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/__init__.py index 0f136612930..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/__init__.py @@ -1,203 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="namelength", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="histogram2dcontour.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bgcolorsrc", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="alignsrc", - parent_name="histogram2dcontour.hoverlabel", - **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="histogram2dcontour.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_align.py new file mode 100644 index 00000000000..ce0ac070b7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="histogram2dcontour.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..5ed02085846 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="alignsrc", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..f823c3677f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..33c15f61700 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bgcolorsrc", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..c2a4fc5379d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..a20022843ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_font.py new file mode 100644 index 00000000000..184d50def9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="histogram2dcontour.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py new file mode 100644 index 00000000000..b15af6e9dfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="namelength", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..03e800f6e59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="histogram2dcontour.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py index a4054c9d271..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py @@ -1,118 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="histogram2dcontour.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="histogram2dcontour.hoverlabel.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="histogram2dcontour.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="histogram2dcontour.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="histogram2dcontour.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="histogram2dcontour.hoverlabel.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py new file mode 100644 index 00000000000..776bc7cfaaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="histogram2dcontour.hoverlabel.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..70d95fb5a13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="histogram2dcontour.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py new file mode 100644 index 00000000000..a4164b23abf --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="histogram2dcontour.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..81ac202f280 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="histogram2dcontour.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py new file mode 100644 index 00000000000..4e6594cf474 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="histogram2dcontour.hoverlabel.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..ab7741de618 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="histogram2dcontour.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/line/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/line/__init__.py index ebe55450762..a7e94c9a18d 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/line/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/line/__init__.py @@ -1,68 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="histogram2dcontour.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style+colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="smoothing", parent_name="histogram2dcontour.line", **kwargs - ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__( - self, plotly_name="dash", parent_name="histogram2dcontour.line", **kwargs - ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="histogram2dcontour.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style+colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/line/_color.py b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_color.py new file mode 100644 index 00000000000..a636ab7bf71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="histogram2dcontour.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style+colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/line/_dash.py b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_dash.py new file mode 100644 index 00000000000..58ac74e7dd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_dash.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__( + self, plotly_name="dash", parent_name="histogram2dcontour.line", **kwargs + ): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/line/_smoothing.py b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_smoothing.py new file mode 100644 index 00000000000..f1c160f621f --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_smoothing.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="smoothing", parent_name="histogram2dcontour.line", **kwargs + ): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/line/_width.py b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_width.py new file mode 100644 index 00000000000..b8d10eb6601 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="histogram2dcontour.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style+colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/marker/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/marker/__init__.py index 3590df5837b..bdc564f8f76 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/marker/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="histogram2dcontour.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="color", parent_name="histogram2dcontour.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/marker/_color.py b/packages/python/plotly/plotly/validators/histogram2dcontour/marker/_color.py new file mode 100644 index 00000000000..3974bdfc3e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="color", parent_name="histogram2dcontour.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/histogram2dcontour/marker/_colorsrc.py new file mode 100644 index 00000000000..86c523f57d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="histogram2dcontour.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/stream/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/stream/__init__.py index dbf30165a71..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="histogram2dcontour.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="histogram2dcontour.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/histogram2dcontour/stream/_maxpoints.py new file mode 100644 index 00000000000..2098c9e6372 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="histogram2dcontour.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/stream/_token.py b/packages/python/plotly/plotly/validators/histogram2dcontour/stream/_token.py new file mode 100644 index 00000000000..d0bc0372a48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="histogram2dcontour.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/__init__.py index 232c24dacb2..c00e4e78187 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/__init__.py @@ -1,46 +1,14 @@ -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="start", parent_name="histogram2dcontour.xbins", **kwargs - ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="size", parent_name="histogram2dcontour.xbins", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="end", parent_name="histogram2dcontour.xbins", **kwargs - ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._start import StartValidator + from ._size import SizeValidator + from ._end import EndValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_end.py b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_end.py new file mode 100644 index 00000000000..6e71a9beea2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_end.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="end", parent_name="histogram2dcontour.xbins", **kwargs + ): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_size.py new file mode 100644 index 00000000000..86444c7be3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="size", parent_name="histogram2dcontour.xbins", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_start.py b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_start.py new file mode 100644 index 00000000000..1b5b12ae705 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/xbins/_start.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="start", parent_name="histogram2dcontour.xbins", **kwargs + ): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/__init__.py index c24e96f1fc1..c00e4e78187 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/__init__.py @@ -1,46 +1,14 @@ -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="start", parent_name="histogram2dcontour.ybins", **kwargs - ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="size", parent_name="histogram2dcontour.ybins", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="end", parent_name="histogram2dcontour.ybins", **kwargs - ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._start import StartValidator + from ._size import SizeValidator + from ._end import EndValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_end.py b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_end.py new file mode 100644 index 00000000000..06052f15a2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_end.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="end", parent_name="histogram2dcontour.ybins", **kwargs + ): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_size.py b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_size.py new file mode 100644 index 00000000000..eae3ae9495d --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="size", parent_name="histogram2dcontour.ybins", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_start.py b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_start.py new file mode 100644 index 00000000000..7df0e0b1098 --- /dev/null +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/ybins/_start.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="start", parent_name="histogram2dcontour.ybins", **kwargs + ): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/__init__.py b/packages/python/plotly/plotly/validators/image/__init__.py index 01a352b4059..5a6c896856e 100644 --- a/packages/python/plotly/plotly/validators/image/__init__.py +++ b/packages/python/plotly/plotly/validators/image/__init__.py @@ -1,527 +1,76 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="image", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZminValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="zmin", parent_name="image", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "calc"}, - {"valType": "number", "editType": "calc"}, - {"valType": "number", "editType": "calc"}, - {"valType": "number", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZmaxValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="zmax", parent_name="image", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "calc"}, - {"valType": "number", "editType": "calc"}, - {"valType": "number", "editType": "calc"}, - {"valType": "number", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="image", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="image", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="image", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="image", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="image", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="image", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="image", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="image", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="image", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="image", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="image", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="image", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="image", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="image", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="image", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="image", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="image", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="image", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="hovertext", parent_name="image", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="image", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="image", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="image", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="image", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="image", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "color", "name", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="image", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="image", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="image", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="image", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColormodelValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="colormodel", parent_name="image", **kwargs): - super(ColormodelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["rgb", "rgba", "hsl", "hsla"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zmin import ZminValidator + from ._zmax import ZmaxValidator + from ._z import ZValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colormodel import ColormodelValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmax.ZmaxValidator", + "._z.ZValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colormodel.ColormodelValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/image/_colormodel.py b/packages/python/plotly/plotly/validators/image/_colormodel.py new file mode 100644 index 00000000000..fba1f1841c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_colormodel.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColormodelValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="colormodel", parent_name="image", **kwargs): + super(ColormodelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["rgb", "rgba", "hsl", "hsla"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_customdata.py b/packages/python/plotly/plotly/validators/image/_customdata.py new file mode 100644 index 00000000000..978120d5ef0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="image", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_customdatasrc.py b/packages/python/plotly/plotly/validators/image/_customdatasrc.py new file mode 100644 index 00000000000..f4f7648e502 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="image", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_dx.py b/packages/python/plotly/plotly/validators/image/_dx.py new file mode 100644 index 00000000000..b7f84d8d066 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_dx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="image", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_dy.py b/packages/python/plotly/plotly/validators/image/_dy.py new file mode 100644 index 00000000000..574f48315fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_dy.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="image", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hoverinfo.py b/packages/python/plotly/plotly/validators/image/_hoverinfo.py new file mode 100644 index 00000000000..fc0d2266ab0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="image", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "color", "name", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/image/_hoverinfosrc.py new file mode 100644 index 00000000000..83f5fdd8ddf --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="image", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hoverlabel.py b/packages/python/plotly/plotly/validators/image/_hoverlabel.py new file mode 100644 index 00000000000..06f8518edcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="image", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hovertemplate.py b/packages/python/plotly/plotly/validators/image/_hovertemplate.py new file mode 100644 index 00000000000..3e3b886b109 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="image", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/image/_hovertemplatesrc.py new file mode 100644 index 00000000000..f955997dcdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="image", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hovertext.py b/packages/python/plotly/plotly/validators/image/_hovertext.py new file mode 100644 index 00000000000..8a8974169dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hovertext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="hovertext", parent_name="image", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_hovertextsrc.py b/packages/python/plotly/plotly/validators/image/_hovertextsrc.py new file mode 100644 index 00000000000..93137d7ee02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="image", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_ids.py b/packages/python/plotly/plotly/validators/image/_ids.py new file mode 100644 index 00000000000..a4c739389b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="image", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_idssrc.py b/packages/python/plotly/plotly/validators/image/_idssrc.py new file mode 100644 index 00000000000..1730f60767a --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="image", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_meta.py b/packages/python/plotly/plotly/validators/image/_meta.py new file mode 100644 index 00000000000..e1ee95852e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="image", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_metasrc.py b/packages/python/plotly/plotly/validators/image/_metasrc.py new file mode 100644 index 00000000000..7eb07c480af --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="image", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_name.py b/packages/python/plotly/plotly/validators/image/_name.py new file mode 100644 index 00000000000..3ab0910c37b --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="image", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_opacity.py b/packages/python/plotly/plotly/validators/image/_opacity.py new file mode 100644 index 00000000000..494605e103b --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="image", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_stream.py b/packages/python/plotly/plotly/validators/image/_stream.py new file mode 100644 index 00000000000..f6ecbe6e957 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="image", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_text.py b/packages/python/plotly/plotly/validators/image/_text.py new file mode 100644 index 00000000000..2e1799e607c --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="image", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_textsrc.py b/packages/python/plotly/plotly/validators/image/_textsrc.py new file mode 100644 index 00000000000..a9111c5004f --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="image", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_uid.py b/packages/python/plotly/plotly/validators/image/_uid.py new file mode 100644 index 00000000000..9e0390c1513 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="image", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_uirevision.py b/packages/python/plotly/plotly/validators/image/_uirevision.py new file mode 100644 index 00000000000..94d564df812 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="image", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_visible.py b/packages/python/plotly/plotly/validators/image/_visible.py new file mode 100644 index 00000000000..b6d2b6a0f4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="image", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_x0.py b/packages/python/plotly/plotly/validators/image/_x0.py new file mode 100644 index 00000000000..f6556689844 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="image", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_xaxis.py b/packages/python/plotly/plotly/validators/image/_xaxis.py new file mode 100644 index 00000000000..aefb3fb4a36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="image", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_y0.py b/packages/python/plotly/plotly/validators/image/_y0.py new file mode 100644 index 00000000000..5b347a27dbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="image", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_yaxis.py b/packages/python/plotly/plotly/validators/image/_yaxis.py new file mode 100644 index 00000000000..54f5cdb66c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="image", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_z.py b/packages/python/plotly/plotly/validators/image/_z.py new file mode 100644 index 00000000000..7d0531cbaea --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="image", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_zmax.py b/packages/python/plotly/plotly/validators/image/_zmax.py new file mode 100644 index 00000000000..5de0dac0824 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_zmax.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class ZmaxValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="zmax", parent_name="image", **kwargs): + super(ZmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "calc"}, + {"valType": "number", "editType": "calc"}, + {"valType": "number", "editType": "calc"}, + {"valType": "number", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_zmin.py b/packages/python/plotly/plotly/validators/image/_zmin.py new file mode 100644 index 00000000000..3024dc96410 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_zmin.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class ZminValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="zmin", parent_name="image", **kwargs): + super(ZminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "calc"}, + {"valType": "number", "editType": "calc"}, + {"valType": "number", "editType": "calc"}, + {"valType": "number", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/_zsrc.py b/packages/python/plotly/plotly/validators/image/_zsrc.py new file mode 100644 index 00000000000..a042ce6c042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="image", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/image/hoverlabel/__init__.py index 7eddd830b78..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/image/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/__init__.py @@ -1,176 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="image.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="image.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="image.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="image.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="image.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="image.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="image.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="image.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="image.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_align.py new file mode 100644 index 00000000000..a48c2e7fa1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="image.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..50f311bfdb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="image.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..916260c5205 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="image.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..f8ff09a1899 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="image.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..cf865c73bdf --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="image.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..aaf33cefc92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="image.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_font.py new file mode 100644 index 00000000000..17dde4b766c --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="image.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_namelength.py new file mode 100644 index 00000000000..aed34c9eb1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="image.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3d3b2300348 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="image.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/__init__.py index 8a7d9f42206..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/image/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="image.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="image.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="image.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="image.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="image.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="image.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_color.py new file mode 100644 index 00000000000..958887864d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="image.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..0b3056ddf8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="image.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_family.py new file mode 100644 index 00000000000..63509ab516d --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="image.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..3e0b3decc8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="image.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_size.py new file mode 100644 index 00000000000..417f0d3258c --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="image.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..f857cc837f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="image.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/stream/__init__.py b/packages/python/plotly/plotly/validators/image/stream/__init__.py index 4c4f1c1855b..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/image/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/image/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="image.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="image.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/image/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/image/stream/_maxpoints.py new file mode 100644 index 00000000000..cc6d50b0da0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="image.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/image/stream/_token.py b/packages/python/plotly/plotly/validators/image/stream/_token.py new file mode 100644 index 00000000000..69f80a27828 --- /dev/null +++ b/packages/python/plotly/plotly/validators/image/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="image.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/__init__.py b/packages/python/plotly/plotly/validators/indicator/__init__.py index 77aec79e940..8d63b661f31 100644 --- a/packages/python/plotly/plotly/validators/indicator/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/__init__.py @@ -1,389 +1,50 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="indicator", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="indicator", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="indicator", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="indicator", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="indicator", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the title. It - defaults to `center` except for bullet charts - for which it defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="indicator", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NumberValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="number", parent_name="indicator", **kwargs): - super(NumberValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Number"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="indicator", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="indicator", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - flags=kwargs.pop("flags", ["number", "delta", "gauge"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="indicator", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="indicator", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="indicator", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="indicator", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GaugeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="gauge", parent_name="indicator", **kwargs): - super(GaugeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Gauge"), - data_docs=kwargs.pop( - "data_docs", - """ - axis - :class:`plotly.graph_objects.indicator.gauge.Ax - is` instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the - gauge. - borderwidth - Sets the width (in px) of the border enclosing - the gauge. - shape - Set the shape of the gauge - steps - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.Step` instances or dicts with - compatible properties - stepdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.stepdefaults), sets the - default property values to use for elements of - indicator.gauge.steps - threshold - :class:`plotly.graph_objects.indicator.gauge.Th - reshold` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="indicator", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this indicator - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator - trace (in plot fraction). - y - Sets the vertical domain of this indicator - trace (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DeltaValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="delta", parent_name="indicator", **kwargs): - super(DeltaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Delta"), - data_docs=kwargs.pop( - "data_docs", - """ - decreasing - :class:`plotly.graph_objects.indicator.delta.De - creasing` instance or dict with compatible - properties - font - Set the font used to display the delta - increasing - :class:`plotly.graph_objects.indicator.delta.In - creasing` instance or dict with compatible - properties - position - Sets the position of delta with respect to the - number. - reference - Sets the reference value to compute the delta. - By default, it is set to the current value. - relative - Show relative change - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="indicator", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="indicator", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="indicator", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._value import ValueValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._title import TitleValidator + from ._stream import StreamValidator + from ._number import NumberValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._gauge import GaugeValidator + from ._domain import DomainValidator + from ._delta import DeltaValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._value.ValueValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._title.TitleValidator", + "._stream.StreamValidator", + "._number.NumberValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._gauge.GaugeValidator", + "._domain.DomainValidator", + "._delta.DeltaValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_align.py b/packages/python/plotly/plotly/validators/indicator/_align.py new file mode 100644 index 00000000000..0ebc1325588 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_align.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="indicator", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_customdata.py b/packages/python/plotly/plotly/validators/indicator/_customdata.py new file mode 100644 index 00000000000..1794323e894 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="indicator", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_customdatasrc.py b/packages/python/plotly/plotly/validators/indicator/_customdatasrc.py new file mode 100644 index 00000000000..2495dea31e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="indicator", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_delta.py b/packages/python/plotly/plotly/validators/indicator/_delta.py new file mode 100644 index 00000000000..34013ce2e69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_delta.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class DeltaValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="delta", parent_name="indicator", **kwargs): + super(DeltaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Delta"), + data_docs=kwargs.pop( + "data_docs", + """ + decreasing + :class:`plotly.graph_objects.indicator.delta.De + creasing` instance or dict with compatible + properties + font + Set the font used to display the delta + increasing + :class:`plotly.graph_objects.indicator.delta.In + creasing` instance or dict with compatible + properties + position + Sets the position of delta with respect to the + number. + reference + Sets the reference value to compute the delta. + By default, it is set to the current value. + relative + Show relative change + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_domain.py b/packages/python/plotly/plotly/validators/indicator/_domain.py new file mode 100644 index 00000000000..f7eb571fbde --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="indicator", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this indicator + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this indicator trace . + x + Sets the horizontal domain of this indicator + trace (in plot fraction). + y + Sets the vertical domain of this indicator + trace (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_gauge.py b/packages/python/plotly/plotly/validators/indicator/_gauge.py new file mode 100644 index 00000000000..ea8857002d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_gauge.py @@ -0,0 +1,44 @@ +import _plotly_utils.basevalidators + + +class GaugeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="gauge", parent_name="indicator", **kwargs): + super(GaugeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Gauge"), + data_docs=kwargs.pop( + "data_docs", + """ + axis + :class:`plotly.graph_objects.indicator.gauge.Ax + is` instance or dict with compatible properties + bar + Set the appearance of the gauge's value + bgcolor + Sets the gauge background color. + bordercolor + Sets the color of the border enclosing the + gauge. + borderwidth + Sets the width (in px) of the border enclosing + the gauge. + shape + Set the shape of the gauge + steps + A tuple of :class:`plotly.graph_objects.indicat + or.gauge.Step` instances or dicts with + compatible properties + stepdefaults + When used in a template (as layout.template.dat + a.indicator.gauge.stepdefaults), sets the + default property values to use for elements of + indicator.gauge.steps + threshold + :class:`plotly.graph_objects.indicator.gauge.Th + reshold` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_ids.py b/packages/python/plotly/plotly/validators/indicator/_ids.py new file mode 100644 index 00000000000..c3d1a0e3486 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_ids.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="indicator", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_idssrc.py b/packages/python/plotly/plotly/validators/indicator/_idssrc.py new file mode 100644 index 00000000000..4580461499b --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="indicator", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_meta.py b/packages/python/plotly/plotly/validators/indicator/_meta.py new file mode 100644 index 00000000000..3ef9e5db3c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="indicator", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_metasrc.py b/packages/python/plotly/plotly/validators/indicator/_metasrc.py new file mode 100644 index 00000000000..4728ffb4302 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="indicator", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_mode.py b/packages/python/plotly/plotly/validators/indicator/_mode.py new file mode 100644 index 00000000000..3e52cbf3bf0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_mode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="indicator", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + flags=kwargs.pop("flags", ["number", "delta", "gauge"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_name.py b/packages/python/plotly/plotly/validators/indicator/_name.py new file mode 100644 index 00000000000..9690864b761 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="indicator", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_number.py b/packages/python/plotly/plotly/validators/indicator/_number.py new file mode 100644 index 00000000000..a588dcb2622 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_number.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class NumberValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="number", parent_name="indicator", **kwargs): + super(NumberValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Number"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Set the font used to display main number + prefix + Sets a prefix appearing before the number. + suffix + Sets a suffix appearing next to the number. + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_stream.py b/packages/python/plotly/plotly/validators/indicator/_stream.py new file mode 100644 index 00000000000..d781befb9db --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="indicator", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_title.py b/packages/python/plotly/plotly/validators/indicator/_title.py new file mode 100644 index 00000000000..b6850b7a6dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_title.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="indicator", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the title. It + defaults to `center` except for bullet charts + for which it defaults to right. + font + Set the font used to display the title + text + Sets the title of this indicator. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_uid.py b/packages/python/plotly/plotly/validators/indicator/_uid.py new file mode 100644 index 00000000000..5dccb040f61 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_uid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="indicator", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_uirevision.py b/packages/python/plotly/plotly/validators/indicator/_uirevision.py new file mode 100644 index 00000000000..9a7ea7b2382 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="indicator", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_value.py b/packages/python/plotly/plotly/validators/indicator/_value.py new file mode 100644 index 00000000000..58586d92ee7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="indicator", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/_visible.py b/packages/python/plotly/plotly/validators/indicator/_visible.py new file mode 100644 index 00000000000..f7c00412ace --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="indicator", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/__init__.py b/packages/python/plotly/plotly/validators/indicator/delta/__init__.py index e1009261c8c..a0d20199815 100644 --- a/packages/python/plotly/plotly/validators/indicator/delta/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/delta/__init__.py @@ -1,146 +1,26 @@ -import _plotly_utils.basevalidators - - -class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="valueformat", parent_name="indicator.delta", **kwargs - ): - super(ValueformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RelativeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="relative", parent_name="indicator.delta", **kwargs): - super(RelativeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReferenceValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="reference", parent_name="indicator.delta", **kwargs - ): - super(ReferenceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="position", parent_name="indicator.delta", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top", "bottom", "left", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="increasing", parent_name="indicator.delta", **kwargs - ): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Increasing"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="indicator.delta", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="decreasing", parent_name="indicator.delta", **kwargs - ): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Decreasing"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._valueformat import ValueformatValidator + from ._relative import RelativeValidator + from ._reference import ReferenceValidator + from ._position import PositionValidator + from ._increasing import IncreasingValidator + from ._font import FontValidator + from ._decreasing import DecreasingValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valueformat.ValueformatValidator", + "._relative.RelativeValidator", + "._reference.ReferenceValidator", + "._position.PositionValidator", + "._increasing.IncreasingValidator", + "._font.FontValidator", + "._decreasing.DecreasingValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_decreasing.py b/packages/python/plotly/plotly/validators/indicator/delta/_decreasing.py new file mode 100644 index 00000000000..1becceac47d --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_decreasing.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="decreasing", parent_name="indicator.delta", **kwargs + ): + super(DecreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Decreasing"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_font.py b/packages/python/plotly/plotly/validators/indicator/delta/_font.py new file mode 100644 index 00000000000..374c26f30e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="indicator.delta", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_increasing.py b/packages/python/plotly/plotly/validators/indicator/delta/_increasing.py new file mode 100644 index 00000000000..af3d2520cc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_increasing.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="increasing", parent_name="indicator.delta", **kwargs + ): + super(IncreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Increasing"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color for increasing value. + symbol + Sets the symbol to display for increasing value +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_position.py b/packages/python/plotly/plotly/validators/indicator/delta/_position.py new file mode 100644 index 00000000000..853a902df7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_position.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="position", parent_name="indicator.delta", **kwargs): + super(PositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "bottom", "left", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_reference.py b/packages/python/plotly/plotly/validators/indicator/delta/_reference.py new file mode 100644 index 00000000000..ac7cc6ad39c --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_reference.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReferenceValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="reference", parent_name="indicator.delta", **kwargs + ): + super(ReferenceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_relative.py b/packages/python/plotly/plotly/validators/indicator/delta/_relative.py new file mode 100644 index 00000000000..e342a7720a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_relative.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RelativeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="relative", parent_name="indicator.delta", **kwargs): + super(RelativeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/_valueformat.py b/packages/python/plotly/plotly/validators/indicator/delta/_valueformat.py new file mode 100644 index 00000000000..ef098a51541 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/_valueformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="valueformat", parent_name="indicator.delta", **kwargs + ): + super(ValueformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/decreasing/__init__.py b/packages/python/plotly/plotly/validators/indicator/delta/decreasing/__init__.py index 116a1fd4eea..4f553fa708c 100644 --- a/packages/python/plotly/plotly/validators/indicator/delta/decreasing/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/delta/decreasing/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._symbol import SymbolValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="symbol", parent_name="indicator.delta.decreasing", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.delta.decreasing", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/decreasing/_color.py b/packages/python/plotly/plotly/validators/indicator/delta/decreasing/_color.py new file mode 100644 index 00000000000..367e98beb66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/decreasing/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.delta.decreasing", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/decreasing/_symbol.py b/packages/python/plotly/plotly/validators/indicator/delta/decreasing/_symbol.py new file mode 100644 index 00000000000..111170ca068 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/decreasing/_symbol.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="symbol", parent_name="indicator.delta.decreasing", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/font/__init__.py b/packages/python/plotly/plotly/validators/indicator/delta/font/__init__.py index c28c19d8ac1..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/indicator/delta/font/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/delta/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="indicator.delta.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="indicator.delta.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.delta.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/font/_color.py b/packages/python/plotly/plotly/validators/indicator/delta/font/_color.py new file mode 100644 index 00000000000..9a76e7bed10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.delta.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/font/_family.py b/packages/python/plotly/plotly/validators/indicator/delta/font/_family.py new file mode 100644 index 00000000000..c4529d912eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="indicator.delta.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/font/_size.py b/packages/python/plotly/plotly/validators/indicator/delta/font/_size.py new file mode 100644 index 00000000000..9d9acc8f14b --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="indicator.delta.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/increasing/__init__.py b/packages/python/plotly/plotly/validators/indicator/delta/increasing/__init__.py index ca785fc6cc0..4f553fa708c 100644 --- a/packages/python/plotly/plotly/validators/indicator/delta/increasing/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/delta/increasing/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._symbol import SymbolValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="symbol", parent_name="indicator.delta.increasing", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.delta.increasing", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/increasing/_color.py b/packages/python/plotly/plotly/validators/indicator/delta/increasing/_color.py new file mode 100644 index 00000000000..f17dcba5b73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/increasing/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.delta.increasing", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/delta/increasing/_symbol.py b/packages/python/plotly/plotly/validators/indicator/delta/increasing/_symbol.py new file mode 100644 index 00000000000..57a72229435 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/delta/increasing/_symbol.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="symbol", parent_name="indicator.delta.increasing", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/domain/__init__.py b/packages/python/plotly/plotly/validators/indicator/domain/__init__.py index 735553bcf3d..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/indicator/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="indicator.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="indicator.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="indicator.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="indicator.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/domain/_column.py b/packages/python/plotly/plotly/validators/indicator/domain/_column.py new file mode 100644 index 00000000000..9465c167a39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="indicator.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/domain/_row.py b/packages/python/plotly/plotly/validators/indicator/domain/_row.py new file mode 100644 index 00000000000..239aa741022 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="indicator.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/domain/_x.py b/packages/python/plotly/plotly/validators/indicator/domain/_x.py new file mode 100644 index 00000000000..a0e4bbfd0f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="indicator.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/domain/_y.py b/packages/python/plotly/plotly/validators/indicator/domain/_y.py new file mode 100644 index 00000000000..b321c0808e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="indicator.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py index bcddf70f296..89820bb15f8 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py @@ -1,354 +1,30 @@ -import _plotly_utils.basevalidators - - -class ThresholdValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="threshold", parent_name="indicator.gauge", **kwargs - ): - super(ThresholdValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Threshold"), - data_docs=kwargs.pop( - "data_docs", - """ - line - :class:`plotly.graph_objects.indicator.gauge.th - reshold.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the threshold line as a - fraction of the thickness of the gauge. - value - Sets a treshold value drawn as a line. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StepValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="stepdefaults", parent_name="indicator.gauge", **kwargs - ): - super(StepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Step"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="steps", parent_name="indicator.gauge", **kwargs): - super(StepsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Step"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.st - ep.Line` instance or dict with compatible - properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - Sets the range of this axis. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="shape", parent_name="indicator.gauge", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["angular", "bullet"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="indicator.gauge", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="indicator.gauge", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="indicator.gauge", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="bar", parent_name="indicator.gauge", **kwargs): - super(BarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Bar"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.ba - r.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="axis", parent_name="indicator.gauge", **kwargs): - super(AxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Axis"), - data_docs=kwargs.pop( - "data_docs", - """ - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.axis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.axis.tickformatstopdefaults), - sets the default property values to use for - elements of - indicator.gauge.axis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._threshold import ThresholdValidator + from ._stepdefaults import StepdefaultsValidator + from ._steps import StepsValidator + from ._shape import ShapeValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._bar import BarValidator + from ._axis import AxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._threshold.ThresholdValidator", + "._stepdefaults.StepdefaultsValidator", + "._steps.StepsValidator", + "._shape.ShapeValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._bar.BarValidator", + "._axis.AxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_axis.py b/packages/python/plotly/plotly/validators/indicator/gauge/_axis.py new file mode 100644 index 00000000000..bf04ca84535 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_axis.py @@ -0,0 +1,166 @@ +import _plotly_utils.basevalidators + + +class AxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="axis", parent_name="indicator.gauge", **kwargs): + super(AxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Axis"), + data_docs=kwargs.pop( + "data_docs", + """ + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.indicat + or.gauge.axis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.indicator.gauge.axis.tickformatstopdefaults), + sets the default property values to use for + elements of + indicator.gauge.axis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_bar.py b/packages/python/plotly/plotly/validators/indicator/gauge/_bar.py new file mode 100644 index 00000000000..79a281602fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_bar.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class BarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="bar", parent_name="indicator.gauge", **kwargs): + super(BarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Bar"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.ba + r.Line` instance or dict with compatible + properties + thickness + Sets the thickness of the bar as a fraction of + the total thickness of the gauge. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_bgcolor.py b/packages/python/plotly/plotly/validators/indicator/gauge/_bgcolor.py new file mode 100644 index 00000000000..c5b6b3a9649 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="indicator.gauge", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_bordercolor.py b/packages/python/plotly/plotly/validators/indicator/gauge/_bordercolor.py new file mode 100644 index 00000000000..aced4811798 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="indicator.gauge", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_borderwidth.py b/packages/python/plotly/plotly/validators/indicator/gauge/_borderwidth.py new file mode 100644 index 00000000000..9f7bfe94207 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="indicator.gauge", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_shape.py b/packages/python/plotly/plotly/validators/indicator/gauge/_shape.py new file mode 100644 index 00000000000..1553bb4da4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_shape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="shape", parent_name="indicator.gauge", **kwargs): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["angular", "bullet"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_stepdefaults.py b/packages/python/plotly/plotly/validators/indicator/gauge/_stepdefaults.py new file mode 100644 index 00000000000..48e93944d3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_stepdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class StepdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="stepdefaults", parent_name="indicator.gauge", **kwargs + ): + super(StepdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Step"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_steps.py b/packages/python/plotly/plotly/validators/indicator/gauge/_steps.py new file mode 100644 index 00000000000..4ff6fe60b6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_steps.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="steps", parent_name="indicator.gauge", **kwargs): + super(StepsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Step"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the background color of the arc. + line + :class:`plotly.graph_objects.indicator.gauge.st + ep.Line` instance or dict with compatible + properties + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + range + Sets the range of this axis. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + thickness + Sets the thickness of the bar as a fraction of + the total thickness of the gauge. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/_threshold.py b/packages/python/plotly/plotly/validators/indicator/gauge/_threshold.py new file mode 100644 index 00000000000..bd761c3618d --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/_threshold.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class ThresholdValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="threshold", parent_name="indicator.gauge", **kwargs + ): + super(ThresholdValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Threshold"), + data_docs=kwargs.pop( + "data_docs", + """ + line + :class:`plotly.graph_objects.indicator.gauge.th + reshold.Line` instance or dict with compatible + properties + thickness + Sets the thickness of the threshold line as a + fraction of the thickness of the gauge. + value + Sets a treshold value drawn as a line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/__init__.py index 56911a1359d..7c4ef6ae0e4 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/axis/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/__init__.py @@ -1,524 +1,66 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="indicator.gauge.axis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="indicator.gauge.axis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="indicator.gauge.axis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="indicator.gauge.axis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="indicator.gauge.axis", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="indicator.gauge.axis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="indicator.gauge.axis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="indicator.gauge.axis", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="indicator.gauge.axis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="indicator.gauge.axis", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="indicator.gauge.axis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="indicator.gauge.axis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="indicator.gauge.axis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="indicator.gauge.axis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="indicator.gauge.axis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="range", parent_name="indicator.gauge.axis", **kwargs - ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="indicator.gauge.axis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="indicator.gauge.axis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="indicator.gauge.axis", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_dtick.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_dtick.py new file mode 100644 index 00000000000..219d2c5041c --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="indicator.gauge.axis", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_exponentformat.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_exponentformat.py new file mode 100644 index 00000000000..f26ca14c264 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="indicator.gauge.axis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_nticks.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_nticks.py new file mode 100644 index 00000000000..45eeb13b4ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="indicator.gauge.axis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_range.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_range.py new file mode 100644 index 00000000000..7bf90ae50a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_range.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="range", parent_name="indicator.gauge.axis", **kwargs + ): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_separatethousands.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_separatethousands.py new file mode 100644 index 00000000000..ccf6e166dc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="indicator.gauge.axis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showexponent.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showexponent.py new file mode 100644 index 00000000000..7f57d81408f --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="indicator.gauge.axis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showticklabels.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showticklabels.py new file mode 100644 index 00000000000..4a275b90c16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="indicator.gauge.axis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showtickprefix.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showtickprefix.py new file mode 100644 index 00000000000..2d45217ccbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="indicator.gauge.axis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showticksuffix.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showticksuffix.py new file mode 100644 index 00000000000..cb210fa1772 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="indicator.gauge.axis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tick0.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tick0.py new file mode 100644 index 00000000000..cf513896dec --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="indicator.gauge.axis", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickangle.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickangle.py new file mode 100644 index 00000000000..16be5abb507 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickcolor.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickcolor.py new file mode 100644 index 00000000000..3472a825dee --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickfont.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickfont.py new file mode 100644 index 00000000000..14717cf6e22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformat.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformat.py new file mode 100644 index 00000000000..ae45960beb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..5ad43b0e702 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="indicator.gauge.axis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstops.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstops.py new file mode 100644 index 00000000000..24e84e20396 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="indicator.gauge.axis", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticklen.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticklen.py new file mode 100644 index 00000000000..deeb3a91d16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="indicator.gauge.axis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickmode.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickmode.py new file mode 100644 index 00000000000..b92acf56972 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickprefix.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickprefix.py new file mode 100644 index 00000000000..dbd3e2bce84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticks.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticks.py new file mode 100644 index 00000000000..78f2aa4530e --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="indicator.gauge.axis", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticksuffix.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticksuffix.py new file mode 100644 index 00000000000..840a724ec36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="indicator.gauge.axis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticktext.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticktext.py new file mode 100644 index 00000000000..e7049563956 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="indicator.gauge.axis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticktextsrc.py new file mode 100644 index 00000000000..f690812d0b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="indicator.gauge.axis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickvals.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickvals.py new file mode 100644 index 00000000000..67c736082cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickvalssrc.py new file mode 100644 index 00000000000..b1b5db114d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickwidth.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickwidth.py new file mode 100644 index 00000000000..b4ba9d20dd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="indicator.gauge.axis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/_visible.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_visible.py new file mode 100644 index 00000000000..f38e7329937 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="indicator.gauge.axis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/__init__.py index fc05da3ad51..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="indicator.gauge.axis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="indicator.gauge.axis.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.gauge.axis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_color.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_color.py new file mode 100644 index 00000000000..70c12b8ad05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.gauge.axis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_family.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_family.py new file mode 100644 index 00000000000..6479c6e79b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="indicator.gauge.axis.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_size.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_size.py new file mode 100644 index 00000000000..40dd5792bff --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="indicator.gauge.axis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py index e94b5c8edbc..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="indicator.gauge.axis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="indicator.gauge.axis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="indicator.gauge.axis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="indicator.gauge.axis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="indicator.gauge.axis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..c4dfe4bc8ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="indicator.gauge.axis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..989ff11146e --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="indicator.gauge.axis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py new file mode 100644 index 00000000000..b0f01cb7ad3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="indicator.gauge.axis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..b9853cd065d --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="indicator.gauge.axis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py new file mode 100644 index 00000000000..bcbea7a573a --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="indicator.gauge.axis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/__init__.py index 61061d3fc4b..64bf3e3c35b 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/bar/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/__init__.py @@ -1,56 +1,18 @@ -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="indicator.gauge.bar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="indicator.gauge.bar", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.gauge.bar", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._thickness import ThicknessValidator + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._thickness.ThicknessValidator", + "._line.LineValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/_color.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/_color.py new file mode 100644 index 00000000000..e3c75539cae --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.gauge.bar", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/_line.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/_line.py new file mode 100644 index 00000000000..d061cfb9ecc --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/_line.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="indicator.gauge.bar", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. + width + Sets the width (in px) of the line enclosing + each sector. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/_thickness.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/_thickness.py new file mode 100644 index 00000000000..79ea9cdbc70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/_thickness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="indicator.gauge.bar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/__init__.py index 6f9209b3820..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/__init__.py @@ -1,31 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="indicator.gauge.bar.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.gauge.bar.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/_color.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/_color.py new file mode 100644 index 00000000000..d8c115c15e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.gauge.bar.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/_width.py b/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/_width.py new file mode 100644 index 00000000000..54e9365dbbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/bar/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="indicator.gauge.bar.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py index 85cb7b1f731..91d9f88dd50 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py @@ -1,116 +1,24 @@ -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="indicator.gauge.step", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="indicator.gauge.step", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="range", parent_name="indicator.gauge.step", **kwargs - ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="indicator.gauge.step", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="indicator.gauge.step", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.gauge.step", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._thickness import ThicknessValidator + from ._templateitemname import TemplateitemnameValidator + from ._range import RangeValidator + from ._name import NameValidator + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._thickness.ThicknessValidator", + "._templateitemname.TemplateitemnameValidator", + "._range.RangeValidator", + "._name.NameValidator", + "._line.LineValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/_color.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/_color.py new file mode 100644 index 00000000000..21c08968b90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.gauge.step", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/_line.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/_line.py new file mode 100644 index 00000000000..e29de2f3bd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/_line.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="indicator.gauge.step", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. + width + Sets the width (in px) of the line enclosing + each sector. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/_name.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/_name.py new file mode 100644 index 00000000000..0264f8bf1b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="indicator.gauge.step", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/_range.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/_range.py new file mode 100644 index 00000000000..40ba541e6fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/_range.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="range", parent_name="indicator.gauge.step", **kwargs + ): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/_templateitemname.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/_templateitemname.py new file mode 100644 index 00000000000..7e68222a996 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="indicator.gauge.step", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/_thickness.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/_thickness.py new file mode 100644 index 00000000000..a360edfeed6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/_thickness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="indicator.gauge.step", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py index 2c981da6acd..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py @@ -1,31 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="indicator.gauge.step.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.gauge.step.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/line/_color.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/_color.py new file mode 100644 index 00000000000..2c021fc48b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.gauge.step.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/step/line/_width.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/_width.py new file mode 100644 index 00000000000..5e71fc42238 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="indicator.gauge.step.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/__init__.py index 1d2bc32b17d..1340bcf0d3c 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/__init__.py @@ -1,56 +1,18 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="value", parent_name="indicator.gauge.threshold", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="indicator.gauge.threshold", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="indicator.gauge.threshold", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the threshold line. - width - Sets the width (in px) of the threshold line. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._thickness import ThicknessValidator + from ._line import LineValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._thickness.ThicknessValidator", + "._line.LineValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_line.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_line.py new file mode 100644 index 00000000000..bd8fb2a36f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_line.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="indicator.gauge.threshold", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the threshold line. + width + Sets the width (in px) of the threshold line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_thickness.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_thickness.py new file mode 100644 index 00000000000..71f4af6e018 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_thickness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="indicator.gauge.threshold", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_value.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_value.py new file mode 100644 index 00000000000..4d479188008 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="value", parent_name="indicator.gauge.threshold", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/__init__.py index a8000d61748..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/__init__.py @@ -1,37 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="width", - parent_name="indicator.gauge.threshold.line", - **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="indicator.gauge.threshold.line", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/_color.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/_color.py new file mode 100644 index 00000000000..e10b0815eac --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="indicator.gauge.threshold.line", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/_width.py b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/_width.py new file mode 100644 index 00000000000..433e63258f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/gauge/threshold/line/_width.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="width", + parent_name="indicator.gauge.threshold.line", + **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/__init__.py b/packages/python/plotly/plotly/validators/indicator/number/__init__.py index d84176b796f..4b1ce498797 100644 --- a/packages/python/plotly/plotly/validators/indicator/number/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/number/__init__.py @@ -1,81 +1,20 @@ -import _plotly_utils.basevalidators - - -class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="valueformat", parent_name="indicator.number", **kwargs - ): - super(ValueformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="suffix", parent_name="indicator.number", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="prefix", parent_name="indicator.number", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="indicator.number", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._valueformat import ValueformatValidator + from ._suffix import SuffixValidator + from ._prefix import PrefixValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valueformat.ValueformatValidator", + "._suffix.SuffixValidator", + "._prefix.PrefixValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/_font.py b/packages/python/plotly/plotly/validators/indicator/number/_font.py new file mode 100644 index 00000000000..fbf497909f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="indicator.number", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/_prefix.py b/packages/python/plotly/plotly/validators/indicator/number/_prefix.py new file mode 100644 index 00000000000..eb20315a4b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/_prefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PrefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="prefix", parent_name="indicator.number", **kwargs): + super(PrefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/_suffix.py b/packages/python/plotly/plotly/validators/indicator/number/_suffix.py new file mode 100644 index 00000000000..d574b45289b --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/_suffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="suffix", parent_name="indicator.number", **kwargs): + super(SuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/_valueformat.py b/packages/python/plotly/plotly/validators/indicator/number/_valueformat.py new file mode 100644 index 00000000000..e27df5cf225 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/_valueformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="valueformat", parent_name="indicator.number", **kwargs + ): + super(ValueformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/font/__init__.py b/packages/python/plotly/plotly/validators/indicator/number/font/__init__.py index 4abb321dfdd..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/indicator/number/font/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/number/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="indicator.number.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="indicator.number.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.number.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/font/_color.py b/packages/python/plotly/plotly/validators/indicator/number/font/_color.py new file mode 100644 index 00000000000..d1c7ded065f --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.number.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/font/_family.py b/packages/python/plotly/plotly/validators/indicator/number/font/_family.py new file mode 100644 index 00000000000..7e09656c5fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="indicator.number.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/number/font/_size.py b/packages/python/plotly/plotly/validators/indicator/number/font/_size.py new file mode 100644 index 00000000000..1e4f6ce69a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/number/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="indicator.number.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/stream/__init__.py b/packages/python/plotly/plotly/validators/indicator/stream/__init__.py index dfba0cab9e3..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/indicator/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="indicator.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="indicator.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py new file mode 100644 index 00000000000..e30e0ca8706 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="indicator.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/stream/_token.py b/packages/python/plotly/plotly/validators/indicator/stream/_token.py new file mode 100644 index 00000000000..29222daf187 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="indicator.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/__init__.py b/packages/python/plotly/plotly/validators/indicator/title/__init__.py index 461f9132352..9b0e84b4bcb 100644 --- a/packages/python/plotly/plotly/validators/indicator/title/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/title/__init__.py @@ -1,66 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="indicator.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="indicator.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="indicator.title", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._font.FontValidator", "._align.AlignValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/_align.py b/packages/python/plotly/plotly/validators/indicator/title/_align.py new file mode 100644 index 00000000000..d2db0394db9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/title/_align.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="indicator.title", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/_font.py b/packages/python/plotly/plotly/validators/indicator/title/_font.py new file mode 100644 index 00000000000..2331f5e0188 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="indicator.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/_text.py b/packages/python/plotly/plotly/validators/indicator/title/_text.py new file mode 100644 index 00000000000..c0e0362285e --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="indicator.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/font/__init__.py b/packages/python/plotly/plotly/validators/indicator/title/font/__init__.py index 13768dd21c1..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/indicator/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="indicator.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="indicator.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="indicator.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/font/_color.py b/packages/python/plotly/plotly/validators/indicator/title/font/_color.py new file mode 100644 index 00000000000..34c91b02602 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="indicator.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/font/_family.py b/packages/python/plotly/plotly/validators/indicator/title/font/_family.py new file mode 100644 index 00000000000..a10e6806bf9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="indicator.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/indicator/title/font/_size.py b/packages/python/plotly/plotly/validators/indicator/title/font/_size.py new file mode 100644 index 00000000000..8b9d97f0c33 --- /dev/null +++ b/packages/python/plotly/plotly/validators/indicator/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="indicator.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/__init__.py b/packages/python/plotly/plotly/validators/isosurface/__init__.py index 48a0929ad04..eb78be56ba0 100644 --- a/packages/python/plotly/plotly/validators/isosurface/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/__init__.py @@ -1,1141 +1,116 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="isosurface", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="isosurface", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="isosurface", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="isosurface", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="isosurface", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="isosurface", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="isosurface", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuesrc", parent_name="isosurface", **kwargs): - super(ValuesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="value", parent_name="isosurface", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="isosurface", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="isosurface", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="isosurface", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="isosurface", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="surface", parent_name="isosurface", **kwargs): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Surface"), - data_docs=kwargs.pop( - "data_docs", - """ - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="isosurface", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpaceframeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="spaceframe", parent_name="isosurface", **kwargs): - super(SpaceframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Spaceframe"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 0.15 - meaning that only 15% of the area of every - faces of tetras would be shaded. Applying a - greater `fill` ratio would allow the creation - of stronger elements or could be sued to have - entirely closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SlicesValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="slices", parent_name="isosurface", **kwargs): - super(SlicesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Slices"), - data_docs=kwargs.pop( - "data_docs", - """ - x - :class:`plotly.graph_objects.isosurface.slices. - X` instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.slices. - Y` instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.slices. - Z` instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="isosurface", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="isosurface", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="isosurface", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="isosurface", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="isosurface", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="isosurface", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="isosurface", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="isosurface", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lightposition", parent_name="isosurface", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lightposition"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lighting", parent_name="isosurface", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lighting"), - data_docs=kwargs.pop( - "data_docs", - """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="isosurface", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsominValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="isomin", parent_name="isosurface", **kwargs): - super(IsominValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsomaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="isomax", parent_name="isosurface", **kwargs): - super(IsomaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="isosurface", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="isosurface", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="isosurface", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="isosurface", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="isosurface", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="isosurface", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="isosurface", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="isosurface", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="isosurface", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="flatshading", parent_name="isosurface", **kwargs): - super(FlatshadingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="isosurface", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="isosurface", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contour", parent_name="isosurface", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contour"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="isosurface", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="isosurface", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.isosurf - ace.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.isosurface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of isosurface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.isosurface.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - isosurface.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - isosurface.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="isosurface", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="isosurface", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="isosurface", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="isosurface", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="isosurface", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CapsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="caps", parent_name="isosurface", **kwargs): - super(CapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Caps"), - data_docs=kwargs.pop( - "data_docs", - """ - x - :class:`plotly.graph_objects.isosurface.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.caps.Z` - instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="isosurface", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._valuesrc import ValuesrcValidator + from ._value import ValueValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._surface import SurfaceValidator + from ._stream import StreamValidator + from ._spaceframe import SpaceframeValidator + from ._slices import SlicesValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lightposition import LightpositionValidator + from ._lighting import LightingValidator + from ._legendgroup import LegendgroupValidator + from ._isomin import IsominValidator + from ._isomax import IsomaxValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._flatshading import FlatshadingValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contour import ContourValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._caps import CapsValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._valuesrc.ValuesrcValidator", + "._value.ValueValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._surface.SurfaceValidator", + "._stream.StreamValidator", + "._spaceframe.SpaceframeValidator", + "._slices.SlicesValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendgroup.LegendgroupValidator", + "._isomin.IsominValidator", + "._isomax.IsomaxValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._flatshading.FlatshadingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contour.ContourValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._caps.CapsValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_autocolorscale.py b/packages/python/plotly/plotly/validators/isosurface/_autocolorscale.py new file mode 100644 index 00000000000..62aea567a56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="isosurface", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_caps.py b/packages/python/plotly/plotly/validators/isosurface/_caps.py new file mode 100644 index 00000000000..f8fbf365064 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_caps.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class CapsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="caps", parent_name="isosurface", **kwargs): + super(CapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Caps"), + data_docs=kwargs.pop( + "data_docs", + """ + x + :class:`plotly.graph_objects.isosurface.caps.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.caps.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.caps.Z` + instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_cauto.py b/packages/python/plotly/plotly/validators/isosurface/_cauto.py new file mode 100644 index 00000000000..33e851bd19c --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="isosurface", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_cmax.py b/packages/python/plotly/plotly/validators/isosurface/_cmax.py new file mode 100644 index 00000000000..2a092c714c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="isosurface", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_cmid.py b/packages/python/plotly/plotly/validators/isosurface/_cmid.py new file mode 100644 index 00000000000..5902a12e810 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="isosurface", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_cmin.py b/packages/python/plotly/plotly/validators/isosurface/_cmin.py new file mode 100644 index 00000000000..6f6f21d8a45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="isosurface", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_coloraxis.py b/packages/python/plotly/plotly/validators/isosurface/_coloraxis.py new file mode 100644 index 00000000000..ca348e8dcc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="isosurface", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_colorbar.py b/packages/python/plotly/plotly/validators/isosurface/_colorbar.py new file mode 100644 index 00000000000..dde3b884ff7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="isosurface", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.isosurf + ace.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.isosurface.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of isosurface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.isosurface.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + isosurface.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + isosurface.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_colorscale.py b/packages/python/plotly/plotly/validators/isosurface/_colorscale.py new file mode 100644 index 00000000000..dc5c632a943 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="isosurface", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_contour.py b/packages/python/plotly/plotly/validators/isosurface/_contour.py new file mode 100644 index 00000000000..8f6fddf1daf --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_contour.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contour", parent_name="isosurface", **kwargs): + super(ContourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contour"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_customdata.py b/packages/python/plotly/plotly/validators/isosurface/_customdata.py new file mode 100644 index 00000000000..9a3d51b08dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="isosurface", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_customdatasrc.py b/packages/python/plotly/plotly/validators/isosurface/_customdatasrc.py new file mode 100644 index 00000000000..67b69e23d8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="isosurface", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_flatshading.py b/packages/python/plotly/plotly/validators/isosurface/_flatshading.py new file mode 100644 index 00000000000..224d92853ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_flatshading.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="flatshading", parent_name="isosurface", **kwargs): + super(FlatshadingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hoverinfo.py b/packages/python/plotly/plotly/validators/isosurface/_hoverinfo.py new file mode 100644 index 00000000000..248e1fbe866 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="isosurface", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/isosurface/_hoverinfosrc.py new file mode 100644 index 00000000000..3ab417f25b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="isosurface", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hoverlabel.py b/packages/python/plotly/plotly/validators/isosurface/_hoverlabel.py new file mode 100644 index 00000000000..d983dc4bec6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="isosurface", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hovertemplate.py b/packages/python/plotly/plotly/validators/isosurface/_hovertemplate.py new file mode 100644 index 00000000000..1ad3a3f2c55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="isosurface", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/isosurface/_hovertemplatesrc.py new file mode 100644 index 00000000000..a64ac3ed898 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="isosurface", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hovertext.py b/packages/python/plotly/plotly/validators/isosurface/_hovertext.py new file mode 100644 index 00000000000..fed6206eeab --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="isosurface", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_hovertextsrc.py b/packages/python/plotly/plotly/validators/isosurface/_hovertextsrc.py new file mode 100644 index 00000000000..d4cdc7feaac --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="isosurface", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_ids.py b/packages/python/plotly/plotly/validators/isosurface/_ids.py new file mode 100644 index 00000000000..f9d5161aff1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="isosurface", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_idssrc.py b/packages/python/plotly/plotly/validators/isosurface/_idssrc.py new file mode 100644 index 00000000000..bb8a0b4fc99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="isosurface", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_isomax.py b/packages/python/plotly/plotly/validators/isosurface/_isomax.py new file mode 100644 index 00000000000..5639a7830bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_isomax.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IsomaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="isomax", parent_name="isosurface", **kwargs): + super(IsomaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_isomin.py b/packages/python/plotly/plotly/validators/isosurface/_isomin.py new file mode 100644 index 00000000000..22ec85adf79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_isomin.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IsominValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="isomin", parent_name="isosurface", **kwargs): + super(IsominValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_legendgroup.py b/packages/python/plotly/plotly/validators/isosurface/_legendgroup.py new file mode 100644 index 00000000000..cd94818ac2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="isosurface", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_lighting.py b/packages/python/plotly/plotly/validators/isosurface/_lighting.py new file mode 100644 index 00000000000..9b0fe5f0516 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_lighting.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lighting", parent_name="isosurface", **kwargs): + super(LightingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lighting"), + data_docs=kwargs.pop( + "data_docs", + """ + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_lightposition.py b/packages/python/plotly/plotly/validators/isosurface/_lightposition.py new file mode 100644 index 00000000000..3a4a6a3064e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_lightposition.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lightposition", parent_name="isosurface", **kwargs): + super(LightpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lightposition"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_meta.py b/packages/python/plotly/plotly/validators/isosurface/_meta.py new file mode 100644 index 00000000000..91f4a9af450 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="isosurface", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_metasrc.py b/packages/python/plotly/plotly/validators/isosurface/_metasrc.py new file mode 100644 index 00000000000..fb73a34b894 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="isosurface", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_name.py b/packages/python/plotly/plotly/validators/isosurface/_name.py new file mode 100644 index 00000000000..4572f9402de --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="isosurface", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_opacity.py b/packages/python/plotly/plotly/validators/isosurface/_opacity.py new file mode 100644 index 00000000000..980545beda4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="isosurface", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_reversescale.py b/packages/python/plotly/plotly/validators/isosurface/_reversescale.py new file mode 100644 index 00000000000..70df2abe717 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="isosurface", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_scene.py b/packages/python/plotly/plotly/validators/isosurface/_scene.py new file mode 100644 index 00000000000..3a33e3f7875 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="isosurface", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_showlegend.py b/packages/python/plotly/plotly/validators/isosurface/_showlegend.py new file mode 100644 index 00000000000..eda658e7455 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="isosurface", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_showscale.py b/packages/python/plotly/plotly/validators/isosurface/_showscale.py new file mode 100644 index 00000000000..2439ed28d6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="isosurface", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_slices.py b/packages/python/plotly/plotly/validators/isosurface/_slices.py new file mode 100644 index 00000000000..704779f0747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_slices.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class SlicesValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="slices", parent_name="isosurface", **kwargs): + super(SlicesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Slices"), + data_docs=kwargs.pop( + "data_docs", + """ + x + :class:`plotly.graph_objects.isosurface.slices. + X` instance or dict with compatible properties + y + :class:`plotly.graph_objects.isosurface.slices. + Y` instance or dict with compatible properties + z + :class:`plotly.graph_objects.isosurface.slices. + Z` instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_spaceframe.py b/packages/python/plotly/plotly/validators/isosurface/_spaceframe.py new file mode 100644 index 00000000000..6a54954fbf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_spaceframe.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class SpaceframeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="spaceframe", parent_name="isosurface", **kwargs): + super(SpaceframeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Spaceframe"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `spaceframe` + elements. The default fill value is 0.15 + meaning that only 15% of the area of every + faces of tetras would be shaded. Applying a + greater `fill` ratio would allow the creation + of stronger elements or could be sued to have + entirely closed areas (in case of using 1). + show + Displays/hides tetrahedron shapes between + minimum and maximum iso-values. Often useful + when either caps or surfaces are disabled or + filled with values less than 1. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_stream.py b/packages/python/plotly/plotly/validators/isosurface/_stream.py new file mode 100644 index 00000000000..508611695b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="isosurface", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_surface.py b/packages/python/plotly/plotly/validators/isosurface/_surface.py new file mode 100644 index 00000000000..11e1d2e6f44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_surface.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="surface", parent_name="isosurface", **kwargs): + super(SurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Surface"), + data_docs=kwargs.pop( + "data_docs", + """ + count + Sets the number of iso-surfaces between minimum + and maximum iso-values. By default this value + is 2 meaning that only minimum and maximum + surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The + default fill value of the surface is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is + `all` meaning that the rest of surface elements + would be shaded. The check options (either 1 or + 2) could be used to draw half of the squares on + the surface. Using various combinations of + capital `A`, `B`, `C`, `D` and `E` may also be + used to reduce the number of triangles on the + iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and + maximum iso-values. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_text.py b/packages/python/plotly/plotly/validators/isosurface/_text.py new file mode 100644 index 00000000000..3f586e92879 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="isosurface", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_textsrc.py b/packages/python/plotly/plotly/validators/isosurface/_textsrc.py new file mode 100644 index 00000000000..eae738f87d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="isosurface", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_uid.py b/packages/python/plotly/plotly/validators/isosurface/_uid.py new file mode 100644 index 00000000000..d0fefd12631 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="isosurface", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_uirevision.py b/packages/python/plotly/plotly/validators/isosurface/_uirevision.py new file mode 100644 index 00000000000..6f34ba033b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="isosurface", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_value.py b/packages/python/plotly/plotly/validators/isosurface/_value.py new file mode 100644 index 00000000000..aeada45f16c --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_value.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="value", parent_name="isosurface", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_valuesrc.py b/packages/python/plotly/plotly/validators/isosurface/_valuesrc.py new file mode 100644 index 00000000000..19257e38735 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_valuesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuesrc", parent_name="isosurface", **kwargs): + super(ValuesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_visible.py b/packages/python/plotly/plotly/validators/isosurface/_visible.py new file mode 100644 index 00000000000..f9e0af9a11e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="isosurface", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_x.py b/packages/python/plotly/plotly/validators/isosurface/_x.py new file mode 100644 index 00000000000..24d62e36f6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="isosurface", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_xsrc.py b/packages/python/plotly/plotly/validators/isosurface/_xsrc.py new file mode 100644 index 00000000000..9ded7059098 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="isosurface", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_y.py b/packages/python/plotly/plotly/validators/isosurface/_y.py new file mode 100644 index 00000000000..d16fd95bf11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="isosurface", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_ysrc.py b/packages/python/plotly/plotly/validators/isosurface/_ysrc.py new file mode 100644 index 00000000000..ae7bd294898 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="isosurface", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_z.py b/packages/python/plotly/plotly/validators/isosurface/_z.py new file mode 100644 index 00000000000..15b36bf8255 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="isosurface", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/_zsrc.py b/packages/python/plotly/plotly/validators/isosurface/_zsrc.py new file mode 100644 index 00000000000..580623a28de --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="isosurface", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/__init__.py b/packages/python/plotly/plotly/validators/isosurface/caps/__init__.py index 286402b58d6..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/isosurface/caps/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/caps/__init__.py @@ -1,91 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="z", parent_name="isosurface.caps", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Z"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="y", parent_name="isosurface.caps", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Y"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="x", parent_name="isosurface.caps", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "X"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/_x.py b/packages/python/plotly/plotly/validators/isosurface/caps/_x.py new file mode 100644 index 00000000000..e66a761bec3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/_x.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="x", parent_name="isosurface.caps", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "X"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the x `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/_y.py b/packages/python/plotly/plotly/validators/isosurface/caps/_y.py new file mode 100644 index 00000000000..2c2653f60c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/_y.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="y", parent_name="isosurface.caps", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Y"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the y `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/_z.py b/packages/python/plotly/plotly/validators/isosurface/caps/_z.py new file mode 100644 index 00000000000..2ecd6f3449e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/_z.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="z", parent_name="isosurface.caps", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Z"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the z `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/x/__init__.py b/packages/python/plotly/plotly/validators/isosurface/caps/x/__init__.py index f45b43dcaba..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/isosurface/caps/x/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/caps/x/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.caps.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.caps.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/x/_fill.py b/packages/python/plotly/plotly/validators/isosurface/caps/x/_fill.py new file mode 100644 index 00000000000..db82f6fbe04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/x/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.caps.x", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/x/_show.py b/packages/python/plotly/plotly/validators/isosurface/caps/x/_show.py new file mode 100644 index 00000000000..ac2166293ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/x/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.caps.x", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/y/__init__.py b/packages/python/plotly/plotly/validators/isosurface/caps/y/__init__.py index 464ff109baf..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/isosurface/caps/y/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/caps/y/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.caps.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.caps.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/y/_fill.py b/packages/python/plotly/plotly/validators/isosurface/caps/y/_fill.py new file mode 100644 index 00000000000..e4be221f0b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/y/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.caps.y", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/y/_show.py b/packages/python/plotly/plotly/validators/isosurface/caps/y/_show.py new file mode 100644 index 00000000000..dc1544aee9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/y/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.caps.y", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/z/__init__.py b/packages/python/plotly/plotly/validators/isosurface/caps/z/__init__.py index e9ea4aaa7bb..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/isosurface/caps/z/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/caps/z/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.caps.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.caps.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/z/_fill.py b/packages/python/plotly/plotly/validators/isosurface/caps/z/_fill.py new file mode 100644 index 00000000000..c3269eedd8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/z/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.caps.z", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/caps/z/_show.py b/packages/python/plotly/plotly/validators/isosurface/caps/z/_show.py new file mode 100644 index 00000000000..0afe370c441 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/caps/z/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.caps.z", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/__init__.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/__init__.py index cc082ae5eff..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/isosurface/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/__init__.py @@ -1,761 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="isosurface.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="isosurface.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="isosurface.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="isosurface.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="isosurface.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="isosurface.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="isosurface.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="isosurface.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="isosurface.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="isosurface.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="isosurface.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="isosurface.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="isosurface.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="isosurface.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="isosurface.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="isosurface.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="isosurface.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="isosurface.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="isosurface.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="isosurface.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="isosurface.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="isosurface.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="isosurface.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="isosurface.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="isosurface.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="isosurface.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="isosurface.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="isosurface.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="isosurface.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="isosurface.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="isosurface.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="isosurface.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="isosurface.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="isosurface.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="isosurface.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="isosurface.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="isosurface.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="isosurface.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="isosurface.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="isosurface.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="isosurface.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_bgcolor.py new file mode 100644 index 00000000000..beeae2e8e25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="isosurface.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_bordercolor.py new file mode 100644 index 00000000000..a025825d9e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="isosurface.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_borderwidth.py new file mode 100644 index 00000000000..3a734d69b8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="isosurface.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_dtick.py new file mode 100644 index 00000000000..847c6ade3a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="isosurface.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_exponentformat.py new file mode 100644 index 00000000000..25b82bb831f --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="isosurface.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_len.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_len.py new file mode 100644 index 00000000000..4edfe7651a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="isosurface.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_lenmode.py new file mode 100644 index 00000000000..2c014bd3341 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="isosurface.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_nticks.py new file mode 100644 index 00000000000..cd06dba79ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="isosurface.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..43bf8886592 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="isosurface.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..ed0923a9cc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="isosurface.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_separatethousands.py new file mode 100644 index 00000000000..3f36842cc52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="isosurface.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showexponent.py new file mode 100644 index 00000000000..c15840b4a47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="isosurface.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showticklabels.py new file mode 100644 index 00000000000..8af618c8146 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="isosurface.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..98be4cada26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="isosurface.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..fd55cb8dd36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="isosurface.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_thickness.py new file mode 100644 index 00000000000..a6a4e8559bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="isosurface.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..d846b51fed8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="isosurface.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tick0.py new file mode 100644 index 00000000000..17bfb49b977 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="isosurface.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickangle.py new file mode 100644 index 00000000000..9edeede6838 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="isosurface.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickcolor.py new file mode 100644 index 00000000000..49cc9ba8645 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="isosurface.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickfont.py new file mode 100644 index 00000000000..5b3baa9739b --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="isosurface.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformat.py new file mode 100644 index 00000000000..fe0b104663e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="isosurface.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..3a47d7b551d --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="isosurface.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..44af6a2b681 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="isosurface.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticklen.py new file mode 100644 index 00000000000..7d328969781 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="isosurface.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickmode.py new file mode 100644 index 00000000000..7316853e3c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="isosurface.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickprefix.py new file mode 100644 index 00000000000..3074672e81e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="isosurface.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticks.py new file mode 100644 index 00000000000..1b3c92791c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="isosurface.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..29edb85b4ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="isosurface.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticktext.py new file mode 100644 index 00000000000..4c5ab029f52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="isosurface.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..de78a2c80c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="isosurface.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvals.py new file mode 100644 index 00000000000..875fda47718 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="isosurface.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..6f5e4aec174 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="isosurface.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickwidth.py new file mode 100644 index 00000000000..30f3425096f --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="isosurface.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_title.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_title.py new file mode 100644 index 00000000000..85c765552f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="isosurface.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_x.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_x.py new file mode 100644 index 00000000000..abb75f31818 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="isosurface.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_xanchor.py new file mode 100644 index 00000000000..d91978811ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="isosurface.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_xpad.py new file mode 100644 index 00000000000..e3772554786 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="isosurface.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_y.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_y.py new file mode 100644 index 00000000000..b9c4df1b489 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="isosurface.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_yanchor.py new file mode 100644 index 00000000000..8195daa0ad3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="isosurface.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ypad.py new file mode 100644 index 00000000000..13f964d71bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="isosurface.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/__init__.py index 9c56ecdcbb0..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="isosurface.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="isosurface.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="isosurface.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..feaf6adb989 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="isosurface.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..c5c375f8352 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="isosurface.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..3aa450f9571 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="isosurface.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py index fb83620baa0..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="isosurface.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="isosurface.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="isosurface.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="isosurface.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="isosurface.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..65bc97639a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="isosurface.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..e40691424d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="isosurface.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..76b277d163a --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="isosurface.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..20b4ab5f601 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="isosurface.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..b697f15d95f --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="isosurface.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/__init__.py index b3f68128356..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="isosurface.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="isosurface.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="isosurface.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_font.py new file mode 100644 index 00000000000..9adb191b2f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="isosurface.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_side.py new file mode 100644 index 00000000000..279bef1c61c --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="isosurface.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_text.py new file mode 100644 index 00000000000..5595928c407 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="isosurface.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py index 6bcdb8688cf..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/__init__.py @@ -1,55 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="isosurface.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="isosurface.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="isosurface.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_color.py new file mode 100644 index 00000000000..e38905ba4f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="isosurface.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_family.py new file mode 100644 index 00000000000..5b83eceb018 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="isosurface.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_size.py new file mode 100644 index 00000000000..0c487b7c988 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="isosurface.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/contour/__init__.py b/packages/python/plotly/plotly/validators/isosurface/contour/__init__.py index d732028d07c..e59b78ead51 100644 --- a/packages/python/plotly/plotly/validators/isosurface/contour/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/contour/__init__.py @@ -1,42 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="isosurface.contour", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.contour", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="isosurface.contour", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._show import ShowValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/contour/_color.py b/packages/python/plotly/plotly/validators/isosurface/contour/_color.py new file mode 100644 index 00000000000..c9127630e5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/contour/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="isosurface.contour", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/contour/_show.py b/packages/python/plotly/plotly/validators/isosurface/contour/_show.py new file mode 100644 index 00000000000..0c4f1fb8f27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/contour/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.contour", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/contour/_width.py b/packages/python/plotly/plotly/validators/isosurface/contour/_width.py new file mode 100644 index 00000000000..75dea7c3379 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/contour/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="isosurface.contour", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/__init__.py index 2f9c4b05ba7..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/__init__.py @@ -1,185 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="isosurface.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="isosurface.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="isosurface.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="isosurface.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="isosurface.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="isosurface.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="isosurface.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="isosurface.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="isosurface.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_align.py new file mode 100644 index 00000000000..36fe4e19417 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="isosurface.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..24baf886334 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="isosurface.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..765ea7e113e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="isosurface.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..b8963b2e550 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="isosurface.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..897d33f97a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="isosurface.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..bd6d072831c --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="isosurface.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_font.py new file mode 100644 index 00000000000..a0f9a9a397e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="isosurface.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_namelength.py new file mode 100644 index 00000000000..47b855e9192 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="isosurface.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..50f89e32367 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="isosurface.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/__init__.py index 57b7a8c7636..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/__init__.py @@ -1,103 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="isosurface.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="isosurface.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="isosurface.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="isosurface.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="isosurface.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="isosurface.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_color.py new file mode 100644 index 00000000000..aa710cda356 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="isosurface.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..894555266ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="isosurface.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_family.py new file mode 100644 index 00000000000..27068c72077 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="isosurface.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b602551ae5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="isosurface.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_size.py new file mode 100644 index 00000000000..4ef9ce26c66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="isosurface.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..aaa3549a8b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="isosurface.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/__init__.py b/packages/python/plotly/plotly/validators/isosurface/lighting/__init__.py index 9bb5bb4702d..12f1cf66154 100644 --- a/packages/python/plotly/plotly/validators/isosurface/lighting/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/__init__.py @@ -1,130 +1,26 @@ -import _plotly_utils.basevalidators - - -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="vertexnormalsepsilon", - parent_name="isosurface.lighting", - **kwargs - ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="specular", parent_name="isosurface.lighting", **kwargs - ): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="roughness", parent_name="isosurface.lighting", **kwargs - ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="fresnel", parent_name="isosurface.lighting", **kwargs - ): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="facenormalsepsilon", - parent_name="isosurface.lighting", - **kwargs - ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="diffuse", parent_name="isosurface.lighting", **kwargs - ): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ambient", parent_name="isosurface.lighting", **kwargs - ): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._vertexnormalsepsilon import VertexnormalsepsilonValidator + from ._specular import SpecularValidator + from ._roughness import RoughnessValidator + from ._fresnel import FresnelValidator + from ._facenormalsepsilon import FacenormalsepsilonValidator + from ._diffuse import DiffuseValidator + from ._ambient import AmbientValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_ambient.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_ambient.py new file mode 100644 index 00000000000..f3076c1a3bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_ambient.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ambient", parent_name="isosurface.lighting", **kwargs + ): + super(AmbientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_diffuse.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_diffuse.py new file mode 100644 index 00000000000..8575b01cfc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_diffuse.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="diffuse", parent_name="isosurface.lighting", **kwargs + ): + super(DiffuseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_facenormalsepsilon.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_facenormalsepsilon.py new file mode 100644 index 00000000000..c2ed7e207f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_facenormalsepsilon.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="facenormalsepsilon", + parent_name="isosurface.lighting", + **kwargs + ): + super(FacenormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_fresnel.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_fresnel.py new file mode 100644 index 00000000000..2f8663ad392 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_fresnel.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="fresnel", parent_name="isosurface.lighting", **kwargs + ): + super(FresnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_roughness.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_roughness.py new file mode 100644 index 00000000000..c460f3e8cb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_roughness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="roughness", parent_name="isosurface.lighting", **kwargs + ): + super(RoughnessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_specular.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_specular.py new file mode 100644 index 00000000000..6b8c2485bcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_specular.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="specular", parent_name="isosurface.lighting", **kwargs + ): + super(SpecularValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py b/packages/python/plotly/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py new file mode 100644 index 00000000000..1d02837791e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="vertexnormalsepsilon", + parent_name="isosurface.lighting", + **kwargs + ): + super(VertexnormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lightposition/__init__.py b/packages/python/plotly/plotly/validators/isosurface/lightposition/__init__.py index e498852bffd..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/isosurface/lightposition/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/lightposition/__init__.py @@ -1,52 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="z", parent_name="isosurface.lightposition", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="isosurface.lightposition", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="isosurface.lightposition", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lightposition/_x.py b/packages/python/plotly/plotly/validators/isosurface/lightposition/_x.py new file mode 100644 index 00000000000..664eb373a50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lightposition/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="isosurface.lightposition", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lightposition/_y.py b/packages/python/plotly/plotly/validators/isosurface/lightposition/_y.py new file mode 100644 index 00000000000..c774ddaef38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lightposition/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="isosurface.lightposition", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/lightposition/_z.py b/packages/python/plotly/plotly/validators/isosurface/lightposition/_z.py new file mode 100644 index 00000000000..7cfd0570e5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/lightposition/_z.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="z", parent_name="isosurface.lightposition", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/__init__.py b/packages/python/plotly/plotly/validators/isosurface/slices/__init__.py index 762752c61b9..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/isosurface/slices/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/slices/__init__.py @@ -1,106 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="z", parent_name="isosurface.slices", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Z"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the z dimension are drawn. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="y", parent_name="isosurface.slices", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Y"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the y dimension are drawn. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="x", parent_name="isosurface.slices", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "X"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the x dimension are drawn. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/_x.py b/packages/python/plotly/plotly/validators/isosurface/slices/_x.py new file mode 100644 index 00000000000..2ba390434eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/_x.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="x", parent_name="isosurface.slices", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "X"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis x except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the x dimension are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/_y.py b/packages/python/plotly/plotly/validators/isosurface/slices/_y.py new file mode 100644 index 00000000000..a1b9f2c7a8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/_y.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="y", parent_name="isosurface.slices", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Y"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis y except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the y dimension are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/_z.py b/packages/python/plotly/plotly/validators/isosurface/slices/_z.py new file mode 100644 index 00000000000..d70f4336d2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/_z.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="z", parent_name="isosurface.slices", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Z"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis z except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the z dimension are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/x/__init__.py b/packages/python/plotly/plotly/validators/isosurface/slices/x/__init__.py index 26f5d09f8d4..164bbaf02df 100644 --- a/packages/python/plotly/plotly/validators/isosurface/slices/x/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/slices/x/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.slices.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="isosurface.slices.x", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="isosurface.slices.x", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.slices.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/x/_fill.py b/packages/python/plotly/plotly/validators/isosurface/slices/x/_fill.py new file mode 100644 index 00000000000..e4dbc5db753 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/x/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.slices.x", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/x/_locations.py b/packages/python/plotly/plotly/validators/isosurface/slices/x/_locations.py new file mode 100644 index 00000000000..b76f98cd9e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/x/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="isosurface.slices.x", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/x/_locationssrc.py b/packages/python/plotly/plotly/validators/isosurface/slices/x/_locationssrc.py new file mode 100644 index 00000000000..4e1e159c7be --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/x/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="isosurface.slices.x", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/x/_show.py b/packages/python/plotly/plotly/validators/isosurface/slices/x/_show.py new file mode 100644 index 00000000000..ce220697c46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/x/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.slices.x", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/y/__init__.py b/packages/python/plotly/plotly/validators/isosurface/slices/y/__init__.py index ffdce1304e3..164bbaf02df 100644 --- a/packages/python/plotly/plotly/validators/isosurface/slices/y/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/slices/y/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.slices.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="isosurface.slices.y", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="isosurface.slices.y", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.slices.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/y/_fill.py b/packages/python/plotly/plotly/validators/isosurface/slices/y/_fill.py new file mode 100644 index 00000000000..b00b0fba645 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/y/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.slices.y", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/y/_locations.py b/packages/python/plotly/plotly/validators/isosurface/slices/y/_locations.py new file mode 100644 index 00000000000..4a952d67fca --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/y/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="isosurface.slices.y", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/y/_locationssrc.py b/packages/python/plotly/plotly/validators/isosurface/slices/y/_locationssrc.py new file mode 100644 index 00000000000..f7e34296a16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/y/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="isosurface.slices.y", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/y/_show.py b/packages/python/plotly/plotly/validators/isosurface/slices/y/_show.py new file mode 100644 index 00000000000..850ebf5fd5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/y/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.slices.y", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/z/__init__.py b/packages/python/plotly/plotly/validators/isosurface/slices/z/__init__.py index dd10c8a9d78..164bbaf02df 100644 --- a/packages/python/plotly/plotly/validators/isosurface/slices/z/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/slices/z/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.slices.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="isosurface.slices.z", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="isosurface.slices.z", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.slices.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/z/_fill.py b/packages/python/plotly/plotly/validators/isosurface/slices/z/_fill.py new file mode 100644 index 00000000000..2661b9597e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/z/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.slices.z", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/z/_locations.py b/packages/python/plotly/plotly/validators/isosurface/slices/z/_locations.py new file mode 100644 index 00000000000..f069e32f003 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/z/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="isosurface.slices.z", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/z/_locationssrc.py b/packages/python/plotly/plotly/validators/isosurface/slices/z/_locationssrc.py new file mode 100644 index 00000000000..d7b7be969b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/z/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="isosurface.slices.z", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/slices/z/_show.py b/packages/python/plotly/plotly/validators/isosurface/slices/z/_show.py new file mode 100644 index 00000000000..125a2755d1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/slices/z/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.slices.z", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/spaceframe/__init__.py b/packages/python/plotly/plotly/validators/isosurface/spaceframe/__init__.py index a351901cd83..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/isosurface/spaceframe/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/spaceframe/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="show", parent_name="isosurface.spaceframe", **kwargs - ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="fill", parent_name="isosurface.spaceframe", **kwargs - ): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/spaceframe/_fill.py b/packages/python/plotly/plotly/validators/isosurface/spaceframe/_fill.py new file mode 100644 index 00000000000..c53e10855cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/spaceframe/_fill.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="fill", parent_name="isosurface.spaceframe", **kwargs + ): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/spaceframe/_show.py b/packages/python/plotly/plotly/validators/isosurface/spaceframe/_show.py new file mode 100644 index 00000000000..70493553175 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/spaceframe/_show.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="show", parent_name="isosurface.spaceframe", **kwargs + ): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/stream/__init__.py b/packages/python/plotly/plotly/validators/isosurface/stream/__init__.py index e3d9c605e07..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/isosurface/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="isosurface.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="isosurface.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/isosurface/stream/_maxpoints.py new file mode 100644 index 00000000000..143abf9ac73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="isosurface.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/stream/_token.py b/packages/python/plotly/plotly/validators/isosurface/stream/_token.py new file mode 100644 index 00000000000..ccdfb6ce407 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="isosurface.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/surface/__init__.py b/packages/python/plotly/plotly/validators/isosurface/surface/__init__.py index 8ad01c2fc5f..c75d5c08248 100644 --- a/packages/python/plotly/plotly/validators/isosurface/surface/__init__.py +++ b/packages/python/plotly/plotly/validators/isosurface/surface/__init__.py @@ -1,61 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="isosurface.surface", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__( - self, plotly_name="pattern", parent_name="isosurface.surface", **kwargs - ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "odd", "even"]), - flags=kwargs.pop("flags", ["A", "B", "C", "D", "E"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="isosurface.surface", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="count", parent_name="isosurface.surface", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._pattern import PatternValidator + from ._fill import FillValidator + from ._count import CountValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._pattern.PatternValidator", + "._fill.FillValidator", + "._count.CountValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/surface/_count.py b/packages/python/plotly/plotly/validators/isosurface/surface/_count.py new file mode 100644 index 00000000000..f31d3251624 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/surface/_count.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CountValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="count", parent_name="isosurface.surface", **kwargs): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/surface/_fill.py b/packages/python/plotly/plotly/validators/isosurface/surface/_fill.py new file mode 100644 index 00000000000..9a105f934f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/surface/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="isosurface.surface", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/surface/_pattern.py b/packages/python/plotly/plotly/validators/isosurface/surface/_pattern.py new file mode 100644 index 00000000000..d57fada99d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/surface/_pattern.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__( + self, plotly_name="pattern", parent_name="isosurface.surface", **kwargs + ): + super(PatternValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "odd", "even"]), + flags=kwargs.pop("flags", ["A", "B", "C", "D", "E"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/isosurface/surface/_show.py b/packages/python/plotly/plotly/validators/isosurface/surface/_show.py new file mode 100644 index 00000000000..8fa431dff49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/isosurface/surface/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="isosurface.surface", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/__init__.py b/packages/python/plotly/plotly/validators/layout/__init__.py index 3cd081fbbbb..82c263791c6 100644 --- a/packages/python/plotly/plotly/validators/layout/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/__init__.py @@ -1,3602 +1,174 @@ -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="yaxis", parent_name="layout", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "YAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range" (default), - or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.yaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.yaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.yaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.yaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.yaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be customized by the - now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="xaxis", parent_name="layout", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "XAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range" (default), - or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.xaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.xaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - rangeselector - :class:`plotly.graph_objects.layout.xaxis.Range - selector` instance or dict with compatible - properties - rangeslider - :class:`plotly.graph_objects.layout.xaxis.Range - slider` instance or dict with compatible - properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.xaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.xaxis.Title - ` instance or dict with compatible properties - titlefont - Deprecated: Please use layout.xaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be customized by the - now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="layout", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 10), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WaterfallmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="waterfallmode", parent_name="layout", **kwargs): - super(WaterfallmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["group", "overlay"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WaterfallgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="waterfallgroupgap", parent_name="layout", **kwargs): - super(WaterfallgroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WaterfallgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="waterfallgap", parent_name="layout", **kwargs): - super(WaterfallgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ViolinmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="violinmode", parent_name="layout", **kwargs): - super(ViolinmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["group", "overlay"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ViolingroupgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="violingroupgap", parent_name="layout", **kwargs): - super(ViolingroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ViolingapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="violingap", parent_name="layout", **kwargs): - super(ViolingapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UpdatemenuValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="updatemenudefaults", parent_name="layout", **kwargs - ): - super(UpdatemenuValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Updatemenu"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UpdatemenusValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="updatemenus", parent_name="layout", **kwargs): - super(UpdatemenusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Updatemenu"), - data_docs=kwargs.pop( - "data_docs", - """ - active - Determines which button (by index starting from - 0) is considered active. - bgcolor - Sets the background color of the update menu - buttons. - bordercolor - Sets the color of the border enclosing the - update menu. - borderwidth - Sets the width (in px) of the border enclosing - the update menu. - buttons - A tuple of :class:`plotly.graph_objects.layout. - updatemenu.Button` instances or dicts with - compatible properties - buttondefaults - When used in a template (as layout.template.lay - out.updatemenu.buttondefaults), sets the - default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons - are laid out, whether in a dropdown menu or a - row/column of buttons. For `left` and `up`, the - buttons will still appear in left-to-right or - top-to-bottom order respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Sets the padding around the buttons or dropdown - menu. - showactive - Highlights active dropdown item or active - button if true. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible - via a dropdown menu or whether the buttons are - stacked horizontally or vertically - visible - Determines whether or not the update menu is - visible. - x - Sets the x position (in normalized coordinates) - of the update menu. - xanchor - Sets the update menu's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the update menu. - yanchor - Sets the update menu's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the range - selector. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UniformtextValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="uniformtext", parent_name="layout", **kwargs): - super(UniformtextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Uniformtext"), - data_docs=kwargs.pop( - "data_docs", - """ - minsize - Sets the minimum text size between traces of - the same type. - mode - Determines how the font size for various text - elements are uniformed between each trace type. - If the computed text sizes were smaller than - the minimum size defined by - `uniformtext.minsize` using "hide" option hides - the text; and using "show" option shows the - text without further downscaling. Please note - that if the size defined by `minsize` is - greater than the font size defined by trace, - then the `minsize` is used. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TreemapcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): - def __init__(self, plotly_name="treemapcolorway", parent_name="layout", **kwargs): - super(TreemapcolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="transition", parent_name="layout", **kwargs): - super(TransitionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Transition"), - data_docs=kwargs.pop( - "data_docs", - """ - duration - The duration of the transition, in - milliseconds. If equal to zero, updates are - synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or - traces smoothly transitions during updates that - make both traces and layout change. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets the title font. Note that the title's font - used to be customized by the now deprecated - `titlefont` attribute. - pad - Sets the padding of the title. Each padding - value only applies when the corresponding - `xanchor`/`yanchor` value is set accordingly. - E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined - automatically. Padding is muted if the - respective anchor value is "middle*/*center". - text - Sets the plot's title. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 - (right). - xanchor - Sets the title's horizontal alignment with - respect to its x position. "left" means that - the title starts at x, "right" means that the - title ends at x and "center" means that the - title's center is at x. "auto" divides `xref` - by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 - (top). "auto" places the baseline of the title - onto the vertical center of the top margin. - yanchor - Sets the title's vertical alignment with - respect to its y position. "top" means that the - title's cap line is at y, "bottom" means that - the title's baseline is at y and "middle" means - that the title's midline is at y. "auto" - divides `yref` by three and calculates the - `yanchor` value automatically based on the - value of `y`. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TernaryValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="ternary", parent_name="layout", **kwargs): - super(TernaryValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Ternary"), - data_docs=kwargs.pop( - "data_docs", - """ - aaxis - :class:`plotly.graph_objects.layout.ternary.Aax - is` instance or dict with compatible properties - baxis - :class:`plotly.graph_objects.layout.ternary.Bax - is` instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - :class:`plotly.graph_objects.layout.ternary.Cax - is` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.ternary.Dom - ain` instance or dict with compatible - properties - sum - The number each triplet should sum to, and the - maximum range of each axis - uirevision - Controls persistence of user-driven changes in - axis `min` and `title`, if not overridden in - the individual axes. Defaults to - `layout.uirevision`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateValidator(_plotly_utils.basevalidators.BaseTemplateValidator): - def __init__(self, plotly_name="template", parent_name="layout", **kwargs): - super(TemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Template"), - data_docs=kwargs.pop( - "data_docs", - """ - data - :class:`plotly.graph_objects.layout.template.Da - ta` instance or dict with compatible properties - layout - :class:`plotly.graph_objects.Layout` instance - or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SunburstcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): - def __init__(self, plotly_name="sunburstcolorway", parent_name="layout", **kwargs): - super(SunburstcolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikedistanceValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="spikedistance", parent_name="layout", **kwargs): - super(SpikedistanceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SliderValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="sliderdefaults", parent_name="layout", **kwargs): - super(SliderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Slider"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SlidersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="sliders", parent_name="layout", **kwargs): - super(SlidersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Slider"), - data_docs=kwargs.pop( - "data_docs", - """ - active - Determines which button (by index starting from - 0) is considered active. - activebgcolor - Sets the background color of the slider grip - while dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the - slider. - borderwidth - Sets the width (in px) of the border enclosing - the slider. - currentvalue - :class:`plotly.graph_objects.layout.slider.Curr - entvalue` instance or dict with compatible - properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure - excludes the padding of both ends. That is, the - slider's length is this length minus the - padding on both ends. - lenmode - Determines whether this slider length is set in - units of plot "fraction" or in *pixels. Use - `len` to set the value. - minorticklen - Sets the length in pixels of minor step tick - marks - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Set the padding of the slider component along - each side. - steps - A tuple of :class:`plotly.graph_objects.layout. - slider.Step` instances or dicts with compatible - properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), - sets the default property values to use for - elements of layout.slider.steps - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the - slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - :class:`plotly.graph_objects.layout.slider.Tran - sition` instance or dict with compatible - properties - visible - Determines whether or not the slider is - visible. - x - Sets the x position (in normalized coordinates) - of the slider. - xanchor - Sets the slider's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the slider. - yanchor - Sets the slider's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the range selector. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="layout", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="shapedefaults", parent_name="layout", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Shape"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="shapes", parent_name="layout", **kwargs): - super(ShapesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Shape"), - data_docs=kwargs.pop( - "data_docs", - """ - fillcolor - Sets the color filling the shape's interior. - layer - Specifies whether shapes are drawn below or - above traces. - line - :class:`plotly.graph_objects.layout.shape.Line` - instance or dict with compatible properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the - pixel values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and - taken unmodified as pixels relative to - `xanchor` and `yanchor` in case of "pixel" size - mode. There are a few restrictions / quirks - only absolute instructions, not relative. So - the allowed segments are: M, L, H, V, Q, C, T, - S, and Z arcs (A) are not allowed because - radius rx and ry are relative. In the future we - could consider supporting relative commands, - but we would have to decide on how to handle - date and log axes. Note that even as is, Q and - C Bezier paths that are smooth on linear axes - may not be smooth on log, and vice versa. no - chained "polybezier" commands - specify the - segment type for each one. On category axes, - values are numbers scaled to the serial numbers - of categories because using the categories - themselves there would be no way to describe - fractional positions On data axes: because - space and T are both normal components of path - strings, we can't use either to separate date - from time parts. Therefore we'll use underscore - for this purpose: 2015-02-21_13:45:56.789 - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If - "line", a line is drawn from (`x0`,`y0`) to - (`x1`,`y1`) with respect to the axes' sizing - mode. If "circle", a circle is drawn from - ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 - -`y0`)|) with respect to the axes' sizing mode. - If "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), - (`x0`,`y1`), (`x0`,`y0`) with respect to the - axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' - sizing mode. - visible - Determines whether or not this shape is - visible. - x0 - Sets the shape's starting x position. See - `type` and `xsizemode` for more info. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - xanchor - Only relevant in conjunction with `xsizemode` - set to "pixel". Specifies the anchor point on - the x axis to which `x0`, `x1` and x - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `xsizemode` - not set to "pixel". - xref - Sets the shape's x coordinate axis. If set to - an x axis id (e.g. "x" or "x2"), the `x` - position refers to an x coordinate. If set to - "paper", the `x` position refers to the - distance from the left side of the plotting - area in normalized coordinates where 0 (1) - corresponds to the left (right) side. If the - axis `type` is "log", then you must take the - log of your desired range. If the axis `type` - is "date", then you must convert the date to - unix time in milliseconds. - xsizemode - Sets the shapes's sizing mode along the x axis. - If set to "scaled", `x0`, `x1` and x - coordinates within `path` refer to data values - on the x axis or a fraction of the plot area's - width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in - terms of data or plot fraction but `x0`, `x1` - and x coordinates within `path` are pixels - relative to `xanchor`. This way, the shape can - have a fixed width while maintaining a position - relative to data or plot fraction. - y0 - Sets the shape's starting y position. See - `type` and `ysizemode` for more info. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - yanchor - Only relevant in conjunction with `ysizemode` - set to "pixel". Specifies the anchor point on - the y axis to which `y0`, `y1` and y - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `ysizemode` - not set to "pixel". - yref - Sets the annotation's y coordinate axis. If set - to an y axis id (e.g. "y" or "y2"), the `y` - position refers to an y coordinate If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). - ysizemode - Sets the shapes's sizing mode along the y axis. - If set to "scaled", `y0`, `y1` and y - coordinates within `path` refer to data values - on the y axis or a fraction of the plot area's - height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in - terms of data or plot fraction but `y0`, `y1` - and y coordinates within `path` are pixels - relative to `yanchor`. This way, the shape can - have a fixed height while maintaining a - position relative to data or plot fraction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatorsValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="separators", parent_name="layout", **kwargs): - super(SeparatorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectionrevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectionrevision", parent_name="layout", **kwargs): - super(SelectionrevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectdirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="selectdirection", parent_name="layout", **kwargs): - super(SelectdirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["h", "v", "d", "any"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="scene", parent_name="layout", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scene"), - data_docs=kwargs.pop( - "data_docs", - """ - annotations - A tuple of :class:`plotly.graph_objects.layout. - scene.Annotation` instances or dicts with - compatible properties - annotationdefaults - When used in a template (as layout.template.lay - out.scene.annotationdefaults), sets the default - property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a - cube, regardless of the axes' ranges. If - "data", this scene's axes are drawn in - proportion with the axes' ranges. If "manual", - this scene's axes are drawn in proportion with - the input of "aspectratio" (the default - behavior if "aspectratio" is provided). If - "auto", this scene's axes are drawn using the - results of "data" except when one axis is more - than four times the size of the two others, - where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor - - camera - :class:`plotly.graph_objects.layout.scene.Camer - a` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.scene.Domai - n` instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for - this scene. - hovermode - Determines the mode of hover interactions for - this scene. - uirevision - Controls persistence of user-driven changes in - camera attributes. Defaults to - `layout.uirevision`. - xaxis - :class:`plotly.graph_objects.layout.scene.XAxis - ` instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.scene.YAxis - ` instance or dict with compatible properties - zaxis - :class:`plotly.graph_objects.layout.scene.ZAxis - ` instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RadialAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="radialaxis", parent_name="layout", **kwargs): - super(RadialAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "RadialAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - domain - Polar chart subplots are not supported yet. - This key has currently no effect. - endpadding - Legacy polar charts are deprecated! Please - switch to "polar" subplots. - orientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (an angle with respect to the - origin) of the radial axis. - range - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Defines the start - and end point of this radial axis. - showline - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the line bounding this radial axis will - be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the radial axis ticks will feature tick - labels. - tickcolor - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the color of - the tick lines on this radial axis. - ticklen - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this radial axis. - tickorientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (from the paper perspective) of the - radial axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this radial axis. - visible - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not this axis will be visible. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PolarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="polar", parent_name="layout", **kwargs): - super(PolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Polar"), - data_docs=kwargs.pop( - "data_docs", - """ - angularaxis - :class:`plotly.graph_objects.layout.polar.Angul - arAxis` instance or dict with compatible - properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they - represent fractions of the minimum difference - in bar positions in the data. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "overlay", the bars are plotted - over one another, you might need to an - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.polar.Domai - n` instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and - angular axis line are drawn as "circular" - sectors or as "linear" (polygon) sectors. Has - an effect only when the angular axis has `type` - "category". Note that `radialaxis.angle` is - snapped to the angle of the closest vertex when - `gridshape` is "circular" (so that radial axis - scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of - the polar subplot. - radialaxis - :class:`plotly.graph_objects.layout.polar.Radia - lAxis` instance or dict with compatible - properties - sector - Sets angular span of this polar subplot with - two angles (in degrees). Sector are assumed to - be spanned in the counterclockwise direction - with 0 corresponding to rightmost limit of the - polar subplot. - uirevision - Controls persistence of user-driven changes in - axis attributes, if not overridden in the - individual axes. Defaults to - `layout.uirevision`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PlotBgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="plot_bgcolor", parent_name="layout", **kwargs): - super(PlotBgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PiecolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): - def __init__(self, plotly_name="piecolorway", parent_name="layout", **kwargs): - super(PiecolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PaperBgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="paper_bgcolor", parent_name="layout", **kwargs): - super(PaperBgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="orientation", parent_name="layout", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModebarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="modebar", parent_name="layout", **kwargs): - super(ModebarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Modebar"), - data_docs=kwargs.pop( - "data_docs", - """ - activecolor - Sets the color of the active or hovered on - icons in the modebar. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - uirevision - Controls persistence of user-driven changes - related to the modebar, including `hovermode`, - `dragmode`, and `showspikes` at both the root - level and inside subplots. Defaults to - `layout.uirevision`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="layout", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="layout", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarginValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="margin", parent_name="layout", **kwargs): - super(MarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Margin"), - data_docs=kwargs.pop( - "data_docs", - """ - autoexpand - Turns on/off margin expansion computations. - Legends, colorbars, updatemenus, sliders, axis - rangeselector and rangeslider are allowed to - push the margins by defaults. - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the - plotting area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MapboxValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="mapbox", parent_name="layout", **kwargs): - super(MapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Mapbox"), - data_docs=kwargs.pop( - "data_docs", - """ - accesstoken - Sets the mapbox access token to be used for - this mapbox map. Alternatively, the mapbox - access token can be set in the configuration - options under `mapboxAccessToken`. Note that - accessToken are only required when `style` (e.g - with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a - layout layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (mapbox.bearing). - center - :class:`plotly.graph_objects.layout.mapbox.Cent - er` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.mapbox.Doma - in` instance or dict with compatible properties - layers - A tuple of :class:`plotly.graph_objects.layout. - mapbox.Layer` instances or dicts with - compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), - sets the default property values to use for - elements of layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (mapbox.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.mapbox.layers`. These layers can be - defined either explicitly as a Mapbox Style - object which can contain multiple layer - definitions that load data from any public or - private Tile Map Service (TMS or XYZ) or Web - Map Service (WMS) or implicitly by using one of - the built-in style objects which use WMSes - which do not require any access tokens, or by - using a default Mapbox style or custom Mapbox - style URL, both of which require a Mapbox - access token Note that Mapbox access token can - be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox - Style objects are of the form described in the - Mapbox GL JS documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec - The built-in plotly.js styles objects are: - open-street-map, white-bg, carto-positron, - carto-darkmatter, stamen-terrain, stamen-toner, - stamen-watercolor The built-in Mapbox styles - are: basic, streets, outdoors, light, dark, - satellite, satellite-streets Mapbox style URLs - are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="legend", parent_name="layout", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Legend"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - bordercolor - Sets the color of the border enclosing the - legend. - borderwidth - Sets the width (in px) of the border enclosing - the legend. - font - Sets the font used to text the legend items. - itemclick - Determines the behavior on legend item click. - "toggle" toggles the visibility of the item - clicked on the graph. "toggleothers" makes the - clicked item the sole visible item on the - graph. False disable legend item click - interactions. - itemdoubleclick - Determines the behavior on legend item double- - click. "toggle" toggles the visibility of the - item clicked on the graph. "toggleothers" makes - the clicked item the sole visible item on the - graph. False disable legend item double-click - interactions. - itemsizing - Determines if the legend items symbols scale - with their corresponding "trace" attributes or - remain "constant" independent of the symbol - size on the graph. - orientation - Sets the orientation of the legend. - title - :class:`plotly.graph_objects.layout.legend.Titl - e` instance or dict with compatible properties - tracegroupgap - Sets the amount of vertical space (in px) - between legend groups. - traceorder - Determines the order at which the legend items - are displayed. If "normal", the items are - displayed top-to-bottom in the same order as - the input data. If "reversed", the items are - displayed in the opposite order as "normal". If - "grouped", the items are displayed in groups - (when a trace `legendgroup` is provided). if - "grouped+reversed", the items are displayed in - the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes - in trace and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with - respect to their associated text. - x - Sets the x position (in normalized coordinates) - of the legend. Defaults to 1.02 for vertical - legends and defaults to 0 for horizontal - legends. - xanchor - Sets the legend's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the legend. - Value "auto" anchors legends to the right for - `x` values greater than or equal to 2/3, - anchors legends to the left for `x` values less - than or equal to 1/3 and anchors legends with - respect to their center otherwise. - y - Sets the y position (in normalized coordinates) - of the legend. Defaults to 1 for vertical - legends, defaults to "-0.1" for horizontal - legends on graphs w/o range sliders and - defaults to 1.1 for horizontal legends on graph - with one or multiple range sliders. - yanchor - Sets the legend's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the legend. Value - "auto" anchors legends at their bottom for `y` - values less than or equal to 1/3, anchors - legends to at their top for `y` values greater - than or equal to 2/3 and anchors legends with - respect to their middle otherwise. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ImageValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="imagedefaults", parent_name="layout", **kwargs): - super(ImageValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Image"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ImagesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="images", parent_name="layout", **kwargs): - super(ImagesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Image"), - data_docs=kwargs.pop( - "data_docs", - """ - layer - Specifies whether images are drawn below or - above traces. When `xref` and `yref` are both - set to `paper`, image is drawn below the entire - plot area. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The - image will be sized based on the `position` - value. When `xref` is set to `paper`, units are - sized relative to the plot width. - sizey - Sets the image container size vertically. The - image will be sized based on the `position` - value. When `yref` is set to `paper`, units are - sized relative to the plot height. - sizing - Specifies which dimension of the image to - constrain. - source - Specifies the URL of the image to be used. The - URL must be accessible from the domain where - the plot code is run, and can be either - relative or absolute. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this image is - visible. - x - Sets the image's x position. When `xref` is set - to `paper`, units are sized relative to the - plot height. See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to - a x axis id (e.g. "x" or "x2"), the `x` - position refers to an x data coordinate If set - to "paper", the `x` position refers to the - distance from the left of plot in normalized - coordinates where 0 (1) corresponds to the left - (right). - y - Sets the image's y position. When `yref` is set - to `paper`, units are sized relative to the - plot height. See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to - a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y data coordinate. If set - to "paper", the `y` position refers to the - distance from the bottom of the plot in - normalized coordinates where 0 (1) corresponds - to the bottom (top). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="hovermode", parent_name="layout", **kwargs): - super(HovermodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["x", "y", "closest", False, "x unified", "y unified"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="layout", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - bgcolor - Sets the background color of all hover labels - on graph - bordercolor - Sets the border color of all hover labels on - graph. - font - Sets the default hover label font used by all - traces on the graph. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverdistanceValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="hoverdistance", parent_name="layout", **kwargs): - super(HoverdistanceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HidesourcesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="hidesources", parent_name="layout", **kwargs): - super(HidesourcesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HiddenlabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hiddenlabelssrc", parent_name="layout", **kwargs): - super(HiddenlabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HiddenlabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="hiddenlabels", parent_name="layout", **kwargs): - super(HiddenlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="height", parent_name="layout", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 10), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="grid", parent_name="layout", **kwargs): - super(GridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Grid"), - data_docs=kwargs.pop( - "data_docs", - """ - columns - The number of columns in the grid. If you - provide a 2D `subplots` array, the length of - its longest row is used as the default. If you - give an `xaxes` array, its length is used as - the default. But it's also possible to have a - different length, if you want to leave a row at - the end for non-cartesian subplots. - domain - :class:`plotly.graph_objects.layout.grid.Domain - ` instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given - but we do have `rows` and `columns`, we can - generate defaults using consecutive axis IDs, - in two ways: "coupled" gives one x axis per - column and one y axis per row. "independent" - uses a new xy pair for each cell, left-to-right - across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note - that columns are always enumerated from left to - right. - rows - The number of rows in the grid. If you provide - a 2D `subplots` array or a `yaxes` array, its - length is used as the default. But it's also - possible to have a different length, if you - want to leave a row at the end for non- - cartesian subplots. - subplots - Used for freeform grids, where some axes may be - shared across subplots but others are not. Each - entry should be a cartesian subplot id, like - "xy" or "x3y2", or "" to leave that cell empty. - You may reuse x axes within the same column, - and y axes within the same row. Non-cartesian - subplots and traces that support `domain` can - place themselves in this grid separately using - the `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an x axis id like "x", "x2", etc., or - "" to not put an x axis in that column. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `yaxes` - is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed - as a fraction of the total width available to - one cell. Defaults to 0.1 for coupled-axes - grids and 0.2 for independent grids. - xside - Sets where the x axis labels and titles go. - "bottom" means the very bottom of the grid. - "bottom plot" is the lowest plot that each x - axis is used in. "top" and "top plot" are - similar. - yaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an y axis id like "y", "y2", etc., or - "" to not put a y axis in that row. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `xaxes` - is present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as - a fraction of the total height available to one - cell. Defaults to 0.1 for coupled-axes grids - and 0.3 for independent grids. - yside - Sets where the y axis labels and titles go. - "left" means the very left edge of the grid. - *left plot* is the leftmost plot that each y - axis is used in. "right" and *right plot* are - similar. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GeoValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="geo", parent_name="layout", **kwargs): - super(GeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Geo"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Set the background color of the map - center - :class:`plotly.graph_objects.layout.geo.Center` - instance or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country - boundaries. - domain - :class:`plotly.graph_objects.layout.geo.Domain` - instance or dict with compatible properties - fitbounds - Determines if this subplot's view settings are - auto-computed to fit trace data. On scoped - maps, setting `fitbounds` leads to `center.lon` - and `center.lat` getting auto-filled. On maps - with a non-clipped projection, setting - `fitbounds` leads to `center.lon`, - `center.lat`, and `projection.rotation.lon` - getting auto-filled. On maps with a clipped - projection, setting `fitbounds` leads to - `center.lon`, `center.lat`, - `projection.rotation.lon`, - `projection.rotation.lat`, `lonaxis.range` and - `lonaxis.range` getting auto-filled. If - "locations", only the trace's visible locations - are considered in the `fitbounds` computations. - If "geojson", the entire trace input `geojson` - (if provided) is considered in the `fitbounds` - computations, Defaults to False. - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - :class:`plotly.graph_objects.layout.geo.Lataxis - ` instance or dict with compatible properties - lonaxis - :class:`plotly.graph_objects.layout.geo.Lonaxis - ` instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - :class:`plotly.graph_objects.layout.geo.Project - ion` instance or dict with compatible - properties - resolution - Sets the resolution of the base layers. The - values have units of km/mm e.g. 110 corresponds - to a scale ratio of 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are - drawn. - showframe - Sets whether or not a frame is drawn around the - map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in - color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits - within countries (e.g. states, provinces) are - drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in - the view (projection and center). Defaults to - `layout.uirevision`. - visible - Sets the default visibility of the base layers. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="funnelmode", parent_name="layout", **kwargs): - super(FunnelmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["stack", "group", "overlay"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="funnelgroupgap", parent_name="layout", **kwargs): - super(FunnelgroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="funnelgap", parent_name="layout", **kwargs): - super(FunnelgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelareacolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): - def __init__( - self, plotly_name="funnelareacolorway", parent_name="layout", **kwargs - ): - super(FunnelareacolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExtendtreemapcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="extendtreemapcolors", parent_name="layout", **kwargs - ): - super(ExtendtreemapcolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExtendsunburstcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="extendsunburstcolors", parent_name="layout", **kwargs - ): - super(ExtendsunburstcolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExtendpiecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="extendpiecolors", parent_name="layout", **kwargs): - super(ExtendpiecolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExtendfunnelareacolorsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="extendfunnelareacolors", parent_name="layout", **kwargs - ): - super(ExtendfunnelareacolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EditrevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="editrevision", parent_name="layout", **kwargs): - super(EditrevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DragmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="dragmode", parent_name="layout", **kwargs): - super(DragmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["zoom", "pan", "select", "lasso", "orbit", "turntable", False], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="direction", parent_name="layout", **kwargs): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["clockwise", "counterclockwise"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DatarevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="datarevision", parent_name="layout", **kwargs): - super(DatarevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): - def __init__(self, plotly_name="colorway", parent_name="layout", **kwargs): - super(ColorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorscale", parent_name="layout", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Colorscale"), - data_docs=kwargs.pop( - "data_docs", - """ - diverging - Sets the default diverging colorscale. Note - that `autocolorscale` must be true for this - attribute to work. - sequential - Sets the default sequential colorscale for - positive values. Note that `autocolorscale` - must be true for this attribute to work. - sequentialminus - Sets the default sequential colorscale for - negative values. Note that `autocolorscale` - must be true for this attribute to work. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="coloraxis", parent_name="layout", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Coloraxis"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - corresponding trace color array(s)) or the - bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the - user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmin` must be - set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as corresponding trace color array(s). Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmax` must be - set as well. - colorbar - :class:`plotly.graph_objects.layout.coloraxis.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ClickmodeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="clickmode", parent_name="layout", **kwargs): - super(ClickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["event", "select"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="calendar", parent_name="layout", **kwargs): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="boxmode", parent_name="layout", **kwargs): - super(BoxmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["group", "overlay"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="boxgroupgap", parent_name="layout", **kwargs): - super(BoxgroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="boxgap", parent_name="layout", **kwargs): - super(BoxgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="barnorm", parent_name="layout", **kwargs): - super(BarnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["", "fraction", "percent"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="barmode", parent_name="layout", **kwargs): - super(BarmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["stack", "group", "overlay", "relative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BargroupgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="bargroupgap", parent_name="layout", **kwargs): - super(BargroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BargapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="bargap", parent_name="layout", **kwargs): - super(BargapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutosizeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autosize", parent_name="layout", **kwargs): - super(AutosizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnnotationValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="annotationdefaults", parent_name="layout", **kwargs - ): - super(AnnotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Annotation"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="annotations", parent_name="layout", **kwargs): - super(AnnotationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Annotation"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head. If `axref` is `pixel`, a - positive (negative) component corresponds to - an arrow pointing from right to left (left to - right). If `axref` is an axis, this is an - absolute value on that axis, like `x`, NOT a - relative value. - axref - Indicates in what terms the tail of the - annotation (ax,ay) is specified. If `pixel`, - `ax` is a relative offset in pixels from `x`. - If set to an x axis id (e.g. "x" or "x2"), `ax` - is specified in the same terms as that axis. - This is useful for trendline annotations which - should continue to indicate the correct trend - when zoomed. - ay - Sets the y component of the arrow tail about - the arrow head. If `ayref` is `pixel`, a - positive (negative) component corresponds to - an arrow pointing from bottom to top (top to - bottom). If `ayref` is an axis, this is an - absolute value on that axis, like `y`, NOT a - relative value. - ayref - Indicates in what terms the tail of the - annotation (ax,ay) is specified. If `pixel`, - `ay` is a relative offset in pixels from `y`. - If set to a y axis id (e.g. "y" or "y2"), `ay` - is specified in the same terms as that axis. - This is useful for trendline annotations which - should continue to indicate the correct trend - when zoomed. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the - plot. If you click a data point that exactly - matches the `x` and `y` values of this - annotation, and it is hidden (visible: false), - it will appear. In "onoff" mode, you must click - the same point again to make it disappear, so - if you click multiple points, you can show - multiple annotations. In "onout" mode, a click - anywhere else in the plot (on another data - point or not) will hide this annotation. If you - need to show/hide this annotation in response - to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for - example to label the side of a bar. To label - markers though, `standoff` is preferred over - `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.annotation. - Hoverlabel` instance or dict with compatible - properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , are also - supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xclick - Toggle this annotation when clicking a data - point whose `x` value is `xclick` rather than - the annotation's `x` value. - xref - Sets the annotation's x coordinate axis. If set - to an x axis id (e.g. "x" or "x2"), the `x` - position refers to an x coordinate If set to - "paper", the `x` position refers to the - distance from the left side of the plotting - area in normalized coordinates where 0 (1) - corresponds to the left (right) side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yclick - Toggle this annotation when clicking a data - point whose `y` value is `yclick` rather than - the annotation's `y` value. - yref - Sets the annotation's y coordinate axis. If set - to an y axis id (e.g. "y" or "y2"), the `y` - position refers to an y coordinate If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AngularAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="angularaxis", parent_name="layout", **kwargs): - super(AngularAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "AngularAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - domain - Polar chart subplots are not supported yet. - This key has currently no effect. - endpadding - Legacy polar charts are deprecated! Please - switch to "polar" subplots. - range - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Defines the start - and end point of this angular axis. - showline - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the line bounding this angular axis will - be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the angular axis ticks will feature tick - labels. - tickcolor - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the color of - the tick lines on this angular axis. - ticklen - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this angular axis. - tickorientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (from the paper perspective) of the - angular axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this angular axis. - visible - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not this axis will be visible. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yaxis import YaxisValidator + from ._xaxis import XaxisValidator + from ._width import WidthValidator + from ._waterfallmode import WaterfallmodeValidator + from ._waterfallgroupgap import WaterfallgroupgapValidator + from ._waterfallgap import WaterfallgapValidator + from ._violinmode import ViolinmodeValidator + from ._violingroupgap import ViolingroupgapValidator + from ._violingap import ViolingapValidator + from ._updatemenudefaults import UpdatemenudefaultsValidator + from ._updatemenus import UpdatemenusValidator + from ._uniformtext import UniformtextValidator + from ._uirevision import UirevisionValidator + from ._treemapcolorway import TreemapcolorwayValidator + from ._transition import TransitionValidator + from ._title import TitleValidator + from ._ternary import TernaryValidator + from ._template import TemplateValidator + from ._sunburstcolorway import SunburstcolorwayValidator + from ._spikedistance import SpikedistanceValidator + from ._sliderdefaults import SliderdefaultsValidator + from ._sliders import SlidersValidator + from ._showlegend import ShowlegendValidator + from ._shapedefaults import ShapedefaultsValidator + from ._shapes import ShapesValidator + from ._separators import SeparatorsValidator + from ._selectionrevision import SelectionrevisionValidator + from ._selectdirection import SelectdirectionValidator + from ._scene import SceneValidator + from ._radialaxis import RadialaxisValidator + from ._polar import PolarValidator + from ._plot_bgcolor import Plot_BgcolorValidator + from ._piecolorway import PiecolorwayValidator + from ._paper_bgcolor import Paper_BgcolorValidator + from ._orientation import OrientationValidator + from ._modebar import ModebarValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._margin import MarginValidator + from ._mapbox import MapboxValidator + from ._legend import LegendValidator + from ._imagedefaults import ImagedefaultsValidator + from ._images import ImagesValidator + from ._hovermode import HovermodeValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverdistance import HoverdistanceValidator + from ._hidesources import HidesourcesValidator + from ._hiddenlabelssrc import HiddenlabelssrcValidator + from ._hiddenlabels import HiddenlabelsValidator + from ._height import HeightValidator + from ._grid import GridValidator + from ._geo import GeoValidator + from ._funnelmode import FunnelmodeValidator + from ._funnelgroupgap import FunnelgroupgapValidator + from ._funnelgap import FunnelgapValidator + from ._funnelareacolorway import FunnelareacolorwayValidator + from ._font import FontValidator + from ._extendtreemapcolors import ExtendtreemapcolorsValidator + from ._extendsunburstcolors import ExtendsunburstcolorsValidator + from ._extendpiecolors import ExtendpiecolorsValidator + from ._extendfunnelareacolors import ExtendfunnelareacolorsValidator + from ._editrevision import EditrevisionValidator + from ._dragmode import DragmodeValidator + from ._direction import DirectionValidator + from ._datarevision import DatarevisionValidator + from ._colorway import ColorwayValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._clickmode import ClickmodeValidator + from ._calendar import CalendarValidator + from ._boxmode import BoxmodeValidator + from ._boxgroupgap import BoxgroupgapValidator + from ._boxgap import BoxgapValidator + from ._barnorm import BarnormValidator + from ._barmode import BarmodeValidator + from ._bargroupgap import BargroupgapValidator + from ._bargap import BargapValidator + from ._autosize import AutosizeValidator + from ._annotationdefaults import AnnotationdefaultsValidator + from ._annotations import AnnotationsValidator + from ._angularaxis import AngularaxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._width.WidthValidator", + "._waterfallmode.WaterfallmodeValidator", + "._waterfallgroupgap.WaterfallgroupgapValidator", + "._waterfallgap.WaterfallgapValidator", + "._violinmode.ViolinmodeValidator", + "._violingroupgap.ViolingroupgapValidator", + "._violingap.ViolingapValidator", + "._updatemenudefaults.UpdatemenudefaultsValidator", + "._updatemenus.UpdatemenusValidator", + "._uniformtext.UniformtextValidator", + "._uirevision.UirevisionValidator", + "._treemapcolorway.TreemapcolorwayValidator", + "._transition.TransitionValidator", + "._title.TitleValidator", + "._ternary.TernaryValidator", + "._template.TemplateValidator", + "._sunburstcolorway.SunburstcolorwayValidator", + "._spikedistance.SpikedistanceValidator", + "._sliderdefaults.SliderdefaultsValidator", + "._sliders.SlidersValidator", + "._showlegend.ShowlegendValidator", + "._shapedefaults.ShapedefaultsValidator", + "._shapes.ShapesValidator", + "._separators.SeparatorsValidator", + "._selectionrevision.SelectionrevisionValidator", + "._selectdirection.SelectdirectionValidator", + "._scene.SceneValidator", + "._radialaxis.RadialaxisValidator", + "._polar.PolarValidator", + "._plot_bgcolor.Plot_BgcolorValidator", + "._piecolorway.PiecolorwayValidator", + "._paper_bgcolor.Paper_BgcolorValidator", + "._orientation.OrientationValidator", + "._modebar.ModebarValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._margin.MarginValidator", + "._mapbox.MapboxValidator", + "._legend.LegendValidator", + "._imagedefaults.ImagedefaultsValidator", + "._images.ImagesValidator", + "._hovermode.HovermodeValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverdistance.HoverdistanceValidator", + "._hidesources.HidesourcesValidator", + "._hiddenlabelssrc.HiddenlabelssrcValidator", + "._hiddenlabels.HiddenlabelsValidator", + "._height.HeightValidator", + "._grid.GridValidator", + "._geo.GeoValidator", + "._funnelmode.FunnelmodeValidator", + "._funnelgroupgap.FunnelgroupgapValidator", + "._funnelgap.FunnelgapValidator", + "._funnelareacolorway.FunnelareacolorwayValidator", + "._font.FontValidator", + "._extendtreemapcolors.ExtendtreemapcolorsValidator", + "._extendsunburstcolors.ExtendsunburstcolorsValidator", + "._extendpiecolors.ExtendpiecolorsValidator", + "._extendfunnelareacolors.ExtendfunnelareacolorsValidator", + "._editrevision.EditrevisionValidator", + "._dragmode.DragmodeValidator", + "._direction.DirectionValidator", + "._datarevision.DatarevisionValidator", + "._colorway.ColorwayValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._clickmode.ClickmodeValidator", + "._calendar.CalendarValidator", + "._boxmode.BoxmodeValidator", + "._boxgroupgap.BoxgroupgapValidator", + "._boxgap.BoxgapValidator", + "._barnorm.BarnormValidator", + "._barmode.BarmodeValidator", + "._bargroupgap.BargroupgapValidator", + "._bargap.BargapValidator", + "._autosize.AutosizeValidator", + "._annotationdefaults.AnnotationdefaultsValidator", + "._annotations.AnnotationsValidator", + "._angularaxis.AngularaxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/_angularaxis.py b/packages/python/plotly/plotly/validators/layout/_angularaxis.py new file mode 100644 index 00000000000..c7b0f6b9ad1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_angularaxis.py @@ -0,0 +1,57 @@ +import _plotly_utils.basevalidators + + +class AngularaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="angularaxis", parent_name="layout", **kwargs): + super(AngularaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "AngularAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + domain + Polar chart subplots are not supported yet. + This key has currently no effect. + endpadding + Legacy polar charts are deprecated! Please + switch to "polar" subplots. + range + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Defines the start + and end point of this angular axis. + showline + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the line bounding this angular axis will + be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the angular axis ticks will feature tick + labels. + tickcolor + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the color of + the tick lines on this angular axis. + ticklen + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this angular axis. + tickorientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (from the paper perspective) of the + angular axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this angular axis. + visible + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not this axis will be visible. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_annotationdefaults.py b/packages/python/plotly/plotly/validators/layout/_annotationdefaults.py new file mode 100644 index 00000000000..5d4997eb0bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_annotationdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AnnotationdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="annotationdefaults", parent_name="layout", **kwargs + ): + super(AnnotationdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Annotation"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_annotations.py b/packages/python/plotly/plotly/validators/layout/_annotations.py new file mode 100644 index 00000000000..7007ecac571 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_annotations.py @@ -0,0 +1,277 @@ +import _plotly_utils.basevalidators + + +class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="annotations", parent_name="layout", **kwargs): + super(AnnotationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Annotation"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + arrowwidth + Sets the width (in px) of annotation arrow + line. + ax + Sets the x component of the arrow tail about + the arrow head. If `axref` is `pixel`, a + positive (negative) component corresponds to + an arrow pointing from right to left (left to + right). If `axref` is an axis, this is an + absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the + annotation (ax,ay) is specified. If `pixel`, + `ax` is a relative offset in pixels from `x`. + If set to an x axis id (e.g. "x" or "x2"), `ax` + is specified in the same terms as that axis. + This is useful for trendline annotations which + should continue to indicate the correct trend + when zoomed. + ay + Sets the y component of the arrow tail about + the arrow head. If `ayref` is `pixel`, a + positive (negative) component corresponds to + an arrow pointing from bottom to top (top to + bottom). If `ayref` is an axis, this is an + absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the + annotation (ax,ay) is specified. If `pixel`, + `ay` is a relative offset in pixels from `y`. + If set to a y axis id (e.g. "y" or "y2"), `ay` + is specified in the same terms as that axis. + This is useful for trendline annotations which + should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the + annotation `text`. + borderpad + Sets the padding (in px) between the `text` and + the enclosing border. + borderwidth + Sets the width (in px) of the border enclosing + the annotation `text`. + captureevents + Determines whether the annotation text box + captures mouse move and click events, or allows + those events to pass through to data points in + the plot that may be behind the annotation. By + default `captureevents` is False unless + `hovertext` is provided. If you use the event + `plotly_clickannotation` without `hovertext` + you must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the + plot. If you click a data point that exactly + matches the `x` and `y` values of this + annotation, and it is hidden (visible: false), + it will appear. In "onoff" mode, you must click + the same point again to make it disappear, so + if you click multiple points, you can show + multiple annotations. In "onout" mode, a click + anywhere else in the plot (on another data + point or not) will hide this annotation. If you + need to show/hide this annotation in response + to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for + example to label the side of a bar. To label + markers though, `standoff` is preferred over + `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. + Taller text will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.annotation. + Hoverlabel` instance or dict with compatible + properties + hovertext + Sets text to appear when hovering over this + annotation. If omitted or blank, no hover label + will appear. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the annotation (text + + arrow). + showarrow + Determines whether or not the annotation is + drawn with an arrow. If True, `text` is placed + near the arrow's tail. If False, `text` lines + up with the `x` and `y` provided. + standoff + Sets a distance, in pixels, to move the end + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow + head, relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + startstandoff + Sets a distance, in pixels, to move the start + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. + Plotly uses a subset of HTML tags to do things + like newline (
), bold (), italics + (), hyperlinks (). + Tags , , are also + supported. + textangle + Sets the angle at which the `text` is drawn + with respect to the horizontal. + valign + Sets the vertical alignment of the `text` + within the box. Has an effect only if an + explicit height is set to override the text + height. + visible + Determines whether or not this annotation is + visible. + width + Sets an explicit width for the text box. null + (default) lets the text set the box width. + Wider text will be clipped. There is no + automatic wrapping; use
to start a new + line. + x + Sets the annotation's x position. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + xanchor + Sets the text box's horizontal position anchor + This anchor binds the `x` position to the + "left", "center" or "right" of the annotation. + For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the + right-most portion of the annotation lines up + with the right-most edge of the plotting area. + If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + xclick + Toggle this annotation when clicking a data + point whose `x` value is `xclick` rather than + the annotation's `x` value. + xref + Sets the annotation's x coordinate axis. If set + to an x axis id (e.g. "x" or "x2"), the `x` + position refers to an x coordinate If set to + "paper", the `x` position refers to the + distance from the left side of the plotting + area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and + arrow to the right (positive) or left + (negative) by this many pixels. + y + Sets the annotation's y position. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + yanchor + Sets the text box's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the annotation. + For example, if `y` is set to 1, `yref` to + "paper" and `yanchor` to "top" then the top- + most portion of the annotation lines up with + the top-most edge of the plotting area. If + "auto", the anchor is equivalent to "middle" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + yclick + Toggle this annotation when clicking a data + point whose `y` value is `yclick` rather than + the annotation's `y` value. + yref + Sets the annotation's y coordinate axis. If set + to an y axis id (e.g. "y" or "y2"), the `y` + position refers to an y coordinate If set to + "paper", the `y` position refers to the + distance from the bottom of the plotting area + in normalized coordinates where 0 (1) + corresponds to the bottom (top). + yshift + Shifts the position of the whole annotation and + arrow up (positive) or down (negative) by this + many pixels. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_autosize.py b/packages/python/plotly/plotly/validators/layout/_autosize.py new file mode 100644 index 00000000000..b509d03d40c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_autosize.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutosizeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autosize", parent_name="layout", **kwargs): + super(AutosizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_bargap.py b/packages/python/plotly/plotly/validators/layout/_bargap.py new file mode 100644 index 00000000000..bc1078e96ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_bargap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BargapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="bargap", parent_name="layout", **kwargs): + super(BargapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_bargroupgap.py b/packages/python/plotly/plotly/validators/layout/_bargroupgap.py new file mode 100644 index 00000000000..e0a9d6f17cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_bargroupgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BargroupgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="bargroupgap", parent_name="layout", **kwargs): + super(BargroupgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_barmode.py b/packages/python/plotly/plotly/validators/layout/_barmode.py new file mode 100644 index 00000000000..350e0895809 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_barmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="barmode", parent_name="layout", **kwargs): + super(BarmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["stack", "group", "overlay", "relative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_barnorm.py b/packages/python/plotly/plotly/validators/layout/_barnorm.py new file mode 100644 index 00000000000..6bb1b3f4bd9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_barnorm.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BarnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="barnorm", parent_name="layout", **kwargs): + super(BarnormValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["", "fraction", "percent"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_boxgap.py b/packages/python/plotly/plotly/validators/layout/_boxgap.py new file mode 100644 index 00000000000..b4ba1f10322 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_boxgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BoxgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="boxgap", parent_name="layout", **kwargs): + super(BoxgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_boxgroupgap.py b/packages/python/plotly/plotly/validators/layout/_boxgroupgap.py new file mode 100644 index 00000000000..0178f36f6d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_boxgroupgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BoxgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="boxgroupgap", parent_name="layout", **kwargs): + super(BoxgroupgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_boxmode.py b/packages/python/plotly/plotly/validators/layout/_boxmode.py new file mode 100644 index 00000000000..de21dd7460d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_boxmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BoxmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="boxmode", parent_name="layout", **kwargs): + super(BoxmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["group", "overlay"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_calendar.py b/packages/python/plotly/plotly/validators/layout/_calendar.py new file mode 100644 index 00000000000..d073cd8bbf1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_calendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="calendar", parent_name="layout", **kwargs): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_clickmode.py b/packages/python/plotly/plotly/validators/layout/_clickmode.py new file mode 100644 index 00000000000..9b99f6b8006 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_clickmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ClickmodeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="clickmode", parent_name="layout", **kwargs): + super(ClickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["event", "select"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_coloraxis.py b/packages/python/plotly/plotly/validators/layout/_coloraxis.py new file mode 100644 index 00000000000..bb6b90db0c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_coloraxis.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="coloraxis", parent_name="layout", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Coloraxis"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + corresponding trace color array(s)) or the + bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the + user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as corresponding + trace color array(s) and if set, `cmin` must be + set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as corresponding trace color array(s). Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as corresponding + trace color array(s) and if set, `cmax` must be + set as well. + colorbar + :class:`plotly.graph_objects.layout.coloraxis.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_colorscale.py b/packages/python/plotly/plotly/validators/layout/_colorscale.py new file mode 100644 index 00000000000..6c06c0dde86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_colorscale.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorscale", parent_name="layout", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Colorscale"), + data_docs=kwargs.pop( + "data_docs", + """ + diverging + Sets the default diverging colorscale. Note + that `autocolorscale` must be true for this + attribute to work. + sequential + Sets the default sequential colorscale for + positive values. Note that `autocolorscale` + must be true for this attribute to work. + sequentialminus + Sets the default sequential colorscale for + negative values. Note that `autocolorscale` + must be true for this attribute to work. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_colorway.py b/packages/python/plotly/plotly/validators/layout/_colorway.py new file mode 100644 index 00000000000..aa3f923a044 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_colorway.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): + def __init__(self, plotly_name="colorway", parent_name="layout", **kwargs): + super(ColorwayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_datarevision.py b/packages/python/plotly/plotly/validators/layout/_datarevision.py new file mode 100644 index 00000000000..456b440094b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_datarevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DatarevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="datarevision", parent_name="layout", **kwargs): + super(DatarevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_direction.py b/packages/python/plotly/plotly/validators/layout/_direction.py new file mode 100644 index 00000000000..52e6a7aa409 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_direction.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="direction", parent_name="layout", **kwargs): + super(DirectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["clockwise", "counterclockwise"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_dragmode.py b/packages/python/plotly/plotly/validators/layout/_dragmode.py new file mode 100644 index 00000000000..d3b0116de13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_dragmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class DragmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="dragmode", parent_name="layout", **kwargs): + super(DragmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["zoom", "pan", "select", "lasso", "orbit", "turntable", False], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_editrevision.py b/packages/python/plotly/plotly/validators/layout/_editrevision.py new file mode 100644 index 00000000000..cc4816c3853 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_editrevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EditrevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="editrevision", parent_name="layout", **kwargs): + super(EditrevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_extendfunnelareacolors.py b/packages/python/plotly/plotly/validators/layout/_extendfunnelareacolors.py new file mode 100644 index 00000000000..d4c5bb5b651 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_extendfunnelareacolors.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ExtendfunnelareacolorsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="extendfunnelareacolors", parent_name="layout", **kwargs + ): + super(ExtendfunnelareacolorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_extendpiecolors.py b/packages/python/plotly/plotly/validators/layout/_extendpiecolors.py new file mode 100644 index 00000000000..d51b0f168fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_extendpiecolors.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ExtendpiecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="extendpiecolors", parent_name="layout", **kwargs): + super(ExtendpiecolorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_extendsunburstcolors.py b/packages/python/plotly/plotly/validators/layout/_extendsunburstcolors.py new file mode 100644 index 00000000000..826431fb629 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_extendsunburstcolors.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ExtendsunburstcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="extendsunburstcolors", parent_name="layout", **kwargs + ): + super(ExtendsunburstcolorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_extendtreemapcolors.py b/packages/python/plotly/plotly/validators/layout/_extendtreemapcolors.py new file mode 100644 index 00000000000..6582a7691d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_extendtreemapcolors.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ExtendtreemapcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="extendtreemapcolors", parent_name="layout", **kwargs + ): + super(ExtendtreemapcolorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_font.py b/packages/python/plotly/plotly/validators/layout/_font.py new file mode 100644 index 00000000000..c570a319eab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_funnelareacolorway.py b/packages/python/plotly/plotly/validators/layout/_funnelareacolorway.py new file mode 100644 index 00000000000..a60d4db6651 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_funnelareacolorway.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FunnelareacolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): + def __init__( + self, plotly_name="funnelareacolorway", parent_name="layout", **kwargs + ): + super(FunnelareacolorwayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_funnelgap.py b/packages/python/plotly/plotly/validators/layout/_funnelgap.py new file mode 100644 index 00000000000..a062f8f4395 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_funnelgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FunnelgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="funnelgap", parent_name="layout", **kwargs): + super(FunnelgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_funnelgroupgap.py b/packages/python/plotly/plotly/validators/layout/_funnelgroupgap.py new file mode 100644 index 00000000000..ea435f4a49d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_funnelgroupgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FunnelgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="funnelgroupgap", parent_name="layout", **kwargs): + super(FunnelgroupgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_funnelmode.py b/packages/python/plotly/plotly/validators/layout/_funnelmode.py new file mode 100644 index 00000000000..f8006139a23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_funnelmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FunnelmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="funnelmode", parent_name="layout", **kwargs): + super(FunnelmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["stack", "group", "overlay"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_geo.py b/packages/python/plotly/plotly/validators/layout/_geo.py new file mode 100644 index 00000000000..04ef2bfbd17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_geo.py @@ -0,0 +1,114 @@ +import _plotly_utils.basevalidators + + +class GeoValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="geo", parent_name="layout", **kwargs): + super(GeoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Geo"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Set the background color of the map + center + :class:`plotly.graph_objects.layout.geo.Center` + instance or dict with compatible properties + coastlinecolor + Sets the coastline color. + coastlinewidth + Sets the coastline stroke width (in px). + countrycolor + Sets line color of the country boundaries. + countrywidth + Sets line width (in px) of the country + boundaries. + domain + :class:`plotly.graph_objects.layout.geo.Domain` + instance or dict with compatible properties + fitbounds + Determines if this subplot's view settings are + auto-computed to fit trace data. On scoped + maps, setting `fitbounds` leads to `center.lon` + and `center.lat` getting auto-filled. On maps + with a non-clipped projection, setting + `fitbounds` leads to `center.lon`, + `center.lat`, and `projection.rotation.lon` + getting auto-filled. On maps with a clipped + projection, setting `fitbounds` leads to + `center.lon`, `center.lat`, + `projection.rotation.lon`, + `projection.rotation.lat`, `lonaxis.range` and + `lonaxis.range` getting auto-filled. If + "locations", only the trace's visible locations + are considered in the `fitbounds` computations. + If "geojson", the entire trace input `geojson` + (if provided) is considered in the `fitbounds` + computations, Defaults to False. + framecolor + Sets the color the frame. + framewidth + Sets the stroke width (in px) of the frame. + lakecolor + Sets the color of the lakes. + landcolor + Sets the land mass color. + lataxis + :class:`plotly.graph_objects.layout.geo.Lataxis + ` instance or dict with compatible properties + lonaxis + :class:`plotly.graph_objects.layout.geo.Lonaxis + ` instance or dict with compatible properties + oceancolor + Sets the ocean color + projection + :class:`plotly.graph_objects.layout.geo.Project + ion` instance or dict with compatible + properties + resolution + Sets the resolution of the base layers. The + values have units of km/mm e.g. 110 corresponds + to a scale ratio of 1:110,000,000. + rivercolor + Sets color of the rivers. + riverwidth + Sets the stroke width (in px) of the rivers. + scope + Set the scope of the map. + showcoastlines + Sets whether or not the coastlines are drawn. + showcountries + Sets whether or not country boundaries are + drawn. + showframe + Sets whether or not a frame is drawn around the + map. + showlakes + Sets whether or not lakes are drawn. + showland + Sets whether or not land masses are filled in + color. + showocean + Sets whether or not oceans are filled in color. + showrivers + Sets whether or not rivers are drawn. + showsubunits + Sets whether or not boundaries of subunits + within countries (e.g. states, provinces) are + drawn. + subunitcolor + Sets the color of the subunits boundaries. + subunitwidth + Sets the stroke width (in px) of the subunits + boundaries. + uirevision + Controls persistence of user-driven changes in + the view (projection and center). Defaults to + `layout.uirevision`. + visible + Sets the default visibility of the base layers. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_grid.py b/packages/python/plotly/plotly/validators/layout/_grid.py new file mode 100644 index 00000000000..625844891a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_grid.py @@ -0,0 +1,95 @@ +import _plotly_utils.basevalidators + + +class GridValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="grid", parent_name="layout", **kwargs): + super(GridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Grid"), + data_docs=kwargs.pop( + "data_docs", + """ + columns + The number of columns in the grid. If you + provide a 2D `subplots` array, the length of + its longest row is used as the default. If you + give an `xaxes` array, its length is used as + the default. But it's also possible to have a + different length, if you want to leave a row at + the end for non-cartesian subplots. + domain + :class:`plotly.graph_objects.layout.grid.Domain + ` instance or dict with compatible properties + pattern + If no `subplots`, `xaxes`, or `yaxes` are given + but we do have `rows` and `columns`, we can + generate defaults using consecutive axis IDs, + in two ways: "coupled" gives one x axis per + column and one y axis per row. "independent" + uses a new xy pair for each cell, left-to-right + across each row then iterating rows according + to `roworder`. + roworder + Is the first row the top or the bottom? Note + that columns are always enumerated from left to + right. + rows + The number of rows in the grid. If you provide + a 2D `subplots` array or a `yaxes` array, its + length is used as the default. But it's also + possible to have a different length, if you + want to leave a row at the end for non- + cartesian subplots. + subplots + Used for freeform grids, where some axes may be + shared across subplots but others are not. Each + entry should be a cartesian subplot id, like + "xy" or "x3y2", or "" to leave that cell empty. + You may reuse x axes within the same column, + and y axes within the same row. Non-cartesian + subplots and traces that support `domain` can + place themselves in this grid separately using + the `gridcell` attribute. + xaxes + Used with `yaxes` when the x and y axes are + shared across columns and rows. Each entry + should be an x axis id like "x", "x2", etc., or + "" to not put an x axis in that column. Entries + other than "" must be unique. Ignored if + `subplots` is present. If missing but `yaxes` + is present, will generate consecutive IDs. + xgap + Horizontal space between grid cells, expressed + as a fraction of the total width available to + one cell. Defaults to 0.1 for coupled-axes + grids and 0.2 for independent grids. + xside + Sets where the x axis labels and titles go. + "bottom" means the very bottom of the grid. + "bottom plot" is the lowest plot that each x + axis is used in. "top" and "top plot" are + similar. + yaxes + Used with `yaxes` when the x and y axes are + shared across columns and rows. Each entry + should be an y axis id like "y", "y2", etc., or + "" to not put a y axis in that row. Entries + other than "" must be unique. Ignored if + `subplots` is present. If missing but `xaxes` + is present, will generate consecutive IDs. + ygap + Vertical space between grid cells, expressed as + a fraction of the total height available to one + cell. Defaults to 0.1 for coupled-axes grids + and 0.3 for independent grids. + yside + Sets where the y axis labels and titles go. + "left" means the very left edge of the grid. + *left plot* is the leftmost plot that each y + axis is used in. "right" and *right plot* are + similar. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_height.py b/packages/python/plotly/plotly/validators/layout/_height.py new file mode 100644 index 00000000000..588446e794b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_height.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HeightValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="height", parent_name="layout", **kwargs): + super(HeightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 10), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_hiddenlabels.py b/packages/python/plotly/plotly/validators/layout/_hiddenlabels.py new file mode 100644 index 00000000000..8489093ff7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_hiddenlabels.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HiddenlabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="hiddenlabels", parent_name="layout", **kwargs): + super(HiddenlabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_hiddenlabelssrc.py b/packages/python/plotly/plotly/validators/layout/_hiddenlabelssrc.py new file mode 100644 index 00000000000..a24b0867f47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_hiddenlabelssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HiddenlabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hiddenlabelssrc", parent_name="layout", **kwargs): + super(HiddenlabelssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_hidesources.py b/packages/python/plotly/plotly/validators/layout/_hidesources.py new file mode 100644 index 00000000000..e049df7f345 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_hidesources.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HidesourcesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="hidesources", parent_name="layout", **kwargs): + super(HidesourcesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_hoverdistance.py b/packages/python/plotly/plotly/validators/layout/_hoverdistance.py new file mode 100644 index 00000000000..b2a13ceb442 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_hoverdistance.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoverdistanceValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="hoverdistance", parent_name="layout", **kwargs): + super(HoverdistanceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_hoverlabel.py b/packages/python/plotly/plotly/validators/layout/_hoverlabel.py new file mode 100644 index 00000000000..c8bcc823c81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_hoverlabel.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="layout", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + bgcolor + Sets the background color of all hover labels + on graph + bordercolor + Sets the border color of all hover labels on + graph. + font + Sets the default hover label font used by all + traces on the graph. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_hovermode.py b/packages/python/plotly/plotly/validators/layout/_hovermode.py new file mode 100644 index 00000000000..f0e32ae485e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_hovermode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="hovermode", parent_name="layout", **kwargs): + super(HovermodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["x", "y", "closest", False, "x unified", "y unified"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_imagedefaults.py b/packages/python/plotly/plotly/validators/layout/_imagedefaults.py new file mode 100644 index 00000000000..52e00af47fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_imagedefaults.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ImagedefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="imagedefaults", parent_name="layout", **kwargs): + super(ImagedefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Image"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_images.py b/packages/python/plotly/plotly/validators/layout/_images.py new file mode 100644 index 00000000000..38b0803cf2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_images.py @@ -0,0 +1,93 @@ +import _plotly_utils.basevalidators + + +class ImagesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="images", parent_name="layout", **kwargs): + super(ImagesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Image"), + data_docs=kwargs.pop( + "data_docs", + """ + layer + Specifies whether images are drawn below or + above traces. When `xref` and `yref` are both + set to `paper`, image is drawn below the entire + plot area. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The + image will be sized based on the `position` + value. When `xref` is set to `paper`, units are + sized relative to the plot width. + sizey + Sets the image container size vertically. The + image will be sized based on the `position` + value. When `yref` is set to `paper`, units are + sized relative to the plot height. + sizing + Specifies which dimension of the image to + constrain. + source + Specifies the URL of the image to be used. The + URL must be accessible from the domain where + the plot code is run, and can be either + relative or absolute. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this image is + visible. + x + Sets the image's x position. When `xref` is set + to `paper`, units are sized relative to the + plot height. See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to + a x axis id (e.g. "x" or "x2"), the `x` + position refers to an x data coordinate If set + to "paper", the `x` position refers to the + distance from the left of plot in normalized + coordinates where 0 (1) corresponds to the left + (right). + y + Sets the image's y position. When `yref` is set + to `paper`, units are sized relative to the + plot height. See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to + a y axis id (e.g. "y" or "y2"), the `y` + position refers to a y data coordinate. If set + to "paper", the `y` position refers to the + distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds + to the bottom (top). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_legend.py b/packages/python/plotly/plotly/validators/layout/_legend.py new file mode 100644 index 00000000000..0d6fb835825 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_legend.py @@ -0,0 +1,101 @@ +import _plotly_utils.basevalidators + + +class LegendValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="legend", parent_name="layout", **kwargs): + super(LegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Legend"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the legend background color. Defaults to + `layout.paper_bgcolor`. + bordercolor + Sets the color of the border enclosing the + legend. + borderwidth + Sets the width (in px) of the border enclosing + the legend. + font + Sets the font used to text the legend items. + itemclick + Determines the behavior on legend item click. + "toggle" toggles the visibility of the item + clicked on the graph. "toggleothers" makes the + clicked item the sole visible item on the + graph. False disable legend item click + interactions. + itemdoubleclick + Determines the behavior on legend item double- + click. "toggle" toggles the visibility of the + item clicked on the graph. "toggleothers" makes + the clicked item the sole visible item on the + graph. False disable legend item double-click + interactions. + itemsizing + Determines if the legend items symbols scale + with their corresponding "trace" attributes or + remain "constant" independent of the symbol + size on the graph. + orientation + Sets the orientation of the legend. + title + :class:`plotly.graph_objects.layout.legend.Titl + e` instance or dict with compatible properties + tracegroupgap + Sets the amount of vertical space (in px) + between legend groups. + traceorder + Determines the order at which the legend items + are displayed. If "normal", the items are + displayed top-to-bottom in the same order as + the input data. If "reversed", the items are + displayed in the opposite order as "normal". If + "grouped", the items are displayed in groups + (when a trace `legendgroup` is provided). if + "grouped+reversed", the items are displayed in + the opposite order as "grouped". + uirevision + Controls persistence of legend-driven changes + in trace and pie label visibility. Defaults to + `layout.uirevision`. + valign + Sets the vertical alignment of the symbols with + respect to their associated text. + x + Sets the x position (in normalized coordinates) + of the legend. Defaults to 1.02 for vertical + legends and defaults to 0 for horizontal + legends. + xanchor + Sets the legend's horizontal position anchor. + This anchor binds the `x` position to the + "left", "center" or "right" of the legend. + Value "auto" anchors legends to the right for + `x` values greater than or equal to 2/3, + anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with + respect to their center otherwise. + y + Sets the y position (in normalized coordinates) + of the legend. Defaults to 1 for vertical + legends, defaults to "-0.1" for horizontal + legends on graphs w/o range sliders and + defaults to 1.1 for horizontal legends on graph + with one or multiple range sliders. + yanchor + Sets the legend's vertical position anchor This + anchor binds the `y` position to the "top", + "middle" or "bottom" of the legend. Value + "auto" anchors legends at their bottom for `y` + values less than or equal to 1/3, anchors + legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with + respect to their middle otherwise. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_mapbox.py b/packages/python/plotly/plotly/validators/layout/_mapbox.py new file mode 100644 index 00000000000..c5212ceec2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_mapbox.py @@ -0,0 +1,82 @@ +import _plotly_utils.basevalidators + + +class MapboxValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="mapbox", parent_name="layout", **kwargs): + super(MapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Mapbox"), + data_docs=kwargs.pop( + "data_docs", + """ + accesstoken + Sets the mapbox access token to be used for + this mapbox map. Alternatively, the mapbox + access token can be set in the configuration + options under `mapboxAccessToken`. Note that + accessToken are only required when `style` (e.g + with values : basic, streets, outdoors, light, + dark, satellite, satellite-streets ) and/or a + layout layer references the Mapbox server. + bearing + Sets the bearing angle of the map in degrees + counter-clockwise from North (mapbox.bearing). + center + :class:`plotly.graph_objects.layout.mapbox.Cent + er` instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.mapbox.Doma + in` instance or dict with compatible properties + layers + A tuple of :class:`plotly.graph_objects.layout. + mapbox.Layer` instances or dicts with + compatible properties + layerdefaults + When used in a template (as + layout.template.layout.mapbox.layerdefaults), + sets the default property values to use for + elements of layout.mapbox.layers + pitch + Sets the pitch angle of the map (in degrees, + where 0 means perpendicular to the surface of + the map) (mapbox.pitch). + style + Defines the map layers that are rendered by + default below the trace layers defined in + `data`, which are themselves by default + rendered below the layers defined in + `layout.mapbox.layers`. These layers can be + defined either explicitly as a Mapbox Style + object which can contain multiple layer + definitions that load data from any public or + private Tile Map Service (TMS or XYZ) or Web + Map Service (WMS) or implicitly by using one of + the built-in style objects which use WMSes + which do not require any access tokens, or by + using a default Mapbox style or custom Mapbox + style URL, both of which require a Mapbox + access token Note that Mapbox access token can + be set in the `accesstoken` attribute or in the + `mapboxAccessToken` config option. Mapbox + Style objects are of the form described in the + Mapbox GL JS documentation available at + https://docs.mapbox.com/mapbox-gl-js/style-spec + The built-in plotly.js styles objects are: + open-street-map, white-bg, carto-positron, + carto-darkmatter, stamen-terrain, stamen-toner, + stamen-watercolor The built-in Mapbox styles + are: basic, streets, outdoors, light, dark, + satellite, satellite-streets Mapbox style URLs + are of the form: + mapbox://mapbox.mapbox-- + uirevision + Controls persistence of user-driven changes in + the view: `center`, `zoom`, `bearing`, `pitch`. + Defaults to `layout.uirevision`. + zoom + Sets the zoom level of the map (mapbox.zoom). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_margin.py b/packages/python/plotly/plotly/validators/layout/_margin.py new file mode 100644 index 00000000000..99c1fcd7f50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_margin.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class MarginValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="margin", parent_name="layout", **kwargs): + super(MarginValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Margin"), + data_docs=kwargs.pop( + "data_docs", + """ + autoexpand + Turns on/off margin expansion computations. + Legends, colorbars, updatemenus, sliders, axis + rangeselector and rangeslider are allowed to + push the margins by defaults. + b + Sets the bottom margin (in px). + l + Sets the left margin (in px). + pad + Sets the amount of padding (in px) between the + plotting area and the axis lines + r + Sets the right margin (in px). + t + Sets the top margin (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_meta.py b/packages/python/plotly/plotly/validators/layout/_meta.py new file mode 100644 index 00000000000..8ab9262d3d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="layout", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_metasrc.py b/packages/python/plotly/plotly/validators/layout/_metasrc.py new file mode 100644 index 00000000000..f3579170441 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="layout", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_modebar.py b/packages/python/plotly/plotly/validators/layout/_modebar.py new file mode 100644 index 00000000000..ed21431fe90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_modebar.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class ModebarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="modebar", parent_name="layout", **kwargs): + super(ModebarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Modebar"), + data_docs=kwargs.pop( + "data_docs", + """ + activecolor + Sets the color of the active or hovered on + icons in the modebar. + bgcolor + Sets the background color of the modebar. + color + Sets the color of the icons in the modebar. + orientation + Sets the orientation of the modebar. + uirevision + Controls persistence of user-driven changes + related to the modebar, including `hovermode`, + `dragmode`, and `showspikes` at both the root + level and inside subplots. Defaults to + `layout.uirevision`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_orientation.py b/packages/python/plotly/plotly/validators/layout/_orientation.py new file mode 100644 index 00000000000..b29e044ba99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_orientation.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="orientation", parent_name="layout", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_paper_bgcolor.py b/packages/python/plotly/plotly/validators/layout/_paper_bgcolor.py new file mode 100644 index 00000000000..2ce56e87f36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_paper_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Paper_BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="paper_bgcolor", parent_name="layout", **kwargs): + super(Paper_BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_piecolorway.py b/packages/python/plotly/plotly/validators/layout/_piecolorway.py new file mode 100644 index 00000000000..806e737bbd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_piecolorway.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PiecolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): + def __init__(self, plotly_name="piecolorway", parent_name="layout", **kwargs): + super(PiecolorwayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_plot_bgcolor.py b/packages/python/plotly/plotly/validators/layout/_plot_bgcolor.py new file mode 100644 index 00000000000..f9e0d5c332c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_plot_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Plot_BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="plot_bgcolor", parent_name="layout", **kwargs): + super(Plot_BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_polar.py b/packages/python/plotly/plotly/validators/layout/_polar.py new file mode 100644 index 00000000000..ed00d66eead --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_polar.py @@ -0,0 +1,64 @@ +import _plotly_utils.basevalidators + + +class PolarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="polar", parent_name="layout", **kwargs): + super(PolarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Polar"), + data_docs=kwargs.pop( + "data_docs", + """ + angularaxis + :class:`plotly.graph_objects.layout.polar.Angul + arAxis` instance or dict with compatible + properties + bargap + Sets the gap between bars of adjacent location + coordinates. Values are unitless, they + represent fractions of the minimum difference + in bar positions in the data. + barmode + Determines how bars at the same location + coordinate are displayed on the graph. With + "stack", the bars are stacked on top of one + another With "overlay", the bars are plotted + over one another, you might need to an + "opacity" to see multiple bars. + bgcolor + Set the background color of the subplot + domain + :class:`plotly.graph_objects.layout.polar.Domai + n` instance or dict with compatible properties + gridshape + Determines if the radial axis grid lines and + angular axis line are drawn as "circular" + sectors or as "linear" (polygon) sectors. Has + an effect only when the angular axis has `type` + "category". Note that `radialaxis.angle` is + snapped to the angle of the closest vertex when + `gridshape` is "circular" (so that radial axis + scale is the same as the data scale). + hole + Sets the fraction of the radius to cut out of + the polar subplot. + radialaxis + :class:`plotly.graph_objects.layout.polar.Radia + lAxis` instance or dict with compatible + properties + sector + Sets angular span of this polar subplot with + two angles (in degrees). Sector are assumed to + be spanned in the counterclockwise direction + with 0 corresponding to rightmost limit of the + polar subplot. + uirevision + Controls persistence of user-driven changes in + axis attributes, if not overridden in the + individual axes. Defaults to + `layout.uirevision`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_radialaxis.py b/packages/python/plotly/plotly/validators/layout/_radialaxis.py new file mode 100644 index 00000000000..99a82dbf85d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_radialaxis.py @@ -0,0 +1,62 @@ +import _plotly_utils.basevalidators + + +class RadialaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="radialaxis", parent_name="layout", **kwargs): + super(RadialaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "RadialAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + domain + Polar chart subplots are not supported yet. + This key has currently no effect. + endpadding + Legacy polar charts are deprecated! Please + switch to "polar" subplots. + orientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (an angle with respect to the + origin) of the radial axis. + range + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Defines the start + and end point of this radial axis. + showline + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the line bounding this radial axis will + be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the radial axis ticks will feature tick + labels. + tickcolor + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the color of + the tick lines on this radial axis. + ticklen + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this radial axis. + tickorientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (from the paper perspective) of the + radial axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this radial axis. + visible + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not this axis will be visible. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_scene.py b/packages/python/plotly/plotly/validators/layout/_scene.py new file mode 100644 index 00000000000..262da4c1bdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_scene.py @@ -0,0 +1,67 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="scene", parent_name="layout", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scene"), + data_docs=kwargs.pop( + "data_docs", + """ + annotations + A tuple of :class:`plotly.graph_objects.layout. + scene.Annotation` instances or dicts with + compatible properties + annotationdefaults + When used in a template (as layout.template.lay + out.scene.annotationdefaults), sets the default + property values to use for elements of + layout.scene.annotations + aspectmode + If "cube", this scene's axes are drawn as a + cube, regardless of the axes' ranges. If + "data", this scene's axes are drawn in + proportion with the axes' ranges. If "manual", + this scene's axes are drawn in proportion with + the input of "aspectratio" (the default + behavior if "aspectratio" is provided). If + "auto", this scene's axes are drawn using the + results of "data" except when one axis is more + than four times the size of the two others, + where in that case the results of "cube" are + used. + aspectratio + Sets this scene's axis aspectratio. + bgcolor + + camera + :class:`plotly.graph_objects.layout.scene.Camer + a` instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.scene.Domai + n` instance or dict with compatible properties + dragmode + Determines the mode of drag interactions for + this scene. + hovermode + Determines the mode of hover interactions for + this scene. + uirevision + Controls persistence of user-driven changes in + camera attributes. Defaults to + `layout.uirevision`. + xaxis + :class:`plotly.graph_objects.layout.scene.XAxis + ` instance or dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.scene.YAxis + ` instance or dict with compatible properties + zaxis + :class:`plotly.graph_objects.layout.scene.ZAxis + ` instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_selectdirection.py b/packages/python/plotly/plotly/validators/layout/_selectdirection.py new file mode 100644 index 00000000000..dd80f02c3ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_selectdirection.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SelectdirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="selectdirection", parent_name="layout", **kwargs): + super(SelectdirectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["h", "v", "d", "any"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_selectionrevision.py b/packages/python/plotly/plotly/validators/layout/_selectionrevision.py new file mode 100644 index 00000000000..2d6a4e9478e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_selectionrevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectionrevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectionrevision", parent_name="layout", **kwargs): + super(SelectionrevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_separators.py b/packages/python/plotly/plotly/validators/layout/_separators.py new file mode 100644 index 00000000000..f29f1b2dc5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_separators.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SeparatorsValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="separators", parent_name="layout", **kwargs): + super(SeparatorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_shapedefaults.py b/packages/python/plotly/plotly/validators/layout/_shapedefaults.py new file mode 100644 index 00000000000..72b7303c17e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_shapedefaults.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ShapedefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="shapedefaults", parent_name="layout", **kwargs): + super(ShapedefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Shape"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_shapes.py b/packages/python/plotly/plotly/validators/layout/_shapes.py new file mode 100644 index 00000000000..00086340cda --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_shapes.py @@ -0,0 +1,162 @@ +import _plotly_utils.basevalidators + + +class ShapesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="shapes", parent_name="layout", **kwargs): + super(ShapesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Shape"), + data_docs=kwargs.pop( + "data_docs", + """ + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or + above traces. + line + :class:`plotly.graph_objects.layout.shape.Line` + instance or dict with compatible properties + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the + pixel values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and + taken unmodified as pixels relative to + `xanchor` and `yanchor` in case of "pixel" size + mode. There are a few restrictions / quirks + only absolute instructions, not relative. So + the allowed segments are: M, L, H, V, Q, C, T, + S, and Z arcs (A) are not allowed because + radius rx and ry are relative. In the future we + could consider supporting relative commands, + but we would have to decide on how to handle + date and log axes. Note that even as is, Q and + C Bezier paths that are smooth on linear axes + may not be smooth on log, and vice versa. no + chained "polybezier" commands - specify the + segment type for each one. On category axes, + values are numbers scaled to the serial numbers + of categories because using the categories + themselves there would be no way to describe + fractional positions On data axes: because + space and T are both normal components of path + strings, we can't use either to separate date + from time parts. Therefore we'll use underscore + for this purpose: 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If + "line", a line is drawn from (`x0`,`y0`) to + (`x1`,`y1`) with respect to the axes' sizing + mode. If "circle", a circle is drawn from + ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 + -`y0`)|) with respect to the axes' sizing mode. + If "rect", a rectangle is drawn linking + (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), + (`x0`,`y1`), (`x0`,`y0`) with respect to the + axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' + sizing mode. + visible + Determines whether or not this shape is + visible. + x0 + Sets the shape's starting x position. See + `type` and `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` + set to "pixel". Specifies the anchor point on + the x axis to which `x0`, `x1` and x + coordinates within `path` are relative to. E.g. + useful to attach a pixel sized shape to a + certain data value. No effect when `xsizemode` + not set to "pixel". + xref + Sets the shape's x coordinate axis. If set to + an x axis id (e.g. "x" or "x2"), the `x` + position refers to an x coordinate. If set to + "paper", the `x` position refers to the + distance from the left side of the plotting + area in normalized coordinates where 0 (1) + corresponds to the left (right) side. If the + axis `type` is "log", then you must take the + log of your desired range. If the axis `type` + is "date", then you must convert the date to + unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. + If set to "scaled", `x0`, `x1` and x + coordinates within `path` refer to data values + on the x axis or a fraction of the plot area's + width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in + terms of data or plot fraction but `x0`, `x1` + and x coordinates within `path` are pixels + relative to `xanchor`. This way, the shape can + have a fixed width while maintaining a position + relative to data or plot fraction. + y0 + Sets the shape's starting y position. See + `type` and `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` + set to "pixel". Specifies the anchor point on + the y axis to which `y0`, `y1` and y + coordinates within `path` are relative to. E.g. + useful to attach a pixel sized shape to a + certain data value. No effect when `ysizemode` + not set to "pixel". + yref + Sets the annotation's y coordinate axis. If set + to an y axis id (e.g. "y" or "y2"), the `y` + position refers to an y coordinate If set to + "paper", the `y` position refers to the + distance from the bottom of the plotting area + in normalized coordinates where 0 (1) + corresponds to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. + If set to "scaled", `y0`, `y1` and y + coordinates within `path` refer to data values + on the y axis or a fraction of the plot area's + height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in + terms of data or plot fraction but `y0`, `y1` + and y coordinates within `path` are pixels + relative to `yanchor`. This way, the shape can + have a fixed height while maintaining a + position relative to data or plot fraction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_showlegend.py b/packages/python/plotly/plotly/validators/layout/_showlegend.py new file mode 100644 index 00000000000..7407492a9fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="layout", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_sliderdefaults.py b/packages/python/plotly/plotly/validators/layout/_sliderdefaults.py new file mode 100644 index 00000000000..fa173ca9318 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_sliderdefaults.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SliderdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="sliderdefaults", parent_name="layout", **kwargs): + super(SliderdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Slider"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_sliders.py b/packages/python/plotly/plotly/validators/layout/_sliders.py new file mode 100644 index 00000000000..4d199a20358 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_sliders.py @@ -0,0 +1,110 @@ +import _plotly_utils.basevalidators + + +class SlidersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="sliders", parent_name="layout", **kwargs): + super(SlidersValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Slider"), + data_docs=kwargs.pop( + "data_docs", + """ + active + Determines which button (by index starting from + 0) is considered active. + activebgcolor + Sets the background color of the slider grip + while dragging. + bgcolor + Sets the background color of the slider. + bordercolor + Sets the color of the border enclosing the + slider. + borderwidth + Sets the width (in px) of the border enclosing + the slider. + currentvalue + :class:`plotly.graph_objects.layout.slider.Curr + entvalue` instance or dict with compatible + properties + font + Sets the font of the slider step labels. + len + Sets the length of the slider This measure + excludes the padding of both ends. That is, the + slider's length is this length minus the + padding on both ends. + lenmode + Determines whether this slider length is set in + units of plot "fraction" or in *pixels. Use + `len` to set the value. + minorticklen + Sets the length in pixels of minor step tick + marks + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pad + Set the padding of the slider component along + each side. + steps + A tuple of :class:`plotly.graph_objects.layout. + slider.Step` instances or dicts with compatible + properties + stepdefaults + When used in a template (as + layout.template.layout.slider.stepdefaults), + sets the default property values to use for + elements of layout.slider.steps + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + tickcolor + Sets the color of the border enclosing the + slider. + ticklen + Sets the length in pixels of step tick marks + tickwidth + Sets the tick width (in px). + transition + :class:`plotly.graph_objects.layout.slider.Tran + sition` instance or dict with compatible + properties + visible + Determines whether or not the slider is + visible. + x + Sets the x position (in normalized coordinates) + of the slider. + xanchor + Sets the slider's horizontal position anchor. + This anchor binds the `x` position to the + "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the slider. + yanchor + Sets the slider's vertical position anchor This + anchor binds the `y` position to the "top", + "middle" or "bottom" of the range selector. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_spikedistance.py b/packages/python/plotly/plotly/validators/layout/_spikedistance.py new file mode 100644 index 00000000000..d71f33f9ccb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_spikedistance.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SpikedistanceValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="spikedistance", parent_name="layout", **kwargs): + super(SpikedistanceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_sunburstcolorway.py b/packages/python/plotly/plotly/validators/layout/_sunburstcolorway.py new file mode 100644 index 00000000000..3990d3f41f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_sunburstcolorway.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SunburstcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): + def __init__(self, plotly_name="sunburstcolorway", parent_name="layout", **kwargs): + super(SunburstcolorwayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_template.py b/packages/python/plotly/plotly/validators/layout/_template.py new file mode 100644 index 00000000000..c5c53a2bb70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_template.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class TemplateValidator(_plotly_utils.basevalidators.BaseTemplateValidator): + def __init__(self, plotly_name="template", parent_name="layout", **kwargs): + super(TemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Template"), + data_docs=kwargs.pop( + "data_docs", + """ + data + :class:`plotly.graph_objects.layout.template.Da + ta` instance or dict with compatible properties + layout + :class:`plotly.graph_objects.Layout` instance + or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_ternary.py b/packages/python/plotly/plotly/validators/layout/_ternary.py new file mode 100644 index 00000000000..8c547da3605 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_ternary.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TernaryValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="ternary", parent_name="layout", **kwargs): + super(TernaryValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Ternary"), + data_docs=kwargs.pop( + "data_docs", + """ + aaxis + :class:`plotly.graph_objects.layout.ternary.Aax + is` instance or dict with compatible properties + baxis + :class:`plotly.graph_objects.layout.ternary.Bax + is` instance or dict with compatible properties + bgcolor + Set the background color of the subplot + caxis + :class:`plotly.graph_objects.layout.ternary.Cax + is` instance or dict with compatible properties + domain + :class:`plotly.graph_objects.layout.ternary.Dom + ain` instance or dict with compatible + properties + sum + The number each triplet should sum to, and the + maximum range of each axis + uirevision + Controls persistence of user-driven changes in + axis `min` and `title`, if not overridden in + the individual axes. Defaults to + `layout.uirevision`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_title.py b/packages/python/plotly/plotly/validators/layout/_title.py new file mode 100644 index 00000000000..461588c3a2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_title.py @@ -0,0 +1,68 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets the title font. Note that the title's font + used to be customized by the now deprecated + `titlefont` attribute. + pad + Sets the padding of the title. Each padding + value only applies when the corresponding + `xanchor`/`yanchor` value is set accordingly. + E.g. for left padding to take effect, `xanchor` + must be set to "left". The same rule applies if + `xanchor`/`yanchor` is determined + automatically. Padding is muted if the + respective anchor value is "middle*/*center". + text + Sets the plot's title. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. + x + Sets the x position with respect to `xref` in + normalized coordinates from 0 (left) to 1 + (right). + xanchor + Sets the title's horizontal alignment with + respect to its x position. "left" means that + the title starts at x, "right" means that the + title ends at x and "center" means that the + title's center is at x. "auto" divides `xref` + by three and calculates the `xanchor` value + automatically based on the value of `x`. + xref + Sets the container `x` refers to. "container" + spans the entire `width` of the plot. "paper" + refers to the width of the plotting area only. + y + Sets the y position with respect to `yref` in + normalized coordinates from 0 (bottom) to 1 + (top). "auto" places the baseline of the title + onto the vertical center of the top margin. + yanchor + Sets the title's vertical alignment with + respect to its y position. "top" means that the + title's cap line is at y, "bottom" means that + the title's baseline is at y and "middle" means + that the title's midline is at y. "auto" + divides `yref` by three and calculates the + `yanchor` value automatically based on the + value of `y`. + yref + Sets the container `y` refers to. "container" + spans the entire `height` of the plot. "paper" + refers to the height of the plotting area only. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_transition.py b/packages/python/plotly/plotly/validators/layout/_transition.py new file mode 100644 index 00000000000..2d8e8c8ba9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_transition.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="transition", parent_name="layout", **kwargs): + super(TransitionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Transition"), + data_docs=kwargs.pop( + "data_docs", + """ + duration + The duration of the transition, in + milliseconds. If equal to zero, updates are + synchronous. + easing + The easing function used for the transition + ordering + Determines whether the figure's layout or + traces smoothly transitions during updates that + make both traces and layout change. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_treemapcolorway.py b/packages/python/plotly/plotly/validators/layout/_treemapcolorway.py new file mode 100644 index 00000000000..03be508a34c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_treemapcolorway.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TreemapcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): + def __init__(self, plotly_name="treemapcolorway", parent_name="layout", **kwargs): + super(TreemapcolorwayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_uirevision.py b/packages/python/plotly/plotly/validators/layout/_uirevision.py new file mode 100644 index 00000000000..18abe1de0da --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_uniformtext.py b/packages/python/plotly/plotly/validators/layout/_uniformtext.py new file mode 100644 index 00000000000..9607887ba6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_uniformtext.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class UniformtextValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="uniformtext", parent_name="layout", **kwargs): + super(UniformtextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Uniformtext"), + data_docs=kwargs.pop( + "data_docs", + """ + minsize + Sets the minimum text size between traces of + the same type. + mode + Determines how the font size for various text + elements are uniformed between each trace type. + If the computed text sizes were smaller than + the minimum size defined by + `uniformtext.minsize` using "hide" option hides + the text; and using "show" option shows the + text without further downscaling. Please note + that if the size defined by `minsize` is + greater than the font size defined by trace, + then the `minsize` is used. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_updatemenudefaults.py b/packages/python/plotly/plotly/validators/layout/_updatemenudefaults.py new file mode 100644 index 00000000000..9204750e87b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_updatemenudefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class UpdatemenudefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="updatemenudefaults", parent_name="layout", **kwargs + ): + super(UpdatemenudefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Updatemenu"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_updatemenus.py b/packages/python/plotly/plotly/validators/layout/_updatemenus.py new file mode 100644 index 00000000000..84f2737aed6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_updatemenus.py @@ -0,0 +1,95 @@ +import _plotly_utils.basevalidators + + +class UpdatemenusValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="updatemenus", parent_name="layout", **kwargs): + super(UpdatemenusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Updatemenu"), + data_docs=kwargs.pop( + "data_docs", + """ + active + Determines which button (by index starting from + 0) is considered active. + bgcolor + Sets the background color of the update menu + buttons. + bordercolor + Sets the color of the border enclosing the + update menu. + borderwidth + Sets the width (in px) of the border enclosing + the update menu. + buttons + A tuple of :class:`plotly.graph_objects.layout. + updatemenu.Button` instances or dicts with + compatible properties + buttondefaults + When used in a template (as layout.template.lay + out.updatemenu.buttondefaults), sets the + default property values to use for elements of + layout.updatemenu.buttons + direction + Determines the direction in which the buttons + are laid out, whether in a dropdown menu or a + row/column of buttons. For `left` and `up`, the + buttons will still appear in left-to-right or + top-to-bottom order respectively. + font + Sets the font of the update menu button text. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pad + Sets the padding around the buttons or dropdown + menu. + showactive + Highlights active dropdown item or active + button if true. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Determines whether the buttons are accessible + via a dropdown menu or whether the buttons are + stacked horizontally or vertically + visible + Determines whether or not the update menu is + visible. + x + Sets the x position (in normalized coordinates) + of the update menu. + xanchor + Sets the update menu's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the update menu. + yanchor + Sets the update menu's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the range + selector. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_violingap.py b/packages/python/plotly/plotly/validators/layout/_violingap.py new file mode 100644 index 00000000000..7e5f6b6f051 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_violingap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ViolingapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="violingap", parent_name="layout", **kwargs): + super(ViolingapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_violingroupgap.py b/packages/python/plotly/plotly/validators/layout/_violingroupgap.py new file mode 100644 index 00000000000..c5754d12d87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_violingroupgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ViolingroupgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="violingroupgap", parent_name="layout", **kwargs): + super(ViolingroupgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_violinmode.py b/packages/python/plotly/plotly/validators/layout/_violinmode.py new file mode 100644 index 00000000000..848724e4d68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_violinmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ViolinmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="violinmode", parent_name="layout", **kwargs): + super(ViolinmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["group", "overlay"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_waterfallgap.py b/packages/python/plotly/plotly/validators/layout/_waterfallgap.py new file mode 100644 index 00000000000..66f2addce48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_waterfallgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WaterfallgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="waterfallgap", parent_name="layout", **kwargs): + super(WaterfallgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_waterfallgroupgap.py b/packages/python/plotly/plotly/validators/layout/_waterfallgroupgap.py new file mode 100644 index 00000000000..2a304a37fbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_waterfallgroupgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WaterfallgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="waterfallgroupgap", parent_name="layout", **kwargs): + super(WaterfallgroupgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_waterfallmode.py b/packages/python/plotly/plotly/validators/layout/_waterfallmode.py new file mode 100644 index 00000000000..c04a7587649 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_waterfallmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WaterfallmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="waterfallmode", parent_name="layout", **kwargs): + super(WaterfallmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["group", "overlay"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_width.py b/packages/python/plotly/plotly/validators/layout/_width.py new file mode 100644 index 00000000000..d33a3599582 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="layout", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 10), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_xaxis.py b/packages/python/plotly/plotly/validators/layout/_xaxis.py new file mode 100644 index 00000000000..b7f6dd85ba5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_xaxis.py @@ -0,0 +1,445 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="xaxis", parent_name="layout", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "XAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + anchor + If set to an opposite-letter axis id (e.g. + `x2`, `y`), this axis is bound to the + corresponding opposite-letter axis. If set to + "free", this axis' position is determined by + `position`. + automargin + Determines whether long tick labels + automatically grow the figure margins. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + constrain + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines how that + happens: by increasing the "range" (default), + or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines which + direction we push the originally specified plot + area. Options are "left", "center" (default), + and "right" for x axes, and "top", "middle" + (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an + effect on "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has + an effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot + fraction). + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the + range of this axis will match the range of the + corresponding axis in data-coordinates space. + Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that + matching axes must have the same `type`. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + overlaying + If set a same-letter axis id, this axis is + overlaid on top of the corresponding same- + letter axis, with traces and axes visible for + both axes. If False, this axis does not overlay + any same-letter axes. In this case, for axes + with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting + space (in normalized coordinates). Only has an + effect if `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangebreaks + A tuple of :class:`plotly.graph_objects.layout. + xaxis.Rangebreak` instances or dicts with + compatible properties + rangebreakdefaults + When used in a template (as layout.template.lay + out.xaxis.rangebreakdefaults), sets the default + property values to use for elements of + layout.xaxis.rangebreaks + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + rangeselector + :class:`plotly.graph_objects.layout.xaxis.Range + selector` instance or dict with compatible + properties + rangeslider + :class:`plotly.graph_objects.layout.xaxis.Range + slider` instance or dict with compatible + properties + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the + range of this axis changes together with the + range of the corresponding axis such that the + scale of pixels per unit is in a constant + ratio. Both axes are still zoomable, but when + you zoom one, the other will zoom the same + amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce + the constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` + but you can only link axes of the same `type`. + The linked axis can have the opposite letter + (to constrain the aspect ratio) or the same + letter (to match scales across subplots). Loops + (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant + and the last constraint encountered will be + ignored to avoid possible inconsistent + constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and + a `matches` constraint is currently forbidden. + scaleratio + If this axis is linked to another by + `scaleanchor`, this determines the pixel to + unit scale ratio. For example, if this value is + 10, then every unit on this axis spans 10 times + the number of pixels as a unit on the linked + axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn + between the category levels of this axis. Only + has an effect on "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Determines whether or not spikes (aka + droplines) are drawn for this axis. Note: This + only takes affect when hovermode = closest + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned + at the "bottom" ("left") or "top" ("right") of + the plotting area. + spikecolor + Sets the spike color. If undefined, will use + the series color + spikedash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line + If "toaxis", the line is drawn from the data + point to the axis the series is plotted on. If + "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If + "marker", then a marker dot is drawn on the + axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the + cursor or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + xaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.xaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn + with respect to their corresponding tick + labels. Only has an effect for axes of `type` + "category" or "multicategory". When set to + "boundaries", ticks and grid lines are drawn + half a category to the left/bottom of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.xaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.xaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be customized by the + now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, and `title` if in + `editable: true` configuration. Defaults to + `layout.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/_yaxis.py b/packages/python/plotly/plotly/validators/layout/_yaxis.py new file mode 100644 index 00000000000..1b7c12dab57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/_yaxis.py @@ -0,0 +1,437 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="yaxis", parent_name="layout", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "YAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + anchor + If set to an opposite-letter axis id (e.g. + `x2`, `y`), this axis is bound to the + corresponding opposite-letter axis. If set to + "free", this axis' position is determined by + `position`. + automargin + Determines whether long tick labels + automatically grow the figure margins. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + constrain + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines how that + happens: by increasing the "range" (default), + or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines which + direction we push the originally specified plot + area. Options are "left", "center" (default), + and "right" for x axes, and "top", "middle" + (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an + effect on "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has + an effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot + fraction). + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the + range of this axis will match the range of the + corresponding axis in data-coordinates space. + Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that + matching axes must have the same `type`. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + overlaying + If set a same-letter axis id, this axis is + overlaid on top of the corresponding same- + letter axis, with traces and axes visible for + both axes. If False, this axis does not overlay + any same-letter axes. In this case, for axes + with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting + space (in normalized coordinates). Only has an + effect if `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangebreaks + A tuple of :class:`plotly.graph_objects.layout. + yaxis.Rangebreak` instances or dicts with + compatible properties + rangebreakdefaults + When used in a template (as layout.template.lay + out.yaxis.rangebreakdefaults), sets the default + property values to use for elements of + layout.yaxis.rangebreaks + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the + range of this axis changes together with the + range of the corresponding axis such that the + scale of pixels per unit is in a constant + ratio. Both axes are still zoomable, but when + you zoom one, the other will zoom the same + amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce + the constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` + but you can only link axes of the same `type`. + The linked axis can have the opposite letter + (to constrain the aspect ratio) or the same + letter (to match scales across subplots). Loops + (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant + and the last constraint encountered will be + ignored to avoid possible inconsistent + constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and + a `matches` constraint is currently forbidden. + scaleratio + If this axis is linked to another by + `scaleanchor`, this determines the pixel to + unit scale ratio. For example, if this value is + 10, then every unit on this axis spans 10 times + the number of pixels as a unit on the linked + axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn + between the category levels of this axis. Only + has an effect on "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Determines whether or not spikes (aka + droplines) are drawn for this axis. Note: This + only takes affect when hovermode = closest + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned + at the "bottom" ("left") or "top" ("right") of + the plotting area. + spikecolor + Sets the spike color. If undefined, will use + the series color + spikedash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line + If "toaxis", the line is drawn from the data + point to the axis the series is plotted on. If + "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If + "marker", then a marker dot is drawn on the + axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the + cursor or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + yaxis.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.yaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn + with respect to their corresponding tick + labels. Only has an effect for axes of `type` + "category" or "multicategory". When set to + "boundaries", ticks and grid lines are drawn + half a category to the left/bottom of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.yaxis.Title + ` instance or dict with compatible properties + titlefont + Deprecated: Please use layout.yaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be customized by the + now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, and `title` if in + `editable: true` configuration. Defaults to + `layout.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/angularaxis/__init__.py index 299f5cdda83..6ac2e2551d8 100644 --- a/packages/python/plotly/plotly/validators/layout/angularaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/__init__.py @@ -1,172 +1,32 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.angularaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.angularaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickorientation", parent_name="layout.angularaxis", **kwargs - ): - super(TickorientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["horizontal", "vertical"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.angularaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.angularaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.angularaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.angularaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.angularaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "dflt": 0, "editType": "plot"}, - {"valType": "number", "dflt": 360, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndpaddingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="endpadding", parent_name="layout.angularaxis", **kwargs - ): - super(EndpaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="domain", parent_name="layout.angularaxis", **kwargs - ): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._ticksuffix import TicksuffixValidator + from ._tickorientation import TickorientationValidator + from ._ticklen import TicklenValidator + from ._tickcolor import TickcolorValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._range import RangeValidator + from ._endpadding import EndpaddingValidator + from ._domain import DomainValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._ticksuffix.TicksuffixValidator", + "._tickorientation.TickorientationValidator", + "._ticklen.TicklenValidator", + "._tickcolor.TickcolorValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._range.RangeValidator", + "._endpadding.EndpaddingValidator", + "._domain.DomainValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_domain.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_domain.py new file mode 100644 index 00000000000..4b57debb9b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_domain.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="domain", parent_name="layout.angularaxis", **kwargs + ): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_endpadding.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_endpadding.py new file mode 100644 index 00000000000..559edbc6272 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_endpadding.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndpaddingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="endpadding", parent_name="layout.angularaxis", **kwargs + ): + super(EndpaddingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_range.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_range.py new file mode 100644 index 00000000000..8e414d98778 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_range.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.angularaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "dflt": 0, "editType": "plot"}, + {"valType": "number", "dflt": 360, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_showline.py new file mode 100644 index 00000000000..65a792e116a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.angularaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_showticklabels.py new file mode 100644 index 00000000000..5285ebb4272 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.angularaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_tickcolor.py new file mode 100644 index 00000000000..aae6bbc636f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.angularaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_ticklen.py new file mode 100644 index 00000000000..081096b3583 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.angularaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_tickorientation.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_tickorientation.py new file mode 100644 index 00000000000..7714e52f7f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_tickorientation.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickorientation", parent_name="layout.angularaxis", **kwargs + ): + super(TickorientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["horizontal", "vertical"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_ticksuffix.py new file mode 100644 index 00000000000..413f80ef400 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.angularaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/angularaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/angularaxis/_visible.py new file mode 100644 index 00000000000..b50c8ffe305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/angularaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.angularaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/__init__.py b/packages/python/plotly/plotly/validators/layout/annotation/__init__.py index e8574778962..bb35a40f62c 100644 --- a/packages/python/plotly/plotly/validators/layout/annotation/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/annotation/__init__.py @@ -1,715 +1,98 @@ -import _plotly_utils.basevalidators - - -class YshiftValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="yshift", parent_name="layout.annotation", **kwargs): - super(YshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yref", parent_name="layout.annotation", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["paper", "/^y([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YclickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="yclick", parent_name="layout.annotation", **kwargs): - super(YclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="layout.annotation", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y", parent_name="layout.annotation", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XshiftValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xshift", parent_name="layout.annotation", **kwargs): - super(XshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xref", parent_name="layout.annotation", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["paper", "/^x([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XclickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="xclick", parent_name="layout.annotation", **kwargs): - super(XclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="layout.annotation", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x", parent_name="layout.annotation", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="layout.annotation", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.annotation", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="valign", parent_name="layout.annotation", **kwargs): - super(ValignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="textangle", parent_name="layout.annotation", **kwargs - ): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="layout.annotation", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="layout.annotation", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartstandoffValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="startstandoff", parent_name="layout.annotation", **kwargs - ): - super(StartstandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartarrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="startarrowsize", parent_name="layout.annotation", **kwargs - ): - super(StartarrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0.3), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="startarrowhead", parent_name="layout.annotation", **kwargs - ): - super(StartarrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 8), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="standoff", parent_name="layout.annotation", **kwargs - ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowarrowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showarrow", parent_name="layout.annotation", **kwargs - ): - super(ShowarrowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="layout.annotation", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.annotation", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertext", parent_name="layout.annotation", **kwargs - ): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="hoverlabel", parent_name="layout.annotation", **kwargs - ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="height", parent_name="layout.annotation", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.annotation", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ClicktoshowValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="clicktoshow", parent_name="layout.annotation", **kwargs - ): - super(ClicktoshowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [False, "onoff", "onout"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CaptureeventsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="captureevents", parent_name="layout.annotation", **kwargs - ): - super(CaptureeventsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="layout.annotation", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderpad", parent_name="layout.annotation", **kwargs - ): - super(BorderpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="layout.annotation", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.annotation", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AyrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ayref", parent_name="layout.annotation", **kwargs): - super(AyrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["pixel", "/^y([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AyValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="ay", parent_name="layout.annotation", **kwargs): - super(AyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AxrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="axref", parent_name="layout.annotation", **kwargs): - super(AxrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["pixel", "/^x([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AxValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="ax", parent_name="layout.annotation", **kwargs): - super(AxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="arrowwidth", parent_name="layout.annotation", **kwargs - ): - super(ArrowwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0.1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="arrowsize", parent_name="layout.annotation", **kwargs - ): - super(ArrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0.3), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowsideValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__( - self, plotly_name="arrowside", parent_name="layout.annotation", **kwargs - ): - super(ArrowsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["end", "start"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="arrowhead", parent_name="layout.annotation", **kwargs - ): - super(ArrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 8), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="arrowcolor", parent_name="layout.annotation", **kwargs - ): - super(ArrowcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="layout.annotation", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yshift import YshiftValidator + from ._yref import YrefValidator + from ._yclick import YclickValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xshift import XshiftValidator + from ._xref import XrefValidator + from ._xclick import XclickValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valign import ValignValidator + from ._textangle import TextangleValidator + from ._text import TextValidator + from ._templateitemname import TemplateitemnameValidator + from ._startstandoff import StartstandoffValidator + from ._startarrowsize import StartarrowsizeValidator + from ._startarrowhead import StartarrowheadValidator + from ._standoff import StandoffValidator + from ._showarrow import ShowarrowValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._hovertext import HovertextValidator + from ._hoverlabel import HoverlabelValidator + from ._height import HeightValidator + from ._font import FontValidator + from ._clicktoshow import ClicktoshowValidator + from ._captureevents import CaptureeventsValidator + from ._borderwidth import BorderwidthValidator + from ._borderpad import BorderpadValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._ayref import AyrefValidator + from ._ay import AyValidator + from ._axref import AxrefValidator + from ._ax import AxValidator + from ._arrowwidth import ArrowwidthValidator + from ._arrowsize import ArrowsizeValidator + from ._arrowside import ArrowsideValidator + from ._arrowhead import ArrowheadValidator + from ._arrowcolor import ArrowcolorValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yshift.YshiftValidator", + "._yref.YrefValidator", + "._yclick.YclickValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xshift.XshiftValidator", + "._xref.XrefValidator", + "._xclick.XclickValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valign.ValignValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._templateitemname.TemplateitemnameValidator", + "._startstandoff.StartstandoffValidator", + "._startarrowsize.StartarrowsizeValidator", + "._startarrowhead.StartarrowheadValidator", + "._standoff.StandoffValidator", + "._showarrow.ShowarrowValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._height.HeightValidator", + "._font.FontValidator", + "._clicktoshow.ClicktoshowValidator", + "._captureevents.CaptureeventsValidator", + "._borderwidth.BorderwidthValidator", + "._borderpad.BorderpadValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._ayref.AyrefValidator", + "._ay.AyValidator", + "._axref.AxrefValidator", + "._ax.AxValidator", + "._arrowwidth.ArrowwidthValidator", + "._arrowsize.ArrowsizeValidator", + "._arrowside.ArrowsideValidator", + "._arrowhead.ArrowheadValidator", + "._arrowcolor.ArrowcolorValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_align.py b/packages/python/plotly/plotly/validators/layout/annotation/_align.py new file mode 100644 index 00000000000..530f37497bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_align.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="layout.annotation", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_arrowcolor.py b/packages/python/plotly/plotly/validators/layout/annotation/_arrowcolor.py new file mode 100644 index 00000000000..e84a4be72b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_arrowcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="arrowcolor", parent_name="layout.annotation", **kwargs + ): + super(ArrowcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_arrowhead.py b/packages/python/plotly/plotly/validators/layout/annotation/_arrowhead.py new file mode 100644 index 00000000000..1dce1e7b673 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_arrowhead.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ArrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="arrowhead", parent_name="layout.annotation", **kwargs + ): + super(ArrowheadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 8), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_arrowside.py b/packages/python/plotly/plotly/validators/layout/annotation/_arrowside.py new file mode 100644 index 00000000000..f34c24f1f54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_arrowside.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ArrowsideValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__( + self, plotly_name="arrowside", parent_name="layout.annotation", **kwargs + ): + super(ArrowsideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["end", "start"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_arrowsize.py b/packages/python/plotly/plotly/validators/layout/annotation/_arrowsize.py new file mode 100644 index 00000000000..bcc3df61905 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_arrowsize.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ArrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="arrowsize", parent_name="layout.annotation", **kwargs + ): + super(ArrowsizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0.3), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_arrowwidth.py b/packages/python/plotly/plotly/validators/layout/annotation/_arrowwidth.py new file mode 100644 index 00000000000..1c4ef1edb86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_arrowwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ArrowwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="arrowwidth", parent_name="layout.annotation", **kwargs + ): + super(ArrowwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0.1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_ax.py b/packages/python/plotly/plotly/validators/layout/annotation/_ax.py new file mode 100644 index 00000000000..60de7574a28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_ax.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AxValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="ax", parent_name="layout.annotation", **kwargs): + super(AxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_axref.py b/packages/python/plotly/plotly/validators/layout/annotation/_axref.py new file mode 100644 index 00000000000..867f7012258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_axref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AxrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="axref", parent_name="layout.annotation", **kwargs): + super(AxrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["pixel", "/^x([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_ay.py b/packages/python/plotly/plotly/validators/layout/annotation/_ay.py new file mode 100644 index 00000000000..4b1bdb03389 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_ay.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AyValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="ay", parent_name="layout.annotation", **kwargs): + super(AyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_ayref.py b/packages/python/plotly/plotly/validators/layout/annotation/_ayref.py new file mode 100644 index 00000000000..debe63f392f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_ayref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AyrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ayref", parent_name="layout.annotation", **kwargs): + super(AyrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["pixel", "/^y([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/annotation/_bgcolor.py new file mode 100644 index 00000000000..424ae1c6d3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.annotation", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/annotation/_bordercolor.py new file mode 100644 index 00000000000..7d45305900b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="layout.annotation", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_borderpad.py b/packages/python/plotly/plotly/validators/layout/annotation/_borderpad.py new file mode 100644 index 00000000000..336d870f84c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_borderpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderpad", parent_name="layout.annotation", **kwargs + ): + super(BorderpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/annotation/_borderwidth.py new file mode 100644 index 00000000000..02de3a317de --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="layout.annotation", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_captureevents.py b/packages/python/plotly/plotly/validators/layout/annotation/_captureevents.py new file mode 100644 index 00000000000..b811e77e6f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_captureevents.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CaptureeventsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="captureevents", parent_name="layout.annotation", **kwargs + ): + super(CaptureeventsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_clicktoshow.py b/packages/python/plotly/plotly/validators/layout/annotation/_clicktoshow.py new file mode 100644 index 00000000000..32a86924b25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_clicktoshow.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ClicktoshowValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="clicktoshow", parent_name="layout.annotation", **kwargs + ): + super(ClicktoshowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [False, "onoff", "onout"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_font.py b/packages/python/plotly/plotly/validators/layout/annotation/_font.py new file mode 100644 index 00000000000..57b8bc2a16c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.annotation", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_height.py b/packages/python/plotly/plotly/validators/layout/annotation/_height.py new file mode 100644 index 00000000000..fc3d4c68ff8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_height.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HeightValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="height", parent_name="layout.annotation", **kwargs): + super(HeightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_hoverlabel.py b/packages/python/plotly/plotly/validators/layout/annotation/_hoverlabel.py new file mode 100644 index 00000000000..3829000d8fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_hoverlabel.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="hoverlabel", parent_name="layout.annotation", **kwargs + ): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the background color of the hover label. + By default uses the annotation's `bgcolor` made + opaque, or white if it was transparent. + bordercolor + Sets the border color of the hover label. By + default uses either dark grey or white, for + maximum contrast with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses + the global hover font and size, with color from + `hoverlabel.bordercolor`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_hovertext.py b/packages/python/plotly/plotly/validators/layout/annotation/_hovertext.py new file mode 100644 index 00000000000..f612def2aec --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_hovertext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertext", parent_name="layout.annotation", **kwargs + ): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_name.py b/packages/python/plotly/plotly/validators/layout/annotation/_name.py new file mode 100644 index 00000000000..e661e5b5b6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.annotation", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_opacity.py b/packages/python/plotly/plotly/validators/layout/annotation/_opacity.py new file mode 100644 index 00000000000..f34cbdd1dc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="layout.annotation", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_showarrow.py b/packages/python/plotly/plotly/validators/layout/annotation/_showarrow.py new file mode 100644 index 00000000000..c7ae73303f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_showarrow.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowarrowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showarrow", parent_name="layout.annotation", **kwargs + ): + super(ShowarrowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_standoff.py b/packages/python/plotly/plotly/validators/layout/annotation/_standoff.py new file mode 100644 index 00000000000..f2ead84948b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_standoff.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="standoff", parent_name="layout.annotation", **kwargs + ): + super(StandoffValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_startarrowhead.py b/packages/python/plotly/plotly/validators/layout/annotation/_startarrowhead.py new file mode 100644 index 00000000000..993d8832690 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_startarrowhead.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="startarrowhead", parent_name="layout.annotation", **kwargs + ): + super(StartarrowheadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 8), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_startarrowsize.py b/packages/python/plotly/plotly/validators/layout/annotation/_startarrowsize.py new file mode 100644 index 00000000000..d3479642fa0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_startarrowsize.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StartarrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="startarrowsize", parent_name="layout.annotation", **kwargs + ): + super(StartarrowsizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0.3), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_startstandoff.py b/packages/python/plotly/plotly/validators/layout/annotation/_startstandoff.py new file mode 100644 index 00000000000..eee9fbd6a64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_startstandoff.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StartstandoffValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="startstandoff", parent_name="layout.annotation", **kwargs + ): + super(StartstandoffValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/annotation/_templateitemname.py new file mode 100644 index 00000000000..2d6bde0ad41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="layout.annotation", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_text.py b/packages/python/plotly/plotly/validators/layout/annotation/_text.py new file mode 100644 index 00000000000..75894927482 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="layout.annotation", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_textangle.py b/packages/python/plotly/plotly/validators/layout/annotation/_textangle.py new file mode 100644 index 00000000000..563e62d7402 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_textangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="textangle", parent_name="layout.annotation", **kwargs + ): + super(TextangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_valign.py b/packages/python/plotly/plotly/validators/layout/annotation/_valign.py new file mode 100644 index 00000000000..f24a3b75305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_valign.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="valign", parent_name="layout.annotation", **kwargs): + super(ValignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_visible.py b/packages/python/plotly/plotly/validators/layout/annotation/_visible.py new file mode 100644 index 00000000000..117fab9be72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.annotation", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_width.py b/packages/python/plotly/plotly/validators/layout/annotation/_width.py new file mode 100644 index 00000000000..ac9cb097ead --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="layout.annotation", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_x.py b/packages/python/plotly/plotly/validators/layout/annotation/_x.py new file mode 100644 index 00000000000..01e459a8a53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x", parent_name="layout.annotation", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_xanchor.py b/packages/python/plotly/plotly/validators/layout/annotation/_xanchor.py new file mode 100644 index 00000000000..5ed0bad5f3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="layout.annotation", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_xclick.py b/packages/python/plotly/plotly/validators/layout/annotation/_xclick.py new file mode 100644 index 00000000000..a80f01e89b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_xclick.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XclickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="xclick", parent_name="layout.annotation", **kwargs): + super(XclickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_xref.py b/packages/python/plotly/plotly/validators/layout/annotation/_xref.py new file mode 100644 index 00000000000..9a9afd77cbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_xref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xref", parent_name="layout.annotation", **kwargs): + super(XrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["paper", "/^x([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_xshift.py b/packages/python/plotly/plotly/validators/layout/annotation/_xshift.py new file mode 100644 index 00000000000..12a611a6ea9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_xshift.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XshiftValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xshift", parent_name="layout.annotation", **kwargs): + super(XshiftValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_y.py b/packages/python/plotly/plotly/validators/layout/annotation/_y.py new file mode 100644 index 00000000000..4ad554f346d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y", parent_name="layout.annotation", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_yanchor.py b/packages/python/plotly/plotly/validators/layout/annotation/_yanchor.py new file mode 100644 index 00000000000..6a304a35c49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="layout.annotation", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_yclick.py b/packages/python/plotly/plotly/validators/layout/annotation/_yclick.py new file mode 100644 index 00000000000..c78089ee0f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_yclick.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YclickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="yclick", parent_name="layout.annotation", **kwargs): + super(YclickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_yref.py b/packages/python/plotly/plotly/validators/layout/annotation/_yref.py new file mode 100644 index 00000000000..3931f4598a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_yref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yref", parent_name="layout.annotation", **kwargs): + super(YrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["paper", "/^y([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/_yshift.py b/packages/python/plotly/plotly/validators/layout/annotation/_yshift.py new file mode 100644 index 00000000000..7fb3a084a14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/_yshift.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YshiftValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="yshift", parent_name="layout.annotation", **kwargs): + super(YshiftValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/font/__init__.py b/packages/python/plotly/plotly/validators/layout/annotation/font/__init__.py index 7d225e6480d..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/annotation/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/annotation/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.annotation.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.annotation.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.annotation.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/font/_color.py b/packages/python/plotly/plotly/validators/layout/annotation/font/_color.py new file mode 100644 index 00000000000..207415dad5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.annotation.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/font/_family.py b/packages/python/plotly/plotly/validators/layout/annotation/font/_family.py new file mode 100644 index 00000000000..dfe065ae82b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.annotation.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/font/_size.py b/packages/python/plotly/plotly/validators/layout/annotation/font/_size.py new file mode 100644 index 00000000000..ed2201f2c8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.annotation.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/__init__.py index c9d46aa994a..3ab9188d96d 100644 --- a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/__init__.py @@ -1,77 +1,18 @@ -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.annotation.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="layout.annotation.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="layout.annotation.hoverlabel", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._font import FontValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._font.FontValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..70be0e85368 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="layout.annotation.hoverlabel", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..759338b132d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="layout.annotation.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_font.py new file mode 100644 index 00000000000..a0193b73f1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.annotation.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/__init__.py index 16dfca176b1..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.annotation.hoverlabel.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.annotation.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.annotation.hoverlabel.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_color.py new file mode 100644 index 00000000000..6ba0c6defcc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.annotation.hoverlabel.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_family.py new file mode 100644 index 00000000000..fec3621b737 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.annotation.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_size.py new file mode 100644 index 00000000000..28ff804665b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/annotation/hoverlabel/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.annotation.hoverlabel.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/__init__.py b/packages/python/plotly/plotly/validators/layout/coloraxis/__init__.py index edf07cac6b2..9fa570ef1fc 100644 --- a/packages/python/plotly/plotly/validators/layout/coloraxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/__init__.py @@ -1,356 +1,30 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="layout.coloraxis", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="layout.coloraxis", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="layout.coloraxis", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="layout.coloraxis", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - coloraxis.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.coloraxis.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.coloraxis.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.coloraxis.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.coloraxis.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - layout.coloraxis.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="layout.coloraxis", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="layout.coloraxis", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="layout.coloraxis", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="layout.coloraxis", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="layout.coloraxis", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_autocolorscale.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_autocolorscale.py new file mode 100644 index 00000000000..c974393c73e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="layout.coloraxis", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_cauto.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_cauto.py new file mode 100644 index 00000000000..13450cd2443 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="layout.coloraxis", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_cmax.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_cmax.py new file mode 100644 index 00000000000..8740937c672 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="layout.coloraxis", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_cmid.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_cmid.py new file mode 100644 index 00000000000..5d1f104628e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="layout.coloraxis", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_cmin.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_cmin.py new file mode 100644 index 00000000000..83195b0316b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="layout.coloraxis", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_colorbar.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_colorbar.py new file mode 100644 index 00000000000..def4c909e7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="layout.coloraxis", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + coloraxis.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.coloraxis.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of + layout.coloraxis.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.coloraxis.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.coloraxis.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + layout.coloraxis.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_colorscale.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_colorscale.py new file mode 100644 index 00000000000..933a2cafafc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="layout.coloraxis", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_reversescale.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_reversescale.py new file mode 100644 index 00000000000..74e252c154a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="layout.coloraxis", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/_showscale.py b/packages/python/plotly/plotly/validators/layout/coloraxis/_showscale.py new file mode 100644 index 00000000000..10aeb3bc1b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="layout.coloraxis", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/__init__.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/__init__.py index 2c2bd6bbdef..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/__init__.py @@ -1,819 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="layout.coloraxis.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.coloraxis.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py new file mode 100644 index 00000000000..971f8949cfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py new file mode 100644 index 00000000000..ad54bbfbd55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py new file mode 100644 index 00000000000..f48108e5ccf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_dtick.py new file mode 100644 index 00000000000..9bb7004d69c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py new file mode 100644 index 00000000000..14eae523fa6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_len.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_len.py new file mode 100644 index 00000000000..acc25312ba0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_lenmode.py new file mode 100644 index 00000000000..66d100549f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_nticks.py new file mode 100644 index 00000000000..84e3abdb0d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..cabd9bbd067 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..0d6c5ce9252 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py new file mode 100644 index 00000000000..fdba6373567 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showexponent.py new file mode 100644 index 00000000000..5434468d80f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py new file mode 100644 index 00000000000..91031596258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..f0f534d5997 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..c718e67caa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_thickness.py new file mode 100644 index 00000000000..a21ae21d3cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..0450b65d5f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tick0.py new file mode 100644 index 00000000000..3bc62618862 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickangle.py new file mode 100644 index 00000000000..8e47c19b3d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py new file mode 100644 index 00000000000..64440a73ab6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickfont.py new file mode 100644 index 00000000000..adf500a5b4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformat.py new file mode 100644 index 00000000000..755798d2276 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..763b922ffa3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..9eb9453eecb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticklen.py new file mode 100644 index 00000000000..dea2d80d7c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickmode.py new file mode 100644 index 00000000000..8fe9de2de55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py new file mode 100644 index 00000000000..a747ea40eb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticks.py new file mode 100644 index 00000000000..7b11034cf13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..606322826ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticktext.py new file mode 100644 index 00000000000..7a2cde8eb84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..230823a3d8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickvals.py new file mode 100644 index 00000000000..c2df31f27e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..bafc04c1bd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="layout.coloraxis.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py new file mode 100644 index 00000000000..9401256c930 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_title.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_title.py new file mode 100644 index 00000000000..ecd2d8c1a67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_x.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_x.py new file mode 100644 index 00000000000..1e8e5d82778 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_xanchor.py new file mode 100644 index 00000000000..8acc8cb78ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_xpad.py new file mode 100644 index 00000000000..c0d9b6e00e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_y.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_y.py new file mode 100644 index 00000000000..98006a9c01f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_yanchor.py new file mode 100644 index 00000000000..1fa3289db3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ypad.py new file mode 100644 index 00000000000..f2f9d76e9e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="layout.coloraxis.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py index 92a771a37f3..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.coloraxis.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.coloraxis.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.coloraxis.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..8251642a997 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.coloraxis.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..c0e407963e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.coloraxis.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..73755108cbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.coloraxis.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py index 949c3999508..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.coloraxis.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.coloraxis.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.coloraxis.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.coloraxis.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.coloraxis.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..6f260c3d555 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.coloraxis.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..f77ada39d6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.coloraxis.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..9ea114b3c8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.coloraxis.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..92283aac54c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.coloraxis.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..8c4dbff3d02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.coloraxis.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/__init__.py index e735c258702..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="layout.coloraxis.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="layout.coloraxis.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="layout.coloraxis.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_font.py new file mode 100644 index 00000000000..fb4a5175d9c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="layout.coloraxis.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_side.py new file mode 100644 index 00000000000..efd98fe3066 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="layout.coloraxis.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_text.py new file mode 100644 index 00000000000..02096eb6df9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="layout.coloraxis.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py index eb2edd624cc..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.coloraxis.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.coloraxis.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.coloraxis.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py new file mode 100644 index 00000000000..10963a38a84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.coloraxis.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py new file mode 100644 index 00000000000..48e10c1a871 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.coloraxis.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py new file mode 100644 index 00000000000..2a3a439418b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.coloraxis.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/colorscale/__init__.py b/packages/python/plotly/plotly/validators/layout/colorscale/__init__.py index 0573ea6011b..db1a772f9f1 100644 --- a/packages/python/plotly/plotly/validators/layout/colorscale/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/colorscale/__init__.py @@ -1,46 +1,18 @@ -import _plotly_utils.basevalidators - - -class SequentialminusValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="sequentialminus", parent_name="layout.colorscale", **kwargs - ): - super(SequentialminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SequentialValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="sequential", parent_name="layout.colorscale", **kwargs - ): - super(SequentialValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DivergingValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="diverging", parent_name="layout.colorscale", **kwargs - ): - super(DivergingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sequentialminus import SequentialminusValidator + from ._sequential import SequentialValidator + from ._diverging import DivergingValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sequentialminus.SequentialminusValidator", + "._sequential.SequentialValidator", + "._diverging.DivergingValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/colorscale/_diverging.py b/packages/python/plotly/plotly/validators/layout/colorscale/_diverging.py new file mode 100644 index 00000000000..53c15ab3392 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/colorscale/_diverging.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DivergingValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="diverging", parent_name="layout.colorscale", **kwargs + ): + super(DivergingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/colorscale/_sequential.py b/packages/python/plotly/plotly/validators/layout/colorscale/_sequential.py new file mode 100644 index 00000000000..7aaf2bc9c87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/colorscale/_sequential.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SequentialValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="sequential", parent_name="layout.colorscale", **kwargs + ): + super(SequentialValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/colorscale/_sequentialminus.py b/packages/python/plotly/plotly/validators/layout/colorscale/_sequentialminus.py new file mode 100644 index 00000000000..b10fc776a93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/colorscale/_sequentialminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SequentialminusValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="sequentialminus", parent_name="layout.colorscale", **kwargs + ): + super(SequentialminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/font/__init__.py b/packages/python/plotly/plotly/validators/layout/font/__init__.py index 4ae632e5078..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/font/__init__.py @@ -1,43 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="layout.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="layout.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/font/_color.py b/packages/python/plotly/plotly/validators/layout/font/_color.py new file mode 100644 index 00000000000..959cb99c02e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/font/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/font/_family.py b/packages/python/plotly/plotly/validators/layout/font/_family.py new file mode 100644 index 00000000000..bdb07967bbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/font/_family.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="layout.font", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/font/_size.py b/packages/python/plotly/plotly/validators/layout/font/_size.py new file mode 100644 index 00000000000..77710a4068a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/font/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="layout.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/__init__.py index 6def604c85e..d629d83d2bc 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/__init__.py @@ -1,575 +1,76 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="layout.geo", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.geo", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubunitwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="subunitwidth", parent_name="layout.geo", **kwargs): - super(SubunitwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubunitcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="subunitcolor", parent_name="layout.geo", **kwargs): - super(SubunitcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowsubunitsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showsubunits", parent_name="layout.geo", **kwargs): - super(ShowsubunitsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowriversValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showrivers", parent_name="layout.geo", **kwargs): - super(ShowriversValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowoceanValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showocean", parent_name="layout.geo", **kwargs): - super(ShowoceanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlandValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showland", parent_name="layout.geo", **kwargs): - super(ShowlandValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlakesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlakes", parent_name="layout.geo", **kwargs): - super(ShowlakesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowframeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showframe", parent_name="layout.geo", **kwargs): - super(ShowframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowcountriesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showcountries", parent_name="layout.geo", **kwargs): - super(ShowcountriesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowcoastlinesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showcoastlines", parent_name="layout.geo", **kwargs - ): - super(ShowcoastlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScopeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="scope", parent_name="layout.geo", **kwargs): - super(ScopeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "world", - "usa", - "europe", - "asia", - "africa", - "north america", - "south america", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RiverwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="riverwidth", parent_name="layout.geo", **kwargs): - super(RiverwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RivercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="rivercolor", parent_name="layout.geo", **kwargs): - super(RivercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ResolutionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="resolution", parent_name="layout.geo", **kwargs): - super(ResolutionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - coerce_number=kwargs.pop("coerce_number", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [110, 50]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="projection", parent_name="layout.geo", **kwargs): - super(ProjectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Projection"), - data_docs=kwargs.pop( - "data_docs", - """ - parallels - For conic projection types only. Sets the - parallels (tangent, secant) where the cone - intersects the sphere. - rotation - :class:`plotly.graph_objects.layout.geo.project - ion.Rotation` instance or dict with compatible - properties - scale - Zooms in or out on the map view. A scale of 1 - corresponds to the largest zoom level that fits - the map's lon and lat ranges. - type - Sets the projection type. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OceancolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="oceancolor", parent_name="layout.geo", **kwargs): - super(OceancolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonaxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lonaxis", parent_name="layout.geo", **kwargs): - super(LonaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lonaxis"), - data_docs=kwargs.pop( - "data_docs", - """ - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LataxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lataxis", parent_name="layout.geo", **kwargs): - super(LataxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lataxis"), - data_docs=kwargs.pop( - "data_docs", - """ - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LandcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="landcolor", parent_name="layout.geo", **kwargs): - super(LandcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LakecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="lakecolor", parent_name="layout.geo", **kwargs): - super(LakecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FramewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="framewidth", parent_name="layout.geo", **kwargs): - super(FramewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FramecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="framecolor", parent_name="layout.geo", **kwargs): - super(FramecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FitboundsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fitbounds", parent_name="layout.geo", **kwargs): - super(FitboundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [False, "locations", "geojson"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="layout.geo", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - row - If there is a layout grid, use the domain for - this row in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - x - Sets the horizontal domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - y - Sets the vertical domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountrywidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="countrywidth", parent_name="layout.geo", **kwargs): - super(CountrywidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountrycolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="countrycolor", parent_name="layout.geo", **kwargs): - super(CountrycolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CoastlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="coastlinewidth", parent_name="layout.geo", **kwargs - ): - super(CoastlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CoastlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="coastlinecolor", parent_name="layout.geo", **kwargs - ): - super(CoastlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="center", parent_name="layout.geo", **kwargs): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Center"), - data_docs=kwargs.pop( - "data_docs", - """ - lat - Sets the latitude of the map's center. For all - projection types, the map's latitude center - lies at the middle of the latitude range by - default. - lon - Sets the longitude of the map's center. By - default, the map's longitude center lies at the - middle of the longitude range for scoped - projection and above `projection.rotation.lon` - otherwise. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.geo", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._subunitwidth import SubunitwidthValidator + from ._subunitcolor import SubunitcolorValidator + from ._showsubunits import ShowsubunitsValidator + from ._showrivers import ShowriversValidator + from ._showocean import ShowoceanValidator + from ._showland import ShowlandValidator + from ._showlakes import ShowlakesValidator + from ._showframe import ShowframeValidator + from ._showcountries import ShowcountriesValidator + from ._showcoastlines import ShowcoastlinesValidator + from ._scope import ScopeValidator + from ._riverwidth import RiverwidthValidator + from ._rivercolor import RivercolorValidator + from ._resolution import ResolutionValidator + from ._projection import ProjectionValidator + from ._oceancolor import OceancolorValidator + from ._lonaxis import LonaxisValidator + from ._lataxis import LataxisValidator + from ._landcolor import LandcolorValidator + from ._lakecolor import LakecolorValidator + from ._framewidth import FramewidthValidator + from ._framecolor import FramecolorValidator + from ._fitbounds import FitboundsValidator + from ._domain import DomainValidator + from ._countrywidth import CountrywidthValidator + from ._countrycolor import CountrycolorValidator + from ._coastlinewidth import CoastlinewidthValidator + from ._coastlinecolor import CoastlinecolorValidator + from ._center import CenterValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._subunitwidth.SubunitwidthValidator", + "._subunitcolor.SubunitcolorValidator", + "._showsubunits.ShowsubunitsValidator", + "._showrivers.ShowriversValidator", + "._showocean.ShowoceanValidator", + "._showland.ShowlandValidator", + "._showlakes.ShowlakesValidator", + "._showframe.ShowframeValidator", + "._showcountries.ShowcountriesValidator", + "._showcoastlines.ShowcoastlinesValidator", + "._scope.ScopeValidator", + "._riverwidth.RiverwidthValidator", + "._rivercolor.RivercolorValidator", + "._resolution.ResolutionValidator", + "._projection.ProjectionValidator", + "._oceancolor.OceancolorValidator", + "._lonaxis.LonaxisValidator", + "._lataxis.LataxisValidator", + "._landcolor.LandcolorValidator", + "._lakecolor.LakecolorValidator", + "._framewidth.FramewidthValidator", + "._framecolor.FramecolorValidator", + "._fitbounds.FitboundsValidator", + "._domain.DomainValidator", + "._countrywidth.CountrywidthValidator", + "._countrycolor.CountrycolorValidator", + "._coastlinewidth.CoastlinewidthValidator", + "._coastlinecolor.CoastlinecolorValidator", + "._center.CenterValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/geo/_bgcolor.py new file mode 100644 index 00000000000..dc4814dfbc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.geo", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_center.py b/packages/python/plotly/plotly/validators/layout/geo/_center.py new file mode 100644 index 00000000000..d6686e12ed9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_center.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="center", parent_name="layout.geo", **kwargs): + super(CenterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Center"), + data_docs=kwargs.pop( + "data_docs", + """ + lat + Sets the latitude of the map's center. For all + projection types, the map's latitude center + lies at the middle of the latitude range by + default. + lon + Sets the longitude of the map's center. By + default, the map's longitude center lies at the + middle of the longitude range for scoped + projection and above `projection.rotation.lon` + otherwise. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_coastlinecolor.py b/packages/python/plotly/plotly/validators/layout/geo/_coastlinecolor.py new file mode 100644 index 00000000000..c8d4073e9da --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_coastlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CoastlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="coastlinecolor", parent_name="layout.geo", **kwargs + ): + super(CoastlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_coastlinewidth.py b/packages/python/plotly/plotly/validators/layout/geo/_coastlinewidth.py new file mode 100644 index 00000000000..d5c869e7123 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_coastlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CoastlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="coastlinewidth", parent_name="layout.geo", **kwargs + ): + super(CoastlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_countrycolor.py b/packages/python/plotly/plotly/validators/layout/geo/_countrycolor.py new file mode 100644 index 00000000000..c655602bf14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_countrycolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CountrycolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="countrycolor", parent_name="layout.geo", **kwargs): + super(CountrycolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_countrywidth.py b/packages/python/plotly/plotly/validators/layout/geo/_countrywidth.py new file mode 100644 index 00000000000..79406dd14bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_countrywidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CountrywidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="countrywidth", parent_name="layout.geo", **kwargs): + super(CountrywidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_domain.py b/packages/python/plotly/plotly/validators/layout/geo/_domain.py new file mode 100644 index 00000000000..722ca54cb6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_domain.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="layout.geo", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this geo subplot . + Note that geo subplots are constrained by + domain. In general, when `projection.scale` is + set to 1. a map will fit either its x or y + domain, but not both. + row + If there is a layout grid, use the domain for + this row in the grid for this geo subplot . + Note that geo subplots are constrained by + domain. In general, when `projection.scale` is + set to 1. a map will fit either its x or y + domain, but not both. + x + Sets the horizontal domain of this geo subplot + (in plot fraction). Note that geo subplots are + constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit + either its x or y domain, but not both. + y + Sets the vertical domain of this geo subplot + (in plot fraction). Note that geo subplots are + constrained by domain. In general, when + `projection.scale` is set to 1. a map will fit + either its x or y domain, but not both. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_fitbounds.py b/packages/python/plotly/plotly/validators/layout/geo/_fitbounds.py new file mode 100644 index 00000000000..b88f160a633 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_fitbounds.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FitboundsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fitbounds", parent_name="layout.geo", **kwargs): + super(FitboundsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [False, "locations", "geojson"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_framecolor.py b/packages/python/plotly/plotly/validators/layout/geo/_framecolor.py new file mode 100644 index 00000000000..c9732e85d47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_framecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FramecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="framecolor", parent_name="layout.geo", **kwargs): + super(FramecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_framewidth.py b/packages/python/plotly/plotly/validators/layout/geo/_framewidth.py new file mode 100644 index 00000000000..79ebd8a15c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_framewidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FramewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="framewidth", parent_name="layout.geo", **kwargs): + super(FramewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_lakecolor.py b/packages/python/plotly/plotly/validators/layout/geo/_lakecolor.py new file mode 100644 index 00000000000..58677606c74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_lakecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LakecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="lakecolor", parent_name="layout.geo", **kwargs): + super(LakecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_landcolor.py b/packages/python/plotly/plotly/validators/layout/geo/_landcolor.py new file mode 100644 index 00000000000..8f4b12507c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_landcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LandcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="landcolor", parent_name="layout.geo", **kwargs): + super(LandcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_lataxis.py b/packages/python/plotly/plotly/validators/layout/geo/_lataxis.py new file mode 100644 index 00000000000..900482c5ec4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_lataxis.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class LataxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lataxis", parent_name="layout.geo", **kwargs): + super(LataxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lataxis"), + data_docs=kwargs.pop( + "data_docs", + """ + dtick + Sets the graticule's longitude/latitude tick + step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets + the map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the + map. + tick0 + Sets the graticule's starting tick + longitude/latitude. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_lonaxis.py b/packages/python/plotly/plotly/validators/layout/geo/_lonaxis.py new file mode 100644 index 00000000000..874abf0d1b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_lonaxis.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class LonaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lonaxis", parent_name="layout.geo", **kwargs): + super(LonaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lonaxis"), + data_docs=kwargs.pop( + "data_docs", + """ + dtick + Sets the graticule's longitude/latitude tick + step. + gridcolor + Sets the graticule's stroke color. + gridwidth + Sets the graticule's stroke width (in px). + range + Sets the range of this axis (in degrees), sets + the map's clipped coordinates. + showgrid + Sets whether or not graticule are shown on the + map. + tick0 + Sets the graticule's starting tick + longitude/latitude. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_oceancolor.py b/packages/python/plotly/plotly/validators/layout/geo/_oceancolor.py new file mode 100644 index 00000000000..d11a23fc700 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_oceancolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OceancolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="oceancolor", parent_name="layout.geo", **kwargs): + super(OceancolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_projection.py b/packages/python/plotly/plotly/validators/layout/geo/_projection.py new file mode 100644 index 00000000000..7b81e9130fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_projection.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="projection", parent_name="layout.geo", **kwargs): + super(ProjectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Projection"), + data_docs=kwargs.pop( + "data_docs", + """ + parallels + For conic projection types only. Sets the + parallels (tangent, secant) where the cone + intersects the sphere. + rotation + :class:`plotly.graph_objects.layout.geo.project + ion.Rotation` instance or dict with compatible + properties + scale + Zooms in or out on the map view. A scale of 1 + corresponds to the largest zoom level that fits + the map's lon and lat ranges. + type + Sets the projection type. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_resolution.py b/packages/python/plotly/plotly/validators/layout/geo/_resolution.py new file mode 100644 index 00000000000..4cc1117b2bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_resolution.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ResolutionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="resolution", parent_name="layout.geo", **kwargs): + super(ResolutionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + coerce_number=kwargs.pop("coerce_number", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [110, 50]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_rivercolor.py b/packages/python/plotly/plotly/validators/layout/geo/_rivercolor.py new file mode 100644 index 00000000000..58f4214a92f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_rivercolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RivercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="rivercolor", parent_name="layout.geo", **kwargs): + super(RivercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_riverwidth.py b/packages/python/plotly/plotly/validators/layout/geo/_riverwidth.py new file mode 100644 index 00000000000..acd246f57eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_riverwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RiverwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="riverwidth", parent_name="layout.geo", **kwargs): + super(RiverwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_scope.py b/packages/python/plotly/plotly/validators/layout/geo/_scope.py new file mode 100644 index 00000000000..79c3a5efeb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_scope.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class ScopeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="scope", parent_name="layout.geo", **kwargs): + super(ScopeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "world", + "usa", + "europe", + "asia", + "africa", + "north america", + "south america", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showcoastlines.py b/packages/python/plotly/plotly/validators/layout/geo/_showcoastlines.py new file mode 100644 index 00000000000..8b30ebcae93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showcoastlines.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowcoastlinesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showcoastlines", parent_name="layout.geo", **kwargs + ): + super(ShowcoastlinesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showcountries.py b/packages/python/plotly/plotly/validators/layout/geo/_showcountries.py new file mode 100644 index 00000000000..0ff662084f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showcountries.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowcountriesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showcountries", parent_name="layout.geo", **kwargs): + super(ShowcountriesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showframe.py b/packages/python/plotly/plotly/validators/layout/geo/_showframe.py new file mode 100644 index 00000000000..f5883640e73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showframe.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowframeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showframe", parent_name="layout.geo", **kwargs): + super(ShowframeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showlakes.py b/packages/python/plotly/plotly/validators/layout/geo/_showlakes.py new file mode 100644 index 00000000000..5a242c6dcac --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showlakes.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlakesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlakes", parent_name="layout.geo", **kwargs): + super(ShowlakesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showland.py b/packages/python/plotly/plotly/validators/layout/geo/_showland.py new file mode 100644 index 00000000000..29d4e550220 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showland.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlandValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showland", parent_name="layout.geo", **kwargs): + super(ShowlandValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showocean.py b/packages/python/plotly/plotly/validators/layout/geo/_showocean.py new file mode 100644 index 00000000000..e947180bef3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showocean.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowoceanValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showocean", parent_name="layout.geo", **kwargs): + super(ShowoceanValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showrivers.py b/packages/python/plotly/plotly/validators/layout/geo/_showrivers.py new file mode 100644 index 00000000000..58d6fef33a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showrivers.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowriversValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showrivers", parent_name="layout.geo", **kwargs): + super(ShowriversValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_showsubunits.py b/packages/python/plotly/plotly/validators/layout/geo/_showsubunits.py new file mode 100644 index 00000000000..56f9feab026 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_showsubunits.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowsubunitsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showsubunits", parent_name="layout.geo", **kwargs): + super(ShowsubunitsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_subunitcolor.py b/packages/python/plotly/plotly/validators/layout/geo/_subunitcolor.py new file mode 100644 index 00000000000..277159af328 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_subunitcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SubunitcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="subunitcolor", parent_name="layout.geo", **kwargs): + super(SubunitcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_subunitwidth.py b/packages/python/plotly/plotly/validators/layout/geo/_subunitwidth.py new file mode 100644 index 00000000000..33a581a3ada --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_subunitwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubunitwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="subunitwidth", parent_name="layout.geo", **kwargs): + super(SubunitwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_uirevision.py b/packages/python/plotly/plotly/validators/layout/geo/_uirevision.py new file mode 100644 index 00000000000..a896b8caac3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.geo", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/_visible.py b/packages/python/plotly/plotly/validators/layout/geo/_visible.py new file mode 100644 index 00000000000..ee7a5961e06 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="layout.geo", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/center/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/center/__init__.py index 7299813e617..814a8fe0eed 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/center/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/center/__init__.py @@ -1,26 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._lon import LonValidator + from ._lat import LatValidator +else: + from _plotly_utils.importers import relative_import -class LonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="lon", parent_name="layout.geo.center", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="lat", parent_name="layout.geo.center", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/center/_lat.py b/packages/python/plotly/plotly/validators/layout/geo/center/_lat.py new file mode 100644 index 00000000000..df0d54a39f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/center/_lat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="lat", parent_name="layout.geo.center", **kwargs): + super(LatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/center/_lon.py b/packages/python/plotly/plotly/validators/layout/geo/center/_lon.py new file mode 100644 index 00000000000..0007cb1eaaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/center/_lon.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="lon", parent_name="layout.geo.center", **kwargs): + super(LonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/domain/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/domain/__init__.py index 2cfef7e0344..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="layout.geo.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="layout.geo.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="layout.geo.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="layout.geo.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/domain/_column.py b/packages/python/plotly/plotly/validators/layout/geo/domain/_column.py new file mode 100644 index 00000000000..ff2b7061b7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="layout.geo.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/domain/_row.py b/packages/python/plotly/plotly/validators/layout/geo/domain/_row.py new file mode 100644 index 00000000000..ea5b93a3592 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="layout.geo.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/domain/_x.py b/packages/python/plotly/plotly/validators/layout/geo/domain/_x.py new file mode 100644 index 00000000000..2df2fe963b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="layout.geo.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/domain/_y.py b/packages/python/plotly/plotly/validators/layout/geo/domain/_y.py new file mode 100644 index 00000000000..6d052815fd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="layout.geo.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/__init__.py index 228d2eabea7..7c8d027dbf7 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/lataxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/__init__.py @@ -1,96 +1,24 @@ -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.geo.lataxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.geo.lataxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.geo.lataxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.geo.lataxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.geo.lataxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.geo.lataxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._tick0 import Tick0Validator + from ._showgrid import ShowgridValidator + from ._range import RangeValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._dtick import DtickValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._tick0.Tick0Validator", + "._showgrid.ShowgridValidator", + "._range.RangeValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._dtick.DtickValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_dtick.py new file mode 100644 index 00000000000..8c465379aeb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_dtick.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.geo.lataxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_gridcolor.py new file mode 100644 index 00000000000..8ecfbf53a3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.geo.lataxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_gridwidth.py new file mode 100644 index 00000000000..2394bff7961 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.geo.lataxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_range.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_range.py new file mode 100644 index 00000000000..8f71e7dc086 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_range.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.geo.lataxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_showgrid.py new file mode 100644 index 00000000000..762291d54c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.geo.lataxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_tick0.py new file mode 100644 index 00000000000..43c54bc6dfe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_tick0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.geo.lataxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/__init__.py index 85e97c1ec87..7c8d027dbf7 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/__init__.py @@ -1,96 +1,24 @@ -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.geo.lonaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.geo.lonaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.geo.lonaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.geo.lonaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.geo.lonaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.geo.lonaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._tick0 import Tick0Validator + from ._showgrid import ShowgridValidator + from ._range import RangeValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._dtick import DtickValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._tick0.Tick0Validator", + "._showgrid.ShowgridValidator", + "._range.RangeValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._dtick.DtickValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_dtick.py new file mode 100644 index 00000000000..11120c09b8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_dtick.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.geo.lonaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_gridcolor.py new file mode 100644 index 00000000000..d0afb9da048 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.geo.lonaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_gridwidth.py new file mode 100644 index 00000000000..0f53d06478a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.geo.lonaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_range.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_range.py new file mode 100644 index 00000000000..6383682fd66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_range.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.geo.lonaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_showgrid.py new file mode 100644 index 00000000000..9afe82c1e24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.geo.lonaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_tick0.py new file mode 100644 index 00000000000..68ff3dbe112 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_tick0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.geo.lonaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/projection/__init__.py index c444a1467db..8fb55f7c342 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/projection/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/__init__.py @@ -1,111 +1,20 @@ -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="layout.geo.projection", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "equirectangular", - "mercator", - "orthographic", - "natural earth", - "kavrayskiy7", - "miller", - "robinson", - "eckert4", - "azimuthal equal area", - "azimuthal equidistant", - "conic equal area", - "conic conformal", - "conic equidistant", - "gnomonic", - "stereographic", - "mollweide", - "hammer", - "transverse mercator", - "albers usa", - "winkel tripel", - "aitoff", - "sinusoidal", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="scale", parent_name="layout.geo.projection", **kwargs - ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RotationValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="rotation", parent_name="layout.geo.projection", **kwargs - ): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rotation"), - data_docs=kwargs.pop( - "data_docs", - """ - lat - Rotates the map along meridians (in degrees - North). - lon - Rotates the map along parallels (in degrees - East). Defaults to the center of the - `lonaxis.range` values. - roll - Roll the map (in degrees) For example, a roll - of 180 makes the map appear upside down. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParallelsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="parallels", parent_name="layout.geo.projection", **kwargs - ): - super(ParallelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._type import TypeValidator + from ._scale import ScaleValidator + from ._rotation import RotationValidator + from ._parallels import ParallelsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._scale.ScaleValidator", + "._rotation.RotationValidator", + "._parallels.ParallelsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/_parallels.py b/packages/python/plotly/plotly/validators/layout/geo/projection/_parallels.py new file mode 100644 index 00000000000..7bd594208b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/_parallels.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class ParallelsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="parallels", parent_name="layout.geo.projection", **kwargs + ): + super(ParallelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/_rotation.py b/packages/python/plotly/plotly/validators/layout/geo/projection/_rotation.py new file mode 100644 index 00000000000..6606ec9ffdf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/_rotation.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class RotationValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="rotation", parent_name="layout.geo.projection", **kwargs + ): + super(RotationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rotation"), + data_docs=kwargs.pop( + "data_docs", + """ + lat + Rotates the map along meridians (in degrees + North). + lon + Rotates the map along parallels (in degrees + East). Defaults to the center of the + `lonaxis.range` values. + roll + Roll the map (in degrees) For example, a roll + of 180 makes the map appear upside down. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/_scale.py b/packages/python/plotly/plotly/validators/layout/geo/projection/_scale.py new file mode 100644 index 00000000000..5ad543d8dc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/_scale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="scale", parent_name="layout.geo.projection", **kwargs + ): + super(ScaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/_type.py b/packages/python/plotly/plotly/validators/layout/geo/projection/_type.py new file mode 100644 index 00000000000..8938a5c8415 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/_type.py @@ -0,0 +1,41 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="layout.geo.projection", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "equirectangular", + "mercator", + "orthographic", + "natural earth", + "kavrayskiy7", + "miller", + "robinson", + "eckert4", + "azimuthal equal area", + "azimuthal equidistant", + "conic equal area", + "conic conformal", + "conic equidistant", + "gnomonic", + "stereographic", + "mollweide", + "hammer", + "transverse mercator", + "albers usa", + "winkel tripel", + "aitoff", + "sinusoidal", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/__init__.py b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/__init__.py index ab3accafbac..71b5d2feb00 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/__init__.py @@ -1,46 +1,14 @@ -import _plotly_utils.basevalidators - - -class RollValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="roll", parent_name="layout.geo.projection.rotation", **kwargs - ): - super(RollValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="lon", parent_name="layout.geo.projection.rotation", **kwargs - ): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="lat", parent_name="layout.geo.projection.rotation", **kwargs - ): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._roll import RollValidator + from ._lon import LonValidator + from ._lat import LatValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._roll.RollValidator", "._lon.LonValidator", "._lat.LatValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_lat.py b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_lat.py new file mode 100644 index 00000000000..1c02176c774 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_lat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LatValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="lat", parent_name="layout.geo.projection.rotation", **kwargs + ): + super(LatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_lon.py b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_lon.py new file mode 100644 index 00000000000..088d9845ece --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_lon.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="lon", parent_name="layout.geo.projection.rotation", **kwargs + ): + super(LonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_roll.py b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_roll.py new file mode 100644 index 00000000000..e37fcee0fba --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/geo/projection/rotation/_roll.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class RollValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="roll", parent_name="layout.geo.projection.rotation", **kwargs + ): + super(RollValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/__init__.py b/packages/python/plotly/plotly/validators/layout/grid/__init__.py index 04b2b875c6e..b6ef3806fc3 100644 --- a/packages/python/plotly/plotly/validators/layout/grid/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/grid/__init__.py @@ -1,218 +1,36 @@ -import _plotly_utils.basevalidators - - -class YsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yside", parent_name="layout.grid", **kwargs): - super(YsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["left", "left plot", "right plot", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ygap", parent_name="layout.grid", **kwargs): - super(YgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="yaxes", parent_name="layout.grid", **kwargs): - super(YaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - { - "valType": "enumerated", - "values": ["/^y([2-9]|[1-9][0-9]+)?$/", ""], - "editType": "plot", - }, - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xside", parent_name="layout.grid", **kwargs): - super(XsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["bottom", "bottom plot", "top plot", "top"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xgap", parent_name="layout.grid", **kwargs): - super(XgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="xaxes", parent_name="layout.grid", **kwargs): - super(XaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - { - "valType": "enumerated", - "values": ["/^x([2-9]|[1-9][0-9]+)?$/", ""], - "editType": "plot", - }, - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): - super(SubplotsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dimensions=kwargs.pop("dimensions", 2), - edit_type=kwargs.pop("edit_type", "plot"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - { - "valType": "enumerated", - "values": ["/^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?$/", ""], - "editType": "plot", - }, - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowsValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="rows", parent_name="layout.grid", **kwargs): - super(RowsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoworderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="roworder", parent_name="layout.grid", **kwargs): - super(RoworderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top to bottom", "bottom to top"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="pattern", parent_name="layout.grid", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["independent", "coupled"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="layout.grid", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Sets the horizontal domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. - y - Sets the vertical domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnsValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="columns", parent_name="layout.grid", **kwargs): - super(ColumnsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yside import YsideValidator + from ._ygap import YgapValidator + from ._yaxes import YaxesValidator + from ._xside import XsideValidator + from ._xgap import XgapValidator + from ._xaxes import XaxesValidator + from ._subplots import SubplotsValidator + from ._rows import RowsValidator + from ._roworder import RoworderValidator + from ._pattern import PatternValidator + from ._domain import DomainValidator + from ._columns import ColumnsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yside.YsideValidator", + "._ygap.YgapValidator", + "._yaxes.YaxesValidator", + "._xside.XsideValidator", + "._xgap.XgapValidator", + "._xaxes.XaxesValidator", + "._subplots.SubplotsValidator", + "._rows.RowsValidator", + "._roworder.RoworderValidator", + "._pattern.PatternValidator", + "._domain.DomainValidator", + "._columns.ColumnsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_columns.py b/packages/python/plotly/plotly/validators/layout/grid/_columns.py new file mode 100644 index 00000000000..f43d1d2828e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_columns.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnsValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="columns", parent_name="layout.grid", **kwargs): + super(ColumnsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_domain.py b/packages/python/plotly/plotly/validators/layout/grid/_domain.py new file mode 100644 index 00000000000..97cc1055860 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_domain.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="layout.grid", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Sets the horizontal domain of this grid subplot + (in plot fraction). The first and last cells + end exactly at the domain edges, with no grout + around the edges. + y + Sets the vertical domain of this grid subplot + (in plot fraction). The first and last cells + end exactly at the domain edges, with no grout + around the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_pattern.py b/packages/python/plotly/plotly/validators/layout/grid/_pattern.py new file mode 100644 index 00000000000..0e50ad8b801 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_pattern.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="pattern", parent_name="layout.grid", **kwargs): + super(PatternValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["independent", "coupled"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_roworder.py b/packages/python/plotly/plotly/validators/layout/grid/_roworder.py new file mode 100644 index 00000000000..42030a890b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_roworder.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RoworderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="roworder", parent_name="layout.grid", **kwargs): + super(RoworderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top to bottom", "bottom to top"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_rows.py b/packages/python/plotly/plotly/validators/layout/grid/_rows.py new file mode 100644 index 00000000000..5db86aa4d95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_rows.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowsValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="rows", parent_name="layout.grid", **kwargs): + super(RowsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_subplots.py b/packages/python/plotly/plotly/validators/layout/grid/_subplots.py new file mode 100644 index 00000000000..3f713b1dfaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_subplots.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): + super(SubplotsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dimensions=kwargs.pop("dimensions", 2), + edit_type=kwargs.pop("edit_type", "plot"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + { + "valType": "enumerated", + "values": ["/^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?$/", ""], + "editType": "plot", + }, + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_xaxes.py b/packages/python/plotly/plotly/validators/layout/grid/_xaxes.py new file mode 100644 index 00000000000..0d74e6e6750 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_xaxes.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="xaxes", parent_name="layout.grid", **kwargs): + super(XaxesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + { + "valType": "enumerated", + "values": ["/^x([2-9]|[1-9][0-9]+)?$/", ""], + "editType": "plot", + }, + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_xgap.py b/packages/python/plotly/plotly/validators/layout/grid/_xgap.py new file mode 100644 index 00000000000..4ecefd5eecf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_xgap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xgap", parent_name="layout.grid", **kwargs): + super(XgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_xside.py b/packages/python/plotly/plotly/validators/layout/grid/_xside.py new file mode 100644 index 00000000000..3b2b4380d03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_xside.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xside", parent_name="layout.grid", **kwargs): + super(XsideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["bottom", "bottom plot", "top plot", "top"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_yaxes.py b/packages/python/plotly/plotly/validators/layout/grid/_yaxes.py new file mode 100644 index 00000000000..00613892bff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_yaxes.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="yaxes", parent_name="layout.grid", **kwargs): + super(YaxesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + { + "valType": "enumerated", + "values": ["/^y([2-9]|[1-9][0-9]+)?$/", ""], + "editType": "plot", + }, + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_ygap.py b/packages/python/plotly/plotly/validators/layout/grid/_ygap.py new file mode 100644 index 00000000000..b4df063dac9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_ygap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ygap", parent_name="layout.grid", **kwargs): + super(YgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/_yside.py b/packages/python/plotly/plotly/validators/layout/grid/_yside.py new file mode 100644 index 00000000000..ba01a03c52b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/_yside.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yside", parent_name="layout.grid", **kwargs): + super(YsideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["left", "left plot", "right plot", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/domain/__init__.py b/packages/python/plotly/plotly/validators/layout/grid/domain/__init__.py index 4a45579226c..bdfa3a225bd 100644 --- a/packages/python/plotly/plotly/validators/layout/grid/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/grid/domain/__init__.py @@ -1,40 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="layout.grid.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="layout.grid.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/domain/_x.py b/packages/python/plotly/plotly/validators/layout/grid/domain/_x.py new file mode 100644 index 00000000000..15c0686e54f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="layout.grid.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/grid/domain/_y.py b/packages/python/plotly/plotly/validators/layout/grid/domain/_y.py new file mode 100644 index 00000000000..f66494e4252 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/grid/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="layout.grid.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/__init__.py index 35b937d8b60..f9328b78fa6 100644 --- a/packages/python/plotly/plotly/validators/layout/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/__init__.py @@ -1,101 +1,22 @@ -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="layout.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="layout.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="layout.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/_align.py new file mode 100644 index 00000000000..c508f1e5e30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/_align.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="layout.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..265e5500c20 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..0645a5e9ca4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="layout.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/_font.py new file mode 100644 index 00000000000..5ccbbd5cbdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/_namelength.py new file mode 100644 index 00000000000..6eaa2266836 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/_namelength.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="layout.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/__init__.py index 0a3f775fc61..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_color.py new file mode 100644 index 00000000000..a5155410bc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_family.py new file mode 100644 index 00000000000..6e32e129933 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_size.py new file mode 100644 index 00000000000..36e9a67cbbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/__init__.py b/packages/python/plotly/plotly/validators/layout/image/__init__.py index 57e294d3bb8..79f894280d8 100644 --- a/packages/python/plotly/plotly/validators/layout/image/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/image/__init__.py @@ -1,218 +1,42 @@ -import _plotly_utils.basevalidators - - -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yref", parent_name="layout.image", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["paper", "/^y([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="layout.image", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y", parent_name="layout.image", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xref", parent_name="layout.image", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["paper", "/^x([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="layout.image", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x", parent_name="layout.image", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="layout.image", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="layout.image", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourceValidator(_plotly_utils.basevalidators.ImageUriValidator): - def __init__(self, plotly_name="source", parent_name="layout.image", **kwargs): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="sizing", parent_name="layout.image", **kwargs): - super(SizingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fill", "contain", "stretch"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizey", parent_name="layout.image", **kwargs): - super(SizeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizexValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizex", parent_name="layout.image", **kwargs): - super(SizexValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="layout.image", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.image", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="layer", parent_name="layout.image", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["below", "above"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yref import YrefValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xref import XrefValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._templateitemname import TemplateitemnameValidator + from ._source import SourceValidator + from ._sizing import SizingValidator + from ._sizey import SizeyValidator + from ._sizex import SizexValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._layer import LayerValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._templateitemname.TemplateitemnameValidator", + "._source.SourceValidator", + "._sizing.SizingValidator", + "._sizey.SizeyValidator", + "._sizex.SizexValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._layer.LayerValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_layer.py b/packages/python/plotly/plotly/validators/layout/image/_layer.py new file mode 100644 index 00000000000..e62c69f8dc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_layer.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="layer", parent_name="layout.image", **kwargs): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["below", "above"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_name.py b/packages/python/plotly/plotly/validators/layout/image/_name.py new file mode 100644 index 00000000000..fd4d32752df --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.image", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_opacity.py b/packages/python/plotly/plotly/validators/layout/image/_opacity.py new file mode 100644 index 00000000000..07821babbf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="layout.image", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_sizex.py b/packages/python/plotly/plotly/validators/layout/image/_sizex.py new file mode 100644 index 00000000000..2450ce7d507 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_sizex.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizexValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizex", parent_name="layout.image", **kwargs): + super(SizexValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_sizey.py b/packages/python/plotly/plotly/validators/layout/image/_sizey.py new file mode 100644 index 00000000000..790212da0bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_sizey.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizeyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizey", parent_name="layout.image", **kwargs): + super(SizeyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_sizing.py b/packages/python/plotly/plotly/validators/layout/image/_sizing.py new file mode 100644 index 00000000000..c4c6915db19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_sizing.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="sizing", parent_name="layout.image", **kwargs): + super(SizingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fill", "contain", "stretch"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_source.py b/packages/python/plotly/plotly/validators/layout/image/_source.py new file mode 100644 index 00000000000..1286038d39f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_source.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SourceValidator(_plotly_utils.basevalidators.ImageUriValidator): + def __init__(self, plotly_name="source", parent_name="layout.image", **kwargs): + super(SourceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/image/_templateitemname.py new file mode 100644 index 00000000000..b41c581c626 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="layout.image", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_visible.py b/packages/python/plotly/plotly/validators/layout/image/_visible.py new file mode 100644 index 00000000000..350ac179b73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="layout.image", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_x.py b/packages/python/plotly/plotly/validators/layout/image/_x.py new file mode 100644 index 00000000000..8084a9fdce2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x", parent_name="layout.image", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_xanchor.py b/packages/python/plotly/plotly/validators/layout/image/_xanchor.py new file mode 100644 index 00000000000..90dd510a828 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="layout.image", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_xref.py b/packages/python/plotly/plotly/validators/layout/image/_xref.py new file mode 100644 index 00000000000..31c3601415b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_xref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xref", parent_name="layout.image", **kwargs): + super(XrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["paper", "/^x([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_y.py b/packages/python/plotly/plotly/validators/layout/image/_y.py new file mode 100644 index 00000000000..77c6abec939 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y", parent_name="layout.image", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_yanchor.py b/packages/python/plotly/plotly/validators/layout/image/_yanchor.py new file mode 100644 index 00000000000..111793c9f19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="layout.image", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/image/_yref.py b/packages/python/plotly/plotly/validators/layout/image/_yref.py new file mode 100644 index 00000000000..5332ca06a1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/image/_yref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yref", parent_name="layout.image", **kwargs): + super(YrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["paper", "/^y([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/__init__.py b/packages/python/plotly/plotly/validators/layout/legend/__init__.py index 1a357af8797..3c5d5c2691d 100644 --- a/packages/python/plotly/plotly/validators/layout/legend/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/legend/__init__.py @@ -1,301 +1,46 @@ -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="layout.legend", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="layout.legend", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="layout.legend", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="layout.legend", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="valign", parent_name="layout.legend", **kwargs): - super(ValignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.legend", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TraceorderValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="traceorder", parent_name="layout.legend", **kwargs): - super(TraceorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - extras=kwargs.pop("extras", ["normal"]), - flags=kwargs.pop("flags", ["reversed", "grouped"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracegroupgapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tracegroupgap", parent_name="layout.legend", **kwargs - ): - super(TracegroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout.legend", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this legend's title font. - side - Determines the location of legend's title with - respect to the legend items. Defaulted to "top" - with `orientation` is "h". Defaulted to "left" - with `orientation` is "v". The *top left* - options could be used to expand legend area in - both x and y sides. - text - Sets the title of the legend. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="orientation", parent_name="layout.legend", **kwargs - ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ItemsizingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="itemsizing", parent_name="layout.legend", **kwargs): - super(ItemsizingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["trace", "constant"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ItemdoubleclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="itemdoubleclick", parent_name="layout.legend", **kwargs - ): - super(ItemdoubleclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["toggle", "toggleothers", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ItemclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="itemclick", parent_name="layout.legend", **kwargs): - super(ItemclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["toggle", "toggleothers", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.legend", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="layout.legend", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="layout.legend", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.legend", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._valign import ValignValidator + from ._uirevision import UirevisionValidator + from ._traceorder import TraceorderValidator + from ._tracegroupgap import TracegroupgapValidator + from ._title import TitleValidator + from ._orientation import OrientationValidator + from ._itemsizing import ItemsizingValidator + from ._itemdoubleclick import ItemdoubleclickValidator + from ._itemclick import ItemclickValidator + from ._font import FontValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._valign.ValignValidator", + "._uirevision.UirevisionValidator", + "._traceorder.TraceorderValidator", + "._tracegroupgap.TracegroupgapValidator", + "._title.TitleValidator", + "._orientation.OrientationValidator", + "._itemsizing.ItemsizingValidator", + "._itemdoubleclick.ItemdoubleclickValidator", + "._itemclick.ItemclickValidator", + "._font.FontValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/legend/_bgcolor.py new file mode 100644 index 00000000000..96ef3c5424a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.legend", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/legend/_bordercolor.py new file mode 100644 index 00000000000..1798f62a4c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="layout.legend", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/legend/_borderwidth.py new file mode 100644 index 00000000000..81b557b23c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="layout.legend", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_font.py b/packages/python/plotly/plotly/validators/layout/legend/_font.py new file mode 100644 index 00000000000..65b64216a10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.legend", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_itemclick.py b/packages/python/plotly/plotly/validators/layout/legend/_itemclick.py new file mode 100644 index 00000000000..bc14f73e1b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_itemclick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ItemclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="itemclick", parent_name="layout.legend", **kwargs): + super(ItemclickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["toggle", "toggleothers", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_itemdoubleclick.py b/packages/python/plotly/plotly/validators/layout/legend/_itemdoubleclick.py new file mode 100644 index 00000000000..c2bf10eb41b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_itemdoubleclick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ItemdoubleclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="itemdoubleclick", parent_name="layout.legend", **kwargs + ): + super(ItemdoubleclickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["toggle", "toggleothers", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_itemsizing.py b/packages/python/plotly/plotly/validators/layout/legend/_itemsizing.py new file mode 100644 index 00000000000..d8fd9e50e96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_itemsizing.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ItemsizingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="itemsizing", parent_name="layout.legend", **kwargs): + super(ItemsizingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["trace", "constant"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_orientation.py b/packages/python/plotly/plotly/validators/layout/legend/_orientation.py new file mode 100644 index 00000000000..7f9b732192c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_orientation.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="orientation", parent_name="layout.legend", **kwargs + ): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_title.py b/packages/python/plotly/plotly/validators/layout/legend/_title.py new file mode 100644 index 00000000000..28022e9b0cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_title.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout.legend", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this legend's title font. + side + Determines the location of legend's title with + respect to the legend items. Defaulted to "top" + with `orientation` is "h". Defaulted to "left" + with `orientation` is "v". The *top left* + options could be used to expand legend area in + both x and y sides. + text + Sets the title of the legend. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_tracegroupgap.py b/packages/python/plotly/plotly/validators/layout/legend/_tracegroupgap.py new file mode 100644 index 00000000000..428a5c75532 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_tracegroupgap.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracegroupgapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tracegroupgap", parent_name="layout.legend", **kwargs + ): + super(TracegroupgapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_traceorder.py b/packages/python/plotly/plotly/validators/layout/legend/_traceorder.py new file mode 100644 index 00000000000..bc6c5908623 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_traceorder.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TraceorderValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="traceorder", parent_name="layout.legend", **kwargs): + super(TraceorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + extras=kwargs.pop("extras", ["normal"]), + flags=kwargs.pop("flags", ["reversed", "grouped"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_uirevision.py b/packages/python/plotly/plotly/validators/layout/legend/_uirevision.py new file mode 100644 index 00000000000..8ef1f76ea16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.legend", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_valign.py b/packages/python/plotly/plotly/validators/layout/legend/_valign.py new file mode 100644 index 00000000000..2f29b75ff18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_valign.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="valign", parent_name="layout.legend", **kwargs): + super(ValignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_x.py b/packages/python/plotly/plotly/validators/layout/legend/_x.py new file mode 100644 index 00000000000..c42f8d58663 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="layout.legend", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_xanchor.py b/packages/python/plotly/plotly/validators/layout/legend/_xanchor.py new file mode 100644 index 00000000000..f631b2341c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="layout.legend", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_y.py b/packages/python/plotly/plotly/validators/layout/legend/_y.py new file mode 100644 index 00000000000..6287f7c1d39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="layout.legend", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/_yanchor.py b/packages/python/plotly/plotly/validators/layout/legend/_yanchor.py new file mode 100644 index 00000000000..399c2f5b113 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="layout.legend", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/font/__init__.py b/packages/python/plotly/plotly/validators/layout/legend/font/__init__.py index 9a10b10ea12..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/legend/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/legend/font/__init__.py @@ -1,45 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="layout.legend.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.legend.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.legend.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/font/_color.py b/packages/python/plotly/plotly/validators/layout/legend/font/_color.py new file mode 100644 index 00000000000..f0dcd7a90b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/font/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.legend.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/font/_family.py b/packages/python/plotly/plotly/validators/layout/legend/font/_family.py new file mode 100644 index 00000000000..173002f0139 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.legend.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/font/_size.py b/packages/python/plotly/plotly/validators/layout/legend/font/_size.py new file mode 100644 index 00000000000..76010a7f27b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/font/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="layout.legend.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/__init__.py b/packages/python/plotly/plotly/validators/layout/legend/title/__init__.py index 4f5dab0a41f..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/layout/legend/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/legend/title/__init__.py @@ -1,66 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="layout.legend.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="side", parent_name="layout.legend.title", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "left", "top left"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.legend.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/_font.py b/packages/python/plotly/plotly/validators/layout/legend/title/_font.py new file mode 100644 index 00000000000..d48cbc4b5e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.legend.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/_side.py b/packages/python/plotly/plotly/validators/layout/legend/title/_side.py new file mode 100644 index 00000000000..1f21e123976 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/title/_side.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="layout.legend.title", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "left", "top left"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/_text.py b/packages/python/plotly/plotly/validators/layout/legend/title/_text.py new file mode 100644 index 00000000000..4f6c3a93733 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="layout.legend.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/legend/title/font/__init__.py index 2923e47bd5c..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/legend/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/legend/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.legend.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.legend.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.legend.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "legend"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/legend/title/font/_color.py new file mode 100644 index 00000000000..bfe6f5aabdb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.legend.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/legend/title/font/_family.py new file mode 100644 index 00000000000..18fbc485854 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.legend.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/legend/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/legend/title/font/_size.py new file mode 100644 index 00000000000..c4c2fa47867 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/legend/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.legend.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "legend"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/__init__.py index bd501352538..365e0778b9f 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/__init__.py @@ -1,309 +1,32 @@ -import _plotly_utils.basevalidators - - -class ZoomValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="zoom", parent_name="layout.mapbox", **kwargs): - super(ZoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.mapbox", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StyleValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="style", parent_name="layout.mapbox", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "basic", - "streets", - "outdoors", - "light", - "dark", - "satellite", - "satellite-streets", - "open-street-map", - "white-bg", - "carto-positron", - "carto-darkmatter", - "stamen-terrain", - "stamen-toner", - "stamen-watercolor", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PitchValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pitch", parent_name="layout.mapbox", **kwargs): - super(PitchValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="layerdefaults", parent_name="layout.mapbox", **kwargs - ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Layer"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="layers", parent_name="layout.mapbox", **kwargs): - super(LayersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Layer"), - data_docs=kwargs.pop( - "data_docs", - """ - below - Determines if the layer will be inserted before - the layer with the specified ID. If omitted or - set to '', the layer will be inserted above - every existing layer. - circle - :class:`plotly.graph_objects.layout.mapbox.laye - r.Circle` instance or dict with compatible - properties - color - Sets the primary layer color. If `type` is - "circle", color corresponds to the circle color - (mapbox.layer.paint.circle-color) If `type` is - "line", color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is - "fill", color corresponds to the fill color - (mapbox.layer.paint.fill-color) If `type` is - "symbol", color corresponds to the icon color - (mapbox.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom - right, bottom left. Only has an effect for - "image" `sourcetype`. - fill - :class:`plotly.graph_objects.layout.mapbox.laye - r.Fill` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.layout.mapbox.laye - r.Line` instance or dict with compatible - properties - maxzoom - Sets the maximum zoom level - (mapbox.layer.maxzoom). At zoom levels equal to - or greater than the maxzoom, the layer will be - hidden. - minzoom - Sets the minimum zoom level - (mapbox.layer.minzoom). At zoom levels less - than the minzoom, the layer will be hidden. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the layer. If `type` is - "circle", opacity corresponds to the circle - opacity (mapbox.layer.paint.circle-opacity) If - `type` is "line", opacity corresponds to the - line opacity (mapbox.layer.paint.line-opacity) - If `type` is "fill", opacity corresponds to the - fill opacity (mapbox.layer.paint.fill-opacity) - If `type` is "symbol", opacity corresponds to - the icon/text opacity (mapbox.layer.paint.text- - opacity) - source - Sets the source data for this layer - (mapbox.layer.source). When `sourcetype` is set - to "geojson", `source` can be a URL to a - GeoJSON or a GeoJSON object. When `sourcetype` - is set to "vector" or "raster", `source` can be - a URL or an array of tile URLs. When - `sourcetype` is set to "image", `source` can be - a URL to an image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile - source (mapbox.layer.source-layer). Required - for "vector" source type that supports multiple - layers. - sourcetype - Sets the source type for this layer, that is - the type of the layer data. - symbol - :class:`plotly.graph_objects.layout.mapbox.laye - r.Symbol` instance or dict with compatible - properties - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer - data set in `source` will be rendered With - `sourcetype` set to "geojson", the following - values are allowed: "circle", "line", "fill" - and "symbol". but note that "line" and "fill" - are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", - the following values are allowed: "circle", - "line", "fill" and "symbol". With `sourcetype` - set to "raster" or `*image*`, only the "raster" - value is allowed. - visible - Determines whether this layer is displayed -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="layout.mapbox", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this mapbox subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this mapbox subplot . - x - Sets the horizontal domain of this mapbox - subplot (in plot fraction). - y - Sets the vertical domain of this mapbox subplot - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="center", parent_name="layout.mapbox", **kwargs): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Center"), - data_docs=kwargs.pop( - "data_docs", - """ - lat - Sets the latitude of the center of the map (in - degrees North). - lon - Sets the longitude of the center of the map (in - degrees East). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BearingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="bearing", parent_name="layout.mapbox", **kwargs): - super(BearingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AccesstokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="accesstoken", parent_name="layout.mapbox", **kwargs - ): - super(AccesstokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zoom import ZoomValidator + from ._uirevision import UirevisionValidator + from ._style import StyleValidator + from ._pitch import PitchValidator + from ._layerdefaults import LayerdefaultsValidator + from ._layers import LayersValidator + from ._domain import DomainValidator + from ._center import CenterValidator + from ._bearing import BearingValidator + from ._accesstoken import AccesstokenValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zoom.ZoomValidator", + "._uirevision.UirevisionValidator", + "._style.StyleValidator", + "._pitch.PitchValidator", + "._layerdefaults.LayerdefaultsValidator", + "._layers.LayersValidator", + "._domain.DomainValidator", + "._center.CenterValidator", + "._bearing.BearingValidator", + "._accesstoken.AccesstokenValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_accesstoken.py b/packages/python/plotly/plotly/validators/layout/mapbox/_accesstoken.py new file mode 100644 index 00000000000..fd5d2797b76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_accesstoken.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AccesstokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="accesstoken", parent_name="layout.mapbox", **kwargs + ): + super(AccesstokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_bearing.py b/packages/python/plotly/plotly/validators/layout/mapbox/_bearing.py new file mode 100644 index 00000000000..667280ee071 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_bearing.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BearingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="bearing", parent_name="layout.mapbox", **kwargs): + super(BearingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_center.py b/packages/python/plotly/plotly/validators/layout/mapbox/_center.py new file mode 100644 index 00000000000..ecf82bb918b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_center.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="center", parent_name="layout.mapbox", **kwargs): + super(CenterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Center"), + data_docs=kwargs.pop( + "data_docs", + """ + lat + Sets the latitude of the center of the map (in + degrees North). + lon + Sets the longitude of the center of the map (in + degrees East). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_domain.py b/packages/python/plotly/plotly/validators/layout/mapbox/_domain.py new file mode 100644 index 00000000000..fae0aae339d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="layout.mapbox", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this mapbox subplot + . + row + If there is a layout grid, use the domain for + this row in the grid for this mapbox subplot . + x + Sets the horizontal domain of this mapbox + subplot (in plot fraction). + y + Sets the vertical domain of this mapbox subplot + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_layerdefaults.py b/packages/python/plotly/plotly/validators/layout/mapbox/_layerdefaults.py new file mode 100644 index 00000000000..dd3c4415947 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_layerdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class LayerdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="layerdefaults", parent_name="layout.mapbox", **kwargs + ): + super(LayerdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Layer"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_layers.py b/packages/python/plotly/plotly/validators/layout/mapbox/_layers.py new file mode 100644 index 00000000000..fd0244f31c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_layers.py @@ -0,0 +1,127 @@ +import _plotly_utils.basevalidators + + +class LayersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="layers", parent_name="layout.mapbox", **kwargs): + super(LayersValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Layer"), + data_docs=kwargs.pop( + "data_docs", + """ + below + Determines if the layer will be inserted before + the layer with the specified ID. If omitted or + set to '', the layer will be inserted above + every existing layer. + circle + :class:`plotly.graph_objects.layout.mapbox.laye + r.Circle` instance or dict with compatible + properties + color + Sets the primary layer color. If `type` is + "circle", color corresponds to the circle color + (mapbox.layer.paint.circle-color) If `type` is + "line", color corresponds to the line color + (mapbox.layer.paint.line-color) If `type` is + "fill", color corresponds to the fill color + (mapbox.layer.paint.fill-color) If `type` is + "symbol", color corresponds to the icon color + (mapbox.layer.paint.icon-color) + coordinates + Sets the coordinates array contains [longitude, + latitude] pairs for the image corners listed in + clockwise order: top left, top right, bottom + right, bottom left. Only has an effect for + "image" `sourcetype`. + fill + :class:`plotly.graph_objects.layout.mapbox.laye + r.Fill` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.layout.mapbox.laye + r.Line` instance or dict with compatible + properties + maxzoom + Sets the maximum zoom level + (mapbox.layer.maxzoom). At zoom levels equal to + or greater than the maxzoom, the layer will be + hidden. + minzoom + Sets the minimum zoom level + (mapbox.layer.minzoom). At zoom levels less + than the minzoom, the layer will be hidden. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the layer. If `type` is + "circle", opacity corresponds to the circle + opacity (mapbox.layer.paint.circle-opacity) If + `type` is "line", opacity corresponds to the + line opacity (mapbox.layer.paint.line-opacity) + If `type` is "fill", opacity corresponds to the + fill opacity (mapbox.layer.paint.fill-opacity) + If `type` is "symbol", opacity corresponds to + the icon/text opacity (mapbox.layer.paint.text- + opacity) + source + Sets the source data for this layer + (mapbox.layer.source). When `sourcetype` is set + to "geojson", `source` can be a URL to a + GeoJSON or a GeoJSON object. When `sourcetype` + is set to "vector" or "raster", `source` can be + a URL or an array of tile URLs. When + `sourcetype` is set to "image", `source` can be + a URL to an image. + sourceattribution + Sets the attribution for this source. + sourcelayer + Specifies the layer to use from a vector tile + source (mapbox.layer.source-layer). Required + for "vector" source type that supports multiple + layers. + sourcetype + Sets the source type for this layer, that is + the type of the layer data. + symbol + :class:`plotly.graph_objects.layout.mapbox.laye + r.Symbol` instance or dict with compatible + properties + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Sets the layer type, that is the how the layer + data set in `source` will be rendered With + `sourcetype` set to "geojson", the following + values are allowed: "circle", "line", "fill" + and "symbol". but note that "line" and "fill" + are not compatible with Point GeoJSON + geometries. With `sourcetype` set to "vector", + the following values are allowed: "circle", + "line", "fill" and "symbol". With `sourcetype` + set to "raster" or `*image*`, only the "raster" + value is allowed. + visible + Determines whether this layer is displayed +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_pitch.py b/packages/python/plotly/plotly/validators/layout/mapbox/_pitch.py new file mode 100644 index 00000000000..6c255cfd8cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_pitch.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PitchValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pitch", parent_name="layout.mapbox", **kwargs): + super(PitchValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_style.py b/packages/python/plotly/plotly/validators/layout/mapbox/_style.py new file mode 100644 index 00000000000..025960abda0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_style.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class StyleValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="style", parent_name="layout.mapbox", **kwargs): + super(StyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "basic", + "streets", + "outdoors", + "light", + "dark", + "satellite", + "satellite-streets", + "open-street-map", + "white-bg", + "carto-positron", + "carto-darkmatter", + "stamen-terrain", + "stamen-toner", + "stamen-watercolor", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_uirevision.py b/packages/python/plotly/plotly/validators/layout/mapbox/_uirevision.py new file mode 100644 index 00000000000..d0869557409 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.mapbox", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/_zoom.py b/packages/python/plotly/plotly/validators/layout/mapbox/_zoom.py new file mode 100644 index 00000000000..80eac7052c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/_zoom.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZoomValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="zoom", parent_name="layout.mapbox", **kwargs): + super(ZoomValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/center/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/center/__init__.py index e3e0f2f75a3..814a8fe0eed 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/center/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/center/__init__.py @@ -1,26 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._lon import LonValidator + from ._lat import LatValidator +else: + from _plotly_utils.importers import relative_import -class LonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="lon", parent_name="layout.mapbox.center", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="lat", parent_name="layout.mapbox.center", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/center/_lat.py b/packages/python/plotly/plotly/validators/layout/mapbox/center/_lat.py new file mode 100644 index 00000000000..7fc668af43e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/center/_lat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="lat", parent_name="layout.mapbox.center", **kwargs): + super(LatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/center/_lon.py b/packages/python/plotly/plotly/validators/layout/mapbox/center/_lon.py new file mode 100644 index 00000000000..a435412cc1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/center/_lon.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="lon", parent_name="layout.mapbox.center", **kwargs): + super(LonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/domain/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/domain/__init__.py index 0743020ec0e..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/domain/__init__.py @@ -1,72 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="layout.mapbox.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="layout.mapbox.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="layout.mapbox.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="column", parent_name="layout.mapbox.domain", **kwargs - ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/domain/_column.py b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_column.py new file mode 100644 index 00000000000..ef481e8f14b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_column.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="column", parent_name="layout.mapbox.domain", **kwargs + ): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/domain/_row.py b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_row.py new file mode 100644 index 00000000000..5661dfe3ce1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="layout.mapbox.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/domain/_x.py b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_x.py new file mode 100644 index 00000000000..8d3bcd46178 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="layout.mapbox.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/domain/_y.py b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_y.py new file mode 100644 index 00000000000..3361431d39e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="layout.mapbox.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/__init__.py index b326c6079a0..409b191fda3 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/layer/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/__init__.py @@ -1,355 +1,48 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.mapbox.layer", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.mapbox.layer", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["circle", "line", "fill", "symbol", "raster"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.mapbox.layer", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="symbol", parent_name="layout.mapbox.layer", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Symbol"), - data_docs=kwargs.pop( - "data_docs", - """ - 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. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourcetypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sourcetype", parent_name="layout.mapbox.layer", **kwargs - ): - super(SourcetypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["geojson", "vector", "raster", "image"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourcelayerValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="sourcelayer", parent_name="layout.mapbox.layer", **kwargs - ): - super(SourcelayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourceattributionValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="sourceattribution", - parent_name="layout.mapbox.layer", - **kwargs - ): - super(SourceattributionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourceValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="source", parent_name="layout.mapbox.layer", **kwargs - ): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="layout.mapbox.layer", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.mapbox.layer", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinzoomValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="minzoom", parent_name="layout.mapbox.layer", **kwargs - ): - super(MinzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 24), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxzoom", parent_name="layout.mapbox.layer", **kwargs - ): - super(MaxzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 24), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="layout.mapbox.layer", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - 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". -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="fill", parent_name="layout.mapbox.layer", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Fill"), - data_docs=kwargs.pop( - "data_docs", - """ - outlinecolor - Sets the fill outline color - (mapbox.layer.paint.fill-outline-color). Has an - effect only when `type` is set to "fill". -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CoordinatesValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="coordinates", parent_name="layout.mapbox.layer", **kwargs - ): - super(CoordinatesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.mapbox.layer", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CircleValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="circle", parent_name="layout.mapbox.layer", **kwargs - ): - super(CircleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Circle"), - data_docs=kwargs.pop( - "data_docs", - """ - radius - Sets the circle radius - (mapbox.layer.paint.circle-radius). Has an - effect only when `type` is set to "circle". -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BelowValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="below", parent_name="layout.mapbox.layer", **kwargs - ): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._type import TypeValidator + from ._templateitemname import TemplateitemnameValidator + from ._symbol import SymbolValidator + from ._sourcetype import SourcetypeValidator + from ._sourcelayer import SourcelayerValidator + from ._sourceattribution import SourceattributionValidator + from ._source import SourceValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._minzoom import MinzoomValidator + from ._maxzoom import MaxzoomValidator + from ._line import LineValidator + from ._fill import FillValidator + from ._coordinates import CoordinatesValidator + from ._color import ColorValidator + from ._circle import CircleValidator + from ._below import BelowValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._symbol.SymbolValidator", + "._sourcetype.SourcetypeValidator", + "._sourcelayer.SourcelayerValidator", + "._sourceattribution.SourceattributionValidator", + "._source.SourceValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._minzoom.MinzoomValidator", + "._maxzoom.MaxzoomValidator", + "._line.LineValidator", + "._fill.FillValidator", + "._coordinates.CoordinatesValidator", + "._color.ColorValidator", + "._circle.CircleValidator", + "._below.BelowValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_below.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_below.py new file mode 100644 index 00000000000..41db8b4cd2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_below.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BelowValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="below", parent_name="layout.mapbox.layer", **kwargs + ): + super(BelowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_circle.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_circle.py new file mode 100644 index 00000000000..e2ff080eb9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_circle.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class CircleValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="circle", parent_name="layout.mapbox.layer", **kwargs + ): + super(CircleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Circle"), + data_docs=kwargs.pop( + "data_docs", + """ + radius + Sets the circle radius + (mapbox.layer.paint.circle-radius). Has an + effect only when `type` is set to "circle". +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_color.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_color.py new file mode 100644 index 00000000000..6323df26571 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.mapbox.layer", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_coordinates.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_coordinates.py new file mode 100644 index 00000000000..9214d2c4e81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_coordinates.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CoordinatesValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="coordinates", parent_name="layout.mapbox.layer", **kwargs + ): + super(CoordinatesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_fill.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_fill.py new file mode 100644 index 00000000000..3dad9ffc7b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_fill.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="fill", parent_name="layout.mapbox.layer", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Fill"), + data_docs=kwargs.pop( + "data_docs", + """ + outlinecolor + Sets the fill outline color + (mapbox.layer.paint.fill-outline-color). Has an + effect only when `type` is set to "fill". +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_line.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_line.py new file mode 100644 index 00000000000..a5976d84be3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_line.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="layout.mapbox.layer", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + 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". +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_maxzoom.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_maxzoom.py new file mode 100644 index 00000000000..b0fbe7c33a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_maxzoom.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxzoom", parent_name="layout.mapbox.layer", **kwargs + ): + super(MaxzoomValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 24), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_minzoom.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_minzoom.py new file mode 100644 index 00000000000..37ac51bb81d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_minzoom.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MinzoomValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="minzoom", parent_name="layout.mapbox.layer", **kwargs + ): + super(MinzoomValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 24), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_name.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_name.py new file mode 100644 index 00000000000..d3b3e2d971a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.mapbox.layer", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_opacity.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_opacity.py new file mode 100644 index 00000000000..e63c4180108 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="layout.mapbox.layer", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_source.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_source.py new file mode 100644 index 00000000000..47f0644aa22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_source.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SourceValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="source", parent_name="layout.mapbox.layer", **kwargs + ): + super(SourceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourceattribution.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourceattribution.py new file mode 100644 index 00000000000..f5764d862a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourceattribution.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SourceattributionValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="sourceattribution", + parent_name="layout.mapbox.layer", + **kwargs + ): + super(SourceattributionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourcelayer.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourcelayer.py new file mode 100644 index 00000000000..88879a69e49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourcelayer.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SourcelayerValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="sourcelayer", parent_name="layout.mapbox.layer", **kwargs + ): + super(SourcelayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourcetype.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourcetype.py new file mode 100644 index 00000000000..46bfaaf1907 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_sourcetype.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SourcetypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sourcetype", parent_name="layout.mapbox.layer", **kwargs + ): + super(SourcetypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["geojson", "vector", "raster", "image"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_symbol.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_symbol.py new file mode 100644 index 00000000000..c1ec9c507de --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_symbol.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="symbol", parent_name="layout.mapbox.layer", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Symbol"), + data_docs=kwargs.pop( + "data_docs", + """ + 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. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_templateitemname.py new file mode 100644 index 00000000000..7682495fa54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.mapbox.layer", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_type.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_type.py new file mode 100644 index 00000000000..c53631af954 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.mapbox.layer", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["circle", "line", "fill", "symbol", "raster"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/_visible.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_visible.py new file mode 100644 index 00000000000..bf07d6d7f52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.mapbox.layer", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/__init__.py index 22332f85079..45b7855673f 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._radius import RadiusValidator +else: + from _plotly_utils.importers import relative_import -class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="radius", parent_name="layout.mapbox.layer.circle", **kwargs - ): - super(RadiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._radius.RadiusValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/_radius.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/_radius.py new file mode 100644 index 00000000000..22332f85079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/circle/_radius.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="radius", parent_name="layout.mapbox.layer.circle", **kwargs + ): + super(RadiusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/__init__.py index ac74b4be7b3..2b76f933fc6 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._outlinecolor import OutlinecolorValidator +else: + from _plotly_utils.importers import relative_import -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="layout.mapbox.layer.fill", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._outlinecolor.OutlinecolorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py new file mode 100644 index 00000000000..ac74b4be7b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="layout.mapbox.layer.fill", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/__init__.py index 8245745b0ff..c7c9304113f 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/__init__.py @@ -1,46 +1,18 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="layout.mapbox.layer.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="dashsrc", parent_name="layout.mapbox.layer.line", **kwargs - ): - super(DashsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="dash", parent_name="layout.mapbox.layer.line", **kwargs - ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dashsrc import DashsrcValidator + from ._dash import DashValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._dashsrc.DashsrcValidator", + "._dash.DashValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dash.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dash.py new file mode 100644 index 00000000000..8477950ef2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dash.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="dash", parent_name="layout.mapbox.layer.line", **kwargs + ): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dashsrc.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dashsrc.py new file mode 100644 index 00000000000..c9a31da6312 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dashsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DashsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="dashsrc", parent_name="layout.mapbox.layer.line", **kwargs + ): + super(DashsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_width.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_width.py new file mode 100644 index 00000000000..378f7009160 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="layout.mapbox.layer.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/__init__.py index 1f9661ce413..8102f26764c 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/__init__.py @@ -1,141 +1,24 @@ -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="textposition", - parent_name="layout.mapbox.layer.symbol", - **kwargs - ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="layout.mapbox.layer.symbol", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.mapbox.layer.symbol", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PlacementValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="placement", - parent_name="layout.mapbox.layer.symbol", - **kwargs - ): - super(PlacementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["point", "line", "line-center"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="iconsize", parent_name="layout.mapbox.layer.symbol", **kwargs - ): - super(IconsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IconValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="icon", parent_name="layout.mapbox.layer.symbol", **kwargs - ): - super(IconValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._placement import PlacementValidator + from ._iconsize import IconsizeValidator + from ._icon import IconValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._placement.PlacementValidator", + "._iconsize.IconsizeValidator", + "._icon.IconValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_icon.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_icon.py new file mode 100644 index 00000000000..750fe2f49f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_icon.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class IconValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="icon", parent_name="layout.mapbox.layer.symbol", **kwargs + ): + super(IconValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py new file mode 100644 index 00000000000..fe1e174f49a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="iconsize", parent_name="layout.mapbox.layer.symbol", **kwargs + ): + super(IconsizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_placement.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_placement.py new file mode 100644 index 00000000000..06cc0216f4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_placement.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class PlacementValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="placement", + parent_name="layout.mapbox.layer.symbol", + **kwargs + ): + super(PlacementValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["point", "line", "line-center"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_text.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_text.py new file mode 100644 index 00000000000..f3ef4ef0a5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.mapbox.layer.symbol", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_textfont.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_textfont.py new file mode 100644 index 00000000000..3a3fe851254 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_textfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="layout.mapbox.layer.symbol", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_textposition.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_textposition.py new file mode 100644 index 00000000000..78a8ca759f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_textposition.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="textposition", + parent_name="layout.mapbox.layer.symbol", + **kwargs + ): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py index 2f8127d9259..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.mapbox.layer.symbol.textfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.mapbox.layer.symbol.textfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.mapbox.layer.symbol.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py new file mode 100644 index 00000000000..f580befc217 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.mapbox.layer.symbol.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py new file mode 100644 index 00000000000..bf869e22d41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.mapbox.layer.symbol.textfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py new file mode 100644 index 00000000000..58736044f2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.mapbox.layer.symbol.textfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/__init__.py b/packages/python/plotly/plotly/validators/layout/margin/__init__.py index 4f48cb35b77..da88e9d03fa 100644 --- a/packages/python/plotly/plotly/validators/layout/margin/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/margin/__init__.py @@ -1,87 +1,24 @@ -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="t", parent_name="layout.margin", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="r", parent_name="layout.margin", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pad", parent_name="layout.margin", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="l", parent_name="layout.margin", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="b", parent_name="layout.margin", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutoexpandValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autoexpand", parent_name="layout.margin", **kwargs): - super(AutoexpandValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._t import TValidator + from ._r import RValidator + from ._pad import PadValidator + from ._l import LValidator + from ._b import BValidator + from ._autoexpand import AutoexpandValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._t.TValidator", + "._r.RValidator", + "._pad.PadValidator", + "._l.LValidator", + "._b.BValidator", + "._autoexpand.AutoexpandValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/_autoexpand.py b/packages/python/plotly/plotly/validators/layout/margin/_autoexpand.py new file mode 100644 index 00000000000..7ef060cdbf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/margin/_autoexpand.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutoexpandValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autoexpand", parent_name="layout.margin", **kwargs): + super(AutoexpandValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/_b.py b/packages/python/plotly/plotly/validators/layout/margin/_b.py new file mode 100644 index 00000000000..7501decd033 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/margin/_b.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b", parent_name="layout.margin", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/_l.py b/packages/python/plotly/plotly/validators/layout/margin/_l.py new file mode 100644 index 00000000000..65473123085 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/margin/_l.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="l", parent_name="layout.margin", **kwargs): + super(LValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/_pad.py b/packages/python/plotly/plotly/validators/layout/margin/_pad.py new file mode 100644 index 00000000000..08e0bb54ac2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/margin/_pad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pad", parent_name="layout.margin", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/_r.py b/packages/python/plotly/plotly/validators/layout/margin/_r.py new file mode 100644 index 00000000000..bf783cc8e6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/margin/_r.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="r", parent_name="layout.margin", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/margin/_t.py b/packages/python/plotly/plotly/validators/layout/margin/_t.py new file mode 100644 index 00000000000..2401adf41c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/margin/_t.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="t", parent_name="layout.margin", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/modebar/__init__.py b/packages/python/plotly/plotly/validators/layout/modebar/__init__.py index 9b0a132b2ef..65381299077 100644 --- a/packages/python/plotly/plotly/validators/layout/modebar/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/modebar/__init__.py @@ -1,75 +1,22 @@ -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.modebar", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="orientation", parent_name="layout.modebar", **kwargs - ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.modebar", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.modebar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="activecolor", parent_name="layout.modebar", **kwargs - ): - super(ActivecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._uirevision import UirevisionValidator + from ._orientation import OrientationValidator + from ._color import ColorValidator + from ._bgcolor import BgcolorValidator + from ._activecolor import ActivecolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._orientation.OrientationValidator", + "._color.ColorValidator", + "._bgcolor.BgcolorValidator", + "._activecolor.ActivecolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/modebar/_activecolor.py b/packages/python/plotly/plotly/validators/layout/modebar/_activecolor.py new file mode 100644 index 00000000000..c6e09df3b24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/modebar/_activecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="activecolor", parent_name="layout.modebar", **kwargs + ): + super(ActivecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/modebar/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/modebar/_bgcolor.py new file mode 100644 index 00000000000..56732502741 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/modebar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.modebar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/modebar/_color.py b/packages/python/plotly/plotly/validators/layout/modebar/_color.py new file mode 100644 index 00000000000..94e75d42eb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/modebar/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.modebar", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/modebar/_orientation.py b/packages/python/plotly/plotly/validators/layout/modebar/_orientation.py new file mode 100644 index 00000000000..a67779fb1b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/modebar/_orientation.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="orientation", parent_name="layout.modebar", **kwargs + ): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/modebar/_uirevision.py b/packages/python/plotly/plotly/validators/layout/modebar/_uirevision.py new file mode 100644 index 00000000000..ac9e9e2a444 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/modebar/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.modebar", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/__init__.py index 15e7957f728..3e570d0e8bc 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/__init__.py @@ -1,703 +1,32 @@ -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.polar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SectorValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="sector", parent_name="layout.polar", **kwargs): - super(SectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RadialAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="radialaxis", parent_name="layout.polar", **kwargs): - super(RadialAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "RadialAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - angle - Sets the angle (in degrees) from which the - radial axis is drawn. Note that by default, - radial axis line on the theta=0 line - corresponds to a line pointing right (like what - mathematicians prefer). Defaults to the first - `polar.sector` angle. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", - the range is non-negative, regardless of the - input data. If "normal", the range is computed - in relation to the extrema of the input data - (same behavior as for cartesian axes). - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of radial axis line - the tick and tick labels appear. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.radialaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.radialaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.radialaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.polar.radia - laxis.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.polar.radialaxis.title.font instead. - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, `angle`, and `title` - if in `editable: true` configuration. Defaults - to `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoleValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="hole", parent_name="layout.polar", **kwargs): - super(HoleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="gridshape", parent_name="layout.polar", **kwargs): - super(GridshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["circular", "linear"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="layout.polar", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this polar subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this polar subplot . - x - Sets the horizontal domain of this polar - subplot (in plot fraction). - y - Sets the vertical domain of this polar subplot - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.polar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="barmode", parent_name="layout.polar", **kwargs): - super(BarmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["stack", "overlay"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BargapValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="bargap", parent_name="layout.polar", **kwargs): - super(BargapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AngularAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="angularaxis", parent_name="layout.polar", **kwargs): - super(AngularAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "AngularAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - direction - Sets the direction corresponding to positive - angles. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - period - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - rotation - Sets that start position (in degrees) of the - angular axis By default, polar subplots with - `direction` set to "counterclockwise" get a - `rotation` of 0 which corresponds to due East - (like what mathematicians prefer). In turn, - polar with `direction` set to "clockwise" get a - rotation of 90 which corresponds to due North - (like on a compass), - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thetaunit - Sets the format unit of the formatted "theta" - values. Has an effect only when - `angularaxis.type` is "linear". - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.angularaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.angularaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.angularaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - type - Sets the angular axis type. If "linear", set - `thetaunit` to determine the unit in which axis - value are shown. If *category, use `period` to - set the number of integer coordinates around - polar axis. - uirevision - Controls persistence of user-driven changes in - axis `rotation`. Defaults to - `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._uirevision import UirevisionValidator + from ._sector import SectorValidator + from ._radialaxis import RadialaxisValidator + from ._hole import HoleValidator + from ._gridshape import GridshapeValidator + from ._domain import DomainValidator + from ._bgcolor import BgcolorValidator + from ._barmode import BarmodeValidator + from ._bargap import BargapValidator + from ._angularaxis import AngularaxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._sector.SectorValidator", + "._radialaxis.RadialaxisValidator", + "._hole.HoleValidator", + "._gridshape.GridshapeValidator", + "._domain.DomainValidator", + "._bgcolor.BgcolorValidator", + "._barmode.BarmodeValidator", + "._bargap.BargapValidator", + "._angularaxis.AngularaxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_angularaxis.py b/packages/python/plotly/plotly/validators/layout/polar/_angularaxis.py new file mode 100644 index 00000000000..ef7f0d80c5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_angularaxis.py @@ -0,0 +1,264 @@ +import _plotly_utils.basevalidators + + +class AngularaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="angularaxis", parent_name="layout.polar", **kwargs): + super(AngularaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "AngularAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + direction + Sets the direction corresponding to positive + angles. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + period + Set the angular period. Has an effect only when + `angularaxis.type` is "category". + rotation + Sets that start position (in degrees) of the + angular axis By default, polar subplots with + `direction` set to "counterclockwise" get a + `rotation` of 0 which corresponds to due East + (like what mathematicians prefer). In turn, + polar with `direction` set to "clockwise" get a + rotation of 90 which corresponds to due North + (like on a compass), + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thetaunit + Sets the format unit of the formatted "theta" + values. Has an effect only when + `angularaxis.type` is "linear". + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + polar.angularaxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.polar.angularaxis.tickformatstopdefaults), + sets the default property values to use for + elements of + layout.polar.angularaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + type + Sets the angular axis type. If "linear", set + `thetaunit` to determine the unit in which axis + value are shown. If *category, use `period` to + set the number of integer coordinates around + polar axis. + uirevision + Controls persistence of user-driven changes in + axis `rotation`. Defaults to + `polar.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_bargap.py b/packages/python/plotly/plotly/validators/layout/polar/_bargap.py new file mode 100644 index 00000000000..40490996ae5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_bargap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BargapValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="bargap", parent_name="layout.polar", **kwargs): + super(BargapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_barmode.py b/packages/python/plotly/plotly/validators/layout/polar/_barmode.py new file mode 100644 index 00000000000..9658b466733 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_barmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="barmode", parent_name="layout.polar", **kwargs): + super(BarmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["stack", "overlay"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/polar/_bgcolor.py new file mode 100644 index 00000000000..b1e97f2b723 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.polar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_domain.py b/packages/python/plotly/plotly/validators/layout/polar/_domain.py new file mode 100644 index 00000000000..d063e6d4964 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="layout.polar", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this polar subplot + . + row + If there is a layout grid, use the domain for + this row in the grid for this polar subplot . + x + Sets the horizontal domain of this polar + subplot (in plot fraction). + y + Sets the vertical domain of this polar subplot + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_gridshape.py b/packages/python/plotly/plotly/validators/layout/polar/_gridshape.py new file mode 100644 index 00000000000..1a17de4c5c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_gridshape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GridshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="gridshape", parent_name="layout.polar", **kwargs): + super(GridshapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["circular", "linear"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_hole.py b/packages/python/plotly/plotly/validators/layout/polar/_hole.py new file mode 100644 index 00000000000..ea2a6d77470 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_hole.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoleValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="hole", parent_name="layout.polar", **kwargs): + super(HoleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_radialaxis.py b/packages/python/plotly/plotly/validators/layout/polar/_radialaxis.py new file mode 100644 index 00000000000..adc1c6ad6a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_radialaxis.py @@ -0,0 +1,295 @@ +import _plotly_utils.basevalidators + + +class RadialaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="radialaxis", parent_name="layout.polar", **kwargs): + super(RadialaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "RadialAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + angle + Sets the angle (in degrees) from which the + radial axis is drawn. Note that by default, + radial axis line on the theta=0 line + corresponds to a line pointing right (like what + mathematicians prefer). Defaults to the first + `polar.sector` angle. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If *tozero*`, the range extends to 0, + regardless of the input data If "nonnegative", + the range is non-negative, regardless of the + input data. If "normal", the range is computed + in relation to the extrema of the input data + (same behavior as for cartesian axes). + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines on which side of radial axis line + the tick and tick labels appear. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + polar.radialaxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.polar.radialaxis.tickformatstopdefaults), + sets the default property values to use for + elements of + layout.polar.radialaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.polar.radia + laxis.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.polar.radialaxis.title.font instead. + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, `angle`, and `title` + if in `editable: true` configuration. Defaults + to `polar.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_sector.py b/packages/python/plotly/plotly/validators/layout/polar/_sector.py new file mode 100644 index 00000000000..f99b091e29b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_sector.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class SectorValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="sector", parent_name="layout.polar", **kwargs): + super(SectorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/_uirevision.py b/packages/python/plotly/plotly/validators/layout/polar/_uirevision.py new file mode 100644 index 00000000000..42065ab9416 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.polar", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/__init__.py index f6877f047a8..027a8ae987d 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/__init__.py @@ -1,850 +1,100 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.polar.angularaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.polar.angularaxis", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.polar.angularaxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="layout.polar.angularaxis", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thetaunit", parent_name="layout.polar.angularaxis", **kwargs - ): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["radians", "degrees"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.polar.angularaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.polar.angularaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RotationValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="rotation", parent_name="layout.polar.angularaxis", **kwargs - ): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PeriodValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="period", parent_name="layout.polar.angularaxis", **kwargs - ): - super(PeriodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.polar.angularaxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.polar.angularaxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.polar.angularaxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="layer", parent_name="layout.polar.angularaxis", **kwargs - ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="hoverformat", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.polar.angularaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.polar.angularaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="layout.polar.angularaxis", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="direction", parent_name="layout.polar.angularaxis", **kwargs - ): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["counterclockwise", "clockwise"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.polar.angularaxis", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="categoryorder", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="categoryarraysrc", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="categoryarray", - parent_name="layout.polar.angularaxis", - **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._type import TypeValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thetaunit import ThetaunitValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._rotation import RotationValidator + from ._period import PeriodValidator + from ._nticks import NticksValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._direction import DirectionValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thetaunit.ThetaunitValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rotation.RotationValidator", + "._period.PeriodValidator", + "._nticks.NticksValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._direction.DirectionValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryarray.py new file mode 100644 index 00000000000..01bc7fa4ed8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryarray.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="categoryarray", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..a2d09448694 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="categoryarraysrc", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryorder.py new file mode 100644 index 00000000000..f9ad6253f4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_categoryorder.py @@ -0,0 +1,38 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="categoryorder", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_color.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_color.py new file mode 100644 index 00000000000..7413e57ad5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.polar.angularaxis", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_direction.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_direction.py new file mode 100644 index 00000000000..fea8558a608 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_direction.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="direction", parent_name="layout.polar.angularaxis", **kwargs + ): + super(DirectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["counterclockwise", "clockwise"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_dtick.py new file mode 100644 index 00000000000..07a1f370afc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="layout.polar.angularaxis", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_exponentformat.py new file mode 100644 index 00000000000..b51e20da870 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_gridcolor.py new file mode 100644 index 00000000000..c1aad4cc2f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.polar.angularaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_gridwidth.py new file mode 100644 index 00000000000..3e08f99b397 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.polar.angularaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_hoverformat.py new file mode 100644 index 00000000000..499aa7ed1df --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_hoverformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="hoverformat", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_layer.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_layer.py new file mode 100644 index 00000000000..0415eace101 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_layer.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="layer", parent_name="layout.polar.angularaxis", **kwargs + ): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_linecolor.py new file mode 100644 index 00000000000..b571ab7e48d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.polar.angularaxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_linewidth.py new file mode 100644 index 00000000000..5e96f1718b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.polar.angularaxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_nticks.py new file mode 100644 index 00000000000..f1e5f5f3e39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.polar.angularaxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_period.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_period.py new file mode 100644 index 00000000000..b27fec15b68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_period.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class PeriodValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="period", parent_name="layout.polar.angularaxis", **kwargs + ): + super(PeriodValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_rotation.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_rotation.py new file mode 100644 index 00000000000..30cb2fe15f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_rotation.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class RotationValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="rotation", parent_name="layout.polar.angularaxis", **kwargs + ): + super(RotationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_separatethousands.py new file mode 100644 index 00000000000..5e9dece7a52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showexponent.py new file mode 100644 index 00000000000..4a1ea95e589 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showgrid.py new file mode 100644 index 00000000000..8634cab3581 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.polar.angularaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showline.py new file mode 100644 index 00000000000..9ba0c3a4509 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.polar.angularaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showticklabels.py new file mode 100644 index 00000000000..0ccfe555748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showtickprefix.py new file mode 100644 index 00000000000..bfae95c955b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showticksuffix.py new file mode 100644 index 00000000000..ffa5a8c1ada --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_thetaunit.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_thetaunit.py new file mode 100644 index 00000000000..42fae210047 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_thetaunit.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thetaunit", parent_name="layout.polar.angularaxis", **kwargs + ): + super(ThetaunitValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["radians", "degrees"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tick0.py new file mode 100644 index 00000000000..4ac31f9cef2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="layout.polar.angularaxis", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickangle.py new file mode 100644 index 00000000000..8d5b94ab849 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickcolor.py new file mode 100644 index 00000000000..0df92266ff6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickfont.py new file mode 100644 index 00000000000..ef6410c1188 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformat.py new file mode 100644 index 00000000000..e193175a96f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..809c7a0403c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformatstops.py new file mode 100644 index 00000000000..90f50624347 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticklen.py new file mode 100644 index 00000000000..7c4218d3d71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickmode.py new file mode 100644 index 00000000000..2a50c6faf61 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickprefix.py new file mode 100644 index 00000000000..b2d8ca01341 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticks.py new file mode 100644 index 00000000000..1888ba15107 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticksuffix.py new file mode 100644 index 00000000000..b4c25662269 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticktext.py new file mode 100644 index 00000000000..5669e026df5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py new file mode 100644 index 00000000000..859d2e437e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickvals.py new file mode 100644 index 00000000000..7c137b23efc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py new file mode 100644 index 00000000000..0f1ecaf6681 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="layout.polar.angularaxis", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickwidth.py new file mode 100644 index 00000000000..6674ebc386d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_type.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_type.py new file mode 100644 index 00000000000..5852f0d2356 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="layout.polar.angularaxis", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_uirevision.py new file mode 100644 index 00000000000..52d994505d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.polar.angularaxis", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_visible.py new file mode 100644 index 00000000000..97f497a9e4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.polar.angularaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py index 67cfa297f41..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.polar.angularaxis.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.polar.angularaxis.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.polar.angularaxis.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_color.py new file mode 100644 index 00000000000..0419961e3d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.polar.angularaxis.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_family.py new file mode 100644 index 00000000000..142261d36b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.polar.angularaxis.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_size.py new file mode 100644 index 00000000000..7a43a6c4968 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.polar.angularaxis.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py index dab117408fe..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.polar.angularaxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.polar.angularaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.polar.angularaxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.polar.angularaxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.polar.angularaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..050c1215c63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.polar.angularaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..13e4ec9a307 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.polar.angularaxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..0ec84fca1f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.polar.angularaxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..58781c52990 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.polar.angularaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..9acdd3a0cb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.polar.angularaxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/domain/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/domain/__init__.py index 1af4af2f202..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/domain/__init__.py @@ -1,72 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="layout.polar.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="layout.polar.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="layout.polar.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="column", parent_name="layout.polar.domain", **kwargs - ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/domain/_column.py b/packages/python/plotly/plotly/validators/layout/polar/domain/_column.py new file mode 100644 index 00000000000..3a61ea912f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/domain/_column.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="column", parent_name="layout.polar.domain", **kwargs + ): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/domain/_row.py b/packages/python/plotly/plotly/validators/layout/polar/domain/_row.py new file mode 100644 index 00000000000..a1eaa8a27c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="layout.polar.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/domain/_x.py b/packages/python/plotly/plotly/validators/layout/polar/domain/_x.py new file mode 100644 index 00000000000..ad7c99ca8ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="layout.polar.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/domain/_y.py b/packages/python/plotly/plotly/validators/layout/polar/domain/_y.py new file mode 100644 index 00000000000..399ede14a00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="layout.polar.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/__init__.py index fdc33ba7850..80935c5c8db 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/__init__.py @@ -1,942 +1,106 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.polar.radialaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.polar.radialaxis", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.polar.radialaxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="layout.polar.radialaxis", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="layout.polar.radialaxis", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["clockwise", "counterclockwise"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.polar.radialaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.polar.radialaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="rangemode", parent_name="layout.polar.radialaxis", **kwargs - ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["tozero", "nonnegative", "normal"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="range", parent_name="layout.polar.radialaxis", **kwargs - ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.polar.radialaxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.polar.radialaxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.polar.radialaxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="layer", parent_name="layout.polar.radialaxis", **kwargs - ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.polar.radialaxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.polar.radialaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.polar.radialaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="layout.polar.radialaxis", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.polar.radialaxis", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="categoryorder", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="categoryarraysrc", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="categoryarray", - parent_name="layout.polar.radialaxis", - **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="calendar", parent_name="layout.polar.radialaxis", **kwargs - ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="autorange", parent_name="layout.polar.radialaxis", **kwargs - ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="angle", parent_name="layout.polar.radialaxis", **kwargs - ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._side import SideValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._rangemode import RangemodeValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._calendar import CalendarValidator + from ._autorange import AutorangeValidator + from ._angle import AngleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._autorange.AutorangeValidator", + "._angle.AngleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_angle.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_angle.py new file mode 100644 index 00000000000..a186d238839 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_angle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AngleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="angle", parent_name="layout.polar.radialaxis", **kwargs + ): + super(AngleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_autorange.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_autorange.py new file mode 100644 index 00000000000..c7bb344ed3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_autorange.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="autorange", parent_name="layout.polar.radialaxis", **kwargs + ): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_calendar.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_calendar.py new file mode 100644 index 00000000000..a6bc1e829c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_calendar.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="calendar", parent_name="layout.polar.radialaxis", **kwargs + ): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryarray.py new file mode 100644 index 00000000000..93362efd77b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryarray.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="categoryarray", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..479b0f026a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="categoryarraysrc", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryorder.py new file mode 100644 index 00000000000..309fa904aab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_categoryorder.py @@ -0,0 +1,38 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="categoryorder", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_color.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_color.py new file mode 100644 index 00000000000..bf54151474b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.polar.radialaxis", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_dtick.py new file mode 100644 index 00000000000..a0d528a7562 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="layout.polar.radialaxis", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_exponentformat.py new file mode 100644 index 00000000000..a09e18aca5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_gridcolor.py new file mode 100644 index 00000000000..e711fb10954 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.polar.radialaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_gridwidth.py new file mode 100644 index 00000000000..b199a16c910 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.polar.radialaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_hoverformat.py new file mode 100644 index 00000000000..668316f2c17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.polar.radialaxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_layer.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_layer.py new file mode 100644 index 00000000000..caf84b6879c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_layer.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="layer", parent_name="layout.polar.radialaxis", **kwargs + ): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_linecolor.py new file mode 100644 index 00000000000..6f620165362 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.polar.radialaxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_linewidth.py new file mode 100644 index 00000000000..a2819efb305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.polar.radialaxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_nticks.py new file mode 100644 index 00000000000..6134ec43f3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.polar.radialaxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_range.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_range.py new file mode 100644 index 00000000000..95c0b48ec6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_range.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="range", parent_name="layout.polar.radialaxis", **kwargs + ): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_rangemode.py new file mode 100644 index 00000000000..eb7251ff658 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_rangemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="rangemode", parent_name="layout.polar.radialaxis", **kwargs + ): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["tozero", "nonnegative", "normal"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_separatethousands.py new file mode 100644 index 00000000000..099c28a18f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showexponent.py new file mode 100644 index 00000000000..5bd0a2bd0f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showgrid.py new file mode 100644 index 00000000000..a852091e80d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.polar.radialaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showline.py new file mode 100644 index 00000000000..3d15588593a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.polar.radialaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showticklabels.py new file mode 100644 index 00000000000..64881416085 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showtickprefix.py new file mode 100644 index 00000000000..53c783b4edf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showticksuffix.py new file mode 100644 index 00000000000..dd921179c3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_side.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_side.py new file mode 100644 index 00000000000..cbf3436b78b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="layout.polar.radialaxis", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["clockwise", "counterclockwise"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tick0.py new file mode 100644 index 00000000000..b9d84abe8c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="layout.polar.radialaxis", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickangle.py new file mode 100644 index 00000000000..8512c7deab8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickcolor.py new file mode 100644 index 00000000000..8efb0dd7c69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickfont.py new file mode 100644 index 00000000000..609a06627d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformat.py new file mode 100644 index 00000000000..e6dfdad1c60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..4171bddc0a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformatstops.py new file mode 100644 index 00000000000..7bd317baac5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="layout.polar.radialaxis", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticklen.py new file mode 100644 index 00000000000..4be18f62cdd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickmode.py new file mode 100644 index 00000000000..0746b9826cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickprefix.py new file mode 100644 index 00000000000..cf86838327c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticks.py new file mode 100644 index 00000000000..e8ef02ac129 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticksuffix.py new file mode 100644 index 00000000000..3fe35539147 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktext.py new file mode 100644 index 00000000000..1f411516678 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py new file mode 100644 index 00000000000..8209d860625 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickvals.py new file mode 100644 index 00000000000..2b12056bbf1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py new file mode 100644 index 00000000000..8c6a053aeb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickwidth.py new file mode 100644 index 00000000000..f590b65958e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_title.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_title.py new file mode 100644 index 00000000000..14a305f373c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_title.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_type.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_type.py new file mode 100644 index 00000000000..7b8d250516f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="layout.polar.radialaxis", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_uirevision.py new file mode 100644 index 00000000000..e1a0df7ceaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.polar.radialaxis", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_visible.py new file mode 100644 index 00000000000..05160aee3aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.polar.radialaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py index 7a9395b0c04..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.polar.radialaxis.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.polar.radialaxis.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.polar.radialaxis.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_color.py new file mode 100644 index 00000000000..5b337502564 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.polar.radialaxis.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_family.py new file mode 100644 index 00000000000..4bf6348ed3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.polar.radialaxis.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_size.py new file mode 100644 index 00000000000..8a3a6766f3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.polar.radialaxis.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py index 1add8a26244..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.polar.radialaxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.polar.radialaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.polar.radialaxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.polar.radialaxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.polar.radialaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..26b3a6bbd18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.polar.radialaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a371d62c4b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.polar.radialaxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..13e058d71d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.polar.radialaxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..1c31c8910ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.polar.radialaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..27ed983ed5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.polar.radialaxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/__init__.py index c0a408a774b..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.polar.radialaxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.polar.radialaxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/_font.py new file mode 100644 index 00000000000..56ec1a9f6cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.polar.radialaxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/_text.py new file mode 100644 index 00000000000..40b9c0fa2f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.polar.radialaxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/__init__.py index 4b030267534..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.polar.radialaxis.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.polar.radialaxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.polar.radialaxis.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_color.py new file mode 100644 index 00000000000..2aba3c6410b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.polar.radialaxis.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_family.py new file mode 100644 index 00000000000..c720b3608ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.polar.radialaxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_size.py new file mode 100644 index 00000000000..980dec7a840 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.polar.radialaxis.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/radialaxis/__init__.py index 15965b55eb6..c6398191426 100644 --- a/packages/python/plotly/plotly/validators/layout/radialaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/__init__.py @@ -1,186 +1,34 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.radialaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.radialaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickorientation", parent_name="layout.radialaxis", **kwargs - ): - super(TickorientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["horizontal", "vertical"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.radialaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.radialaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.radialaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.radialaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.radialaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="orientation", parent_name="layout.radialaxis", **kwargs - ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndpaddingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="endpadding", parent_name="layout.radialaxis", **kwargs - ): - super(EndpaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="domain", parent_name="layout.radialaxis", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._ticksuffix import TicksuffixValidator + from ._tickorientation import TickorientationValidator + from ._ticklen import TicklenValidator + from ._tickcolor import TickcolorValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._range import RangeValidator + from ._orientation import OrientationValidator + from ._endpadding import EndpaddingValidator + from ._domain import DomainValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._ticksuffix.TicksuffixValidator", + "._tickorientation.TickorientationValidator", + "._ticklen.TicklenValidator", + "._tickcolor.TickcolorValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._range.RangeValidator", + "._orientation.OrientationValidator", + "._endpadding.EndpaddingValidator", + "._domain.DomainValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_domain.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_domain.py new file mode 100644 index 00000000000..4ece16654ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_domain.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="domain", parent_name="layout.radialaxis", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_endpadding.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_endpadding.py new file mode 100644 index 00000000000..18efae1c9c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_endpadding.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EndpaddingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="endpadding", parent_name="layout.radialaxis", **kwargs + ): + super(EndpaddingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_orientation.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_orientation.py new file mode 100644 index 00000000000..78d8683f078 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_orientation.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="orientation", parent_name="layout.radialaxis", **kwargs + ): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_range.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_range.py new file mode 100644 index 00000000000..b2049ed73b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_range.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.radialaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_showline.py new file mode 100644 index 00000000000..13ae4e1d009 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.radialaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_showticklabels.py new file mode 100644 index 00000000000..200402644b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.radialaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_tickcolor.py new file mode 100644 index 00000000000..ae905d87a10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.radialaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_ticklen.py new file mode 100644 index 00000000000..5ac8eb66a28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.radialaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_tickorientation.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_tickorientation.py new file mode 100644 index 00000000000..33f97614a99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_tickorientation.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickorientation", parent_name="layout.radialaxis", **kwargs + ): + super(TickorientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["horizontal", "vertical"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_ticksuffix.py new file mode 100644 index 00000000000..8991256103b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.radialaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/radialaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/radialaxis/_visible.py new file mode 100644 index 00000000000..e0c0e13c95a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/radialaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.radialaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/__init__.py index 1a2792835a3..929f98b4368 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/__init__.py @@ -1,1300 +1,38 @@ -import _plotly_utils.basevalidators - - -class ZAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="zaxis", parent_name="layout.scene", **kwargs): - super(ZAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ZAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.zaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.zaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.zaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.zaxis - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.scene.zaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="yaxis", parent_name="layout.scene", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "YAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.yaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.yaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.yaxis - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.scene.yaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="xaxis", parent_name="layout.scene", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "XAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.xaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.xaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.xaxis - .Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.scene.xaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.scene", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="hovermode", parent_name="layout.scene", **kwargs): - super(HovermodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["closest", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DragmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="dragmode", parent_name="layout.scene", **kwargs): - super(DragmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["orbit", "turntable", "zoom", "pan", False]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="layout.scene", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this scene subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this scene subplot . - x - Sets the horizontal domain of this scene - subplot (in plot fraction). - y - Sets the vertical domain of this scene subplot - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CameraValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="camera", parent_name="layout.scene", **kwargs): - super(CameraValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Camera"), - data_docs=kwargs.pop( - "data_docs", - """ - center - Sets the (x,y,z) components of the 'center' - camera vector This vector determines the - translation (x,y,z) space about the center of - this scene. By default, there is no such - translation. - eye - Sets the (x,y,z) components of the 'eye' camera - vector. This vector determines the view point - about the origin of this scene. - projection - :class:`plotly.graph_objects.layout.scene.camer - a.Projection` instance or dict with compatible - properties - up - Sets the (x,y,z) components of the 'up' camera - vector. This vector determines the up direction - of this scene with respect to the page. The - default is *{x: 0, y: 0, z: 1}* which means - that the z axis points up. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.scene", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AspectratioValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="aspectratio", parent_name="layout.scene", **kwargs): - super(AspectratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Aspectratio"), - data_docs=kwargs.pop( - "data_docs", - """ - x - - y - - z - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AspectmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="aspectmode", parent_name="layout.scene", **kwargs): - super(AspectmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "cube", "data", "manual"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnnotationValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="annotationdefaults", parent_name="layout.scene", **kwargs - ): - super(AnnotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Annotation"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="annotations", parent_name="layout.scene", **kwargs): - super(AnnotationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Annotation"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head (in pixels). - ay - Sets the y component of the arrow tail about - the arrow head (in pixels). - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.scene.annot - ation.Hoverlabel` instance or dict with - compatible properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , are also - supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. - z - Sets the annotation's z position. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zaxis import ZaxisValidator + from ._yaxis import YaxisValidator + from ._xaxis import XaxisValidator + from ._uirevision import UirevisionValidator + from ._hovermode import HovermodeValidator + from ._dragmode import DragmodeValidator + from ._domain import DomainValidator + from ._camera import CameraValidator + from ._bgcolor import BgcolorValidator + from ._aspectratio import AspectratioValidator + from ._aspectmode import AspectmodeValidator + from ._annotationdefaults import AnnotationdefaultsValidator + from ._annotations import AnnotationsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zaxis.ZaxisValidator", + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._uirevision.UirevisionValidator", + "._hovermode.HovermodeValidator", + "._dragmode.DragmodeValidator", + "._domain.DomainValidator", + "._camera.CameraValidator", + "._bgcolor.BgcolorValidator", + "._aspectratio.AspectratioValidator", + "._aspectmode.AspectmodeValidator", + "._annotationdefaults.AnnotationdefaultsValidator", + "._annotations.AnnotationsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_annotationdefaults.py b/packages/python/plotly/plotly/validators/layout/scene/_annotationdefaults.py new file mode 100644 index 00000000000..872fc1700d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_annotationdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AnnotationdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="annotationdefaults", parent_name="layout.scene", **kwargs + ): + super(AnnotationdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Annotation"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_annotations.py b/packages/python/plotly/plotly/validators/layout/scene/_annotations.py new file mode 100644 index 00000000000..601ef0b6fc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_annotations.py @@ -0,0 +1,192 @@ +import _plotly_utils.basevalidators + + +class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="annotations", parent_name="layout.scene", **kwargs): + super(AnnotationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Annotation"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + arrowwidth + Sets the width (in px) of annotation arrow + line. + ax + Sets the x component of the arrow tail about + the arrow head (in pixels). + ay + Sets the y component of the arrow tail about + the arrow head (in pixels). + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the + annotation `text`. + borderpad + Sets the padding (in px) between the `text` and + the enclosing border. + borderwidth + Sets the width (in px) of the border enclosing + the annotation `text`. + captureevents + Determines whether the annotation text box + captures mouse move and click events, or allows + those events to pass through to data points in + the plot that may be behind the annotation. By + default `captureevents` is False unless + `hovertext` is provided. If you use the event + `plotly_clickannotation` without `hovertext` + you must explicitly enable `captureevents`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. + Taller text will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.scene.annot + ation.Hoverlabel` instance or dict with + compatible properties + hovertext + Sets text to appear when hovering over this + annotation. If omitted or blank, no hover label + will appear. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the annotation (text + + arrow). + showarrow + Determines whether or not the annotation is + drawn with an arrow. If True, `text` is placed + near the arrow's tail. If False, `text` lines + up with the `x` and `y` provided. + standoff + Sets a distance, in pixels, to move the end + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow + head, relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + startstandoff + Sets a distance, in pixels, to move the start + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. + Plotly uses a subset of HTML tags to do things + like newline (
), bold (), italics + (), hyperlinks (). + Tags , , are also + supported. + textangle + Sets the angle at which the `text` is drawn + with respect to the horizontal. + valign + Sets the vertical alignment of the `text` + within the box. Has an effect only if an + explicit height is set to override the text + height. + visible + Determines whether or not this annotation is + visible. + width + Sets an explicit width for the text box. null + (default) lets the text set the box width. + Wider text will be clipped. There is no + automatic wrapping; use
to start a new + line. + x + Sets the annotation's x position. + xanchor + Sets the text box's horizontal position anchor + This anchor binds the `x` position to the + "left", "center" or "right" of the annotation. + For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the + right-most portion of the annotation lines up + with the right-most edge of the plotting area. + If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + xshift + Shifts the position of the whole annotation and + arrow to the right (positive) or left + (negative) by this many pixels. + y + Sets the annotation's y position. + yanchor + Sets the text box's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the annotation. + For example, if `y` is set to 1, `yref` to + "paper" and `yanchor` to "top" then the top- + most portion of the annotation lines up with + the top-most edge of the plotting area. If + "auto", the anchor is equivalent to "middle" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + yshift + Shifts the position of the whole annotation and + arrow up (positive) or down (negative) by this + many pixels. + z + Sets the annotation's z position. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_aspectmode.py b/packages/python/plotly/plotly/validators/layout/scene/_aspectmode.py new file mode 100644 index 00000000000..5a8e21b36ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_aspectmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AspectmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="aspectmode", parent_name="layout.scene", **kwargs): + super(AspectmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "cube", "data", "manual"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_aspectratio.py b/packages/python/plotly/plotly/validators/layout/scene/_aspectratio.py new file mode 100644 index 00000000000..25fabfd9ae4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_aspectratio.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class AspectratioValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="aspectratio", parent_name="layout.scene", **kwargs): + super(AspectratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Aspectratio"), + data_docs=kwargs.pop( + "data_docs", + """ + x + + y + + z + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/scene/_bgcolor.py new file mode 100644 index 00000000000..d5b44241d2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.scene", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_camera.py b/packages/python/plotly/plotly/validators/layout/scene/_camera.py new file mode 100644 index 00000000000..cc52545753f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_camera.py @@ -0,0 +1,36 @@ +import _plotly_utils.basevalidators + + +class CameraValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="camera", parent_name="layout.scene", **kwargs): + super(CameraValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Camera"), + data_docs=kwargs.pop( + "data_docs", + """ + center + Sets the (x,y,z) components of the 'center' + camera vector This vector determines the + translation (x,y,z) space about the center of + this scene. By default, there is no such + translation. + eye + Sets the (x,y,z) components of the 'eye' camera + vector. This vector determines the view point + about the origin of this scene. + projection + :class:`plotly.graph_objects.layout.scene.camer + a.Projection` instance or dict with compatible + properties + up + Sets the (x,y,z) components of the 'up' camera + vector. This vector determines the up direction + of this scene with respect to the page. The + default is *{x: 0, y: 0, z: 1}* which means + that the z axis points up. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_domain.py b/packages/python/plotly/plotly/validators/layout/scene/_domain.py new file mode 100644 index 00000000000..822668dee50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="layout.scene", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this scene subplot + . + row + If there is a layout grid, use the domain for + this row in the grid for this scene subplot . + x + Sets the horizontal domain of this scene + subplot (in plot fraction). + y + Sets the vertical domain of this scene subplot + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_dragmode.py b/packages/python/plotly/plotly/validators/layout/scene/_dragmode.py new file mode 100644 index 00000000000..1e970cf27bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_dragmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DragmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="dragmode", parent_name="layout.scene", **kwargs): + super(DragmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["orbit", "turntable", "zoom", "pan", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_hovermode.py b/packages/python/plotly/plotly/validators/layout/scene/_hovermode.py new file mode 100644 index 00000000000..6a794da2485 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_hovermode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="hovermode", parent_name="layout.scene", **kwargs): + super(HovermodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["closest", False]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_uirevision.py b/packages/python/plotly/plotly/validators/layout/scene/_uirevision.py new file mode 100644 index 00000000000..416ca9f5f4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.scene", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_xaxis.py b/packages/python/plotly/plotly/validators/layout/scene/_xaxis.py new file mode 100644 index 00000000000..f5e7fa2a765 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_xaxis.py @@ -0,0 +1,305 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="xaxis", parent_name="layout.scene", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "XAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a + background color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Sets whether or not spikes starting from data + points to this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall + boundaries are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + scene.xaxis.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.scene.xaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.scene.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.xaxis + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.scene.xaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_yaxis.py b/packages/python/plotly/plotly/validators/layout/scene/_yaxis.py new file mode 100644 index 00000000000..565cbdaf106 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_yaxis.py @@ -0,0 +1,305 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="yaxis", parent_name="layout.scene", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "YAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a + background color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Sets whether or not spikes starting from data + points to this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall + boundaries are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + scene.yaxis.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.scene.yaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.scene.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.yaxis + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.scene.yaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/_zaxis.py b/packages/python/plotly/plotly/validators/layout/scene/_zaxis.py new file mode 100644 index 00000000000..5dd40abcfd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/_zaxis.py @@ -0,0 +1,305 @@ +import _plotly_utils.basevalidators + + +class ZaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="zaxis", parent_name="layout.scene", **kwargs): + super(ZaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ZAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + backgroundcolor + Sets the background color of this axis' wall. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + separatethousands + If "true", even 4-digit integers are separated + showaxeslabels + Sets whether or not this axis is labeled + showbackground + Sets whether or not this axis' wall has a + background color. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Sets whether or not spikes starting from data + points to this axis' wall are shown on hover. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + spikecolor + Sets the color of the spikes. + spikesides + Sets whether or not spikes extending from the + projection data points to this axis' wall + boundaries are shown on hover. + spikethickness + Sets the thickness (in px) of the spikes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + scene.zaxis.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.scene.zaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.scene.zaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.scene.zaxis + .Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.scene.zaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/__init__.py index 2cee6650017..b98a7c6f264 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/annotation/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/__init__.py @@ -1,667 +1,86 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="z", parent_name="layout.scene.annotation", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YshiftValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="yshift", parent_name="layout.scene.annotation", **kwargs - ): - super(YshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="layout.scene.annotation", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="y", parent_name="layout.scene.annotation", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XshiftValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xshift", parent_name="layout.scene.annotation", **kwargs - ): - super(XshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="layout.scene.annotation", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="x", parent_name="layout.scene.annotation", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="layout.scene.annotation", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.scene.annotation", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="valign", parent_name="layout.scene.annotation", **kwargs - ): - super(ValignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="textangle", parent_name="layout.scene.annotation", **kwargs - ): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.scene.annotation", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.scene.annotation", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartstandoffValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="startstandoff", - parent_name="layout.scene.annotation", - **kwargs - ): - super(StartstandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartarrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="startarrowsize", - parent_name="layout.scene.annotation", - **kwargs - ): - super(StartarrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0.3), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="startarrowhead", - parent_name="layout.scene.annotation", - **kwargs - ): - super(StartarrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 8), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="standoff", parent_name="layout.scene.annotation", **kwargs - ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowarrowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showarrow", parent_name="layout.scene.annotation", **kwargs - ): - super(ShowarrowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="layout.scene.annotation", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="layout.scene.annotation", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertext", parent_name="layout.scene.annotation", **kwargs - ): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="hoverlabel", parent_name="layout.scene.annotation", **kwargs - ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="height", parent_name="layout.scene.annotation", **kwargs - ): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.scene.annotation", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CaptureeventsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="captureevents", - parent_name="layout.scene.annotation", - **kwargs - ): - super(CaptureeventsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="layout.scene.annotation", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderpad", parent_name="layout.scene.annotation", **kwargs - ): - super(BorderpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="layout.scene.annotation", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.scene.annotation", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ay", parent_name="layout.scene.annotation", **kwargs - ): - super(AyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ax", parent_name="layout.scene.annotation", **kwargs - ): - super(AxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="arrowwidth", parent_name="layout.scene.annotation", **kwargs - ): - super(ArrowwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0.1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="arrowsize", parent_name="layout.scene.annotation", **kwargs - ): - super(ArrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0.3), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowsideValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__( - self, plotly_name="arrowside", parent_name="layout.scene.annotation", **kwargs - ): - super(ArrowsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["end", "start"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="arrowhead", parent_name="layout.scene.annotation", **kwargs - ): - super(ArrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 8), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="arrowcolor", parent_name="layout.scene.annotation", **kwargs - ): - super(ArrowcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="layout.scene.annotation", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._yshift import YshiftValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xshift import XshiftValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valign import ValignValidator + from ._textangle import TextangleValidator + from ._text import TextValidator + from ._templateitemname import TemplateitemnameValidator + from ._startstandoff import StartstandoffValidator + from ._startarrowsize import StartarrowsizeValidator + from ._startarrowhead import StartarrowheadValidator + from ._standoff import StandoffValidator + from ._showarrow import ShowarrowValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._hovertext import HovertextValidator + from ._hoverlabel import HoverlabelValidator + from ._height import HeightValidator + from ._font import FontValidator + from ._captureevents import CaptureeventsValidator + from ._borderwidth import BorderwidthValidator + from ._borderpad import BorderpadValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._ay import AyValidator + from ._ax import AxValidator + from ._arrowwidth import ArrowwidthValidator + from ._arrowsize import ArrowsizeValidator + from ._arrowside import ArrowsideValidator + from ._arrowhead import ArrowheadValidator + from ._arrowcolor import ArrowcolorValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._z.ZValidator", + "._yshift.YshiftValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xshift.XshiftValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valign.ValignValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._templateitemname.TemplateitemnameValidator", + "._startstandoff.StartstandoffValidator", + "._startarrowsize.StartarrowsizeValidator", + "._startarrowhead.StartarrowheadValidator", + "._standoff.StandoffValidator", + "._showarrow.ShowarrowValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._height.HeightValidator", + "._font.FontValidator", + "._captureevents.CaptureeventsValidator", + "._borderwidth.BorderwidthValidator", + "._borderpad.BorderpadValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._ay.AyValidator", + "._ax.AxValidator", + "._arrowwidth.ArrowwidthValidator", + "._arrowsize.ArrowsizeValidator", + "._arrowside.ArrowsideValidator", + "._arrowhead.ArrowheadValidator", + "._arrowcolor.ArrowcolorValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_align.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_align.py new file mode 100644 index 00000000000..ecd52f2ac48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_align.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="layout.scene.annotation", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowcolor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowcolor.py new file mode 100644 index 00000000000..c97b8f7094d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="arrowcolor", parent_name="layout.scene.annotation", **kwargs + ): + super(ArrowcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowhead.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowhead.py new file mode 100644 index 00000000000..32016a9496d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowhead.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ArrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="arrowhead", parent_name="layout.scene.annotation", **kwargs + ): + super(ArrowheadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 8), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowside.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowside.py new file mode 100644 index 00000000000..43564c6467e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowside.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ArrowsideValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__( + self, plotly_name="arrowside", parent_name="layout.scene.annotation", **kwargs + ): + super(ArrowsideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["end", "start"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowsize.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowsize.py new file mode 100644 index 00000000000..1a0a060ddc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowsize.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ArrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="arrowsize", parent_name="layout.scene.annotation", **kwargs + ): + super(ArrowsizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0.3), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowwidth.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowwidth.py new file mode 100644 index 00000000000..e1a2eb7ffa0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_arrowwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ArrowwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="arrowwidth", parent_name="layout.scene.annotation", **kwargs + ): + super(ArrowwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0.1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_ax.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_ax.py new file mode 100644 index 00000000000..f3cb9058afb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_ax.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ax", parent_name="layout.scene.annotation", **kwargs + ): + super(AxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_ay.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_ay.py new file mode 100644 index 00000000000..8a5cb883fc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_ay.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ay", parent_name="layout.scene.annotation", **kwargs + ): + super(AyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_bgcolor.py new file mode 100644 index 00000000000..511b3d4e6ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.scene.annotation", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_bordercolor.py new file mode 100644 index 00000000000..2e6087af1c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="layout.scene.annotation", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_borderpad.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_borderpad.py new file mode 100644 index 00000000000..4c4e4f8e89e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_borderpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderpad", parent_name="layout.scene.annotation", **kwargs + ): + super(BorderpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_borderwidth.py new file mode 100644 index 00000000000..55be712d9e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="layout.scene.annotation", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_captureevents.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_captureevents.py new file mode 100644 index 00000000000..e5389e35534 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_captureevents.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class CaptureeventsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="captureevents", + parent_name="layout.scene.annotation", + **kwargs + ): + super(CaptureeventsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_font.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_font.py new file mode 100644 index 00000000000..8a34e8731f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.scene.annotation", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_height.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_height.py new file mode 100644 index 00000000000..75f2e9a828a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_height.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HeightValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="height", parent_name="layout.scene.annotation", **kwargs + ): + super(HeightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_hoverlabel.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_hoverlabel.py new file mode 100644 index 00000000000..0e73b8b3aab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_hoverlabel.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="hoverlabel", parent_name="layout.scene.annotation", **kwargs + ): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the background color of the hover label. + By default uses the annotation's `bgcolor` made + opaque, or white if it was transparent. + bordercolor + Sets the border color of the hover label. By + default uses either dark grey or white, for + maximum contrast with `hoverlabel.bgcolor`. + font + Sets the hover label text font. By default uses + the global hover font and size, with color from + `hoverlabel.bordercolor`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_hovertext.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_hovertext.py new file mode 100644 index 00000000000..d93f48588d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_hovertext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertext", parent_name="layout.scene.annotation", **kwargs + ): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_name.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_name.py new file mode 100644 index 00000000000..4604f3e8f91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="layout.scene.annotation", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_opacity.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_opacity.py new file mode 100644 index 00000000000..d2320dba483 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="layout.scene.annotation", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_showarrow.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_showarrow.py new file mode 100644 index 00000000000..4b713394ef0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_showarrow.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowarrowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showarrow", parent_name="layout.scene.annotation", **kwargs + ): + super(ShowarrowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_standoff.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_standoff.py new file mode 100644 index 00000000000..77b5c5ca9c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_standoff.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="standoff", parent_name="layout.scene.annotation", **kwargs + ): + super(StandoffValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_startarrowhead.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_startarrowhead.py new file mode 100644 index 00000000000..a0708909307 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_startarrowhead.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="startarrowhead", + parent_name="layout.scene.annotation", + **kwargs + ): + super(StartarrowheadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 8), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_startarrowsize.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_startarrowsize.py new file mode 100644 index 00000000000..3bbe58059b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_startarrowsize.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class StartarrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="startarrowsize", + parent_name="layout.scene.annotation", + **kwargs + ): + super(StartarrowsizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0.3), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_startstandoff.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_startstandoff.py new file mode 100644 index 00000000000..23e565c60cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_startstandoff.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class StartstandoffValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="startstandoff", + parent_name="layout.scene.annotation", + **kwargs + ): + super(StartstandoffValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_templateitemname.py new file mode 100644 index 00000000000..f0f9331f040 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.scene.annotation", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_text.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_text.py new file mode 100644 index 00000000000..bf91c0c28af --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.scene.annotation", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_textangle.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_textangle.py new file mode 100644 index 00000000000..26a29b56960 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_textangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="textangle", parent_name="layout.scene.annotation", **kwargs + ): + super(TextangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_valign.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_valign.py new file mode 100644 index 00000000000..64a044d4d2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_valign.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="valign", parent_name="layout.scene.annotation", **kwargs + ): + super(ValignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_visible.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_visible.py new file mode 100644 index 00000000000..078b08361a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.scene.annotation", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_width.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_width.py new file mode 100644 index 00000000000..18aade253a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="layout.scene.annotation", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_x.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_x.py new file mode 100644 index 00000000000..42211d65188 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="x", parent_name="layout.scene.annotation", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_xanchor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_xanchor.py new file mode 100644 index 00000000000..1315ef238b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="layout.scene.annotation", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_xshift.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_xshift.py new file mode 100644 index 00000000000..e8437c728ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_xshift.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XshiftValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xshift", parent_name="layout.scene.annotation", **kwargs + ): + super(XshiftValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_y.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_y.py new file mode 100644 index 00000000000..87ae250b25d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="y", parent_name="layout.scene.annotation", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_yanchor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_yanchor.py new file mode 100644 index 00000000000..9d4a89a5554 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="layout.scene.annotation", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_yshift.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_yshift.py new file mode 100644 index 00000000000..78513a3919f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_yshift.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YshiftValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="yshift", parent_name="layout.scene.annotation", **kwargs + ): + super(YshiftValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/_z.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/_z.py new file mode 100644 index 00000000000..e75ad9e069d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="z", parent_name="layout.scene.annotation", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/font/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/__init__.py index dff38b559dd..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/annotation/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.annotation.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.scene.annotation.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.annotation.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_color.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_color.py new file mode 100644 index 00000000000..94525a17546 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.annotation.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_family.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_family.py new file mode 100644 index 00000000000..cd8c5a62ecc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.scene.annotation.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_size.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_size.py new file mode 100644 index 00000000000..2adf65ee587 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.annotation.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py index 9235a15215d..3ab9188d96d 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py @@ -1,80 +1,18 @@ -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="layout.scene.annotation.hoverlabel", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="layout.scene.annotation.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="layout.scene.annotation.hoverlabel", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._font import FontValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._font.FontValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..a54b38507c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="layout.scene.annotation.hoverlabel", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..d9b9299c7f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="layout.scene.annotation.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_font.py new file mode 100644 index 00000000000..218ab77f2a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="layout.scene.annotation.hoverlabel", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py index b99c2269eef..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.scene.annotation.hoverlabel.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.scene.annotation.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.scene.annotation.hoverlabel.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py new file mode 100644 index 00000000000..b740fc67490 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.scene.annotation.hoverlabel.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py new file mode 100644 index 00000000000..00bfbe40eb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.scene.annotation.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py new file mode 100644 index 00000000000..1c705458092 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.scene.annotation.hoverlabel.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/aspectratio/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/__init__.py index 4613fa56c5a..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/aspectratio/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/__init__.py @@ -1,52 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="z", parent_name="layout.scene.aspectratio", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="layout.scene.aspectratio", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="layout.scene.aspectratio", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_x.py b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_x.py new file mode 100644 index 00000000000..e27415a6883 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="layout.scene.aspectratio", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_y.py b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_y.py new file mode 100644 index 00000000000..def8213db31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="layout.scene.aspectratio", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_z.py b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_z.py new file mode 100644 index 00000000000..31b812274fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/aspectratio/_z.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="z", parent_name="layout.scene.aspectratio", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/camera/__init__.py index 391109a3d51..60c22a58546 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/camera/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/__init__.py @@ -1,96 +1,20 @@ -import _plotly_utils.basevalidators - - -class UpValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="up", parent_name="layout.scene.camera", **kwargs): - super(UpValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Up"), - data_docs=kwargs.pop( - "data_docs", - """ - x - - y - - z - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="projection", parent_name="layout.scene.camera", **kwargs - ): - super(ProjectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Projection"), - data_docs=kwargs.pop( - "data_docs", - """ - type - Sets the projection type. The projection type - could be either "perspective" or - "orthographic". The default is "perspective". -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EyeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="eye", parent_name="layout.scene.camera", **kwargs): - super(EyeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Eye"), - data_docs=kwargs.pop( - "data_docs", - """ - x - - y - - z - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="center", parent_name="layout.scene.camera", **kwargs - ): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Center"), - data_docs=kwargs.pop( - "data_docs", - """ - x - - y - - z - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._up import UpValidator + from ._projection import ProjectionValidator + from ._eye import EyeValidator + from ._center import CenterValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._up.UpValidator", + "._projection.ProjectionValidator", + "._eye.EyeValidator", + "._center.CenterValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/_center.py b/packages/python/plotly/plotly/validators/layout/scene/camera/_center.py new file mode 100644 index 00000000000..2eedfa4fd1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/_center.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="center", parent_name="layout.scene.camera", **kwargs + ): + super(CenterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Center"), + data_docs=kwargs.pop( + "data_docs", + """ + x + + y + + z + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/_eye.py b/packages/python/plotly/plotly/validators/layout/scene/camera/_eye.py new file mode 100644 index 00000000000..881116c4193 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/_eye.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class EyeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="eye", parent_name="layout.scene.camera", **kwargs): + super(EyeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Eye"), + data_docs=kwargs.pop( + "data_docs", + """ + x + + y + + z + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/_projection.py b/packages/python/plotly/plotly/validators/layout/scene/camera/_projection.py new file mode 100644 index 00000000000..a926053732c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/_projection.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="projection", parent_name="layout.scene.camera", **kwargs + ): + super(ProjectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Projection"), + data_docs=kwargs.pop( + "data_docs", + """ + type + Sets the projection type. The projection type + could be either "perspective" or + "orthographic". The default is "perspective". +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/_up.py b/packages/python/plotly/plotly/validators/layout/scene/camera/_up.py new file mode 100644 index 00000000000..90805189936 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/_up.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class UpValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="up", parent_name="layout.scene.camera", **kwargs): + super(UpValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Up"), + data_docs=kwargs.pop( + "data_docs", + """ + x + + y + + z + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/center/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/camera/center/__init__.py index 5df5a81a121..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/camera/center/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/center/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="z", parent_name="layout.scene.camera.center", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="layout.scene.camera.center", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="layout.scene.camera.center", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/center/_x.py b/packages/python/plotly/plotly/validators/layout/scene/camera/center/_x.py new file mode 100644 index 00000000000..15de27ef3d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/center/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="layout.scene.camera.center", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/center/_y.py b/packages/python/plotly/plotly/validators/layout/scene/camera/center/_y.py new file mode 100644 index 00000000000..f6556c15252 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/center/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="layout.scene.camera.center", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/center/_z.py b/packages/python/plotly/plotly/validators/layout/scene/camera/center/_z.py new file mode 100644 index 00000000000..bf5d069f36f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/center/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="z", parent_name="layout.scene.camera.center", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/eye/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/__init__.py index 5d96506b95f..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/camera/eye/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="z", parent_name="layout.scene.camera.eye", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="layout.scene.camera.eye", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="layout.scene.camera.eye", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_x.py b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_x.py new file mode 100644 index 00000000000..a305e9e3ddc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="layout.scene.camera.eye", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_y.py b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_y.py new file mode 100644 index 00000000000..6eea7610190 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="layout.scene.camera.eye", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_z.py b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_z.py new file mode 100644 index 00000000000..902421d13a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/eye/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="z", parent_name="layout.scene.camera.eye", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/projection/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/camera/projection/__init__.py index 6ec9cee5825..57955f24d41 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/camera/projection/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/projection/__init__.py @@ -1,15 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._type import TypeValidator +else: + from _plotly_utils.importers import relative_import -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="layout.scene.camera.projection", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["perspective", "orthographic"]), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._type.TypeValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/projection/_type.py b/packages/python/plotly/plotly/validators/layout/scene/camera/projection/_type.py new file mode 100644 index 00000000000..6ec9cee5825 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/projection/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="layout.scene.camera.projection", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["perspective", "orthographic"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/up/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/camera/up/__init__.py index 05c3b4bd865..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/camera/up/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/up/__init__.py @@ -1,40 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="z", parent_name="layout.scene.camera.up", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="layout.scene.camera.up", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="layout.scene.camera.up", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "camera"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/up/_x.py b/packages/python/plotly/plotly/validators/layout/scene/camera/up/_x.py new file mode 100644 index 00000000000..5a5b79998ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/up/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="layout.scene.camera.up", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/up/_y.py b/packages/python/plotly/plotly/validators/layout/scene/camera/up/_y.py new file mode 100644 index 00000000000..90ea8a39a4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/up/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="layout.scene.camera.up", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/camera/up/_z.py b/packages/python/plotly/plotly/validators/layout/scene/camera/up/_z.py new file mode 100644 index 00000000000..79d8767d06e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/camera/up/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="z", parent_name="layout.scene.camera.up", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "camera"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/domain/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/domain/__init__.py index 1a750c6a8f1..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/domain/__init__.py @@ -1,72 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="layout.scene.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="layout.scene.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="layout.scene.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="column", parent_name="layout.scene.domain", **kwargs - ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/domain/_column.py b/packages/python/plotly/plotly/validators/layout/scene/domain/_column.py new file mode 100644 index 00000000000..d644e3ed1fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/domain/_column.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="column", parent_name="layout.scene.domain", **kwargs + ): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/domain/_row.py b/packages/python/plotly/plotly/validators/layout/scene/domain/_row.py new file mode 100644 index 00000000000..d6c75d72fb3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="layout.scene.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/domain/_x.py b/packages/python/plotly/plotly/validators/layout/scene/domain/_x.py new file mode 100644 index 00000000000..2fea157b395 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="layout.scene.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/domain/_y.py b/packages/python/plotly/plotly/validators/layout/scene/domain/_y.py new file mode 100644 index 00000000000..a41a979913c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="layout.scene.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/__init__.py index bd8b14658de..6c1f783082c 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/xaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/__init__.py @@ -1,1013 +1,120 @@ -import _plotly_utils.basevalidators - - -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="zerolinewidth", parent_name="layout.scene.xaxis", **kwargs - ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="zerolinecolor", parent_name="layout.scene.xaxis", **kwargs - ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="zeroline", parent_name="layout.scene.xaxis", **kwargs - ): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.scene.xaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.scene.xaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout.scene.xaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.scene.xaxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.scene.xaxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.scene.xaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="layout.scene.xaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.scene.xaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.scene.xaxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.scene.xaxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.scene.xaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="spikethickness", parent_name="layout.scene.xaxis", **kwargs - ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="spikesides", parent_name="layout.scene.xaxis", **kwargs - ): - super(SpikesidesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="spikecolor", parent_name="layout.scene.xaxis", **kwargs - ): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showspikes", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showbackground", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowbackgroundValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showaxeslabels", parent_name="layout.scene.xaxis", **kwargs - ): - super(ShowaxeslabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.scene.xaxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="rangemode", parent_name="layout.scene.xaxis", **kwargs - ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.scene.xaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", False), - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.scene.xaxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="mirror", parent_name="layout.scene.xaxis", **kwargs - ): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.scene.xaxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.scene.xaxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.scene.xaxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.scene.xaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.scene.xaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.scene.xaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.scene.xaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.scene.xaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="layout.scene.xaxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="layout.scene.xaxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="layout.scene.xaxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="calendar", parent_name="layout.scene.xaxis", **kwargs - ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="backgroundcolor", parent_name="layout.scene.xaxis", **kwargs - ): - super(BackgroundcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="autorange", parent_name="layout.scene.xaxis", **kwargs - ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zerolinewidth import ZerolinewidthValidator + from ._zerolinecolor import ZerolinecolorValidator + from ._zeroline import ZerolineValidator + from ._visible import VisibleValidator + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._spikethickness import SpikethicknessValidator + from ._spikesides import SpikesidesValidator + from ._spikecolor import SpikecolorValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showspikes import ShowspikesValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._showbackground import ShowbackgroundValidator + from ._showaxeslabels import ShowaxeslabelsValidator + from ._separatethousands import SeparatethousandsValidator + from ._rangemode import RangemodeValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._mirror import MirrorValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._calendar import CalendarValidator + from ._backgroundcolor import BackgroundcolorValidator + from ._autorange import AutorangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesides.SpikesidesValidator", + "._spikecolor.SpikecolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showbackground.ShowbackgroundValidator", + "._showaxeslabels.ShowaxeslabelsValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._backgroundcolor.BackgroundcolorValidator", + "._autorange.AutorangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_autorange.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_autorange.py new file mode 100644 index 00000000000..da002cb8035 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_autorange.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="autorange", parent_name="layout.scene.xaxis", **kwargs + ): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_backgroundcolor.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_backgroundcolor.py new file mode 100644 index 00000000000..86805110082 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_backgroundcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="backgroundcolor", parent_name="layout.scene.xaxis", **kwargs + ): + super(BackgroundcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_calendar.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_calendar.py new file mode 100644 index 00000000000..e355a75e121 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_calendar.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="calendar", parent_name="layout.scene.xaxis", **kwargs + ): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryarray.py new file mode 100644 index 00000000000..bfc7bdaa078 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="layout.scene.xaxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..d9c8c97e22c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="layout.scene.xaxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryorder.py new file mode 100644 index 00000000000..8c3bd79a641 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_categoryorder.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="layout.scene.xaxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_color.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_color.py new file mode 100644 index 00000000000..502b9e8be22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.scene.xaxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_dtick.py new file mode 100644 index 00000000000..ed7cbcd2f64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.scene.xaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_exponentformat.py new file mode 100644 index 00000000000..bdc2cab6cf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.scene.xaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_gridcolor.py new file mode 100644 index 00000000000..876fab72346 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.scene.xaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_gridwidth.py new file mode 100644 index 00000000000..a61a9c21801 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.scene.xaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_hoverformat.py new file mode 100644 index 00000000000..52c656ffec0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.scene.xaxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linecolor.py new file mode 100644 index 00000000000..ecf004af6ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.scene.xaxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linewidth.py new file mode 100644 index 00000000000..7db2b8a3083 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.scene.xaxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_mirror.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_mirror.py new file mode 100644 index 00000000000..5c4269f7b8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_mirror.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="mirror", parent_name="layout.scene.xaxis", **kwargs + ): + super(MirrorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_nticks.py new file mode 100644 index 00000000000..e944224b634 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.scene.xaxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_range.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_range.py new file mode 100644 index 00000000000..b223a06aa3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_range.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.scene.xaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", False), + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_rangemode.py new file mode 100644 index 00000000000..c6d159d12be --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_rangemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="rangemode", parent_name="layout.scene.xaxis", **kwargs + ): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_separatethousands.py new file mode 100644 index 00000000000..5f1f1ea0273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.scene.xaxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showaxeslabels.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showaxeslabels.py new file mode 100644 index 00000000000..bbdedb8ca31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showaxeslabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showaxeslabels", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowaxeslabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showbackground.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showbackground.py new file mode 100644 index 00000000000..b4d02ed9154 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showbackground.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showbackground", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowbackgroundValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showexponent.py new file mode 100644 index 00000000000..ec7476490e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showgrid.py new file mode 100644 index 00000000000..0db2ed95ff7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showline.py new file mode 100644 index 00000000000..48e427cc30b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showspikes.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showspikes.py new file mode 100644 index 00000000000..b78aacfd510 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showspikes.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showspikes", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowspikesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showticklabels.py new file mode 100644 index 00000000000..a855ffdc372 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showtickprefix.py new file mode 100644 index 00000000000..0419b00d42c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showticksuffix.py new file mode 100644 index 00000000000..7f4d8a9c093 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.scene.xaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikecolor.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikecolor.py new file mode 100644 index 00000000000..c231a324a3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="spikecolor", parent_name="layout.scene.xaxis", **kwargs + ): + super(SpikecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikesides.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikesides.py new file mode 100644 index 00000000000..c8eaa89c9dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikesides.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="spikesides", parent_name="layout.scene.xaxis", **kwargs + ): + super(SpikesidesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikethickness.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikethickness.py new file mode 100644 index 00000000000..36aa0d82b33 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_spikethickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="spikethickness", parent_name="layout.scene.xaxis", **kwargs + ): + super(SpikethicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tick0.py new file mode 100644 index 00000000000..fcc03c179a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.scene.xaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickangle.py new file mode 100644 index 00000000000..0b0f08b9685 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickcolor.py new file mode 100644 index 00000000000..adff797319e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickfont.py new file mode 100644 index 00000000000..72c46b25a2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformat.py new file mode 100644 index 00000000000..903b63eb0ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..edd302e2a27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.scene.xaxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformatstops.py new file mode 100644 index 00000000000..84ca36ab481 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticklen.py new file mode 100644 index 00000000000..10b3087d8f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.scene.xaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickmode.py new file mode 100644 index 00000000000..64e492c2e12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickprefix.py new file mode 100644 index 00000000000..cf8ef68d8fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticks.py new file mode 100644 index 00000000000..fea57fec7f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="layout.scene.xaxis", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticksuffix.py new file mode 100644 index 00000000000..95263541caf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.scene.xaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticktext.py new file mode 100644 index 00000000000..b37cc326a23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.scene.xaxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticktextsrc.py new file mode 100644 index 00000000000..bc9554ce273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.scene.xaxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvals.py new file mode 100644 index 00000000000..08e61f99afe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvalssrc.py new file mode 100644 index 00000000000..0eb5a84597f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickwidth.py new file mode 100644 index 00000000000..88295189f9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.scene.xaxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_title.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_title.py new file mode 100644 index 00000000000..4186e52fb3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_title.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout.scene.xaxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_type.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_type.py new file mode 100644 index 00000000000..c65d6ed4677 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.scene.xaxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_visible.py new file mode 100644 index 00000000000..116f59cf4e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.scene.xaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zeroline.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zeroline.py new file mode 100644 index 00000000000..142f21e0c5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zeroline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="zeroline", parent_name="layout.scene.xaxis", **kwargs + ): + super(ZerolineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zerolinecolor.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zerolinecolor.py new file mode 100644 index 00000000000..34af021c07c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zerolinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="zerolinecolor", parent_name="layout.scene.xaxis", **kwargs + ): + super(ZerolinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zerolinewidth.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zerolinewidth.py new file mode 100644 index 00000000000..69ae36a3c2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/_zerolinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="zerolinewidth", parent_name="layout.scene.xaxis", **kwargs + ): + super(ZerolinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/__init__.py index 20a92be5837..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.xaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.scene.xaxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.xaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_color.py new file mode 100644 index 00000000000..fad3a93f14d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.xaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_family.py new file mode 100644 index 00000000000..76b9e193e0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.scene.xaxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_size.py new file mode 100644 index 00000000000..638bc0eedd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.xaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py index 447caaf3ed9..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.scene.xaxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.scene.xaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.scene.xaxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.scene.xaxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.scene.xaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..dfc8d2952f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.scene.xaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..13a5aed5dff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.scene.xaxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..c3b1cee6955 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.scene.xaxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..5f263fd0a9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.scene.xaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..29513672887 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.scene.xaxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/__init__.py index 58120c03209..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.scene.xaxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.scene.xaxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/_font.py new file mode 100644 index 00000000000..22ebf772d0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.scene.xaxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/_text.py new file mode 100644 index 00000000000..33e9ad0a2b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.scene.xaxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/__init__.py index 11fb2e097c3..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.xaxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.scene.xaxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.xaxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_color.py new file mode 100644 index 00000000000..4c2a1afee4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.xaxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_family.py new file mode 100644 index 00000000000..7c8007d5668 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.scene.xaxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_size.py new file mode 100644 index 00000000000..d2d8adf3e14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.xaxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/__init__.py index c592ea4b257..6c1f783082c 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/yaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/__init__.py @@ -1,1013 +1,120 @@ -import _plotly_utils.basevalidators - - -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="zerolinewidth", parent_name="layout.scene.yaxis", **kwargs - ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="zerolinecolor", parent_name="layout.scene.yaxis", **kwargs - ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="zeroline", parent_name="layout.scene.yaxis", **kwargs - ): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.scene.yaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.scene.yaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout.scene.yaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.scene.yaxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.scene.yaxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.scene.yaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="layout.scene.yaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.scene.yaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.scene.yaxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.scene.yaxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.scene.yaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="spikethickness", parent_name="layout.scene.yaxis", **kwargs - ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="spikesides", parent_name="layout.scene.yaxis", **kwargs - ): - super(SpikesidesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="spikecolor", parent_name="layout.scene.yaxis", **kwargs - ): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showspikes", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showbackground", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowbackgroundValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showaxeslabels", parent_name="layout.scene.yaxis", **kwargs - ): - super(ShowaxeslabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.scene.yaxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="rangemode", parent_name="layout.scene.yaxis", **kwargs - ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.scene.yaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", False), - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.scene.yaxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="mirror", parent_name="layout.scene.yaxis", **kwargs - ): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.scene.yaxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.scene.yaxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.scene.yaxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.scene.yaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.scene.yaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.scene.yaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.scene.yaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.scene.yaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="layout.scene.yaxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="layout.scene.yaxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="layout.scene.yaxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="calendar", parent_name="layout.scene.yaxis", **kwargs - ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="backgroundcolor", parent_name="layout.scene.yaxis", **kwargs - ): - super(BackgroundcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="autorange", parent_name="layout.scene.yaxis", **kwargs - ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zerolinewidth import ZerolinewidthValidator + from ._zerolinecolor import ZerolinecolorValidator + from ._zeroline import ZerolineValidator + from ._visible import VisibleValidator + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._spikethickness import SpikethicknessValidator + from ._spikesides import SpikesidesValidator + from ._spikecolor import SpikecolorValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showspikes import ShowspikesValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._showbackground import ShowbackgroundValidator + from ._showaxeslabels import ShowaxeslabelsValidator + from ._separatethousands import SeparatethousandsValidator + from ._rangemode import RangemodeValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._mirror import MirrorValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._calendar import CalendarValidator + from ._backgroundcolor import BackgroundcolorValidator + from ._autorange import AutorangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesides.SpikesidesValidator", + "._spikecolor.SpikecolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showbackground.ShowbackgroundValidator", + "._showaxeslabels.ShowaxeslabelsValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._backgroundcolor.BackgroundcolorValidator", + "._autorange.AutorangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_autorange.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_autorange.py new file mode 100644 index 00000000000..cab29f40540 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_autorange.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="autorange", parent_name="layout.scene.yaxis", **kwargs + ): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_backgroundcolor.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_backgroundcolor.py new file mode 100644 index 00000000000..321cf4e4995 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_backgroundcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="backgroundcolor", parent_name="layout.scene.yaxis", **kwargs + ): + super(BackgroundcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_calendar.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_calendar.py new file mode 100644 index 00000000000..f2fc1d7d61d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_calendar.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="calendar", parent_name="layout.scene.yaxis", **kwargs + ): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryarray.py new file mode 100644 index 00000000000..2ced199e2f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="layout.scene.yaxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..d8b935d65c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="layout.scene.yaxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryorder.py new file mode 100644 index 00000000000..f402f76100d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_categoryorder.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="layout.scene.yaxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_color.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_color.py new file mode 100644 index 00000000000..2c3ea608e5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.scene.yaxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_dtick.py new file mode 100644 index 00000000000..37c9c3a3ba1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.scene.yaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_exponentformat.py new file mode 100644 index 00000000000..14f5672c6a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.scene.yaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_gridcolor.py new file mode 100644 index 00000000000..caab1c789d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.scene.yaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_gridwidth.py new file mode 100644 index 00000000000..8d319872987 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.scene.yaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_hoverformat.py new file mode 100644 index 00000000000..1e065c779bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.scene.yaxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_linecolor.py new file mode 100644 index 00000000000..a08a2df324a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.scene.yaxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_linewidth.py new file mode 100644 index 00000000000..c8af55b77f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.scene.yaxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_mirror.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_mirror.py new file mode 100644 index 00000000000..c41e3669578 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_mirror.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="mirror", parent_name="layout.scene.yaxis", **kwargs + ): + super(MirrorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_nticks.py new file mode 100644 index 00000000000..1878094f882 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.scene.yaxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_range.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_range.py new file mode 100644 index 00000000000..6fbf1b93b65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_range.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.scene.yaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", False), + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_rangemode.py new file mode 100644 index 00000000000..6268f7dbebe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_rangemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="rangemode", parent_name="layout.scene.yaxis", **kwargs + ): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_separatethousands.py new file mode 100644 index 00000000000..6678ebc08c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.scene.yaxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showaxeslabels.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showaxeslabels.py new file mode 100644 index 00000000000..906fe18d21d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showaxeslabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showaxeslabels", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowaxeslabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showbackground.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showbackground.py new file mode 100644 index 00000000000..61b8a15ec19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showbackground.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showbackground", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowbackgroundValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showexponent.py new file mode 100644 index 00000000000..8561a85882a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showgrid.py new file mode 100644 index 00000000000..b3bf5c0eee6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showline.py new file mode 100644 index 00000000000..b6e8f3428b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showspikes.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showspikes.py new file mode 100644 index 00000000000..aa2e8c97b05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showspikes.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showspikes", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowspikesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showticklabels.py new file mode 100644 index 00000000000..52be8d88015 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showtickprefix.py new file mode 100644 index 00000000000..61027a192f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showticksuffix.py new file mode 100644 index 00000000000..9a71a15edb2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.scene.yaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikecolor.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikecolor.py new file mode 100644 index 00000000000..6f4702e16f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="spikecolor", parent_name="layout.scene.yaxis", **kwargs + ): + super(SpikecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikesides.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikesides.py new file mode 100644 index 00000000000..091dc874128 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikesides.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="spikesides", parent_name="layout.scene.yaxis", **kwargs + ): + super(SpikesidesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikethickness.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikethickness.py new file mode 100644 index 00000000000..27f128bf3a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_spikethickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="spikethickness", parent_name="layout.scene.yaxis", **kwargs + ): + super(SpikethicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tick0.py new file mode 100644 index 00000000000..e8e5c0dde22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.scene.yaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickangle.py new file mode 100644 index 00000000000..633d14155ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickcolor.py new file mode 100644 index 00000000000..44fc16bb922 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickfont.py new file mode 100644 index 00000000000..e6dd545381b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformat.py new file mode 100644 index 00000000000..129a24f87a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..c35b7377f4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.scene.yaxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformatstops.py new file mode 100644 index 00000000000..04ac6fc1c6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticklen.py new file mode 100644 index 00000000000..5034f839bd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.scene.yaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickmode.py new file mode 100644 index 00000000000..788d6168964 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickprefix.py new file mode 100644 index 00000000000..d15d8657e89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticks.py new file mode 100644 index 00000000000..ab4cafbea59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="layout.scene.yaxis", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticksuffix.py new file mode 100644 index 00000000000..f45d3ee25ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.scene.yaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticktext.py new file mode 100644 index 00000000000..7de279498cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.scene.yaxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticktextsrc.py new file mode 100644 index 00000000000..fbfb7f2fd39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.scene.yaxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickvals.py new file mode 100644 index 00000000000..a7baaf6ad5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickvalssrc.py new file mode 100644 index 00000000000..94d703a11e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickwidth.py new file mode 100644 index 00000000000..ae198e44fbb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.scene.yaxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_title.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_title.py new file mode 100644 index 00000000000..812844c9c60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_title.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout.scene.yaxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_type.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_type.py new file mode 100644 index 00000000000..6a2b0256e81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.scene.yaxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_visible.py new file mode 100644 index 00000000000..e4a42bb6ce4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.scene.yaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zeroline.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zeroline.py new file mode 100644 index 00000000000..3a0d19ff73c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zeroline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="zeroline", parent_name="layout.scene.yaxis", **kwargs + ): + super(ZerolineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zerolinecolor.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zerolinecolor.py new file mode 100644 index 00000000000..d0e6cc93996 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zerolinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="zerolinecolor", parent_name="layout.scene.yaxis", **kwargs + ): + super(ZerolinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zerolinewidth.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zerolinewidth.py new file mode 100644 index 00000000000..f923edc8e5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/_zerolinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="zerolinewidth", parent_name="layout.scene.yaxis", **kwargs + ): + super(ZerolinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/__init__.py index 64d4ce093f6..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.yaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.scene.yaxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.yaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_color.py new file mode 100644 index 00000000000..c47a34fef7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.yaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_family.py new file mode 100644 index 00000000000..fa99bc7a58e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.scene.yaxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_size.py new file mode 100644 index 00000000000..99ed9bf6bcb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.yaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py index 954787f5cba..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.scene.yaxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.scene.yaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.scene.yaxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.scene.yaxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.scene.yaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..3588faf2d83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.scene.yaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..1ad5533d23d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.scene.yaxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..a89893db995 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.scene.yaxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..201b6cd019c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.scene.yaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..07dea218062 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.scene.yaxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/__init__.py index 6b9285c8c85..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.scene.yaxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.scene.yaxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/_font.py new file mode 100644 index 00000000000..db6bfd24491 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.scene.yaxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/_text.py new file mode 100644 index 00000000000..db547f6b3f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.scene.yaxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/__init__.py index af6859c151a..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.yaxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.scene.yaxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.yaxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_color.py new file mode 100644 index 00000000000..bbc34e0a370 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.yaxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_family.py new file mode 100644 index 00000000000..41d2d205142 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.scene.yaxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_size.py new file mode 100644 index 00000000000..ba282f87cc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.yaxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/__init__.py index 805d659428e..6c1f783082c 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/zaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/__init__.py @@ -1,1013 +1,120 @@ -import _plotly_utils.basevalidators - - -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="zerolinewidth", parent_name="layout.scene.zaxis", **kwargs - ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="zerolinecolor", parent_name="layout.scene.zaxis", **kwargs - ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="zeroline", parent_name="layout.scene.zaxis", **kwargs - ): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.scene.zaxis", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.scene.zaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout.scene.zaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.scene.zaxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.scene.zaxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.scene.zaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="layout.scene.zaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.scene.zaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.scene.zaxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.scene.zaxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.scene.zaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="spikethickness", parent_name="layout.scene.zaxis", **kwargs - ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="spikesides", parent_name="layout.scene.zaxis", **kwargs - ): - super(SpikesidesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="spikecolor", parent_name="layout.scene.zaxis", **kwargs - ): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showspikes", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showbackground", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowbackgroundValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showaxeslabels", parent_name="layout.scene.zaxis", **kwargs - ): - super(ShowaxeslabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.scene.zaxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="rangemode", parent_name="layout.scene.zaxis", **kwargs - ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.scene.zaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", False), - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - { - "valType": "any", - "editType": "plot", - "impliedEdits": {"^autorange": False}, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.scene.zaxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="mirror", parent_name="layout.scene.zaxis", **kwargs - ): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.scene.zaxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.scene.zaxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.scene.zaxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.scene.zaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.scene.zaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.scene.zaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.scene.zaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.scene.zaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="layout.scene.zaxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="layout.scene.zaxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="layout.scene.zaxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="calendar", parent_name="layout.scene.zaxis", **kwargs - ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="backgroundcolor", parent_name="layout.scene.zaxis", **kwargs - ): - super(BackgroundcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="autorange", parent_name="layout.scene.zaxis", **kwargs - ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zerolinewidth import ZerolinewidthValidator + from ._zerolinecolor import ZerolinecolorValidator + from ._zeroline import ZerolineValidator + from ._visible import VisibleValidator + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._spikethickness import SpikethicknessValidator + from ._spikesides import SpikesidesValidator + from ._spikecolor import SpikecolorValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showspikes import ShowspikesValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._showbackground import ShowbackgroundValidator + from ._showaxeslabels import ShowaxeslabelsValidator + from ._separatethousands import SeparatethousandsValidator + from ._rangemode import RangemodeValidator + from ._range import RangeValidator + from ._nticks import NticksValidator + from ._mirror import MirrorValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._calendar import CalendarValidator + from ._backgroundcolor import BackgroundcolorValidator + from ._autorange import AutorangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesides.SpikesidesValidator", + "._spikecolor.SpikecolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showbackground.ShowbackgroundValidator", + "._showaxeslabels.ShowaxeslabelsValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._backgroundcolor.BackgroundcolorValidator", + "._autorange.AutorangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_autorange.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_autorange.py new file mode 100644 index 00000000000..838cb921071 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_autorange.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="autorange", parent_name="layout.scene.zaxis", **kwargs + ): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_backgroundcolor.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_backgroundcolor.py new file mode 100644 index 00000000000..7b3c72e2f59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_backgroundcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="backgroundcolor", parent_name="layout.scene.zaxis", **kwargs + ): + super(BackgroundcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_calendar.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_calendar.py new file mode 100644 index 00000000000..5a28c837408 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_calendar.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="calendar", parent_name="layout.scene.zaxis", **kwargs + ): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarray.py new file mode 100644 index 00000000000..f091ad1fc25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="layout.scene.zaxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..a11192fa845 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="layout.scene.zaxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryorder.py new file mode 100644 index 00000000000..136dae55173 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryorder.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="layout.scene.zaxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_color.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_color.py new file mode 100644 index 00000000000..a655b8c3c98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.scene.zaxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_dtick.py new file mode 100644 index 00000000000..f456a7bf5e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.scene.zaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_exponentformat.py new file mode 100644 index 00000000000..5b4669a018b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.scene.zaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_gridcolor.py new file mode 100644 index 00000000000..0941bdcb6da --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.scene.zaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_gridwidth.py new file mode 100644 index 00000000000..da37cc464a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.scene.zaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_hoverformat.py new file mode 100644 index 00000000000..582c6072e77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.scene.zaxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_linecolor.py new file mode 100644 index 00000000000..1d38fd5bb99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.scene.zaxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_linewidth.py new file mode 100644 index 00000000000..14f38765bad --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.scene.zaxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_mirror.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_mirror.py new file mode 100644 index 00000000000..9ee03e6d778 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_mirror.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="mirror", parent_name="layout.scene.zaxis", **kwargs + ): + super(MirrorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_nticks.py new file mode 100644 index 00000000000..7538b0e6121 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.scene.zaxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_range.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_range.py new file mode 100644 index 00000000000..81c4b6bd791 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_range.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.scene.zaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", False), + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + { + "valType": "any", + "editType": "plot", + "impliedEdits": {"^autorange": False}, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_rangemode.py new file mode 100644 index 00000000000..58f65fd4b14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_rangemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="rangemode", parent_name="layout.scene.zaxis", **kwargs + ): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_separatethousands.py new file mode 100644 index 00000000000..d8cf84b78d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.scene.zaxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showaxeslabels.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showaxeslabels.py new file mode 100644 index 00000000000..64cbf74b3e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showaxeslabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showaxeslabels", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowaxeslabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showbackground.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showbackground.py new file mode 100644 index 00000000000..2b5271927e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showbackground.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showbackground", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowbackgroundValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showexponent.py new file mode 100644 index 00000000000..dbdbcc49f3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showgrid.py new file mode 100644 index 00000000000..de357fb775e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showline.py new file mode 100644 index 00000000000..77bed435f97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showspikes.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showspikes.py new file mode 100644 index 00000000000..2220f520c7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showspikes.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showspikes", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowspikesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showticklabels.py new file mode 100644 index 00000000000..94968a0b451 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showtickprefix.py new file mode 100644 index 00000000000..b9178c3fafa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showticksuffix.py new file mode 100644 index 00000000000..43cf57b850b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.scene.zaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikecolor.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikecolor.py new file mode 100644 index 00000000000..921fdeef7b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="spikecolor", parent_name="layout.scene.zaxis", **kwargs + ): + super(SpikecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikesides.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikesides.py new file mode 100644 index 00000000000..0e665197496 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikesides.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="spikesides", parent_name="layout.scene.zaxis", **kwargs + ): + super(SpikesidesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikethickness.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikethickness.py new file mode 100644 index 00000000000..f0142f37f1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_spikethickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="spikethickness", parent_name="layout.scene.zaxis", **kwargs + ): + super(SpikethicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tick0.py new file mode 100644 index 00000000000..a67b54b5a49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.scene.zaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickangle.py new file mode 100644 index 00000000000..20f5507b82d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickcolor.py new file mode 100644 index 00000000000..1e979659a0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickfont.py new file mode 100644 index 00000000000..9f6097582c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformat.py new file mode 100644 index 00000000000..b3d766fe09d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..4c05f12affd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.scene.zaxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformatstops.py new file mode 100644 index 00000000000..0c1caf88175 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticklen.py new file mode 100644 index 00000000000..af106a3556d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.scene.zaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickmode.py new file mode 100644 index 00000000000..4fd10eac559 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickprefix.py new file mode 100644 index 00000000000..8217004aba5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticks.py new file mode 100644 index 00000000000..67c4dc6f901 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="layout.scene.zaxis", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticksuffix.py new file mode 100644 index 00000000000..8aec099fc93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.scene.zaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticktext.py new file mode 100644 index 00000000000..afc61236c51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.scene.zaxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticktextsrc.py new file mode 100644 index 00000000000..00178ba4bc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.scene.zaxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickvals.py new file mode 100644 index 00000000000..da7499a991a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickvalssrc.py new file mode 100644 index 00000000000..052bba5ce54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickwidth.py new file mode 100644 index 00000000000..78f0faff0d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.scene.zaxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_title.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_title.py new file mode 100644 index 00000000000..764d5bdce5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_title.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout.scene.zaxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_type.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_type.py new file mode 100644 index 00000000000..b9fe19453f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.scene.zaxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_visible.py new file mode 100644 index 00000000000..1c0bd94b9e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.scene.zaxis", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zeroline.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zeroline.py new file mode 100644 index 00000000000..74f5cf4d78d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zeroline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="zeroline", parent_name="layout.scene.zaxis", **kwargs + ): + super(ZerolineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zerolinecolor.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zerolinecolor.py new file mode 100644 index 00000000000..dd565ebdf3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zerolinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="zerolinecolor", parent_name="layout.scene.zaxis", **kwargs + ): + super(ZerolinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zerolinewidth.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zerolinewidth.py new file mode 100644 index 00000000000..89a01860159 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/_zerolinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="zerolinewidth", parent_name="layout.scene.zaxis", **kwargs + ): + super(ZerolinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/__init__.py index e547383ea03..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.zaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.scene.zaxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.zaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_color.py new file mode 100644 index 00000000000..54ca5eeecc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.zaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_family.py new file mode 100644 index 00000000000..f0b81241126 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.scene.zaxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_size.py new file mode 100644 index 00000000000..be57e3aba18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.zaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py index 98ffbe006a8..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.scene.zaxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.scene.zaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.scene.zaxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.scene.zaxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.scene.zaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..c9eadde6e6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.scene.zaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a1eb577ae25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.scene.zaxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..4f1301e77ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.scene.zaxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..4cce018f8f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.scene.zaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..e128a8da767 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.scene.zaxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/__init__.py index d16dc9b22ca..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.scene.zaxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.scene.zaxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/_font.py new file mode 100644 index 00000000000..6d22e3de07d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.scene.zaxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/_text.py new file mode 100644 index 00000000000..e5adec406f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.scene.zaxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/__init__.py index e9217aa6b2f..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.scene.zaxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.scene.zaxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.scene.zaxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_color.py new file mode 100644 index 00000000000..c9436d63f1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.scene.zaxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_family.py new file mode 100644 index 00000000000..30d501defd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.scene.zaxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_size.py new file mode 100644 index 00000000000..1fbed06a090 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.scene.zaxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/__init__.py b/packages/python/plotly/plotly/validators/layout/shape/__init__.py index f1fac26f713..ba5f731716c 100644 --- a/packages/python/plotly/plotly/validators/layout/shape/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/shape/__init__.py @@ -1,287 +1,50 @@ -import _plotly_utils.basevalidators - - -class YsizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ysizemode", parent_name="layout.shape", **kwargs): - super(YsizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["scaled", "pixel"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yref", parent_name="layout.shape", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["paper", "/^y([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="yanchor", parent_name="layout.shape", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y1Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y1", parent_name="layout.shape", **kwargs): - super(Y1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="layout.shape", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xsizemode", parent_name="layout.shape", **kwargs): - super(XsizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["scaled", "pixel"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xref", parent_name="layout.shape", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["paper", "/^x([2-9]|[1-9][0-9]+)?$/"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="xanchor", parent_name="layout.shape", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X1Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x1", parent_name="layout.shape", **kwargs): - super(X1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="layout.shape", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="layout.shape", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.shape", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["circle", "rect", "path", "line"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="layout.shape", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PathValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="path", parent_name="layout.shape", **kwargs): - super(PathValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="layout.shape", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.shape", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="layout.shape", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="layer", parent_name="layout.shape", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["below", "above"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="layout.shape", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysizemode import YsizemodeValidator + from ._yref import YrefValidator + from ._yanchor import YanchorValidator + from ._y1 import Y1Validator + from ._y0 import Y0Validator + from ._xsizemode import XsizemodeValidator + from ._xref import XrefValidator + from ._xanchor import XanchorValidator + from ._x1 import X1Validator + from ._x0 import X0Validator + from ._visible import VisibleValidator + from ._type import TypeValidator + from ._templateitemname import TemplateitemnameValidator + from ._path import PathValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._line import LineValidator + from ._layer import LayerValidator + from ._fillcolor import FillcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysizemode.YsizemodeValidator", + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y1.Y1Validator", + "._y0.Y0Validator", + "._xsizemode.XsizemodeValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x1.X1Validator", + "._x0.X0Validator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._path.PathValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._line.LineValidator", + "._layer.LayerValidator", + "._fillcolor.FillcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_fillcolor.py b/packages/python/plotly/plotly/validators/layout/shape/_fillcolor.py new file mode 100644 index 00000000000..68c50f5ae32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="layout.shape", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_layer.py b/packages/python/plotly/plotly/validators/layout/shape/_layer.py new file mode 100644 index 00000000000..2acb4671f7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_layer.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="layer", parent_name="layout.shape", **kwargs): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["below", "above"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_line.py b/packages/python/plotly/plotly/validators/layout/shape/_line.py new file mode 100644 index 00000000000..a80a087489e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="layout.shape", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_name.py b/packages/python/plotly/plotly/validators/layout/shape/_name.py new file mode 100644 index 00000000000..367658c7fb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.shape", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_opacity.py b/packages/python/plotly/plotly/validators/layout/shape/_opacity.py new file mode 100644 index 00000000000..f4190661aa2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="layout.shape", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_path.py b/packages/python/plotly/plotly/validators/layout/shape/_path.py new file mode 100644 index 00000000000..6f38c4673b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_path.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PathValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="path", parent_name="layout.shape", **kwargs): + super(PathValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/shape/_templateitemname.py new file mode 100644 index 00000000000..9fc3e874bb5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="layout.shape", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_type.py b/packages/python/plotly/plotly/validators/layout/shape/_type.py new file mode 100644 index 00000000000..db8830c407c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.shape", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["circle", "rect", "path", "line"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_visible.py b/packages/python/plotly/plotly/validators/layout/shape/_visible.py new file mode 100644 index 00000000000..fdf1dca55d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="layout.shape", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_x0.py b/packages/python/plotly/plotly/validators/layout/shape/_x0.py new file mode 100644 index 00000000000..aba3bd7bc8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="layout.shape", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_x1.py b/packages/python/plotly/plotly/validators/layout/shape/_x1.py new file mode 100644 index 00000000000..ddc619ae840 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_x1.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X1Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x1", parent_name="layout.shape", **kwargs): + super(X1Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_xanchor.py b/packages/python/plotly/plotly/validators/layout/shape/_xanchor.py new file mode 100644 index 00000000000..144a3f9fde5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_xanchor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="xanchor", parent_name="layout.shape", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_xref.py b/packages/python/plotly/plotly/validators/layout/shape/_xref.py new file mode 100644 index 00000000000..6a193c15d0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_xref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xref", parent_name="layout.shape", **kwargs): + super(XrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["paper", "/^x([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_xsizemode.py b/packages/python/plotly/plotly/validators/layout/shape/_xsizemode.py new file mode 100644 index 00000000000..29a0542632a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_xsizemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XsizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xsizemode", parent_name="layout.shape", **kwargs): + super(XsizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["scaled", "pixel"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_y0.py b/packages/python/plotly/plotly/validators/layout/shape/_y0.py new file mode 100644 index 00000000000..39e5350b7c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="layout.shape", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_y1.py b/packages/python/plotly/plotly/validators/layout/shape/_y1.py new file mode 100644 index 00000000000..95d89912c4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_y1.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y1Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y1", parent_name="layout.shape", **kwargs): + super(Y1Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_yanchor.py b/packages/python/plotly/plotly/validators/layout/shape/_yanchor.py new file mode 100644 index 00000000000..f67c6af3ea2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_yanchor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="yanchor", parent_name="layout.shape", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_yref.py b/packages/python/plotly/plotly/validators/layout/shape/_yref.py new file mode 100644 index 00000000000..62ebd4eb4cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_yref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yref", parent_name="layout.shape", **kwargs): + super(YrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["paper", "/^y([2-9]|[1-9][0-9]+)?$/"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/_ysizemode.py b/packages/python/plotly/plotly/validators/layout/shape/_ysizemode.py new file mode 100644 index 00000000000..1eff07cd078 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/_ysizemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YsizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ysizemode", parent_name="layout.shape", **kwargs): + super(YsizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["scaled", "pixel"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/line/__init__.py b/packages/python/plotly/plotly/validators/layout/shape/line/__init__.py index 3839f86dbd5..ac8bd485063 100644 --- a/packages/python/plotly/plotly/validators/layout/shape/line/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/shape/line/__init__.py @@ -1,46 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="layout.shape.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="dash", parent_name="layout.shape.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.shape.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/line/_color.py b/packages/python/plotly/plotly/validators/layout/shape/line/_color.py new file mode 100644 index 00000000000..9d0b9a47c0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.shape.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py b/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py new file mode 100644 index 00000000000..75492e16a47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="dash", parent_name="layout.shape.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/shape/line/_width.py b/packages/python/plotly/plotly/validators/layout/shape/line/_width.py new file mode 100644 index 00000000000..79a9feea7e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/shape/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="layout.shape.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/__init__.py index a29398af7a9..84f2759f017 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/__init__.py @@ -1,491 +1,60 @@ -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="layout.slider", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="layout.slider", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="layout.slider", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="layout.slider", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="layout.slider", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="transition", parent_name="layout.slider", **kwargs): - super(TransitionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Transition"), - data_docs=kwargs.pop( - "data_docs", - """ - duration - Sets the duration of the slider transition - easing - Sets the easing function of the slider - transition -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tickwidth", parent_name="layout.slider", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="layout.slider", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="tickcolor", parent_name="layout.slider", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="layout.slider", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StepValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="stepdefaults", parent_name="layout.slider", **kwargs - ): - super(StepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Step"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="steps", parent_name="layout.slider", **kwargs): - super(StepsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Step"), - data_docs=kwargs.pop( - "data_docs", - """ - args - Sets the arguments values to be passed to the - Plotly method set in `method` on slide. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_sliderchange` method and executing the - API command manually without losing the benefit - of the slider automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the slider - method - Sets the Plotly method to be called when the - slider value is changed. If the `skip` method - is used, the API slider will function as normal - but will perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to slider events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - Sets the value of the slider step, used to - refer to the step programatically. Defaults to - the slider label if not provided. - visible - Determines whether or not this step is included - in the slider. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pad", parent_name="layout.slider", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pad"), - data_docs=kwargs.pop( - "data_docs", - """ - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.slider", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinorticklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="minorticklen", parent_name="layout.slider", **kwargs - ): - super(MinorticklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="layout.slider", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="layout.slider", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.slider", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CurrentvalueValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="currentvalue", parent_name="layout.slider", **kwargs - ): - super(CurrentvalueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Currentvalue"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets the font of the current value label text. - offset - The amount of space, in pixels, between the - current value label and the slider. - prefix - When currentvalue.visible is true, this sets - the prefix of the label. - suffix - When currentvalue.visible is true, this sets - the suffix of the label. - visible - Shows the currently-selected value above the - slider. - xanchor - The alignment of the value readout relative to - the length of the slider. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="layout.slider", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="layout.slider", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.slider", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ActivebgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="activebgcolor", parent_name="layout.slider", **kwargs - ): - super(ActivebgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ActiveValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="active", parent_name="layout.slider", **kwargs): - super(ActiveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._transition import TransitionValidator + from ._tickwidth import TickwidthValidator + from ._ticklen import TicklenValidator + from ._tickcolor import TickcolorValidator + from ._templateitemname import TemplateitemnameValidator + from ._stepdefaults import StepdefaultsValidator + from ._steps import StepsValidator + from ._pad import PadValidator + from ._name import NameValidator + from ._minorticklen import MinorticklenValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._font import FontValidator + from ._currentvalue import CurrentvalueValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._activebgcolor import ActivebgcolorValidator + from ._active import ActiveValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._transition.TransitionValidator", + "._tickwidth.TickwidthValidator", + "._ticklen.TicklenValidator", + "._tickcolor.TickcolorValidator", + "._templateitemname.TemplateitemnameValidator", + "._stepdefaults.StepdefaultsValidator", + "._steps.StepsValidator", + "._pad.PadValidator", + "._name.NameValidator", + "._minorticklen.MinorticklenValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._font.FontValidator", + "._currentvalue.CurrentvalueValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._activebgcolor.ActivebgcolorValidator", + "._active.ActiveValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_active.py b/packages/python/plotly/plotly/validators/layout/slider/_active.py new file mode 100644 index 00000000000..4c61a1b4047 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_active.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ActiveValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="active", parent_name="layout.slider", **kwargs): + super(ActiveValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_activebgcolor.py b/packages/python/plotly/plotly/validators/layout/slider/_activebgcolor.py new file mode 100644 index 00000000000..5bd9b37357c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_activebgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ActivebgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="activebgcolor", parent_name="layout.slider", **kwargs + ): + super(ActivebgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/slider/_bgcolor.py new file mode 100644 index 00000000000..79ada74ed82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.slider", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/slider/_bordercolor.py new file mode 100644 index 00000000000..8a401dea6bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="layout.slider", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/slider/_borderwidth.py new file mode 100644 index 00000000000..69238d4347f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="layout.slider", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_currentvalue.py b/packages/python/plotly/plotly/validators/layout/slider/_currentvalue.py new file mode 100644 index 00000000000..0b9df2571c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_currentvalue.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CurrentvalueValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="currentvalue", parent_name="layout.slider", **kwargs + ): + super(CurrentvalueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Currentvalue"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets the font of the current value label text. + offset + The amount of space, in pixels, between the + current value label and the slider. + prefix + When currentvalue.visible is true, this sets + the prefix of the label. + suffix + When currentvalue.visible is true, this sets + the suffix of the label. + visible + Shows the currently-selected value above the + slider. + xanchor + The alignment of the value readout relative to + the length of the slider. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_font.py b/packages/python/plotly/plotly/validators/layout/slider/_font.py new file mode 100644 index 00000000000..e8b6e3508cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.slider", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_len.py b/packages/python/plotly/plotly/validators/layout/slider/_len.py new file mode 100644 index 00000000000..43edebe819c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="layout.slider", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_lenmode.py b/packages/python/plotly/plotly/validators/layout/slider/_lenmode.py new file mode 100644 index 00000000000..f14cc5e01e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="layout.slider", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_minorticklen.py b/packages/python/plotly/plotly/validators/layout/slider/_minorticklen.py new file mode 100644 index 00000000000..678f9ec120d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_minorticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MinorticklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="minorticklen", parent_name="layout.slider", **kwargs + ): + super(MinorticklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_name.py b/packages/python/plotly/plotly/validators/layout/slider/_name.py new file mode 100644 index 00000000000..866cb8a5875 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.slider", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_pad.py b/packages/python/plotly/plotly/validators/layout/slider/_pad.py new file mode 100644 index 00000000000..7dd4c6c8a5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_pad.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pad", parent_name="layout.slider", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pad"), + data_docs=kwargs.pop( + "data_docs", + """ + b + The amount of padding (in px) along the bottom + of the component. + l + The amount of padding (in px) on the left side + of the component. + r + The amount of padding (in px) on the right side + of the component. + t + The amount of padding (in px) along the top of + the component. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_stepdefaults.py b/packages/python/plotly/plotly/validators/layout/slider/_stepdefaults.py new file mode 100644 index 00000000000..aba3939dcfc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_stepdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class StepdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="stepdefaults", parent_name="layout.slider", **kwargs + ): + super(StepdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Step"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_steps.py b/packages/python/plotly/plotly/validators/layout/slider/_steps.py new file mode 100644 index 00000000000..daef8f7ee1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_steps.py @@ -0,0 +1,67 @@ +import _plotly_utils.basevalidators + + +class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="steps", parent_name="layout.slider", **kwargs): + super(StepsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Step"), + data_docs=kwargs.pop( + "data_docs", + """ + args + Sets the arguments values to be passed to the + Plotly method set in `method` on slide. + execute + When true, the API method is executed. When + false, all other behaviors are the same and + command execution is skipped. This may be + useful when hooking into, for example, the + `plotly_sliderchange` method and executing the + API command manually without losing the benefit + of the slider automatically binding to the + state of the plot through the specification of + `method` and `args`. + label + Sets the text label to appear on the slider + method + Sets the Plotly method to be called when the + slider value is changed. If the `skip` method + is used, the API slider will function as normal + but will perform no API calls and will not bind + automatically to state updates. This may be + used to create a component interface and attach + to slider events manually via JavaScript. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + Sets the value of the slider step, used to + refer to the step programatically. Defaults to + the slider label if not provided. + visible + Determines whether or not this step is included + in the slider. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/slider/_templateitemname.py new file mode 100644 index 00000000000..cce7c662039 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="layout.slider", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/slider/_tickcolor.py new file mode 100644 index 00000000000..bfddd6312eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_tickcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="tickcolor", parent_name="layout.slider", **kwargs): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_ticklen.py b/packages/python/plotly/plotly/validators/layout/slider/_ticklen.py new file mode 100644 index 00000000000..e9427d8800c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="layout.slider", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/slider/_tickwidth.py new file mode 100644 index 00000000000..738cc5361ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_tickwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tickwidth", parent_name="layout.slider", **kwargs): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_transition.py b/packages/python/plotly/plotly/validators/layout/slider/_transition.py new file mode 100644 index 00000000000..9a766418010 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_transition.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="transition", parent_name="layout.slider", **kwargs): + super(TransitionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Transition"), + data_docs=kwargs.pop( + "data_docs", + """ + duration + Sets the duration of the slider transition + easing + Sets the easing function of the slider + transition +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_visible.py b/packages/python/plotly/plotly/validators/layout/slider/_visible.py new file mode 100644 index 00000000000..f2136abee6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="layout.slider", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_x.py b/packages/python/plotly/plotly/validators/layout/slider/_x.py new file mode 100644 index 00000000000..e2e370d427f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="layout.slider", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_xanchor.py b/packages/python/plotly/plotly/validators/layout/slider/_xanchor.py new file mode 100644 index 00000000000..6eb76a88d5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="layout.slider", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_y.py b/packages/python/plotly/plotly/validators/layout/slider/_y.py new file mode 100644 index 00000000000..151079f7760 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="layout.slider", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/_yanchor.py b/packages/python/plotly/plotly/validators/layout/slider/_yanchor.py new file mode 100644 index 00000000000..7233d522872 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="layout.slider", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/__init__.py index bb027dd35b7..12f2f9de394 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/__init__.py @@ -1,120 +1,24 @@ -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="layout.slider.currentvalue", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.slider.currentvalue", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="suffix", parent_name="layout.slider.currentvalue", **kwargs - ): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="prefix", parent_name="layout.slider.currentvalue", **kwargs - ): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="offset", parent_name="layout.slider.currentvalue", **kwargs - ): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.slider.currentvalue", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._xanchor import XanchorValidator + from ._visible import VisibleValidator + from ._suffix import SuffixValidator + from ._prefix import PrefixValidator + from ._offset import OffsetValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._xanchor.XanchorValidator", + "._visible.VisibleValidator", + "._suffix.SuffixValidator", + "._prefix.PrefixValidator", + "._offset.OffsetValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_font.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_font.py new file mode 100644 index 00000000000..bd198c39ede --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.slider.currentvalue", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_offset.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_offset.py new file mode 100644 index 00000000000..417f728bac7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_offset.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="offset", parent_name="layout.slider.currentvalue", **kwargs + ): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_prefix.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_prefix.py new file mode 100644 index 00000000000..6ef88f195b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_prefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PrefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="prefix", parent_name="layout.slider.currentvalue", **kwargs + ): + super(PrefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_suffix.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_suffix.py new file mode 100644 index 00000000000..9010a321fde --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_suffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="suffix", parent_name="layout.slider.currentvalue", **kwargs + ): + super(SuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_visible.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_visible.py new file mode 100644 index 00000000000..0f269565998 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.slider.currentvalue", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_xanchor.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_xanchor.py new file mode 100644 index 00000000000..dac65e54e49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="layout.slider.currentvalue", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/__init__.py index 4cd537016c2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.slider.currentvalue.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.slider.currentvalue.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.slider.currentvalue.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_color.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_color.py new file mode 100644 index 00000000000..7f3474866a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.slider.currentvalue.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_family.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_family.py new file mode 100644 index 00000000000..2aba3773504 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.slider.currentvalue.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_size.py b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_size.py new file mode 100644 index 00000000000..b4b7fb8612e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.slider.currentvalue.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/font/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/font/__init__.py index 2b506384d87..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/font/__init__.py @@ -1,45 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="layout.slider.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.slider.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.slider.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/font/_color.py b/packages/python/plotly/plotly/validators/layout/slider/font/_color.py new file mode 100644 index 00000000000..5ca4b13c3aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/font/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.slider.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/font/_family.py b/packages/python/plotly/plotly/validators/layout/slider/font/_family.py new file mode 100644 index 00000000000..45466c7225e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.slider.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/font/_size.py b/packages/python/plotly/plotly/validators/layout/slider/font/_size.py new file mode 100644 index 00000000000..55543dfe948 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/font/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="layout.slider.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/pad/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/pad/__init__.py index 9b8fef83692..7770792ed8c 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/pad/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/pad/__init__.py @@ -1,54 +1,15 @@ -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="t", parent_name="layout.slider.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="r", parent_name="layout.slider.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="l", parent_name="layout.slider.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="b", parent_name="layout.slider.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._t import TValidator + from ._r import RValidator + from ._l import LValidator + from ._b import BValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/pad/_b.py b/packages/python/plotly/plotly/validators/layout/slider/pad/_b.py new file mode 100644 index 00000000000..7207b2eb77b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/pad/_b.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b", parent_name="layout.slider.pad", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/pad/_l.py b/packages/python/plotly/plotly/validators/layout/slider/pad/_l.py new file mode 100644 index 00000000000..16ee05121a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/pad/_l.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="l", parent_name="layout.slider.pad", **kwargs): + super(LValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/pad/_r.py b/packages/python/plotly/plotly/validators/layout/slider/pad/_r.py new file mode 100644 index 00000000000..5e2b93c8d12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/pad/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="r", parent_name="layout.slider.pad", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/pad/_t.py b/packages/python/plotly/plotly/validators/layout/slider/pad/_t.py new file mode 100644 index 00000000000..321c9264124 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/pad/_t.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="t", parent_name="layout.slider.pad", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/step/__init__.py index b3e85dce558..9428b04e474 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/step/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/step/__init__.py @@ -1,130 +1,28 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.slider.step", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="value", parent_name="layout.slider.step", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="layout.slider.step", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.slider.step", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="method", parent_name="layout.slider.step", **kwargs - ): - super(MethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["restyle", "relayout", "animate", "update", "skip"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="label", parent_name="layout.slider.step", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="execute", parent_name="layout.slider.step", **kwargs - ): - super(ExecuteValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArgsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="args", parent_name="layout.slider.step", **kwargs): - super(ArgsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "arraydraw"}, - {"valType": "any", "editType": "arraydraw"}, - {"valType": "any", "editType": "arraydraw"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._method import MethodValidator + from ._label import LabelValidator + from ._execute import ExecuteValidator + from ._args import ArgsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._method.MethodValidator", + "._label.LabelValidator", + "._execute.ExecuteValidator", + "._args.ArgsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_args.py b/packages/python/plotly/plotly/validators/layout/slider/step/_args.py new file mode 100644 index 00000000000..15cfed591fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_args.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class ArgsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="args", parent_name="layout.slider.step", **kwargs): + super(ArgsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "arraydraw"}, + {"valType": "any", "editType": "arraydraw"}, + {"valType": "any", "editType": "arraydraw"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_execute.py b/packages/python/plotly/plotly/validators/layout/slider/step/_execute.py new file mode 100644 index 00000000000..00edd9397b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_execute.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="execute", parent_name="layout.slider.step", **kwargs + ): + super(ExecuteValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_label.py b/packages/python/plotly/plotly/validators/layout/slider/step/_label.py new file mode 100644 index 00000000000..8e1f07affaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_label.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="label", parent_name="layout.slider.step", **kwargs): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_method.py b/packages/python/plotly/plotly/validators/layout/slider/step/_method.py new file mode 100644 index 00000000000..4ef179fceba --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_method.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class MethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="method", parent_name="layout.slider.step", **kwargs + ): + super(MethodValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["restyle", "relayout", "animate", "update", "skip"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_name.py b/packages/python/plotly/plotly/validators/layout/slider/step/_name.py new file mode 100644 index 00000000000..2e1f0cf7ebb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.slider.step", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/slider/step/_templateitemname.py new file mode 100644 index 00000000000..cd7969722e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="layout.slider.step", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_value.py b/packages/python/plotly/plotly/validators/layout/slider/step/_value.py new file mode 100644 index 00000000000..7bb391d8441 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_value.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="value", parent_name="layout.slider.step", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/step/_visible.py b/packages/python/plotly/plotly/validators/layout/slider/step/_visible.py new file mode 100644 index 00000000000..1d5a50fc8bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/step/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.slider.step", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/transition/__init__.py b/packages/python/plotly/plotly/validators/layout/slider/transition/__init__.py index fb3b5865ae3..c119555d72d 100644 --- a/packages/python/plotly/plotly/validators/layout/slider/transition/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/slider/transition/__init__.py @@ -1,72 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._easing import EasingValidator + from ._duration import DurationValidator +else: + from _plotly_utils.importers import relative_import -class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="easing", parent_name="layout.slider.transition", **kwargs - ): - super(EasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "linear", - "quad", - "cubic", - "sin", - "exp", - "circle", - "elastic", - "back", - "bounce", - "linear-in", - "quad-in", - "cubic-in", - "sin-in", - "exp-in", - "circle-in", - "elastic-in", - "back-in", - "bounce-in", - "linear-out", - "quad-out", - "cubic-out", - "sin-out", - "exp-out", - "circle-out", - "elastic-out", - "back-out", - "bounce-out", - "linear-in-out", - "quad-in-out", - "cubic-in-out", - "sin-in-out", - "exp-in-out", - "circle-in-out", - "elastic-in-out", - "back-in-out", - "bounce-in-out", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DurationValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="duration", parent_name="layout.slider.transition", **kwargs - ): - super(DurationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._easing.EasingValidator", "._duration.DurationValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/transition/_duration.py b/packages/python/plotly/plotly/validators/layout/slider/transition/_duration.py new file mode 100644 index 00000000000..3e02bfd661d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/transition/_duration.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DurationValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="duration", parent_name="layout.slider.transition", **kwargs + ): + super(DurationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/slider/transition/_easing.py b/packages/python/plotly/plotly/validators/layout/slider/transition/_easing.py new file mode 100644 index 00000000000..e6de0b05ea6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/slider/transition/_easing.py @@ -0,0 +1,55 @@ +import _plotly_utils.basevalidators + + +class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="easing", parent_name="layout.slider.transition", **kwargs + ): + super(EasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "linear", + "quad", + "cubic", + "sin", + "exp", + "circle", + "elastic", + "back", + "bounce", + "linear-in", + "quad-in", + "cubic-in", + "sin-in", + "exp-in", + "circle-in", + "elastic-in", + "back-in", + "bounce-in", + "linear-out", + "quad-out", + "cubic-out", + "sin-out", + "exp-out", + "circle-out", + "elastic-out", + "back-out", + "bounce-out", + "linear-in-out", + "quad-in-out", + "cubic-in-out", + "sin-in-out", + "exp-in-out", + "circle-in-out", + "elastic-in-out", + "back-in-out", + "bounce-in-out", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/__init__.py b/packages/python/plotly/plotly/validators/layout/template/__init__.py index ef9803c725f..824c97d00b4 100644 --- a/packages/python/plotly/plotly/validators/layout/template/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/template/__init__.py @@ -1,207 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._layout import LayoutValidator + from ._data import DataValidator +else: + from _plotly_utils.importers import relative_import -class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="layout", parent_name="layout.template", **kwargs): - super(LayoutValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Layout"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DataValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="data", parent_name="layout.template", **kwargs): - super(DataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Data"), - data_docs=kwargs.pop( - "data_docs", - """ - area - A tuple of :class:`plotly.graph_objects.Area` - instances or dicts with compatible properties - barpolar - A tuple of - :class:`plotly.graph_objects.Barpolar` - instances or dicts with compatible properties - bar - A tuple of :class:`plotly.graph_objects.Bar` - instances or dicts with compatible properties - box - A tuple of :class:`plotly.graph_objects.Box` - instances or dicts with compatible properties - candlestick - A tuple of - :class:`plotly.graph_objects.Candlestick` - instances or dicts with compatible properties - carpet - A tuple of :class:`plotly.graph_objects.Carpet` - instances or dicts with compatible properties - choroplethmapbox - A tuple of - :class:`plotly.graph_objects.Choroplethmapbox` - instances or dicts with compatible properties - choropleth - A tuple of - :class:`plotly.graph_objects.Choropleth` - instances or dicts with compatible properties - cone - A tuple of :class:`plotly.graph_objects.Cone` - instances or dicts with compatible properties - contourcarpet - A tuple of - :class:`plotly.graph_objects.Contourcarpet` - instances or dicts with compatible properties - contour - A tuple of - :class:`plotly.graph_objects.Contour` instances - or dicts with compatible properties - densitymapbox - A tuple of - :class:`plotly.graph_objects.Densitymapbox` - instances or dicts with compatible properties - funnelarea - A tuple of - :class:`plotly.graph_objects.Funnelarea` - instances or dicts with compatible properties - funnel - A tuple of :class:`plotly.graph_objects.Funnel` - instances or dicts with compatible properties - heatmapgl - A tuple of - :class:`plotly.graph_objects.Heatmapgl` - instances or dicts with compatible properties - heatmap - A tuple of - :class:`plotly.graph_objects.Heatmap` instances - or dicts with compatible properties - histogram2dcontour - A tuple of :class:`plotly.graph_objects.Histogr - am2dContour` instances or dicts with compatible - properties - histogram2d - A tuple of - :class:`plotly.graph_objects.Histogram2d` - instances or dicts with compatible properties - histogram - A tuple of - :class:`plotly.graph_objects.Histogram` - instances or dicts with compatible properties - image - A tuple of :class:`plotly.graph_objects.Image` - instances or dicts with compatible properties - indicator - A tuple of - :class:`plotly.graph_objects.Indicator` - instances or dicts with compatible properties - isosurface - A tuple of - :class:`plotly.graph_objects.Isosurface` - instances or dicts with compatible properties - mesh3d - A tuple of :class:`plotly.graph_objects.Mesh3d` - instances or dicts with compatible properties - ohlc - A tuple of :class:`plotly.graph_objects.Ohlc` - instances or dicts with compatible properties - parcats - A tuple of - :class:`plotly.graph_objects.Parcats` instances - or dicts with compatible properties - parcoords - A tuple of - :class:`plotly.graph_objects.Parcoords` - instances or dicts with compatible properties - pie - A tuple of :class:`plotly.graph_objects.Pie` - instances or dicts with compatible properties - pointcloud - A tuple of - :class:`plotly.graph_objects.Pointcloud` - instances or dicts with compatible properties - sankey - A tuple of :class:`plotly.graph_objects.Sankey` - instances or dicts with compatible properties - scatter3d - A tuple of - :class:`plotly.graph_objects.Scatter3d` - instances or dicts with compatible properties - scattercarpet - A tuple of - :class:`plotly.graph_objects.Scattercarpet` - instances or dicts with compatible properties - scattergeo - A tuple of - :class:`plotly.graph_objects.Scattergeo` - instances or dicts with compatible properties - scattergl - A tuple of - :class:`plotly.graph_objects.Scattergl` - instances or dicts with compatible properties - scattermapbox - A tuple of - :class:`plotly.graph_objects.Scattermapbox` - instances or dicts with compatible properties - scatterpolargl - A tuple of - :class:`plotly.graph_objects.Scatterpolargl` - instances or dicts with compatible properties - scatterpolar - A tuple of - :class:`plotly.graph_objects.Scatterpolar` - instances or dicts with compatible properties - scatter - A tuple of - :class:`plotly.graph_objects.Scatter` instances - or dicts with compatible properties - scatterternary - A tuple of - :class:`plotly.graph_objects.Scatterternary` - instances or dicts with compatible properties - splom - A tuple of :class:`plotly.graph_objects.Splom` - instances or dicts with compatible properties - streamtube - A tuple of - :class:`plotly.graph_objects.Streamtube` - instances or dicts with compatible properties - sunburst - A tuple of - :class:`plotly.graph_objects.Sunburst` - instances or dicts with compatible properties - surface - A tuple of - :class:`plotly.graph_objects.Surface` instances - or dicts with compatible properties - table - A tuple of :class:`plotly.graph_objects.Table` - instances or dicts with compatible properties - treemap - A tuple of - :class:`plotly.graph_objects.Treemap` instances - or dicts with compatible properties - violin - A tuple of :class:`plotly.graph_objects.Violin` - instances or dicts with compatible properties - volume - A tuple of :class:`plotly.graph_objects.Volume` - instances or dicts with compatible properties - waterfall - A tuple of - :class:`plotly.graph_objects.Waterfall` - instances or dicts with compatible properties -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._layout.LayoutValidator", "._data.DataValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/_data.py b/packages/python/plotly/plotly/validators/layout/template/_data.py new file mode 100644 index 00000000000..673153ea19b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/_data.py @@ -0,0 +1,189 @@ +import _plotly_utils.basevalidators + + +class DataValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="data", parent_name="layout.template", **kwargs): + super(DataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Data"), + data_docs=kwargs.pop( + "data_docs", + """ + area + A tuple of :class:`plotly.graph_objects.Area` + instances or dicts with compatible properties + barpolar + A tuple of + :class:`plotly.graph_objects.Barpolar` + instances or dicts with compatible properties + bar + A tuple of :class:`plotly.graph_objects.Bar` + instances or dicts with compatible properties + box + A tuple of :class:`plotly.graph_objects.Box` + instances or dicts with compatible properties + candlestick + A tuple of + :class:`plotly.graph_objects.Candlestick` + instances or dicts with compatible properties + carpet + A tuple of :class:`plotly.graph_objects.Carpet` + instances or dicts with compatible properties + choroplethmapbox + A tuple of + :class:`plotly.graph_objects.Choroplethmapbox` + instances or dicts with compatible properties + choropleth + A tuple of + :class:`plotly.graph_objects.Choropleth` + instances or dicts with compatible properties + cone + A tuple of :class:`plotly.graph_objects.Cone` + instances or dicts with compatible properties + contourcarpet + A tuple of + :class:`plotly.graph_objects.Contourcarpet` + instances or dicts with compatible properties + contour + A tuple of + :class:`plotly.graph_objects.Contour` instances + or dicts with compatible properties + densitymapbox + A tuple of + :class:`plotly.graph_objects.Densitymapbox` + instances or dicts with compatible properties + funnelarea + A tuple of + :class:`plotly.graph_objects.Funnelarea` + instances or dicts with compatible properties + funnel + A tuple of :class:`plotly.graph_objects.Funnel` + instances or dicts with compatible properties + heatmapgl + A tuple of + :class:`plotly.graph_objects.Heatmapgl` + instances or dicts with compatible properties + heatmap + A tuple of + :class:`plotly.graph_objects.Heatmap` instances + or dicts with compatible properties + histogram2dcontour + A tuple of :class:`plotly.graph_objects.Histogr + am2dContour` instances or dicts with compatible + properties + histogram2d + A tuple of + :class:`plotly.graph_objects.Histogram2d` + instances or dicts with compatible properties + histogram + A tuple of + :class:`plotly.graph_objects.Histogram` + instances or dicts with compatible properties + image + A tuple of :class:`plotly.graph_objects.Image` + instances or dicts with compatible properties + indicator + A tuple of + :class:`plotly.graph_objects.Indicator` + instances or dicts with compatible properties + isosurface + A tuple of + :class:`plotly.graph_objects.Isosurface` + instances or dicts with compatible properties + mesh3d + A tuple of :class:`plotly.graph_objects.Mesh3d` + instances or dicts with compatible properties + ohlc + A tuple of :class:`plotly.graph_objects.Ohlc` + instances or dicts with compatible properties + parcats + A tuple of + :class:`plotly.graph_objects.Parcats` instances + or dicts with compatible properties + parcoords + A tuple of + :class:`plotly.graph_objects.Parcoords` + instances or dicts with compatible properties + pie + A tuple of :class:`plotly.graph_objects.Pie` + instances or dicts with compatible properties + pointcloud + A tuple of + :class:`plotly.graph_objects.Pointcloud` + instances or dicts with compatible properties + sankey + A tuple of :class:`plotly.graph_objects.Sankey` + instances or dicts with compatible properties + scatter3d + A tuple of + :class:`plotly.graph_objects.Scatter3d` + instances or dicts with compatible properties + scattercarpet + A tuple of + :class:`plotly.graph_objects.Scattercarpet` + instances or dicts with compatible properties + scattergeo + A tuple of + :class:`plotly.graph_objects.Scattergeo` + instances or dicts with compatible properties + scattergl + A tuple of + :class:`plotly.graph_objects.Scattergl` + instances or dicts with compatible properties + scattermapbox + A tuple of + :class:`plotly.graph_objects.Scattermapbox` + instances or dicts with compatible properties + scatterpolargl + A tuple of + :class:`plotly.graph_objects.Scatterpolargl` + instances or dicts with compatible properties + scatterpolar + A tuple of + :class:`plotly.graph_objects.Scatterpolar` + instances or dicts with compatible properties + scatter + A tuple of + :class:`plotly.graph_objects.Scatter` instances + or dicts with compatible properties + scatterternary + A tuple of + :class:`plotly.graph_objects.Scatterternary` + instances or dicts with compatible properties + splom + A tuple of :class:`plotly.graph_objects.Splom` + instances or dicts with compatible properties + streamtube + A tuple of + :class:`plotly.graph_objects.Streamtube` + instances or dicts with compatible properties + sunburst + A tuple of + :class:`plotly.graph_objects.Sunburst` + instances or dicts with compatible properties + surface + A tuple of + :class:`plotly.graph_objects.Surface` instances + or dicts with compatible properties + table + A tuple of :class:`plotly.graph_objects.Table` + instances or dicts with compatible properties + treemap + A tuple of + :class:`plotly.graph_objects.Treemap` instances + or dicts with compatible properties + violin + A tuple of :class:`plotly.graph_objects.Violin` + instances or dicts with compatible properties + volume + A tuple of :class:`plotly.graph_objects.Volume` + instances or dicts with compatible properties + waterfall + A tuple of + :class:`plotly.graph_objects.Waterfall` + instances or dicts with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/_layout.py b/packages/python/plotly/plotly/validators/layout/template/_layout.py new file mode 100644 index 00000000000..d5f84b047d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/_layout.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="layout", parent_name="layout.template", **kwargs): + super(LayoutValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Layout"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/__init__.py b/packages/python/plotly/plotly/validators/layout/template/data/__init__.py index f2e7c400a46..312285750c3 100644 --- a/packages/python/plotly/plotly/validators/layout/template/data/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/template/data/__init__.py @@ -1,938 +1,106 @@ -import _plotly_utils.basevalidators - - -class WaterfallsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="waterfall", parent_name="layout.template.data", **kwargs - ): - super(WaterfallsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Waterfall"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VolumesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="volume", parent_name="layout.template.data", **kwargs - ): - super(VolumesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Volume"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ViolinsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="violin", parent_name="layout.template.data", **kwargs - ): - super(ViolinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Violin"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TreemapsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="treemap", parent_name="layout.template.data", **kwargs - ): - super(TreemapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Treemap"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TablesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="table", parent_name="layout.template.data", **kwargs - ): - super(TablesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Table"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfacesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="surface", parent_name="layout.template.data", **kwargs - ): - super(SurfacesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Surface"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SunburstsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="sunburst", parent_name="layout.template.data", **kwargs - ): - super(SunburstsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Sunburst"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamtubesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="streamtube", parent_name="layout.template.data", **kwargs - ): - super(StreamtubesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Streamtube"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SplomsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="splom", parent_name="layout.template.data", **kwargs - ): - super(SplomsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Splom"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterternarysValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scatterternary", parent_name="layout.template.data", **kwargs - ): - super(ScatterternarysValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatterternary"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scatter", parent_name="layout.template.data", **kwargs - ): - super(ScattersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatter"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterpolarsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scatterpolar", parent_name="layout.template.data", **kwargs - ): - super(ScatterpolarsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatterpolar"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterpolarglsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scatterpolargl", parent_name="layout.template.data", **kwargs - ): - super(ScatterpolarglsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatterpolargl"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattermapboxsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scattermapbox", parent_name="layout.template.data", **kwargs - ): - super(ScattermapboxsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattermapbox"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScatterglsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scattergl", parent_name="layout.template.data", **kwargs - ): - super(ScatterglsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattergl"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattergeosValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scattergeo", parent_name="layout.template.data", **kwargs - ): - super(ScattergeosValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattergeo"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScattercarpetsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scattercarpet", parent_name="layout.template.data", **kwargs - ): - super(ScattercarpetsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scattercarpet"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Scatter3dsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="scatter3d", parent_name="layout.template.data", **kwargs - ): - super(Scatter3dsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Scatter3d"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SankeysValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="sankey", parent_name="layout.template.data", **kwargs - ): - super(SankeysValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Sankey"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PointcloudsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="pointcloud", parent_name="layout.template.data", **kwargs - ): - super(PointcloudsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pointcloud"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PiesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="pie", parent_name="layout.template.data", **kwargs): - super(PiesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pie"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParcoordssValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="parcoords", parent_name="layout.template.data", **kwargs - ): - super(ParcoordssValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Parcoords"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParcatssValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="parcats", parent_name="layout.template.data", **kwargs - ): - super(ParcatssValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Parcats"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OhlcsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="ohlc", parent_name="layout.template.data", **kwargs - ): - super(OhlcsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Ohlc"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Mesh3dsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="mesh3d", parent_name="layout.template.data", **kwargs - ): - super(Mesh3dsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Mesh3d"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsosurfacesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="isosurface", parent_name="layout.template.data", **kwargs - ): - super(IsosurfacesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Isosurface"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IndicatorsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="indicator", parent_name="layout.template.data", **kwargs - ): - super(IndicatorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Indicator"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ImagesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="image", parent_name="layout.template.data", **kwargs - ): - super(ImagesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Image"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HistogramsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="histogram", parent_name="layout.template.data", **kwargs - ): - super(HistogramsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Histogram"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Histogram2dsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="histogram2d", parent_name="layout.template.data", **kwargs - ): - super(Histogram2dsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Histogram2d"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Histogram2dContoursValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="histogram2dcontour", - parent_name="layout.template.data", - **kwargs - ): - super(Histogram2dContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Histogram2dContour"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeatmapsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="heatmap", parent_name="layout.template.data", **kwargs - ): - super(HeatmapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Heatmap"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeatmapglsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="heatmapgl", parent_name="layout.template.data", **kwargs - ): - super(HeatmapglsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Heatmapgl"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="funnel", parent_name="layout.template.data", **kwargs - ): - super(FunnelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Funnel"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FunnelareasValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="funnelarea", parent_name="layout.template.data", **kwargs - ): - super(FunnelareasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Funnelarea"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DensitymapboxsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="densitymapbox", parent_name="layout.template.data", **kwargs - ): - super(DensitymapboxsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Densitymapbox"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContoursValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="contour", parent_name="layout.template.data", **kwargs - ): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contour"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContourcarpetsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="contourcarpet", parent_name="layout.template.data", **kwargs - ): - super(ContourcarpetsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contourcarpet"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="cone", parent_name="layout.template.data", **kwargs - ): - super(ConesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Cone"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ChoroplethsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="choropleth", parent_name="layout.template.data", **kwargs - ): - super(ChoroplethsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Choropleth"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ChoroplethmapboxsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="choroplethmapbox", - parent_name="layout.template.data", - **kwargs - ): - super(ChoroplethmapboxsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Choroplethmapbox"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CarpetsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="carpet", parent_name="layout.template.data", **kwargs - ): - super(CarpetsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Carpet"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CandlesticksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="candlestick", parent_name="layout.template.data", **kwargs - ): - super(CandlesticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Candlestick"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="box", parent_name="layout.template.data", **kwargs): - super(BoxsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Box"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="bar", parent_name="layout.template.data", **kwargs): - super(BarsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Bar"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BarpolarsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="barpolar", parent_name="layout.template.data", **kwargs - ): - super(BarpolarsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Barpolar"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AreasValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="area", parent_name="layout.template.data", **kwargs - ): - super(AreasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Area"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._waterfall import WaterfallValidator + from ._volume import VolumeValidator + from ._violin import ViolinValidator + from ._treemap import TreemapValidator + from ._table import TableValidator + from ._surface import SurfaceValidator + from ._sunburst import SunburstValidator + from ._streamtube import StreamtubeValidator + from ._splom import SplomValidator + from ._scatterternary import ScatterternaryValidator + from ._scatter import ScatterValidator + from ._scatterpolar import ScatterpolarValidator + from ._scatterpolargl import ScatterpolarglValidator + from ._scattermapbox import ScattermapboxValidator + from ._scattergl import ScatterglValidator + from ._scattergeo import ScattergeoValidator + from ._scattercarpet import ScattercarpetValidator + from ._scatter3d import Scatter3DValidator + from ._sankey import SankeyValidator + from ._pointcloud import PointcloudValidator + from ._pie import PieValidator + from ._parcoords import ParcoordsValidator + from ._parcats import ParcatsValidator + from ._ohlc import OhlcValidator + from ._mesh3d import Mesh3DValidator + from ._isosurface import IsosurfaceValidator + from ._indicator import IndicatorValidator + from ._image import ImageValidator + from ._histogram import HistogramValidator + from ._histogram2d import Histogram2DValidator + from ._histogram2dcontour import Histogram2DcontourValidator + from ._heatmap import HeatmapValidator + from ._heatmapgl import HeatmapglValidator + from ._funnel import FunnelValidator + from ._funnelarea import FunnelareaValidator + from ._densitymapbox import DensitymapboxValidator + from ._contour import ContourValidator + from ._contourcarpet import ContourcarpetValidator + from ._cone import ConeValidator + from ._choropleth import ChoroplethValidator + from ._choroplethmapbox import ChoroplethmapboxValidator + from ._carpet import CarpetValidator + from ._candlestick import CandlestickValidator + from ._box import BoxValidator + from ._bar import BarValidator + from ._barpolar import BarpolarValidator + from ._area import AreaValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._waterfall.WaterfallValidator", + "._volume.VolumeValidator", + "._violin.ViolinValidator", + "._treemap.TreemapValidator", + "._table.TableValidator", + "._surface.SurfaceValidator", + "._sunburst.SunburstValidator", + "._streamtube.StreamtubeValidator", + "._splom.SplomValidator", + "._scatterternary.ScatterternaryValidator", + "._scatter.ScatterValidator", + "._scatterpolar.ScatterpolarValidator", + "._scatterpolargl.ScatterpolarglValidator", + "._scattermapbox.ScattermapboxValidator", + "._scattergl.ScatterglValidator", + "._scattergeo.ScattergeoValidator", + "._scattercarpet.ScattercarpetValidator", + "._scatter3d.Scatter3DValidator", + "._sankey.SankeyValidator", + "._pointcloud.PointcloudValidator", + "._pie.PieValidator", + "._parcoords.ParcoordsValidator", + "._parcats.ParcatsValidator", + "._ohlc.OhlcValidator", + "._mesh3d.Mesh3DValidator", + "._isosurface.IsosurfaceValidator", + "._indicator.IndicatorValidator", + "._image.ImageValidator", + "._histogram.HistogramValidator", + "._histogram2d.Histogram2DValidator", + "._histogram2dcontour.Histogram2DcontourValidator", + "._heatmap.HeatmapValidator", + "._heatmapgl.HeatmapglValidator", + "._funnel.FunnelValidator", + "._funnelarea.FunnelareaValidator", + "._densitymapbox.DensitymapboxValidator", + "._contour.ContourValidator", + "._contourcarpet.ContourcarpetValidator", + "._cone.ConeValidator", + "._choropleth.ChoroplethValidator", + "._choroplethmapbox.ChoroplethmapboxValidator", + "._carpet.CarpetValidator", + "._candlestick.CandlestickValidator", + "._box.BoxValidator", + "._bar.BarValidator", + "._barpolar.BarpolarValidator", + "._area.AreaValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_area.py b/packages/python/plotly/plotly/validators/layout/template/data/_area.py new file mode 100644 index 00000000000..6048201a163 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_area.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AreaValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="area", parent_name="layout.template.data", **kwargs + ): + super(AreaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Area"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_bar.py b/packages/python/plotly/plotly/validators/layout/template/data/_bar.py new file mode 100644 index 00000000000..4e90fa0869e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_bar.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class BarValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="bar", parent_name="layout.template.data", **kwargs): + super(BarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Bar"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_barpolar.py b/packages/python/plotly/plotly/validators/layout/template/data/_barpolar.py new file mode 100644 index 00000000000..91b87da7c15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_barpolar.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BarpolarValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="barpolar", parent_name="layout.template.data", **kwargs + ): + super(BarpolarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Barpolar"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_box.py b/packages/python/plotly/plotly/validators/layout/template/data/_box.py new file mode 100644 index 00000000000..b529582cca3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_box.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class BoxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="box", parent_name="layout.template.data", **kwargs): + super(BoxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Box"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_candlestick.py b/packages/python/plotly/plotly/validators/layout/template/data/_candlestick.py new file mode 100644 index 00000000000..4444c316e25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_candlestick.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class CandlestickValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="candlestick", parent_name="layout.template.data", **kwargs + ): + super(CandlestickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Candlestick"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_carpet.py b/packages/python/plotly/plotly/validators/layout/template/data/_carpet.py new file mode 100644 index 00000000000..b7088cab1b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_carpet.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class CarpetValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="carpet", parent_name="layout.template.data", **kwargs + ): + super(CarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Carpet"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_choropleth.py b/packages/python/plotly/plotly/validators/layout/template/data/_choropleth.py new file mode 100644 index 00000000000..7463e577e8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_choropleth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ChoroplethValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="choropleth", parent_name="layout.template.data", **kwargs + ): + super(ChoroplethValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Choropleth"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_choroplethmapbox.py b/packages/python/plotly/plotly/validators/layout/template/data/_choroplethmapbox.py new file mode 100644 index 00000000000..1498cd89ff9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_choroplethmapbox.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class ChoroplethmapboxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="choroplethmapbox", + parent_name="layout.template.data", + **kwargs + ): + super(ChoroplethmapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Choroplethmapbox"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_cone.py b/packages/python/plotly/plotly/validators/layout/template/data/_cone.py new file mode 100644 index 00000000000..178aca2475a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_cone.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ConeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="cone", parent_name="layout.template.data", **kwargs + ): + super(ConeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Cone"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_contour.py b/packages/python/plotly/plotly/validators/layout/template/data/_contour.py new file mode 100644 index 00000000000..ad7eae7ef74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_contour.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ContourValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="contour", parent_name="layout.template.data", **kwargs + ): + super(ContourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contour"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_contourcarpet.py b/packages/python/plotly/plotly/validators/layout/template/data/_contourcarpet.py new file mode 100644 index 00000000000..96e85549e13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_contourcarpet.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ContourcarpetValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="contourcarpet", parent_name="layout.template.data", **kwargs + ): + super(ContourcarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contourcarpet"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_densitymapbox.py b/packages/python/plotly/plotly/validators/layout/template/data/_densitymapbox.py new file mode 100644 index 00000000000..f768f50c3bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_densitymapbox.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class DensitymapboxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="densitymapbox", parent_name="layout.template.data", **kwargs + ): + super(DensitymapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Densitymapbox"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_funnel.py b/packages/python/plotly/plotly/validators/layout/template/data/_funnel.py new file mode 100644 index 00000000000..7a0a07d26e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_funnel.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class FunnelValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="funnel", parent_name="layout.template.data", **kwargs + ): + super(FunnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Funnel"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_funnelarea.py b/packages/python/plotly/plotly/validators/layout/template/data/_funnelarea.py new file mode 100644 index 00000000000..c4948d02925 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_funnelarea.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class FunnelareaValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="funnelarea", parent_name="layout.template.data", **kwargs + ): + super(FunnelareaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Funnelarea"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_heatmap.py b/packages/python/plotly/plotly/validators/layout/template/data/_heatmap.py new file mode 100644 index 00000000000..eadc63d7e44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_heatmap.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class HeatmapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="heatmap", parent_name="layout.template.data", **kwargs + ): + super(HeatmapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Heatmap"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_heatmapgl.py b/packages/python/plotly/plotly/validators/layout/template/data/_heatmapgl.py new file mode 100644 index 00000000000..0641b83d5d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_heatmapgl.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class HeatmapglValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="heatmapgl", parent_name="layout.template.data", **kwargs + ): + super(HeatmapglValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Heatmapgl"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_histogram.py b/packages/python/plotly/plotly/validators/layout/template/data/_histogram.py new file mode 100644 index 00000000000..f5c6fc1b9df --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_histogram.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class HistogramValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="histogram", parent_name="layout.template.data", **kwargs + ): + super(HistogramValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Histogram"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_histogram2d.py b/packages/python/plotly/plotly/validators/layout/template/data/_histogram2d.py new file mode 100644 index 00000000000..877cb1e0bb4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_histogram2d.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class Histogram2DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="histogram2d", parent_name="layout.template.data", **kwargs + ): + super(Histogram2DValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Histogram2d"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_histogram2dcontour.py b/packages/python/plotly/plotly/validators/layout/template/data/_histogram2dcontour.py new file mode 100644 index 00000000000..52b9a160855 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_histogram2dcontour.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class Histogram2DcontourValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="histogram2dcontour", + parent_name="layout.template.data", + **kwargs + ): + super(Histogram2DcontourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Histogram2dContour"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_image.py b/packages/python/plotly/plotly/validators/layout/template/data/_image.py new file mode 100644 index 00000000000..439aebdc655 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_image.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ImageValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="image", parent_name="layout.template.data", **kwargs + ): + super(ImageValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Image"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_indicator.py b/packages/python/plotly/plotly/validators/layout/template/data/_indicator.py new file mode 100644 index 00000000000..86d92173f9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_indicator.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class IndicatorValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="indicator", parent_name="layout.template.data", **kwargs + ): + super(IndicatorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Indicator"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_isosurface.py b/packages/python/plotly/plotly/validators/layout/template/data/_isosurface.py new file mode 100644 index 00000000000..28e56f5c27f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_isosurface.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class IsosurfaceValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="isosurface", parent_name="layout.template.data", **kwargs + ): + super(IsosurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Isosurface"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_mesh3d.py b/packages/python/plotly/plotly/validators/layout/template/data/_mesh3d.py new file mode 100644 index 00000000000..566f0d14d7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_mesh3d.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class Mesh3DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="mesh3d", parent_name="layout.template.data", **kwargs + ): + super(Mesh3DValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Mesh3d"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_ohlc.py b/packages/python/plotly/plotly/validators/layout/template/data/_ohlc.py new file mode 100644 index 00000000000..d4de3d9005e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_ohlc.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OhlcValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="ohlc", parent_name="layout.template.data", **kwargs + ): + super(OhlcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Ohlc"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_parcats.py b/packages/python/plotly/plotly/validators/layout/template/data/_parcats.py new file mode 100644 index 00000000000..b1aab667886 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_parcats.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ParcatsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="parcats", parent_name="layout.template.data", **kwargs + ): + super(ParcatsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Parcats"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_parcoords.py b/packages/python/plotly/plotly/validators/layout/template/data/_parcoords.py new file mode 100644 index 00000000000..a8c188f6743 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_parcoords.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ParcoordsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="parcoords", parent_name="layout.template.data", **kwargs + ): + super(ParcoordsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Parcoords"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_pie.py b/packages/python/plotly/plotly/validators/layout/template/data/_pie.py new file mode 100644 index 00000000000..2027420266c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_pie.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class PieValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="pie", parent_name="layout.template.data", **kwargs): + super(PieValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pie"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_pointcloud.py b/packages/python/plotly/plotly/validators/layout/template/data/_pointcloud.py new file mode 100644 index 00000000000..da15aa89dbe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_pointcloud.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class PointcloudValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="pointcloud", parent_name="layout.template.data", **kwargs + ): + super(PointcloudValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pointcloud"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_sankey.py b/packages/python/plotly/plotly/validators/layout/template/data/_sankey.py new file mode 100644 index 00000000000..bc3f91d3854 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_sankey.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SankeyValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="sankey", parent_name="layout.template.data", **kwargs + ): + super(SankeyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Sankey"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scatter.py b/packages/python/plotly/plotly/validators/layout/template/data/_scatter.py new file mode 100644 index 00000000000..951e8db374d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scatter.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScatterValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scatter", parent_name="layout.template.data", **kwargs + ): + super(ScatterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatter"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scatter3d.py b/packages/python/plotly/plotly/validators/layout/template/data/_scatter3d.py new file mode 100644 index 00000000000..59ef42d7e48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scatter3d.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class Scatter3DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scatter3d", parent_name="layout.template.data", **kwargs + ): + super(Scatter3DValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatter3d"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scattercarpet.py b/packages/python/plotly/plotly/validators/layout/template/data/_scattercarpet.py new file mode 100644 index 00000000000..0c9e0059ad0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scattercarpet.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScattercarpetValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scattercarpet", parent_name="layout.template.data", **kwargs + ): + super(ScattercarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattercarpet"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scattergeo.py b/packages/python/plotly/plotly/validators/layout/template/data/_scattergeo.py new file mode 100644 index 00000000000..2bec7dbbb40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scattergeo.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScattergeoValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scattergeo", parent_name="layout.template.data", **kwargs + ): + super(ScattergeoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattergeo"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scattergl.py b/packages/python/plotly/plotly/validators/layout/template/data/_scattergl.py new file mode 100644 index 00000000000..f494b1f6f2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scattergl.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScatterglValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scattergl", parent_name="layout.template.data", **kwargs + ): + super(ScatterglValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattergl"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scattermapbox.py b/packages/python/plotly/plotly/validators/layout/template/data/_scattermapbox.py new file mode 100644 index 00000000000..160705a329f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scattermapbox.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scattermapbox", parent_name="layout.template.data", **kwargs + ): + super(ScattermapboxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scattermapbox"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolar.py b/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolar.py new file mode 100644 index 00000000000..0cafa2d17c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolar.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScatterpolarValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scatterpolar", parent_name="layout.template.data", **kwargs + ): + super(ScatterpolarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatterpolar"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolargl.py b/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolargl.py new file mode 100644 index 00000000000..671f27fd6f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scatterpolargl.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScatterpolarglValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scatterpolargl", parent_name="layout.template.data", **kwargs + ): + super(ScatterpolarglValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatterpolargl"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_scatterternary.py b/packages/python/plotly/plotly/validators/layout/template/data/_scatterternary.py new file mode 100644 index 00000000000..27c76ffbeff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_scatterternary.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ScatterternaryValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="scatterternary", parent_name="layout.template.data", **kwargs + ): + super(ScatterternaryValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Scatterternary"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_splom.py b/packages/python/plotly/plotly/validators/layout/template/data/_splom.py new file mode 100644 index 00000000000..f1ccbd6cf96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_splom.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SplomValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="splom", parent_name="layout.template.data", **kwargs + ): + super(SplomValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Splom"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_streamtube.py b/packages/python/plotly/plotly/validators/layout/template/data/_streamtube.py new file mode 100644 index 00000000000..b87055516d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_streamtube.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class StreamtubeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="streamtube", parent_name="layout.template.data", **kwargs + ): + super(StreamtubeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Streamtube"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_sunburst.py b/packages/python/plotly/plotly/validators/layout/template/data/_sunburst.py new file mode 100644 index 00000000000..46aa2ed78b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_sunburst.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SunburstValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="sunburst", parent_name="layout.template.data", **kwargs + ): + super(SunburstValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Sunburst"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_surface.py b/packages/python/plotly/plotly/validators/layout/template/data/_surface.py new file mode 100644 index 00000000000..5e20d4e8882 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_surface.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SurfaceValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="surface", parent_name="layout.template.data", **kwargs + ): + super(SurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Surface"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_table.py b/packages/python/plotly/plotly/validators/layout/template/data/_table.py new file mode 100644 index 00000000000..d160265455f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_table.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TableValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="table", parent_name="layout.template.data", **kwargs + ): + super(TableValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Table"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_treemap.py b/packages/python/plotly/plotly/validators/layout/template/data/_treemap.py new file mode 100644 index 00000000000..0f30b901044 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_treemap.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TreemapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="treemap", parent_name="layout.template.data", **kwargs + ): + super(TreemapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Treemap"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_violin.py b/packages/python/plotly/plotly/validators/layout/template/data/_violin.py new file mode 100644 index 00000000000..b5c17470b07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_violin.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ViolinValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="violin", parent_name="layout.template.data", **kwargs + ): + super(ViolinValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Violin"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_volume.py b/packages/python/plotly/plotly/validators/layout/template/data/_volume.py new file mode 100644 index 00000000000..8c1cef3029c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_volume.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class VolumeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="volume", parent_name="layout.template.data", **kwargs + ): + super(VolumeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Volume"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/template/data/_waterfall.py b/packages/python/plotly/plotly/validators/layout/template/data/_waterfall.py new file mode 100644 index 00000000000..fd5fd291843 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/template/data/_waterfall.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class WaterfallValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="waterfall", parent_name="layout.template.data", **kwargs + ): + super(WaterfallValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Waterfall"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/__init__.py index 4793dbe2785..8b8fb6a521b 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/__init__.py @@ -1,746 +1,26 @@ -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.ternary", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SumValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sum", parent_name="layout.ternary", **kwargs): - super(SumValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="layout.ternary", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this ternary - subplot . - row - If there is a layout grid, use the domain for - this row in the grid for this ternary subplot . - x - Sets the horizontal domain of this ternary - subplot (in plot fraction). - y - Sets the vertical domain of this ternary - subplot (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CaxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="caxis", parent_name="layout.ternary", **kwargs): - super(CaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Caxis"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.caxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.caxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.caxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.cax - is.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.ternary.caxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="layout.ternary", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="baxis", parent_name="layout.ternary", **kwargs): - super(BaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Baxis"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.baxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.baxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.bax - is.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.ternary.baxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AaxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="aaxis", parent_name="layout.ternary", **kwargs): - super(AaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Aaxis"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.aaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.aaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.aax - is.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - layout.ternary.aaxis.title.font instead. Sets - this axis' title font. Note that the title's - font used to be customized by the now - deprecated `titlefont` attribute. - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._uirevision import UirevisionValidator + from ._sum import SumValidator + from ._domain import DomainValidator + from ._caxis import CaxisValidator + from ._bgcolor import BgcolorValidator + from ._baxis import BaxisValidator + from ._aaxis import AaxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._sum.SumValidator", + "._domain.DomainValidator", + "._caxis.CaxisValidator", + "._bgcolor.BgcolorValidator", + "._baxis.BaxisValidator", + "._aaxis.AaxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_aaxis.py b/packages/python/plotly/plotly/validators/layout/ternary/_aaxis.py new file mode 100644 index 00000000000..b10630abe96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_aaxis.py @@ -0,0 +1,222 @@ +import _plotly_utils.basevalidators + + +class AaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="aaxis", parent_name="layout.ternary", **kwargs): + super(AaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Aaxis"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The + maximum is determined by the sum minus the + minimum values of the other two axes. The full + view corresponds to all the minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + ternary.aaxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.ternary.aaxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.ternary.aaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.aax + is.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.ternary.aaxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in + axis `min`, and `title` if in `editable: true` + configuration. Defaults to + `ternary.uirevision`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_baxis.py b/packages/python/plotly/plotly/validators/layout/ternary/_baxis.py new file mode 100644 index 00000000000..8da8ec2df41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_baxis.py @@ -0,0 +1,222 @@ +import _plotly_utils.basevalidators + + +class BaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="baxis", parent_name="layout.ternary", **kwargs): + super(BaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Baxis"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The + maximum is determined by the sum minus the + minimum values of the other two axes. The full + view corresponds to all the minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + ternary.baxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.ternary.baxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.ternary.baxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.bax + is.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.ternary.baxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in + axis `min`, and `title` if in `editable: true` + configuration. Defaults to + `ternary.uirevision`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/_bgcolor.py new file mode 100644 index 00000000000..bce23f5f80a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="layout.ternary", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_caxis.py b/packages/python/plotly/plotly/validators/layout/ternary/_caxis.py new file mode 100644 index 00000000000..f20d41ee802 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_caxis.py @@ -0,0 +1,222 @@ +import _plotly_utils.basevalidators + + +class CaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="caxis", parent_name="layout.ternary", **kwargs): + super(CaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Caxis"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + min + The minimum value visible on this axis. The + maximum is determined by the sum minus the + minimum values of the other two axes. The full + view corresponds to all the minima set to zero. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.layout. + ternary.caxis.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.ternary.caxis.tickformatstopdefaults), sets + the default property values to use for elements + of layout.ternary.caxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.layout.ternary.cax + is.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + layout.ternary.caxis.title.font instead. Sets + this axis' title font. Note that the title's + font used to be customized by the now + deprecated `titlefont` attribute. + uirevision + Controls persistence of user-driven changes in + axis `min`, and `title` if in `editable: true` + configuration. Defaults to + `ternary.uirevision`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_domain.py b/packages/python/plotly/plotly/validators/layout/ternary/_domain.py new file mode 100644 index 00000000000..4e1203f2739 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="layout.ternary", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this ternary + subplot . + row + If there is a layout grid, use the domain for + this row in the grid for this ternary subplot . + x + Sets the horizontal domain of this ternary + subplot (in plot fraction). + y + Sets the vertical domain of this ternary + subplot (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_sum.py b/packages/python/plotly/plotly/validators/layout/ternary/_sum.py new file mode 100644 index 00000000000..5303c844cd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_sum.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SumValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sum", parent_name="layout.ternary", **kwargs): + super(SumValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/_uirevision.py b/packages/python/plotly/plotly/validators/layout/ternary/_uirevision.py new file mode 100644 index 00000000000..2ce55907d91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.ternary", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/__init__.py index 6594085445c..36c8023e0fc 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/__init__.py @@ -1,693 +1,86 @@ -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.ternary.aaxis", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.ternary.aaxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="layout.ternary.aaxis", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.ternary.aaxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="layout.ternary.aaxis", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.ternary.aaxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.ternary.aaxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="min", parent_name="layout.ternary.aaxis", **kwargs): - super(MinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.ternary.aaxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.ternary.aaxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="layer", parent_name="layout.ternary.aaxis", **kwargs - ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.ternary.aaxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.ternary.aaxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.ternary.aaxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="layout.ternary.aaxis", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.ternary.aaxis", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._uirevision import UirevisionValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._nticks import NticksValidator + from ._min import MinValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._nticks.NticksValidator", + "._min.MinValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_color.py new file mode 100644 index 00000000000..a539927e3d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_dtick.py new file mode 100644 index 00000000000..248622b6691 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="layout.ternary.aaxis", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_exponentformat.py new file mode 100644 index 00000000000..78e16c37f87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_gridcolor.py new file mode 100644 index 00000000000..0607b91917e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.ternary.aaxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_gridwidth.py new file mode 100644 index 00000000000..73fe6266701 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.ternary.aaxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_hoverformat.py new file mode 100644 index 00000000000..1f00dc0d32d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.ternary.aaxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_layer.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_layer.py new file mode 100644 index 00000000000..0f1bd06134a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_layer.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="layer", parent_name="layout.ternary.aaxis", **kwargs + ): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_linecolor.py new file mode 100644 index 00000000000..3affe214bd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.ternary.aaxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_linewidth.py new file mode 100644 index 00000000000..5cd9284f1a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.ternary.aaxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_min.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_min.py new file mode 100644 index 00000000000..923df6b5b23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_min.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MinValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="min", parent_name="layout.ternary.aaxis", **kwargs): + super(MinValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_nticks.py new file mode 100644 index 00000000000..dc166ec03c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.ternary.aaxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_separatethousands.py new file mode 100644 index 00000000000..a7d891dd491 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.ternary.aaxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showexponent.py new file mode 100644 index 00000000000..3490fc30185 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showgrid.py new file mode 100644 index 00000000000..7cb3c866285 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showline.py new file mode 100644 index 00000000000..a7e111c1b61 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showticklabels.py new file mode 100644 index 00000000000..227561c294a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showtickprefix.py new file mode 100644 index 00000000000..01a992ba560 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showticksuffix.py new file mode 100644 index 00000000000..9c9fea35b01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.ternary.aaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tick0.py new file mode 100644 index 00000000000..ae718cf3719 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="layout.ternary.aaxis", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickangle.py new file mode 100644 index 00000000000..f47994dcf27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickcolor.py new file mode 100644 index 00000000000..745792ab6cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickfont.py new file mode 100644 index 00000000000..4b201b8555a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformat.py new file mode 100644 index 00000000000..ac23cad7ba6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..84549917a0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.ternary.aaxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformatstops.py new file mode 100644 index 00000000000..f4cfc23ef63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="layout.ternary.aaxis", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticklen.py new file mode 100644 index 00000000000..99bff32a46d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickmode.py new file mode 100644 index 00000000000..b7471b38e99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickprefix.py new file mode 100644 index 00000000000..9ce7cd401e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticks.py new file mode 100644 index 00000000000..961d9f87aae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticksuffix.py new file mode 100644 index 00000000000..ac693d730c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticktext.py new file mode 100644 index 00000000000..9e9b7b58f6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py new file mode 100644 index 00000000000..4b10275f46f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvals.py new file mode 100644 index 00000000000..b0b9318a672 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py new file mode 100644 index 00000000000..90db1553004 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickwidth.py new file mode 100644 index 00000000000..b6494b6db63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_title.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_title.py new file mode 100644 index 00000000000..0a7a84c2d23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_title.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="layout.ternary.aaxis", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_uirevision.py new file mode 100644 index 00000000000..21ed7eb9d36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.ternary.aaxis", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py index 176847b678d..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.ternary.aaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.ternary.aaxis.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.ternary.aaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_color.py new file mode 100644 index 00000000000..96fdbe535de --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.ternary.aaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_family.py new file mode 100644 index 00000000000..f5d72e91796 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.ternary.aaxis.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_size.py new file mode 100644 index 00000000000..1c3bea2ca6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.ternary.aaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py index 9316093da79..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.ternary.aaxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.ternary.aaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.ternary.aaxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.ternary.aaxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.ternary.aaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..0eb7c58a215 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.ternary.aaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..3536b85673d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.ternary.aaxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..7e4ad8385d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.ternary.aaxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..dd99579dd34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.ternary.aaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..aceaf73ede9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.ternary.aaxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/__init__.py index c6eaf511303..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.ternary.aaxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.ternary.aaxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/_font.py new file mode 100644 index 00000000000..a9840a2e824 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.ternary.aaxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/_text.py new file mode 100644 index 00000000000..0e3ec90be04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.ternary.aaxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/__init__.py index f4c529652c3..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.ternary.aaxis.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.ternary.aaxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.ternary.aaxis.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_color.py new file mode 100644 index 00000000000..f79015dc867 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.ternary.aaxis.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_family.py new file mode 100644 index 00000000000..d2850433f0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.ternary.aaxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_size.py new file mode 100644 index 00000000000..5fc92216891 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.ternary.aaxis.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/__init__.py index b7a8e13cefa..36c8023e0fc 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/baxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/__init__.py @@ -1,693 +1,86 @@ -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.ternary.baxis", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="layout.ternary.baxis", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.ternary.baxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.ternary.baxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.ternary.baxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="layout.ternary.baxis", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.ternary.baxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.ternary.baxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="layout.ternary.baxis", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.ternary.baxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="layout.ternary.baxis", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.ternary.baxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.ternary.baxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.ternary.baxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.ternary.baxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.ternary.baxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.ternary.baxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.ternary.baxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.ternary.baxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="min", parent_name="layout.ternary.baxis", **kwargs): - super(MinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.ternary.baxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.ternary.baxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="layer", parent_name="layout.ternary.baxis", **kwargs - ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.ternary.baxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.ternary.baxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.ternary.baxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.ternary.baxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="layout.ternary.baxis", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.ternary.baxis", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._uirevision import UirevisionValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._nticks import NticksValidator + from ._min import MinValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._nticks.NticksValidator", + "._min.MinValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_color.py new file mode 100644 index 00000000000..cd7ab3f8f49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.ternary.baxis", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_dtick.py new file mode 100644 index 00000000000..c5a9b2d0be6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="layout.ternary.baxis", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_exponentformat.py new file mode 100644 index 00000000000..b402c3f394d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.ternary.baxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_gridcolor.py new file mode 100644 index 00000000000..b2c46405d2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.ternary.baxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_gridwidth.py new file mode 100644 index 00000000000..7fd94ddb4ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.ternary.baxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_hoverformat.py new file mode 100644 index 00000000000..4c265221484 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.ternary.baxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_layer.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_layer.py new file mode 100644 index 00000000000..5388efb4a70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_layer.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="layer", parent_name="layout.ternary.baxis", **kwargs + ): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_linecolor.py new file mode 100644 index 00000000000..cab4c613fe6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.ternary.baxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_linewidth.py new file mode 100644 index 00000000000..fec0c9d5070 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.ternary.baxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_min.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_min.py new file mode 100644 index 00000000000..495db39e85b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_min.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MinValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="min", parent_name="layout.ternary.baxis", **kwargs): + super(MinValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_nticks.py new file mode 100644 index 00000000000..260cd234eae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.ternary.baxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_separatethousands.py new file mode 100644 index 00000000000..1648cf57a71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.ternary.baxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showexponent.py new file mode 100644 index 00000000000..bf6f4193a5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.ternary.baxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showgrid.py new file mode 100644 index 00000000000..255154cc6ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.ternary.baxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showline.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showline.py new file mode 100644 index 00000000000..53aa9a3d2c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.ternary.baxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showticklabels.py new file mode 100644 index 00000000000..230cb54d85e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.ternary.baxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showtickprefix.py new file mode 100644 index 00000000000..82b2061000e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.ternary.baxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showticksuffix.py new file mode 100644 index 00000000000..7bcfb1babfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.ternary.baxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tick0.py new file mode 100644 index 00000000000..f82ff4b68f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="layout.ternary.baxis", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickangle.py new file mode 100644 index 00000000000..e9f7642a213 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickcolor.py new file mode 100644 index 00000000000..fe353e02fd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickfont.py new file mode 100644 index 00000000000..0b622ac1125 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformat.py new file mode 100644 index 00000000000..39a594a0ec2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..de1254393a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.ternary.baxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstops.py new file mode 100644 index 00000000000..73fde506e29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="layout.ternary.baxis", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticklen.py new file mode 100644 index 00000000000..1833ed2075c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.ternary.baxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickmode.py new file mode 100644 index 00000000000..d28e701e79f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickprefix.py new file mode 100644 index 00000000000..61d64de90ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticks.py new file mode 100644 index 00000000000..b824c469cf0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="layout.ternary.baxis", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticksuffix.py new file mode 100644 index 00000000000..fcf670c6029 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.ternary.baxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticktext.py new file mode 100644 index 00000000000..36c809f5a96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.ternary.baxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticktextsrc.py new file mode 100644 index 00000000000..e3802f9eda3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.ternary.baxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickvals.py new file mode 100644 index 00000000000..f18926fa19e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickvalssrc.py new file mode 100644 index 00000000000..1fbbe00ac9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickwidth.py new file mode 100644 index 00000000000..b3550380376 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.ternary.baxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_title.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_title.py new file mode 100644 index 00000000000..6ed680bff04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_title.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="layout.ternary.baxis", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_uirevision.py new file mode 100644 index 00000000000..a7b2909ac0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.ternary.baxis", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/__init__.py index 818b8edb95e..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.ternary.baxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.ternary.baxis.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.ternary.baxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_color.py new file mode 100644 index 00000000000..f1265aa5696 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.ternary.baxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_family.py new file mode 100644 index 00000000000..30d876f5432 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.ternary.baxis.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_size.py new file mode 100644 index 00000000000..7763e51c3e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.ternary.baxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py index ee3e8749d03..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.ternary.baxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.ternary.baxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.ternary.baxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.ternary.baxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.ternary.baxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..59676af7f48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.ternary.baxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a80caa462bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.ternary.baxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py new file mode 100644 index 00000000000..51efab5bfdf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.ternary.baxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..bfce468158f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.ternary.baxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py new file mode 100644 index 00000000000..78e584626b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.ternary.baxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/__init__.py index 7c16ce10866..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.ternary.baxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.ternary.baxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/_font.py new file mode 100644 index 00000000000..14d7d300ac0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.ternary.baxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/_text.py new file mode 100644 index 00000000000..c3f2331f53d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.ternary.baxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/__init__.py index 10120dc1083..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.ternary.baxis.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.ternary.baxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.ternary.baxis.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_color.py new file mode 100644 index 00000000000..f1bd914cd75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.ternary.baxis.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_family.py new file mode 100644 index 00000000000..ddfa960a40b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.ternary.baxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_size.py new file mode 100644 index 00000000000..da2fe0bcf58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.ternary.baxis.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/__init__.py index 87764edeab1..36c8023e0fc 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/caxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/__init__.py @@ -1,693 +1,86 @@ -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="layout.ternary.caxis", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="layout.ternary.caxis", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="layout.ternary.caxis", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="layout.ternary.caxis", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="layout.ternary.caxis", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="layout.ternary.caxis", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="layout.ternary.caxis", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="layout.ternary.caxis", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="layout.ternary.caxis", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="layout.ternary.caxis", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="layout.ternary.caxis", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.ternary.caxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.ternary.caxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.ternary.caxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showline", parent_name="layout.ternary.caxis", **kwargs - ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showgrid", parent_name="layout.ternary.caxis", **kwargs - ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.ternary.caxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="layout.ternary.caxis", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="layout.ternary.caxis", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="min", parent_name="layout.ternary.caxis", **kwargs): - super(MinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="linewidth", parent_name="layout.ternary.caxis", **kwargs - ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="linecolor", parent_name="layout.ternary.caxis", **kwargs - ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="layer", parent_name="layout.ternary.caxis", **kwargs - ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hoverformat", parent_name="layout.ternary.caxis", **kwargs - ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="gridwidth", parent_name="layout.ternary.caxis", **kwargs - ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="gridcolor", parent_name="layout.ternary.caxis", **kwargs - ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.ternary.caxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="layout.ternary.caxis", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.ternary.caxis", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._uirevision import UirevisionValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._nticks import NticksValidator + from ._min import MinValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._nticks.NticksValidator", + "._min.MinValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_color.py new file mode 100644 index 00000000000..29ad6a0d03b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.ternary.caxis", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_dtick.py new file mode 100644 index 00000000000..fc0724da07a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="layout.ternary.caxis", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_exponentformat.py new file mode 100644 index 00000000000..4b1df283a7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.ternary.caxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridcolor.py new file mode 100644 index 00000000000..1e0c1b8a787 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="gridcolor", parent_name="layout.ternary.caxis", **kwargs + ): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridwidth.py new file mode 100644 index 00000000000..10246df9e85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="gridwidth", parent_name="layout.ternary.caxis", **kwargs + ): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_hoverformat.py new file mode 100644 index 00000000000..cae12f15f97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_hoverformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hoverformat", parent_name="layout.ternary.caxis", **kwargs + ): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_layer.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_layer.py new file mode 100644 index 00000000000..640ea935756 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_layer.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="layer", parent_name="layout.ternary.caxis", **kwargs + ): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_linecolor.py new file mode 100644 index 00000000000..272dd08fa50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_linecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="linecolor", parent_name="layout.ternary.caxis", **kwargs + ): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_linewidth.py new file mode 100644 index 00000000000..997a9bd6aff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_linewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="linewidth", parent_name="layout.ternary.caxis", **kwargs + ): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_min.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_min.py new file mode 100644 index 00000000000..006c958eb09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_min.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MinValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="min", parent_name="layout.ternary.caxis", **kwargs): + super(MinValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_nticks.py new file mode 100644 index 00000000000..8b8c59c48c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="layout.ternary.caxis", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_separatethousands.py new file mode 100644 index 00000000000..3066a21d9e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="layout.ternary.caxis", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showexponent.py new file mode 100644 index 00000000000..1ba389e99d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.ternary.caxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showgrid.py new file mode 100644 index 00000000000..13a244ed9ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showgrid.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showgrid", parent_name="layout.ternary.caxis", **kwargs + ): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showline.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showline.py new file mode 100644 index 00000000000..2db2bdd7bfc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showline.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showline", parent_name="layout.ternary.caxis", **kwargs + ): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showticklabels.py new file mode 100644 index 00000000000..7be8f4609ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.ternary.caxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showtickprefix.py new file mode 100644 index 00000000000..331e3a0c422 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.ternary.caxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showticksuffix.py new file mode 100644 index 00000000000..1ecc31c579f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.ternary.caxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tick0.py new file mode 100644 index 00000000000..8276bbdc37d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="layout.ternary.caxis", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickangle.py new file mode 100644 index 00000000000..1f6351542ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickcolor.py new file mode 100644 index 00000000000..46d3cf45743 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickfont.py new file mode 100644 index 00000000000..a2c9897b6e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformat.py new file mode 100644 index 00000000000..739bbee8c11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..f1d8a01199a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="layout.ternary.caxis", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformatstops.py new file mode 100644 index 00000000000..7f35c114ead --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="layout.ternary.caxis", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticklen.py new file mode 100644 index 00000000000..cac2875a720 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="layout.ternary.caxis", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickmode.py new file mode 100644 index 00000000000..73aa100e35b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickprefix.py new file mode 100644 index 00000000000..2deb2531add --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticks.py new file mode 100644 index 00000000000..0afce0c38f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="layout.ternary.caxis", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticksuffix.py new file mode 100644 index 00000000000..4009f9e0860 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="layout.ternary.caxis", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktext.py new file mode 100644 index 00000000000..8ae73d33243 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="layout.ternary.caxis", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktextsrc.py new file mode 100644 index 00000000000..3fb6f5d233c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="layout.ternary.caxis", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickvals.py new file mode 100644 index 00000000000..5e3db2e4220 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickvalssrc.py new file mode 100644 index 00000000000..146c1de74ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickwidth.py new file mode 100644 index 00000000000..19117ae892b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="layout.ternary.caxis", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_title.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_title.py new file mode 100644 index 00000000000..513d561ef5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_title.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="layout.ternary.caxis", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_uirevision.py new file mode 100644 index 00000000000..80d8daa3b1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="layout.ternary.caxis", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/__init__.py index 3b4a35d8011..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/__init__.py @@ -1,52 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.ternary.caxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.ternary.caxis.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.ternary.caxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_color.py new file mode 100644 index 00000000000..f7dc3423f7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.ternary.caxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_family.py new file mode 100644 index 00000000000..71b17f505c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.ternary.caxis.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_size.py new file mode 100644 index 00000000000..142faf2f761 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.ternary.caxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py index eb546a2ab20..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="layout.ternary.caxis.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.ternary.caxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.ternary.caxis.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="layout.ternary.caxis.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.ternary.caxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..597cd23a114 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.ternary.caxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..bab2649c35c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="layout.ternary.caxis.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py new file mode 100644 index 00000000000..500a96b9ecf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.ternary.caxis.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..40e84a10c6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.ternary.caxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py new file mode 100644 index 00000000000..84408657e15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="layout.ternary.caxis.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/__init__.py index c6188d3ea84..b2feec4b68b 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/__init__.py @@ -1,55 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="layout.ternary.caxis.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.ternary.caxis.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/_font.py new file mode 100644 index 00000000000..f8495a08186 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.ternary.caxis.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/_text.py new file mode 100644 index 00000000000..67897240e57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="layout.ternary.caxis.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/__init__.py index 4ac87536f4d..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.ternary.caxis.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.ternary.caxis.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.ternary.caxis.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_color.py new file mode 100644 index 00000000000..63e02581875 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.ternary.caxis.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_family.py new file mode 100644 index 00000000000..5e12481f996 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.ternary.caxis.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_size.py new file mode 100644 index 00000000000..caf678dfecb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.ternary.caxis.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/domain/__init__.py b/packages/python/plotly/plotly/validators/layout/ternary/domain/__init__.py index 3f5ec6e4be1..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/domain/__init__.py @@ -1,74 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="layout.ternary.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="layout.ternary.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="row", parent_name="layout.ternary.domain", **kwargs - ): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="column", parent_name="layout.ternary.domain", **kwargs - ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/domain/_column.py b/packages/python/plotly/plotly/validators/layout/ternary/domain/_column.py new file mode 100644 index 00000000000..5ae480d1ce5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/domain/_column.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="column", parent_name="layout.ternary.domain", **kwargs + ): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/domain/_row.py b/packages/python/plotly/plotly/validators/layout/ternary/domain/_row.py new file mode 100644 index 00000000000..f74b4972078 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/domain/_row.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="row", parent_name="layout.ternary.domain", **kwargs + ): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/domain/_x.py b/packages/python/plotly/plotly/validators/layout/ternary/domain/_x.py new file mode 100644 index 00000000000..df62b569f18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="layout.ternary.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/ternary/domain/_y.py b/packages/python/plotly/plotly/validators/layout/ternary/domain/_y.py new file mode 100644 index 00000000000..58eafce324d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/ternary/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="layout.ternary.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/__init__.py b/packages/python/plotly/plotly/validators/layout/title/__init__.py index 57a41033e9a..5b7f1545db4 100644 --- a/packages/python/plotly/plotly/validators/layout/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/title/__init__.py @@ -1,173 +1,30 @@ -import _plotly_utils.basevalidators - - -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yref", parent_name="layout.title", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["container", "paper"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="layout.title", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="layout.title", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xref", parent_name="layout.title", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["container", "paper"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="layout.title", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="layout.title", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="layout.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pad", parent_name="layout.title", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pad"), - data_docs=kwargs.pop( - "data_docs", - """ - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yref import YrefValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xref import XrefValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._text import TextValidator + from ._pad import PadValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._text.TextValidator", + "._pad.PadValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_font.py b/packages/python/plotly/plotly/validators/layout/title/_font.py new file mode 100644 index 00000000000..d4111028fad --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_pad.py b/packages/python/plotly/plotly/validators/layout/title/_pad.py new file mode 100644 index 00000000000..275713571d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_pad.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pad", parent_name="layout.title", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pad"), + data_docs=kwargs.pop( + "data_docs", + """ + b + The amount of padding (in px) along the bottom + of the component. + l + The amount of padding (in px) on the left side + of the component. + r + The amount of padding (in px) on the right side + of the component. + t + The amount of padding (in px) along the top of + the component. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_text.py b/packages/python/plotly/plotly/validators/layout/title/_text.py new file mode 100644 index 00000000000..0fc0a3dd42d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="layout.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_x.py b/packages/python/plotly/plotly/validators/layout/title/_x.py new file mode 100644 index 00000000000..9da0ff27cd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="layout.title", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_xanchor.py b/packages/python/plotly/plotly/validators/layout/title/_xanchor.py new file mode 100644 index 00000000000..ccc554ba999 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="layout.title", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_xref.py b/packages/python/plotly/plotly/validators/layout/title/_xref.py new file mode 100644 index 00000000000..3593223eb2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_xref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xref", parent_name="layout.title", **kwargs): + super(XrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["container", "paper"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_y.py b/packages/python/plotly/plotly/validators/layout/title/_y.py new file mode 100644 index 00000000000..078000729f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="layout.title", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_yanchor.py b/packages/python/plotly/plotly/validators/layout/title/_yanchor.py new file mode 100644 index 00000000000..27da1e4015f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="layout.title", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/_yref.py b/packages/python/plotly/plotly/validators/layout/title/_yref.py new file mode 100644 index 00000000000..38326049ebf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/_yref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yref", parent_name="layout.title", **kwargs): + super(YrefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["container", "paper"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/title/font/__init__.py index d5dbc43d28f..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/title/font/__init__.py @@ -1,43 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="layout.title.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="layout.title.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.title.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/title/font/_color.py new file mode 100644 index 00000000000..1c94b787bc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/font/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.title.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/title/font/_family.py new file mode 100644 index 00000000000..23433535160 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/font/_family.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="layout.title.font", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/title/font/_size.py new file mode 100644 index 00000000000..309fa569adf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/font/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="layout.title.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/pad/__init__.py b/packages/python/plotly/plotly/validators/layout/title/pad/__init__.py index ad781d04ebd..7770792ed8c 100644 --- a/packages/python/plotly/plotly/validators/layout/title/pad/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/title/pad/__init__.py @@ -1,54 +1,15 @@ -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="t", parent_name="layout.title.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="r", parent_name="layout.title.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="l", parent_name="layout.title.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="b", parent_name="layout.title.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._t import TValidator + from ._r import RValidator + from ._l import LValidator + from ._b import BValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/pad/_b.py b/packages/python/plotly/plotly/validators/layout/title/pad/_b.py new file mode 100644 index 00000000000..e1f5b464509 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/pad/_b.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b", parent_name="layout.title.pad", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/pad/_l.py b/packages/python/plotly/plotly/validators/layout/title/pad/_l.py new file mode 100644 index 00000000000..c62ad2975c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/pad/_l.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="l", parent_name="layout.title.pad", **kwargs): + super(LValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/pad/_r.py b/packages/python/plotly/plotly/validators/layout/title/pad/_r.py new file mode 100644 index 00000000000..d58a4456221 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/pad/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="r", parent_name="layout.title.pad", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/title/pad/_t.py b/packages/python/plotly/plotly/validators/layout/title/pad/_t.py new file mode 100644 index 00000000000..88b28a2a95c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/title/pad/_t.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="t", parent_name="layout.title.pad", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/transition/__init__.py b/packages/python/plotly/plotly/validators/layout/transition/__init__.py index 5a4ce61ef21..0ea3a862ac3 100644 --- a/packages/python/plotly/plotly/validators/layout/transition/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/transition/__init__.py @@ -1,87 +1,18 @@ -import _plotly_utils.basevalidators - - -class OrderingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ordering", parent_name="layout.transition", **kwargs - ): - super(OrderingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["layout first", "traces first"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="easing", parent_name="layout.transition", **kwargs): - super(EasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "linear", - "quad", - "cubic", - "sin", - "exp", - "circle", - "elastic", - "back", - "bounce", - "linear-in", - "quad-in", - "cubic-in", - "sin-in", - "exp-in", - "circle-in", - "elastic-in", - "back-in", - "bounce-in", - "linear-out", - "quad-out", - "cubic-out", - "sin-out", - "exp-out", - "circle-out", - "elastic-out", - "back-out", - "bounce-out", - "linear-in-out", - "quad-in-out", - "cubic-in-out", - "sin-in-out", - "exp-in-out", - "circle-in-out", - "elastic-in-out", - "back-in-out", - "bounce-in-out", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DurationValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="duration", parent_name="layout.transition", **kwargs - ): - super(DurationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ordering import OrderingValidator + from ._easing import EasingValidator + from ._duration import DurationValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ordering.OrderingValidator", + "._easing.EasingValidator", + "._duration.DurationValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/transition/_duration.py b/packages/python/plotly/plotly/validators/layout/transition/_duration.py new file mode 100644 index 00000000000..6b2fd517ff9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/transition/_duration.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DurationValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="duration", parent_name="layout.transition", **kwargs + ): + super(DurationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/transition/_easing.py b/packages/python/plotly/plotly/validators/layout/transition/_easing.py new file mode 100644 index 00000000000..83f37977688 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/transition/_easing.py @@ -0,0 +1,53 @@ +import _plotly_utils.basevalidators + + +class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="easing", parent_name="layout.transition", **kwargs): + super(EasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "linear", + "quad", + "cubic", + "sin", + "exp", + "circle", + "elastic", + "back", + "bounce", + "linear-in", + "quad-in", + "cubic-in", + "sin-in", + "exp-in", + "circle-in", + "elastic-in", + "back-in", + "bounce-in", + "linear-out", + "quad-out", + "cubic-out", + "sin-out", + "exp-out", + "circle-out", + "elastic-out", + "back-out", + "bounce-out", + "linear-in-out", + "quad-in-out", + "cubic-in-out", + "sin-in-out", + "exp-in-out", + "circle-in-out", + "elastic-in-out", + "back-in-out", + "bounce-in-out", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/transition/_ordering.py b/packages/python/plotly/plotly/validators/layout/transition/_ordering.py new file mode 100644 index 00000000000..9616e498706 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/transition/_ordering.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OrderingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ordering", parent_name="layout.transition", **kwargs + ): + super(OrderingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["layout first", "traces first"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/uniformtext/__init__.py b/packages/python/plotly/plotly/validators/layout/uniformtext/__init__.py index 752c945b9f9..8aac79a19a9 100644 --- a/packages/python/plotly/plotly/validators/layout/uniformtext/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/uniformtext/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._mode import ModeValidator + from ._minsize import MinsizeValidator +else: + from _plotly_utils.importers import relative_import -class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="mode", parent_name="layout.uniformtext", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [False, "hide", "show"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MinsizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="minsize", parent_name="layout.uniformtext", **kwargs - ): - super(MinsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._mode.ModeValidator", "._minsize.MinsizeValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/uniformtext/_minsize.py b/packages/python/plotly/plotly/validators/layout/uniformtext/_minsize.py new file mode 100644 index 00000000000..b0579e97a48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/uniformtext/_minsize.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MinsizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="minsize", parent_name="layout.uniformtext", **kwargs + ): + super(MinsizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/uniformtext/_mode.py b/packages/python/plotly/plotly/validators/layout/uniformtext/_mode.py new file mode 100644 index 00000000000..7767f565daa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/uniformtext/_mode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="mode", parent_name="layout.uniformtext", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [False, "hide", "show"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/__init__.py b/packages/python/plotly/plotly/validators/layout/updatemenu/__init__.py index df6ff4d5586..3d672bbce13 100644 --- a/packages/python/plotly/plotly/validators/layout/updatemenu/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/__init__.py @@ -1,384 +1,48 @@ -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="layout.updatemenu", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="layout.updatemenu", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="layout.updatemenu", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="layout.updatemenu", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.updatemenu", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.updatemenu", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["dropdown", "buttons"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="layout.updatemenu", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowactiveValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showactive", parent_name="layout.updatemenu", **kwargs - ): - super(ShowactiveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pad", parent_name="layout.updatemenu", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pad"), - data_docs=kwargs.pop( - "data_docs", - """ - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="layout.updatemenu", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.updatemenu", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="direction", parent_name="layout.updatemenu", **kwargs - ): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["left", "right", "up", "down"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ButtonValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="buttondefaults", parent_name="layout.updatemenu", **kwargs - ): - super(ButtonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Button"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="buttons", parent_name="layout.updatemenu", **kwargs - ): - super(ButtonsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Button"), - data_docs=kwargs.pop( - "data_docs", - """ - args - Sets the arguments values to be passed to the - Plotly method set in `method` on click. - args2 - Sets a 2nd set of `args`, these arguments - values are passed to the Plotly method set in - `method` when clicking this button while in the - active state. Use this to create toggle - buttons. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_buttonclicked` method and executing the - API command manually without losing the benefit - of the updatemenu automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the button. - method - Sets the Plotly method to be called on click. - If the `skip` method is used, the API - updatemenu will function as normal but will - perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to updatemenu events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="layout.updatemenu", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="layout.updatemenu", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.updatemenu", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ActiveValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="active", parent_name="layout.updatemenu", **kwargs): - super(ActiveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._type import TypeValidator + from ._templateitemname import TemplateitemnameValidator + from ._showactive import ShowactiveValidator + from ._pad import PadValidator + from ._name import NameValidator + from ._font import FontValidator + from ._direction import DirectionValidator + from ._buttondefaults import ButtondefaultsValidator + from ._buttons import ButtonsValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._active import ActiveValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._showactive.ShowactiveValidator", + "._pad.PadValidator", + "._name.NameValidator", + "._font.FontValidator", + "._direction.DirectionValidator", + "._buttondefaults.ButtondefaultsValidator", + "._buttons.ButtonsValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._active.ActiveValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_active.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_active.py new file mode 100644 index 00000000000..c014ae2a793 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_active.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ActiveValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="active", parent_name="layout.updatemenu", **kwargs): + super(ActiveValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_bgcolor.py new file mode 100644 index 00000000000..5b7690360ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.updatemenu", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_bordercolor.py new file mode 100644 index 00000000000..fba4d31e5c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="layout.updatemenu", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_borderwidth.py new file mode 100644 index 00000000000..57214a44616 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="layout.updatemenu", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_buttondefaults.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_buttondefaults.py new file mode 100644 index 00000000000..c08aed3abab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_buttondefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ButtondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="buttondefaults", parent_name="layout.updatemenu", **kwargs + ): + super(ButtondefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Button"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_buttons.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_buttons.py new file mode 100644 index 00000000000..e368d9ad9e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_buttons.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="buttons", parent_name="layout.updatemenu", **kwargs + ): + super(ButtonsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Button"), + data_docs=kwargs.pop( + "data_docs", + """ + args + Sets the arguments values to be passed to the + Plotly method set in `method` on click. + args2 + Sets a 2nd set of `args`, these arguments + values are passed to the Plotly method set in + `method` when clicking this button while in the + active state. Use this to create toggle + buttons. + execute + When true, the API method is executed. When + false, all other behaviors are the same and + command execution is skipped. This may be + useful when hooking into, for example, the + `plotly_buttonclicked` method and executing the + API command manually without losing the benefit + of the updatemenu automatically binding to the + state of the plot through the specification of + `method` and `args`. + label + Sets the text label to appear on the button. + method + Sets the Plotly method to be called on click. + If the `skip` method is used, the API + updatemenu will function as normal but will + perform no API calls and will not bind + automatically to state updates. This may be + used to create a component interface and attach + to updatemenu events manually via JavaScript. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this button is + visible. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_direction.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_direction.py new file mode 100644 index 00000000000..491e3c831e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_direction.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="direction", parent_name="layout.updatemenu", **kwargs + ): + super(DirectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["left", "right", "up", "down"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_font.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_font.py new file mode 100644 index 00000000000..94814041dbf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.updatemenu", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_name.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_name.py new file mode 100644 index 00000000000..c938420a25f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="layout.updatemenu", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_pad.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_pad.py new file mode 100644 index 00000000000..3d71ebbb9e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_pad.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pad", parent_name="layout.updatemenu", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pad"), + data_docs=kwargs.pop( + "data_docs", + """ + b + The amount of padding (in px) along the bottom + of the component. + l + The amount of padding (in px) on the left side + of the component. + r + The amount of padding (in px) on the right side + of the component. + t + The amount of padding (in px) along the top of + the component. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_showactive.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_showactive.py new file mode 100644 index 00000000000..9fa7e7db170 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_showactive.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowactiveValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showactive", parent_name="layout.updatemenu", **kwargs + ): + super(ShowactiveValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_templateitemname.py new file mode 100644 index 00000000000..1916488f5eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="layout.updatemenu", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_type.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_type.py new file mode 100644 index 00000000000..46deb8fe38d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.updatemenu", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["dropdown", "buttons"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_visible.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_visible.py new file mode 100644 index 00000000000..c5dc1a77dbb --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.updatemenu", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_x.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_x.py new file mode 100644 index 00000000000..cf7aaacc882 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="layout.updatemenu", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_xanchor.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_xanchor.py new file mode 100644 index 00000000000..82cd8f04ccd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="layout.updatemenu", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_y.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_y.py new file mode 100644 index 00000000000..2b7e3a64d77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="layout.updatemenu", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/_yanchor.py b/packages/python/plotly/plotly/validators/layout/updatemenu/_yanchor.py new file mode 100644 index 00000000000..bb0674d9bd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="layout.updatemenu", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/__init__.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/__init__.py index a22e82670fb..3e3fd2418a4 100644 --- a/packages/python/plotly/plotly/validators/layout/updatemenu/button/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/__init__.py @@ -1,150 +1,28 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.updatemenu.button", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.updatemenu.button", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="layout.updatemenu.button", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="method", parent_name="layout.updatemenu.button", **kwargs - ): - super(MethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["restyle", "relayout", "animate", "update", "skip"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="label", parent_name="layout.updatemenu.button", **kwargs - ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="execute", parent_name="layout.updatemenu.button", **kwargs - ): - super(ExecuteValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Args2Validator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="args2", parent_name="layout.updatemenu.button", **kwargs - ): - super(Args2Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "arraydraw"}, - {"valType": "any", "editType": "arraydraw"}, - {"valType": "any", "editType": "arraydraw"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArgsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="args", parent_name="layout.updatemenu.button", **kwargs - ): - super(ArgsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "arraydraw"}, - {"valType": "any", "editType": "arraydraw"}, - {"valType": "any", "editType": "arraydraw"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._method import MethodValidator + from ._label import LabelValidator + from ._execute import ExecuteValidator + from ._args2 import Args2Validator + from ._args import ArgsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._method.MethodValidator", + "._label.LabelValidator", + "._execute.ExecuteValidator", + "._args2.Args2Validator", + "._args.ArgsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_args.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_args.py new file mode 100644 index 00000000000..0cb1d109b48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_args.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class ArgsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="args", parent_name="layout.updatemenu.button", **kwargs + ): + super(ArgsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "arraydraw"}, + {"valType": "any", "editType": "arraydraw"}, + {"valType": "any", "editType": "arraydraw"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_args2.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_args2.py new file mode 100644 index 00000000000..e720084635f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_args2.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class Args2Validator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="args2", parent_name="layout.updatemenu.button", **kwargs + ): + super(Args2Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "arraydraw"}, + {"valType": "any", "editType": "arraydraw"}, + {"valType": "any", "editType": "arraydraw"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_execute.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_execute.py new file mode 100644 index 00000000000..063058dcd23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_execute.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="execute", parent_name="layout.updatemenu.button", **kwargs + ): + super(ExecuteValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_label.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_label.py new file mode 100644 index 00000000000..6d6d70c5e68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_label.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="label", parent_name="layout.updatemenu.button", **kwargs + ): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_method.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_method.py new file mode 100644 index 00000000000..e7b1d985ff8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_method.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class MethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="method", parent_name="layout.updatemenu.button", **kwargs + ): + super(MethodValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["restyle", "relayout", "animate", "update", "skip"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_name.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_name.py new file mode 100644 index 00000000000..c3d0f2ebfd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="layout.updatemenu.button", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_templateitemname.py new file mode 100644 index 00000000000..fa92902b044 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.updatemenu.button", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/button/_visible.py b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_visible.py new file mode 100644 index 00000000000..efaa4f5eb56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/button/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.updatemenu.button", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/font/__init__.py b/packages/python/plotly/plotly/validators/layout/updatemenu/font/__init__.py index ec4f375013c..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/updatemenu/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.updatemenu.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.updatemenu.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.updatemenu.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/font/_color.py b/packages/python/plotly/plotly/validators/layout/updatemenu/font/_color.py new file mode 100644 index 00000000000..6f5ce02931f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.updatemenu.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/font/_family.py b/packages/python/plotly/plotly/validators/layout/updatemenu/font/_family.py new file mode 100644 index 00000000000..fb8d2a32415 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.updatemenu.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/font/_size.py b/packages/python/plotly/plotly/validators/layout/updatemenu/font/_size.py new file mode 100644 index 00000000000..104e9c6693f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.updatemenu.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/pad/__init__.py b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/__init__.py index 1a13c38a10b..7770792ed8c 100644 --- a/packages/python/plotly/plotly/validators/layout/updatemenu/pad/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/__init__.py @@ -1,54 +1,15 @@ -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="t", parent_name="layout.updatemenu.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="r", parent_name="layout.updatemenu.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="l", parent_name="layout.updatemenu.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="b", parent_name="layout.updatemenu.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "arraydraw"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._t import TValidator + from ._r import RValidator + from ._l import LValidator + from ._b import BValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_b.py b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_b.py new file mode 100644 index 00000000000..00962aad253 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_b.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b", parent_name="layout.updatemenu.pad", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_l.py b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_l.py new file mode 100644 index 00000000000..7719e801fae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_l.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="l", parent_name="layout.updatemenu.pad", **kwargs): + super(LValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_r.py b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_r.py new file mode 100644 index 00000000000..75dd701b85f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="r", parent_name="layout.updatemenu.pad", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_t.py b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_t.py new file mode 100644 index 00000000000..4befabbc5ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/updatemenu/pad/_t.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="t", parent_name="layout.updatemenu.pad", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "arraydraw"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/__init__.py index ada65ac7f73..aa1bb3309fe 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/__init__.py @@ -1,1444 +1,162 @@ -import _plotly_utils.basevalidators - - -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="zerolinewidth", parent_name="layout.xaxis", **kwargs - ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="zerolinecolor", parent_name="layout.xaxis", **kwargs - ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zeroline", parent_name="layout.xaxis", **kwargs): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="layout.xaxis", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.xaxis", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.xaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["-", "linear", "log", "date", "category", "multicategory"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout.xaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tickwidth", parent_name="layout.xaxis", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tickvalssrc", parent_name="layout.xaxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="layout.xaxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ticktextsrc", parent_name="layout.xaxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="layout.xaxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="ticksuffix", parent_name="layout.xaxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksonValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickson", parent_name="layout.xaxis", **kwargs): - super(TicksonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["labels", "boundaries"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="layout.xaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickprefix", parent_name="layout.xaxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="layout.xaxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="layout.xaxis", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickformatstopdefaults", parent_name="layout.xaxis", **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="layout.xaxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickformat", parent_name="layout.xaxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="layout.xaxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="tickcolor", parent_name="layout.xaxis", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="tickangle", parent_name="layout.xaxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.xaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="spikethickness", parent_name="layout.xaxis", **kwargs - ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikesnapValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="spikesnap", parent_name="layout.xaxis", **kwargs): - super(SpikesnapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["data", "cursor", "hovered data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikemodeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="spikemode", parent_name="layout.xaxis", **kwargs): - super(SpikemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - flags=kwargs.pop("flags", ["toaxis", "across", "marker"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikedashValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="spikedash", parent_name="layout.xaxis", **kwargs): - super(SpikedashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="spikecolor", parent_name="layout.xaxis", **kwargs): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="side", parent_name="layout.xaxis", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top", "bottom", "left", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.xaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.xaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.xaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showspikes", parent_name="layout.xaxis", **kwargs): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showline", parent_name="layout.xaxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showgrid", parent_name="layout.xaxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.xaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowdividersValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showdividers", parent_name="layout.xaxis", **kwargs - ): - super(ShowdividersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="layout.xaxis", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="scaleratio", parent_name="layout.xaxis", **kwargs): - super(ScaleratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="scaleanchor", parent_name="layout.xaxis", **kwargs): - super(ScaleanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangesliderValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="rangeslider", parent_name="layout.xaxis", **kwargs): - super(RangesliderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangeslider"), - data_docs=kwargs.pop( - "data_docs", - """ - autorange - Determines whether or not the range slider - range is computed in relation to the input - data. If `range` is provided, then `autorange` - is set to False. - bgcolor - Sets the background color of the range slider. - bordercolor - Sets the border color of the range slider. - borderwidth - Sets the border width of the range slider. - range - Sets the range of the range slider. If not set, - defaults to the full xaxis range. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - thickness - The height of the range slider as a fraction of - the total plot area height. - visible - Determines whether or not the range slider will - be visible. If visible, perpendicular axes will - be set to `fixedrange` - yaxis - :class:`plotly.graph_objects.layout.xaxis.range - slider.YAxis` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeselectorValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="rangeselector", parent_name="layout.xaxis", **kwargs - ): - super(RangeselectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangeselector"), - data_docs=kwargs.pop( - "data_docs", - """ - activecolor - Sets the background color of the active range - selector button. - bgcolor - Sets the background color of the range selector - buttons. - bordercolor - Sets the color of the border enclosing the - range selector. - borderwidth - Sets the width (in px) of the border enclosing - the range selector. - buttons - Sets the specifications for each buttons. By - default, a range selector comes with no - buttons. - buttondefaults - When used in a template (as layout.template.lay - out.xaxis.rangeselector.buttondefaults), sets - the default property values to use for elements - of layout.xaxis.rangeselector.buttons - font - Sets the font of the range selector button - text. - visible - Determines whether or not this range selector - is visible. Note that range selectors are only - available for x axes of `type` set to or auto- - typed to "date". - x - Sets the x position (in normalized coordinates) - of the range selector. - xanchor - Sets the range selector's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the range selector. - yanchor - Sets the range selector's vertical position - anchor This anchor binds the `y` position to - the "top", "middle" or "bottom" of the range - selector. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="rangemode", parent_name="layout.xaxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangebreakValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="rangebreakdefaults", parent_name="layout.xaxis", **kwargs - ): - super(RangebreakValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangebreak"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="rangebreaks", parent_name="layout.xaxis", **kwargs): - super(RangebreaksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangebreak"), - data_docs=kwargs.pop( - "data_docs", - """ - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.xaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "axrange"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "axrange", - "impliedEdits": {"^autorange": False}, - "anim": True, - }, - { - "valType": "any", - "editType": "axrange", - "impliedEdits": {"^autorange": False}, - "anim": True, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PositionValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="position", parent_name="layout.xaxis", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OverlayingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="overlaying", parent_name="layout.xaxis", **kwargs): - super(OverlayingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="layout.xaxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="mirror", parent_name="layout.xaxis", **kwargs): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MatchesValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="matches", parent_name="layout.xaxis", **kwargs): - super(MatchesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="linewidth", parent_name="layout.xaxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="linecolor", parent_name="layout.xaxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="layer", parent_name="layout.xaxis", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hoverformat", parent_name="layout.xaxis", **kwargs): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="gridwidth", parent_name="layout.xaxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="gridcolor", parent_name="layout.xaxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="fixedrange", parent_name="layout.xaxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.xaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.xaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="domain", parent_name="layout.xaxis", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="dividerwidth", parent_name="layout.xaxis", **kwargs - ): - super(DividerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DividercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="dividercolor", parent_name="layout.xaxis", **kwargs - ): - super(DividercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstraintowardValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="constraintoward", parent_name="layout.xaxis", **kwargs - ): - super(ConstraintowardValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["left", "center", "right", "top", "middle", "bottom"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="constrain", parent_name="layout.xaxis", **kwargs): - super(ConstrainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["range", "domain"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.xaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="layout.xaxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="layout.xaxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="layout.xaxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="calendar", parent_name="layout.xaxis", **kwargs): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="autorange", parent_name="layout.xaxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "axrange"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="automargin", parent_name="layout.xaxis", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="anchor", parent_name="layout.xaxis", **kwargs): - super(AnchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zerolinewidth import ZerolinewidthValidator + from ._zerolinecolor import ZerolinecolorValidator + from ._zeroline import ZerolineValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._tickson import TicksonValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._spikethickness import SpikethicknessValidator + from ._spikesnap import SpikesnapValidator + from ._spikemode import SpikemodeValidator + from ._spikedash import SpikedashValidator + from ._spikecolor import SpikecolorValidator + from ._side import SideValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showspikes import ShowspikesValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._showdividers import ShowdividersValidator + from ._separatethousands import SeparatethousandsValidator + from ._scaleratio import ScaleratioValidator + from ._scaleanchor import ScaleanchorValidator + from ._rangeslider import RangesliderValidator + from ._rangeselector import RangeselectorValidator + from ._rangemode import RangemodeValidator + from ._rangebreakdefaults import RangebreakdefaultsValidator + from ._rangebreaks import RangebreaksValidator + from ._range import RangeValidator + from ._position import PositionValidator + from ._overlaying import OverlayingValidator + from ._nticks import NticksValidator + from ._mirror import MirrorValidator + from ._matches import MatchesValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._fixedrange import FixedrangeValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._domain import DomainValidator + from ._dividerwidth import DividerwidthValidator + from ._dividercolor import DividercolorValidator + from ._constraintoward import ConstraintowardValidator + from ._constrain import ConstrainValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._calendar import CalendarValidator + from ._autorange import AutorangeValidator + from ._automargin import AutomarginValidator + from ._anchor import AnchorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickson.TicksonValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesnap.SpikesnapValidator", + "._spikemode.SpikemodeValidator", + "._spikedash.SpikedashValidator", + "._spikecolor.SpikecolorValidator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showdividers.ShowdividersValidator", + "._separatethousands.SeparatethousandsValidator", + "._scaleratio.ScaleratioValidator", + "._scaleanchor.ScaleanchorValidator", + "._rangeslider.RangesliderValidator", + "._rangeselector.RangeselectorValidator", + "._rangemode.RangemodeValidator", + "._rangebreakdefaults.RangebreakdefaultsValidator", + "._rangebreaks.RangebreaksValidator", + "._range.RangeValidator", + "._position.PositionValidator", + "._overlaying.OverlayingValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._matches.MatchesValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._domain.DomainValidator", + "._dividerwidth.DividerwidthValidator", + "._dividercolor.DividercolorValidator", + "._constraintoward.ConstraintowardValidator", + "._constrain.ConstrainValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._autorange.AutorangeValidator", + "._automargin.AutomarginValidator", + "._anchor.AnchorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_anchor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_anchor.py new file mode 100644 index 00000000000..a9e482a0010 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_anchor.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="anchor", parent_name="layout.xaxis", **kwargs): + super(AnchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_automargin.py b/packages/python/plotly/plotly/validators/layout/xaxis/_automargin.py new file mode 100644 index 00000000000..e05ad68ffef --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_automargin.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="automargin", parent_name="layout.xaxis", **kwargs): + super(AutomarginValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_autorange.py b/packages/python/plotly/plotly/validators/layout/xaxis/_autorange.py new file mode 100644 index 00000000000..aea49f1b107 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_autorange.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="autorange", parent_name="layout.xaxis", **kwargs): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "axrange"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_calendar.py b/packages/python/plotly/plotly/validators/layout/xaxis/_calendar.py new file mode 100644 index 00000000000..511f5f564f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_calendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="calendar", parent_name="layout.xaxis", **kwargs): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/xaxis/_categoryarray.py new file mode 100644 index 00000000000..834987c877d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="layout.xaxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/xaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..07bf7f8300d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="layout.xaxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/xaxis/_categoryorder.py new file mode 100644 index 00000000000..fd5dff24462 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_categoryorder.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="layout.xaxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_color.py b/packages/python/plotly/plotly/validators/layout/xaxis/_color.py new file mode 100644 index 00000000000..cd7516388ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.xaxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_constrain.py b/packages/python/plotly/plotly/validators/layout/xaxis/_constrain.py new file mode 100644 index 00000000000..e6ee931b5e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_constrain.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="constrain", parent_name="layout.xaxis", **kwargs): + super(ConstrainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["range", "domain"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_constraintoward.py b/packages/python/plotly/plotly/validators/layout/xaxis/_constraintoward.py new file mode 100644 index 00000000000..3be5a13cdb0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_constraintoward.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ConstraintowardValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="constraintoward", parent_name="layout.xaxis", **kwargs + ): + super(ConstraintowardValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["left", "center", "right", "top", "middle", "bottom"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_dividercolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_dividercolor.py new file mode 100644 index 00000000000..d4607df8142 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_dividercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DividercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="dividercolor", parent_name="layout.xaxis", **kwargs + ): + super(DividercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_dividerwidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/_dividerwidth.py new file mode 100644 index 00000000000..49707bfa416 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_dividerwidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="dividerwidth", parent_name="layout.xaxis", **kwargs + ): + super(DividerwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_domain.py b/packages/python/plotly/plotly/validators/layout/xaxis/_domain.py new file mode 100644 index 00000000000..d1be6edbdb5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_domain.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="domain", parent_name="layout.xaxis", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/xaxis/_dtick.py new file mode 100644 index 00000000000..ac6b2edeae4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.xaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/xaxis/_exponentformat.py new file mode 100644 index 00000000000..573f646c350 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.xaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_fixedrange.py b/packages/python/plotly/plotly/validators/layout/xaxis/_fixedrange.py new file mode 100644 index 00000000000..425e537a6b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_fixedrange.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="fixedrange", parent_name="layout.xaxis", **kwargs): + super(FixedrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_gridcolor.py new file mode 100644 index 00000000000..445c18227d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_gridcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="gridcolor", parent_name="layout.xaxis", **kwargs): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/_gridwidth.py new file mode 100644 index 00000000000..209a25b982a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_gridwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="gridwidth", parent_name="layout.xaxis", **kwargs): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/xaxis/_hoverformat.py new file mode 100644 index 00000000000..023fa92730b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_hoverformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hoverformat", parent_name="layout.xaxis", **kwargs): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_layer.py b/packages/python/plotly/plotly/validators/layout/xaxis/_layer.py new file mode 100644 index 00000000000..cfc6a9334de --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_layer.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="layer", parent_name="layout.xaxis", **kwargs): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_linecolor.py new file mode 100644 index 00000000000..f3ef5bc7bc0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_linecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="linecolor", parent_name="layout.xaxis", **kwargs): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/_linewidth.py new file mode 100644 index 00000000000..d82850d4ea9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_linewidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="linewidth", parent_name="layout.xaxis", **kwargs): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_matches.py b/packages/python/plotly/plotly/validators/layout/xaxis/_matches.py new file mode 100644 index 00000000000..576055861cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_matches.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MatchesValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="matches", parent_name="layout.xaxis", **kwargs): + super(MatchesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_mirror.py b/packages/python/plotly/plotly/validators/layout/xaxis/_mirror.py new file mode 100644 index 00000000000..475c3cc6278 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_mirror.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="mirror", parent_name="layout.xaxis", **kwargs): + super(MirrorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/xaxis/_nticks.py new file mode 100644 index 00000000000..f030822ad87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="layout.xaxis", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_overlaying.py b/packages/python/plotly/plotly/validators/layout/xaxis/_overlaying.py new file mode 100644 index 00000000000..8e2de6ae8b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_overlaying.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OverlayingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="overlaying", parent_name="layout.xaxis", **kwargs): + super(OverlayingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_position.py b/packages/python/plotly/plotly/validators/layout/xaxis/_position.py new file mode 100644 index 00000000000..1c5c1b4e4d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_position.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PositionValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="position", parent_name="layout.xaxis", **kwargs): + super(PositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_range.py b/packages/python/plotly/plotly/validators/layout/xaxis/_range.py new file mode 100644 index 00000000000..edc557cd6ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_range.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.xaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "axrange"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "axrange", + "impliedEdits": {"^autorange": False}, + "anim": True, + }, + { + "valType": "any", + "editType": "axrange", + "impliedEdits": {"^autorange": False}, + "anim": True, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_rangebreakdefaults.py b/packages/python/plotly/plotly/validators/layout/xaxis/_rangebreakdefaults.py new file mode 100644 index 00000000000..63d59d8252e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_rangebreakdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class RangebreakdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="rangebreakdefaults", parent_name="layout.xaxis", **kwargs + ): + super(RangebreakdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangebreak"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_rangebreaks.py b/packages/python/plotly/plotly/validators/layout/xaxis/_rangebreaks.py new file mode 100644 index 00000000000..ff5299a6ce9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_rangebreaks.py @@ -0,0 +1,67 @@ +import _plotly_utils.basevalidators + + +class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="rangebreaks", parent_name="layout.xaxis", **kwargs): + super(RangebreaksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangebreak"), + data_docs=kwargs.pop( + "data_docs", + """ + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The + default is one day in milliseconds. + enabled + Determines whether this axis rangebreak is + enabled or disabled. Please note that + `rangebreaks` only work for "date" axis type. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pattern + Determines a pattern on the time line that + generates breaks. If *day of week* - days of + the week in English e.g. 'Sunday' or `sun` + (matching is case-insensitive and considers + only the first three characters), as well as + Sunday-based integers between 0 and 6. If + "hour" - hour (24-hour clock) as decimal + numbers between 0 and 24. for more info. + Examples: - { pattern: 'day of week', bounds: + [6, 1] } or simply { bounds: ['sat', 'mon'] } + breaks from Saturday to Monday (i.e. skips the + weekends). - { pattern: 'hour', bounds: [17, 8] + } breaks from 5pm to 8am (i.e. skips non-work + hours). + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use + `dvalue` to set the size of the values along + the axis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/xaxis/_rangemode.py new file mode 100644 index 00000000000..ec9ffa52167 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_rangemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="rangemode", parent_name="layout.xaxis", **kwargs): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_rangeselector.py b/packages/python/plotly/plotly/validators/layout/xaxis/_rangeselector.py new file mode 100644 index 00000000000..e954f2781f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_rangeselector.py @@ -0,0 +1,63 @@ +import _plotly_utils.basevalidators + + +class RangeselectorValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="rangeselector", parent_name="layout.xaxis", **kwargs + ): + super(RangeselectorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangeselector"), + data_docs=kwargs.pop( + "data_docs", + """ + activecolor + Sets the background color of the active range + selector button. + bgcolor + Sets the background color of the range selector + buttons. + bordercolor + Sets the color of the border enclosing the + range selector. + borderwidth + Sets the width (in px) of the border enclosing + the range selector. + buttons + Sets the specifications for each buttons. By + default, a range selector comes with no + buttons. + buttondefaults + When used in a template (as layout.template.lay + out.xaxis.rangeselector.buttondefaults), sets + the default property values to use for elements + of layout.xaxis.rangeselector.buttons + font + Sets the font of the range selector button + text. + visible + Determines whether or not this range selector + is visible. Note that range selectors are only + available for x axes of `type` set to or auto- + typed to "date". + x + Sets the x position (in normalized coordinates) + of the range selector. + xanchor + Sets the range selector's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the range selector. + yanchor + Sets the range selector's vertical position + anchor This anchor binds the `y` position to + the "top", "middle" or "bottom" of the range + selector. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_rangeslider.py b/packages/python/plotly/plotly/validators/layout/xaxis/_rangeslider.py new file mode 100644 index 00000000000..e2a01773de4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_rangeslider.py @@ -0,0 +1,50 @@ +import _plotly_utils.basevalidators + + +class RangesliderValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="rangeslider", parent_name="layout.xaxis", **kwargs): + super(RangesliderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangeslider"), + data_docs=kwargs.pop( + "data_docs", + """ + autorange + Determines whether or not the range slider + range is computed in relation to the input + data. If `range` is provided, then `autorange` + is set to False. + bgcolor + Sets the background color of the range slider. + bordercolor + Sets the border color of the range slider. + borderwidth + Sets the border width of the range slider. + range + Sets the range of the range slider. If not set, + defaults to the full xaxis range. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + thickness + The height of the range slider as a fraction of + the total plot area height. + visible + Determines whether or not the range slider will + be visible. If visible, perpendicular axes will + be set to `fixedrange` + yaxis + :class:`plotly.graph_objects.layout.xaxis.range + slider.YAxis` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_scaleanchor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_scaleanchor.py new file mode 100644 index 00000000000..b367a2945ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_scaleanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="scaleanchor", parent_name="layout.xaxis", **kwargs): + super(ScaleanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_scaleratio.py b/packages/python/plotly/plotly/validators/layout/xaxis/_scaleratio.py new file mode 100644 index 00000000000..4fa93898c54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_scaleratio.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="scaleratio", parent_name="layout.xaxis", **kwargs): + super(ScaleratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/xaxis/_separatethousands.py new file mode 100644 index 00000000000..536e3a158d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="layout.xaxis", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showdividers.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showdividers.py new file mode 100644 index 00000000000..36f72dc53b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showdividers.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowdividersValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showdividers", parent_name="layout.xaxis", **kwargs + ): + super(ShowdividersValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showexponent.py new file mode 100644 index 00000000000..61b162d8f7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.xaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showgrid.py new file mode 100644 index 00000000000..085dc56975a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showgrid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showgrid", parent_name="layout.xaxis", **kwargs): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showline.py new file mode 100644 index 00000000000..9fe7f1917cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showline", parent_name="layout.xaxis", **kwargs): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showspikes.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showspikes.py new file mode 100644 index 00000000000..76c481ec0f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showspikes.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showspikes", parent_name="layout.xaxis", **kwargs): + super(ShowspikesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showticklabels.py new file mode 100644 index 00000000000..4c50ba47826 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.xaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showtickprefix.py new file mode 100644 index 00000000000..de2edb9751e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.xaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/xaxis/_showticksuffix.py new file mode 100644 index 00000000000..329957edc52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.xaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_side.py b/packages/python/plotly/plotly/validators/layout/xaxis/_side.py new file mode 100644 index 00000000000..1069ab88972 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_side.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="layout.xaxis", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "bottom", "left", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_spikecolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_spikecolor.py new file mode 100644 index 00000000000..84ee97aeb4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_spikecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="spikecolor", parent_name="layout.xaxis", **kwargs): + super(SpikecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py b/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py new file mode 100644 index 00000000000..f51e08d918f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SpikedashValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="spikedash", parent_name="layout.xaxis", **kwargs): + super(SpikedashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_spikemode.py b/packages/python/plotly/plotly/validators/layout/xaxis/_spikemode.py new file mode 100644 index 00000000000..a2b697f13b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_spikemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SpikemodeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="spikemode", parent_name="layout.xaxis", **kwargs): + super(SpikemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + flags=kwargs.pop("flags", ["toaxis", "across", "marker"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_spikesnap.py b/packages/python/plotly/plotly/validators/layout/xaxis/_spikesnap.py new file mode 100644 index 00000000000..5bfde1f37f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_spikesnap.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SpikesnapValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="spikesnap", parent_name="layout.xaxis", **kwargs): + super(SpikesnapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["data", "cursor", "hovered data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_spikethickness.py b/packages/python/plotly/plotly/validators/layout/xaxis/_spikethickness.py new file mode 100644 index 00000000000..c0e9ab9bd3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_spikethickness.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="spikethickness", parent_name="layout.xaxis", **kwargs + ): + super(SpikethicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tick0.py new file mode 100644 index 00000000000..ae3c7171747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.xaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickangle.py new file mode 100644 index 00000000000..9fbd6308f63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="tickangle", parent_name="layout.xaxis", **kwargs): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickcolor.py new file mode 100644 index 00000000000..8f0af0926ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="tickcolor", parent_name="layout.xaxis", **kwargs): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickfont.py new file mode 100644 index 00000000000..5a01f460ec0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="layout.xaxis", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickformat.py new file mode 100644 index 00000000000..fc60c128a7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickformat", parent_name="layout.xaxis", **kwargs): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..a9189ae00c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickformatstopdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickformatstopdefaults", parent_name="layout.xaxis", **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickformatstops.py new file mode 100644 index 00000000000..122782367d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="layout.xaxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/xaxis/_ticklen.py new file mode 100644 index 00000000000..6e26aece7d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="layout.xaxis", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickmode.py new file mode 100644 index 00000000000..a432a008aff --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="layout.xaxis", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickprefix.py new file mode 100644 index 00000000000..fb4f38f6696 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickprefix", parent_name="layout.xaxis", **kwargs): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/xaxis/_ticks.py new file mode 100644 index 00000000000..4af5ef0496e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="layout.xaxis", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickson.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickson.py new file mode 100644 index 00000000000..cf4038fda8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickson.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksonValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickson", parent_name="layout.xaxis", **kwargs): + super(TicksonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["labels", "boundaries"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/xaxis/_ticksuffix.py new file mode 100644 index 00000000000..76d2348170f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_ticksuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="ticksuffix", parent_name="layout.xaxis", **kwargs): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/xaxis/_ticktext.py new file mode 100644 index 00000000000..ce8757af51f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="layout.xaxis", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/xaxis/_ticktextsrc.py new file mode 100644 index 00000000000..9cbfef5ae82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_ticktextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ticktextsrc", parent_name="layout.xaxis", **kwargs): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickvals.py new file mode 100644 index 00000000000..cccdad534cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="layout.xaxis", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickvalssrc.py new file mode 100644 index 00000000000..851b0a48872 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickvalssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tickvalssrc", parent_name="layout.xaxis", **kwargs): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/_tickwidth.py new file mode 100644 index 00000000000..8e7e23c1593 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_tickwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tickwidth", parent_name="layout.xaxis", **kwargs): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_title.py b/packages/python/plotly/plotly/validators/layout/xaxis/_title.py new file mode 100644 index 00000000000..4b2be40b384 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_title.py @@ -0,0 +1,38 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout.xaxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + standoff + Sets the standoff distance (in px) between the + axis labels and the title text The default + value is a function of the axis tick labels, + the title `font.size` and the axis `linewidth`. + Note that the axis title position is always + constrained within the margins, so the actual + standoff distance is always less than the set + or default value. By setting `standoff` and + turning on `automargin`, plotly.js will push + the margins to fit the axis title at given + standoff distance. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_type.py b/packages/python/plotly/plotly/validators/layout/xaxis/_type.py new file mode 100644 index 00000000000..eb57d026a7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.xaxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["-", "linear", "log", "date", "category", "multicategory"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/xaxis/_uirevision.py new file mode 100644 index 00000000000..16457370d6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.xaxis", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/xaxis/_visible.py new file mode 100644 index 00000000000..1454b8276cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="layout.xaxis", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_zeroline.py b/packages/python/plotly/plotly/validators/layout/xaxis/_zeroline.py new file mode 100644 index 00000000000..fb8c829df73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_zeroline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zeroline", parent_name="layout.xaxis", **kwargs): + super(ZerolineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_zerolinecolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/_zerolinecolor.py new file mode 100644 index 00000000000..5ad25d69320 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_zerolinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="zerolinecolor", parent_name="layout.xaxis", **kwargs + ): + super(ZerolinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_zerolinewidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/_zerolinewidth.py new file mode 100644 index 00000000000..4d78a8fbd91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_zerolinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="zerolinewidth", parent_name="layout.xaxis", **kwargs + ): + super(ZerolinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/__init__.py index f60619813cf..ff88d698be8 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/__init__.py @@ -1,124 +1,26 @@ -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="values", parent_name="layout.xaxis.rangebreak", **kwargs - ): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop("items", {"valType": "any", "editType": "calc"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.xaxis.rangebreak", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="pattern", parent_name="layout.xaxis.rangebreak", **kwargs - ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["day of week", "hour", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="layout.xaxis.rangebreak", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="layout.xaxis.rangebreak", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DvalueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="dvalue", parent_name="layout.xaxis.rangebreak", **kwargs - ): - super(DvalueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoundsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="bounds", parent_name="layout.xaxis.rangebreak", **kwargs - ): - super(BoundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._values import ValuesValidator + from ._templateitemname import TemplateitemnameValidator + from ._pattern import PatternValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dvalue import DvalueValidator + from ._bounds import BoundsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._values.ValuesValidator", + "._templateitemname.TemplateitemnameValidator", + "._pattern.PatternValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dvalue.DvalueValidator", + "._bounds.BoundsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_bounds.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_bounds.py new file mode 100644 index 00000000000..365d1c098e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_bounds.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class BoundsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="bounds", parent_name="layout.xaxis.rangebreak", **kwargs + ): + super(BoundsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_dvalue.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_dvalue.py new file mode 100644 index 00000000000..34f45cbc291 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_dvalue.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DvalueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="dvalue", parent_name="layout.xaxis.rangebreak", **kwargs + ): + super(DvalueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_enabled.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_enabled.py new file mode 100644 index 00000000000..1674ddc8ebe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="layout.xaxis.rangebreak", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_name.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_name.py new file mode 100644 index 00000000000..3f1589b41b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="layout.xaxis.rangebreak", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_pattern.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_pattern.py new file mode 100644 index 00000000000..a87358fbe7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_pattern.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="pattern", parent_name="layout.xaxis.rangebreak", **kwargs + ): + super(PatternValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["day of week", "hour", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py new file mode 100644 index 00000000000..70c20172e95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.xaxis.rangebreak", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_values.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_values.py new file mode 100644 index 00000000000..d69f68d391a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangebreak/_values.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="values", parent_name="layout.xaxis.rangebreak", **kwargs + ): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop("items", {"valType": "any", "editType": "calc"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/__init__.py index 1cb1ceed14b..eb942612170 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/__init__.py @@ -1,287 +1,36 @@ -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ButtonValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="buttondefaults", - parent_name="layout.xaxis.rangeselector", - **kwargs - ): - super(ButtonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Button"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="buttons", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(ButtonsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Button"), - data_docs=kwargs.pop( - "data_docs", - """ - count - Sets the number of steps to take to update the - range. Use with `step` to specify the update - interval. - label - Sets the text label to appear on the button. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - step - The unit of measurement that the `count` value - will set the range by. - stepmode - Sets the range update mode. If "backward", the - range update shifts the start of range back - "count" times "step" milliseconds. If "todate", - the range update shifts the start of range back - to the first timestamp from "count" times - "step" milliseconds back. For example, with - `step` set to "year" and `count` set to 1 the - range update shifts the start of the range back - to January 01 of the current year. Month and - year "todate" are currently available only for - the built-in (Gregorian) calendar. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="layout.xaxis.rangeselector", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="layout.xaxis.rangeselector", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.xaxis.rangeselector", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="activecolor", - parent_name="layout.xaxis.rangeselector", - **kwargs - ): - super(ActivecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._font import FontValidator + from ._buttondefaults import ButtondefaultsValidator + from ._buttons import ButtonsValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._activecolor import ActivecolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._font.FontValidator", + "._buttondefaults.ButtondefaultsValidator", + "._buttons.ButtonsValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._activecolor.ActivecolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_activecolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_activecolor.py new file mode 100644 index 00000000000..054f4ecb5c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_activecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="activecolor", + parent_name="layout.xaxis.rangeselector", + **kwargs + ): + super(ActivecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py new file mode 100644 index 00000000000..7b1f6ac300f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py new file mode 100644 index 00000000000..cd92d2b9df8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="layout.xaxis.rangeselector", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py new file mode 100644 index 00000000000..f130aa79216 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="layout.xaxis.rangeselector", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py new file mode 100644 index 00000000000..be3345166c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class ButtondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="buttondefaults", + parent_name="layout.xaxis.rangeselector", + **kwargs + ): + super(ButtondefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Button"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttons.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttons.py new file mode 100644 index 00000000000..a9a508da8c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttons.py @@ -0,0 +1,63 @@ +import _plotly_utils.basevalidators + + +class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="buttons", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(ButtonsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Button"), + data_docs=kwargs.pop( + "data_docs", + """ + count + Sets the number of steps to take to update the + range. Use with `step` to specify the update + interval. + label + Sets the text label to appear on the button. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + step + The unit of measurement that the `count` value + will set the range by. + stepmode + Sets the range update mode. If "backward", the + range update shifts the start of range back + "count" times "step" milliseconds. If "todate", + the range update shifts the start of range back + to the first timestamp from "count" times + "step" milliseconds back. For example, with + `step` set to "year" and `count` set to 1 the + range update shifts the start of the range back + to January 01 of the current year. Month and + year "todate" are currently available only for + the built-in (Gregorian) calendar. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this button is + visible. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_font.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_font.py new file mode 100644 index 00000000000..8a592f593ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_visible.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_visible.py new file mode 100644 index 00000000000..3e3c7dcacf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_x.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_x.py new file mode 100644 index 00000000000..d8d0b3892f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_xanchor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_xanchor.py new file mode 100644 index 00000000000..9d0fce3021c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_y.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_y.py new file mode 100644 index 00000000000..25077c4fc95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_yanchor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_yanchor.py new file mode 100644 index 00000000000..279a8b19dc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="layout.xaxis.rangeselector", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/__init__.py index bfaaf05af68..382b46428c1 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/__init__.py @@ -1,136 +1,26 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="visible", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StepmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="stepmode", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(StepmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["backward", "todate"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StepValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="step", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(StepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["month", "year", "day", "hour", "minute", "second", "all"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="label", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="count", - parent_name="layout.xaxis.rangeselector.button", - **kwargs - ): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._templateitemname import TemplateitemnameValidator + from ._stepmode import StepmodeValidator + from ._step import StepValidator + from ._name import NameValidator + from ._label import LabelValidator + from ._count import CountValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._templateitemname.TemplateitemnameValidator", + "._stepmode.StepmodeValidator", + "._step.StepValidator", + "._name.NameValidator", + "._label.LabelValidator", + "._count.CountValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_count.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_count.py new file mode 100644 index 00000000000..847724bd7c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_count.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class CountValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="count", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_label.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_label.py new file mode 100644 index 00000000000..2725569316a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_label.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="label", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_name.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_name.py new file mode 100644 index 00000000000..c7d96fa327d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_step.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_step.py new file mode 100644 index 00000000000..a79b78fea13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_step.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class StepValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="step", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(StepValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["month", "year", "day", "hour", "minute", "second", "all"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py new file mode 100644 index 00000000000..9a1835646b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class StepmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="stepmode", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(StepmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["backward", "todate"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py new file mode 100644 index 00000000000..6b34af5efbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_visible.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_visible.py new file mode 100644 index 00000000000..6317cc7e2a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/button/_visible.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="visible", + parent_name="layout.xaxis.rangeselector.button", + **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/__init__.py index 39aaa2725c3..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="layout.xaxis.rangeselector.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="layout.xaxis.rangeselector.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="layout.xaxis.rangeselector.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_color.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_color.py new file mode 100644 index 00000000000..1a56f53a607 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="layout.xaxis.rangeselector.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_family.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_family.py new file mode 100644 index 00000000000..1ca43d26644 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="layout.xaxis.rangeselector.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_size.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_size.py new file mode 100644 index 00000000000..d09b975cda6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="layout.xaxis.rangeselector.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/__init__.py index c93da973ccd..ac3c014c097 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/__init__.py @@ -1,167 +1,28 @@ -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="yaxis", parent_name="layout.xaxis.rangeslider", **kwargs - ): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "YAxis"), - data_docs=kwargs.pop( - "data_docs", - """ - range - Sets the range of this axis for the - rangeslider. - rangemode - Determines whether or not the range of this - axis in the rangeslider use the same value than - in the main plot when zooming in/out. If - "auto", the autorange will be used. If "fixed", - the `range` is used. If "match", the current - range of the corresponding y-axis on the main - subplot is used. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="layout.xaxis.rangeslider", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="layout.xaxis.rangeslider", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="range", parent_name="layout.xaxis.rangeslider", **kwargs - ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "calc", - "impliedEdits": {"^autorange": False}, - }, - { - "valType": "any", - "editType": "calc", - "impliedEdits": {"^autorange": False}, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="layout.xaxis.rangeslider", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="layout.xaxis.rangeslider", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="layout.xaxis.rangeslider", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autorange", parent_name="layout.xaxis.rangeslider", **kwargs - ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yaxis import YaxisValidator + from ._visible import VisibleValidator + from ._thickness import ThicknessValidator + from ._range import RangeValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator + from ._autorange import AutorangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._visible.VisibleValidator", + "._thickness.ThicknessValidator", + "._range.RangeValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._autorange.AutorangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_autorange.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_autorange.py new file mode 100644 index 00000000000..ad082b51c72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_autorange.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autorange", parent_name="layout.xaxis.rangeslider", **kwargs + ): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py new file mode 100644 index 00000000000..868d73791ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="layout.xaxis.rangeslider", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py new file mode 100644 index 00000000000..0f709a964c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="layout.xaxis.rangeslider", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py new file mode 100644 index 00000000000..71bbbfc49c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="layout.xaxis.rangeslider", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_range.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_range.py new file mode 100644 index 00000000000..bfd095a5e11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_range.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="range", parent_name="layout.xaxis.rangeslider", **kwargs + ): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "calc", + "impliedEdits": {"^autorange": False}, + }, + { + "valType": "any", + "editType": "calc", + "impliedEdits": {"^autorange": False}, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_thickness.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_thickness.py new file mode 100644 index 00000000000..e9289887108 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_thickness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="layout.xaxis.rangeslider", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_visible.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_visible.py new file mode 100644 index 00000000000..1142eae4530 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="layout.xaxis.rangeslider", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_yaxis.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_yaxis.py new file mode 100644 index 00000000000..80c952d4cab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/_yaxis.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="yaxis", parent_name="layout.xaxis.rangeslider", **kwargs + ): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "YAxis"), + data_docs=kwargs.pop( + "data_docs", + """ + range + Sets the range of this axis for the + rangeslider. + rangemode + Determines whether or not the range of this + axis in the rangeslider use the same value than + in the main plot when zooming in/out. If + "auto", the autorange will be used. If "fixed", + the `range` is used. If "match", the current + range of the corresponding y-axis on the main + subplot is used. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py index f41759cfbc8..a90c09be4d5 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py @@ -1,44 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._rangemode import RangemodeValidator + from ._range import RangeValidator +else: + from _plotly_utils.importers import relative_import -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="rangemode", - parent_name="layout.xaxis.rangeslider.yaxis", - **kwargs - ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["auto", "fixed", "match"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="range", - parent_name="layout.xaxis.rangeslider.yaxis", - **kwargs - ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "plot"}, - {"valType": "any", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._rangemode.RangemodeValidator", "._range.RangeValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py new file mode 100644 index 00000000000..58855110aa2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="range", + parent_name="layout.xaxis.rangeslider.yaxis", + **kwargs + ): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "plot"}, + {"valType": "any", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py new file mode 100644 index 00000000000..7a048aca7fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="rangemode", + parent_name="layout.xaxis.rangeslider.yaxis", + **kwargs + ): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["auto", "fixed", "match"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/__init__.py index 7fb654cf571..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.xaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.xaxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.xaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_color.py new file mode 100644 index 00000000000..243148a98b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.xaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_family.py new file mode 100644 index 00000000000..fbd54fae285 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.xaxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_size.py new file mode 100644 index 00000000000..4a21de942f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.xaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/__init__.py index 1b3b472923b..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/__init__.py @@ -1,91 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="value", parent_name="layout.xaxis.tickformatstop", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.xaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="layout.xaxis.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="layout.xaxis.tickformatstop", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.xaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "ticks"}, - {"valType": "any", "editType": "ticks"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..b8147603ff9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.xaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "ticks"}, + {"valType": "any", "editType": "ticks"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..fe01c4c5a63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="layout.xaxis.tickformatstop", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..df8018e77c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="layout.xaxis.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..ed0b4bf6abd --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.xaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..8097405d20f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="value", parent_name="layout.xaxis.tickformatstop", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/__init__.py index 8627ae37acb..5b0c42e33e5 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/__init__.py @@ -1,68 +1,18 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="layout.xaxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="standoff", parent_name="layout.xaxis.title", **kwargs - ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.xaxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._standoff import StandoffValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._text.TextValidator", + "._standoff.StandoffValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/_font.py new file mode 100644 index 00000000000..0acbe244e08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.xaxis.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/_standoff.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/_standoff.py new file mode 100644 index 00000000000..de321b53910 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/_standoff.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="standoff", parent_name="layout.xaxis.title", **kwargs + ): + super(StandoffValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/_text.py new file mode 100644 index 00000000000..83076afc952 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="layout.xaxis.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/__init__.py index d3c547073db..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.xaxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.xaxis.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.xaxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_color.py new file mode 100644 index 00000000000..6d869b165dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.xaxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_family.py new file mode 100644 index 00000000000..9104f56ad7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.xaxis.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_size.py new file mode 100644 index 00000000000..5e53d6c2580 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/xaxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.xaxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/__init__.py b/packages/python/plotly/plotly/validators/layout/yaxis/__init__.py index 3aaf0ad88e2..1261605c036 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/__init__.py @@ -1,1327 +1,158 @@ -import _plotly_utils.basevalidators - - -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="zerolinewidth", parent_name="layout.yaxis", **kwargs - ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="zerolinecolor", parent_name="layout.yaxis", **kwargs - ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="zeroline", parent_name="layout.yaxis", **kwargs): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="layout.yaxis", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="layout.yaxis", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="layout.yaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["-", "linear", "log", "date", "category", "multicategory"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="layout.yaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this axis' title font. Note that the - title's font used to be customized by the now - deprecated `titlefont` attribute. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. Note that before - the existence of `title.text`, the title's - contents used to be defined as the `title` - attribute itself. This behavior has been - deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tickwidth", parent_name="layout.yaxis", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tickvalssrc", parent_name="layout.yaxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="layout.yaxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ticktextsrc", parent_name="layout.yaxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="layout.yaxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="ticksuffix", parent_name="layout.yaxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksonValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickson", parent_name="layout.yaxis", **kwargs): - super(TicksonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["labels", "boundaries"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="layout.yaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickprefix", parent_name="layout.yaxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="layout.yaxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="layout.yaxis", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickformatstopdefaults", parent_name="layout.yaxis", **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="layout.yaxis", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="tickformat", parent_name="layout.yaxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="layout.yaxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="tickcolor", parent_name="layout.yaxis", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="tickangle", parent_name="layout.yaxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="layout.yaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="spikethickness", parent_name="layout.yaxis", **kwargs - ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikesnapValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="spikesnap", parent_name="layout.yaxis", **kwargs): - super(SpikesnapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["data", "cursor", "hovered data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikemodeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="spikemode", parent_name="layout.yaxis", **kwargs): - super(SpikemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - flags=kwargs.pop("flags", ["toaxis", "across", "marker"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikedashValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="spikedash", parent_name="layout.yaxis", **kwargs): - super(SpikedashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="spikecolor", parent_name="layout.yaxis", **kwargs): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="side", parent_name="layout.yaxis", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top", "bottom", "left", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="layout.yaxis", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="layout.yaxis", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="layout.yaxis", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showspikes", parent_name="layout.yaxis", **kwargs): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "modebar"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showline", parent_name="layout.yaxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showgrid", parent_name="layout.yaxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="layout.yaxis", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowdividersValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showdividers", parent_name="layout.yaxis", **kwargs - ): - super(ShowdividersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="layout.yaxis", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="scaleratio", parent_name="layout.yaxis", **kwargs): - super(ScaleratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="scaleanchor", parent_name="layout.yaxis", **kwargs): - super(ScaleanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="rangemode", parent_name="layout.yaxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangebreakValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="rangebreakdefaults", parent_name="layout.yaxis", **kwargs - ): - super(RangebreakValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangebreak"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="rangebreaks", parent_name="layout.yaxis", **kwargs): - super(RangebreaksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangebreak"), - data_docs=kwargs.pop( - "data_docs", - """ - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="range", parent_name="layout.yaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "axrange"), - implied_edits=kwargs.pop("implied_edits", {"autorange": False}), - items=kwargs.pop( - "items", - [ - { - "valType": "any", - "editType": "axrange", - "impliedEdits": {"^autorange": False}, - "anim": True, - }, - { - "valType": "any", - "editType": "axrange", - "impliedEdits": {"^autorange": False}, - "anim": True, - }, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PositionValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="position", parent_name="layout.yaxis", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OverlayingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="overlaying", parent_name="layout.yaxis", **kwargs): - super(OverlayingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="layout.yaxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="mirror", parent_name="layout.yaxis", **kwargs): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MatchesValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="matches", parent_name="layout.yaxis", **kwargs): - super(MatchesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="linewidth", parent_name="layout.yaxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="linecolor", parent_name="layout.yaxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "layoutstyle"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="layer", parent_name="layout.yaxis", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["above traces", "below traces"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hoverformat", parent_name="layout.yaxis", **kwargs): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="gridwidth", parent_name="layout.yaxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="gridcolor", parent_name="layout.yaxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="fixedrange", parent_name="layout.yaxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="layout.yaxis", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="layout.yaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="domain", parent_name="layout.yaxis", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="dividerwidth", parent_name="layout.yaxis", **kwargs - ): - super(DividerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DividercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="dividercolor", parent_name="layout.yaxis", **kwargs - ): - super(DividercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstraintowardValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="constraintoward", parent_name="layout.yaxis", **kwargs - ): - super(ConstraintowardValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["left", "center", "right", "top", "middle", "bottom"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="constrain", parent_name="layout.yaxis", **kwargs): - super(ConstrainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["range", "domain"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="layout.yaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="layout.yaxis", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "trace", - "category ascending", - "category descending", - "array", - "total ascending", - "total descending", - "min ascending", - "min descending", - "max ascending", - "max descending", - "sum ascending", - "sum descending", - "mean ascending", - "mean descending", - "median ascending", - "median descending", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="layout.yaxis", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="layout.yaxis", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="calendar", parent_name="layout.yaxis", **kwargs): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="autorange", parent_name="layout.yaxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "axrange"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="automargin", parent_name="layout.yaxis", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="anchor", parent_name="layout.yaxis", **kwargs): - super(AnchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zerolinewidth import ZerolinewidthValidator + from ._zerolinecolor import ZerolinecolorValidator + from ._zeroline import ZerolineValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._type import TypeValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._tickson import TicksonValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._spikethickness import SpikethicknessValidator + from ._spikesnap import SpikesnapValidator + from ._spikemode import SpikemodeValidator + from ._spikedash import SpikedashValidator + from ._spikecolor import SpikecolorValidator + from ._side import SideValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showspikes import ShowspikesValidator + from ._showline import ShowlineValidator + from ._showgrid import ShowgridValidator + from ._showexponent import ShowexponentValidator + from ._showdividers import ShowdividersValidator + from ._separatethousands import SeparatethousandsValidator + from ._scaleratio import ScaleratioValidator + from ._scaleanchor import ScaleanchorValidator + from ._rangemode import RangemodeValidator + from ._rangebreakdefaults import RangebreakdefaultsValidator + from ._rangebreaks import RangebreaksValidator + from ._range import RangeValidator + from ._position import PositionValidator + from ._overlaying import OverlayingValidator + from ._nticks import NticksValidator + from ._mirror import MirrorValidator + from ._matches import MatchesValidator + from ._linewidth import LinewidthValidator + from ._linecolor import LinecolorValidator + from ._layer import LayerValidator + from ._hoverformat import HoverformatValidator + from ._gridwidth import GridwidthValidator + from ._gridcolor import GridcolorValidator + from ._fixedrange import FixedrangeValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._domain import DomainValidator + from ._dividerwidth import DividerwidthValidator + from ._dividercolor import DividercolorValidator + from ._constraintoward import ConstraintowardValidator + from ._constrain import ConstrainValidator + from ._color import ColorValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator + from ._calendar import CalendarValidator + from ._autorange import AutorangeValidator + from ._automargin import AutomarginValidator + from ._anchor import AnchorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickson.TicksonValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesnap.SpikesnapValidator", + "._spikemode.SpikemodeValidator", + "._spikedash.SpikedashValidator", + "._spikecolor.SpikecolorValidator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showdividers.ShowdividersValidator", + "._separatethousands.SeparatethousandsValidator", + "._scaleratio.ScaleratioValidator", + "._scaleanchor.ScaleanchorValidator", + "._rangemode.RangemodeValidator", + "._rangebreakdefaults.RangebreakdefaultsValidator", + "._rangebreaks.RangebreaksValidator", + "._range.RangeValidator", + "._position.PositionValidator", + "._overlaying.OverlayingValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._matches.MatchesValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._domain.DomainValidator", + "._dividerwidth.DividerwidthValidator", + "._dividercolor.DividercolorValidator", + "._constraintoward.ConstraintowardValidator", + "._constrain.ConstrainValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._autorange.AutorangeValidator", + "._automargin.AutomarginValidator", + "._anchor.AnchorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_anchor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_anchor.py new file mode 100644 index 00000000000..a5be544324a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_anchor.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="anchor", parent_name="layout.yaxis", **kwargs): + super(AnchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_automargin.py b/packages/python/plotly/plotly/validators/layout/yaxis/_automargin.py new file mode 100644 index 00000000000..2f8f6247705 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_automargin.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="automargin", parent_name="layout.yaxis", **kwargs): + super(AutomarginValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_autorange.py b/packages/python/plotly/plotly/validators/layout/yaxis/_autorange.py new file mode 100644 index 00000000000..1aaaee0aada --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_autorange.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="autorange", parent_name="layout.yaxis", **kwargs): + super(AutorangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "axrange"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_calendar.py b/packages/python/plotly/plotly/validators/layout/yaxis/_calendar.py new file mode 100644 index 00000000000..08de70d8511 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_calendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="calendar", parent_name="layout.yaxis", **kwargs): + super(CalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_categoryarray.py b/packages/python/plotly/plotly/validators/layout/yaxis/_categoryarray.py new file mode 100644 index 00000000000..cd0cc04e0d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="layout.yaxis", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/layout/yaxis/_categoryarraysrc.py new file mode 100644 index 00000000000..3a30faa2f29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="layout.yaxis", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_categoryorder.py b/packages/python/plotly/plotly/validators/layout/yaxis/_categoryorder.py new file mode 100644 index 00000000000..e27d7a1e00f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_categoryorder.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="layout.yaxis", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "trace", + "category ascending", + "category descending", + "array", + "total ascending", + "total descending", + "min ascending", + "min descending", + "max ascending", + "max descending", + "sum ascending", + "sum descending", + "mean ascending", + "mean descending", + "median ascending", + "median descending", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_color.py b/packages/python/plotly/plotly/validators/layout/yaxis/_color.py new file mode 100644 index 00000000000..20c999d11ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="layout.yaxis", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_constrain.py b/packages/python/plotly/plotly/validators/layout/yaxis/_constrain.py new file mode 100644 index 00000000000..58f415e83ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_constrain.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="constrain", parent_name="layout.yaxis", **kwargs): + super(ConstrainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["range", "domain"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_constraintoward.py b/packages/python/plotly/plotly/validators/layout/yaxis/_constraintoward.py new file mode 100644 index 00000000000..38c5591f4d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_constraintoward.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ConstraintowardValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="constraintoward", parent_name="layout.yaxis", **kwargs + ): + super(ConstraintowardValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["left", "center", "right", "top", "middle", "bottom"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_dividercolor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_dividercolor.py new file mode 100644 index 00000000000..a4bb79dc6f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_dividercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DividercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="dividercolor", parent_name="layout.yaxis", **kwargs + ): + super(DividercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_dividerwidth.py b/packages/python/plotly/plotly/validators/layout/yaxis/_dividerwidth.py new file mode 100644 index 00000000000..8e554e5cfd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_dividerwidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="dividerwidth", parent_name="layout.yaxis", **kwargs + ): + super(DividerwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_domain.py b/packages/python/plotly/plotly/validators/layout/yaxis/_domain.py new file mode 100644 index 00000000000..511ec578d2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_domain.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="domain", parent_name="layout.yaxis", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_dtick.py b/packages/python/plotly/plotly/validators/layout/yaxis/_dtick.py new file mode 100644 index 00000000000..d6a88791bd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="layout.yaxis", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_exponentformat.py b/packages/python/plotly/plotly/validators/layout/yaxis/_exponentformat.py new file mode 100644 index 00000000000..4b99b692179 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="layout.yaxis", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_fixedrange.py b/packages/python/plotly/plotly/validators/layout/yaxis/_fixedrange.py new file mode 100644 index 00000000000..81e1aea5277 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_fixedrange.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="fixedrange", parent_name="layout.yaxis", **kwargs): + super(FixedrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_gridcolor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_gridcolor.py new file mode 100644 index 00000000000..c5c1f766633 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_gridcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="gridcolor", parent_name="layout.yaxis", **kwargs): + super(GridcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_gridwidth.py b/packages/python/plotly/plotly/validators/layout/yaxis/_gridwidth.py new file mode 100644 index 00000000000..a31fab9a43e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_gridwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="gridwidth", parent_name="layout.yaxis", **kwargs): + super(GridwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_hoverformat.py b/packages/python/plotly/plotly/validators/layout/yaxis/_hoverformat.py new file mode 100644 index 00000000000..af0a58ac7c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_hoverformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hoverformat", parent_name="layout.yaxis", **kwargs): + super(HoverformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_layer.py b/packages/python/plotly/plotly/validators/layout/yaxis/_layer.py new file mode 100644 index 00000000000..33441a69ae6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_layer.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="layer", parent_name="layout.yaxis", **kwargs): + super(LayerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["above traces", "below traces"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_linecolor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_linecolor.py new file mode 100644 index 00000000000..7f93d055a91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_linecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="linecolor", parent_name="layout.yaxis", **kwargs): + super(LinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_linewidth.py b/packages/python/plotly/plotly/validators/layout/yaxis/_linewidth.py new file mode 100644 index 00000000000..4dabc5faf52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_linewidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="linewidth", parent_name="layout.yaxis", **kwargs): + super(LinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_matches.py b/packages/python/plotly/plotly/validators/layout/yaxis/_matches.py new file mode 100644 index 00000000000..f6cd882a0f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_matches.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MatchesValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="matches", parent_name="layout.yaxis", **kwargs): + super(MatchesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_mirror.py b/packages/python/plotly/plotly/validators/layout/yaxis/_mirror.py new file mode 100644 index 00000000000..efb7b074f73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_mirror.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="mirror", parent_name="layout.yaxis", **kwargs): + super(MirrorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_nticks.py b/packages/python/plotly/plotly/validators/layout/yaxis/_nticks.py new file mode 100644 index 00000000000..a3e6b1161a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="layout.yaxis", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_overlaying.py b/packages/python/plotly/plotly/validators/layout/yaxis/_overlaying.py new file mode 100644 index 00000000000..5770b5b8134 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_overlaying.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OverlayingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="overlaying", parent_name="layout.yaxis", **kwargs): + super(OverlayingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["free", "/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_position.py b/packages/python/plotly/plotly/validators/layout/yaxis/_position.py new file mode 100644 index 00000000000..047ec45c492 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_position.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PositionValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="position", parent_name="layout.yaxis", **kwargs): + super(PositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_range.py b/packages/python/plotly/plotly/validators/layout/yaxis/_range.py new file mode 100644 index 00000000000..22505ff63d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_range.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="range", parent_name="layout.yaxis", **kwargs): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "axrange"), + implied_edits=kwargs.pop("implied_edits", {"autorange": False}), + items=kwargs.pop( + "items", + [ + { + "valType": "any", + "editType": "axrange", + "impliedEdits": {"^autorange": False}, + "anim": True, + }, + { + "valType": "any", + "editType": "axrange", + "impliedEdits": {"^autorange": False}, + "anim": True, + }, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_rangebreakdefaults.py b/packages/python/plotly/plotly/validators/layout/yaxis/_rangebreakdefaults.py new file mode 100644 index 00000000000..8128a605531 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_rangebreakdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class RangebreakdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="rangebreakdefaults", parent_name="layout.yaxis", **kwargs + ): + super(RangebreakdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangebreak"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_rangebreaks.py b/packages/python/plotly/plotly/validators/layout/yaxis/_rangebreaks.py new file mode 100644 index 00000000000..0cad1a95b53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_rangebreaks.py @@ -0,0 +1,67 @@ +import _plotly_utils.basevalidators + + +class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="rangebreaks", parent_name="layout.yaxis", **kwargs): + super(RangebreaksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangebreak"), + data_docs=kwargs.pop( + "data_docs", + """ + bounds + Sets the lower and upper bounds of this axis + rangebreak. Can be used with `pattern`. + dvalue + Sets the size of each `values` item. The + default is one day in milliseconds. + enabled + Determines whether this axis rangebreak is + enabled or disabled. Please note that + `rangebreaks` only work for "date" axis type. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pattern + Determines a pattern on the time line that + generates breaks. If *day of week* - days of + the week in English e.g. 'Sunday' or `sun` + (matching is case-insensitive and considers + only the first three characters), as well as + Sunday-based integers between 0 and 6. If + "hour" - hour (24-hour clock) as decimal + numbers between 0 and 24. for more info. + Examples: - { pattern: 'day of week', bounds: + [6, 1] } or simply { bounds: ['sat', 'mon'] } + breaks from Saturday to Monday (i.e. skips the + weekends). - { pattern: 'hour', bounds: [17, 8] + } breaks from 5pm to 8am (i.e. skips non-work + hours). + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the coordinate values corresponding to the + rangebreaks. An alternative to `bounds`. Use + `dvalue` to set the size of the values along + the axis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_rangemode.py b/packages/python/plotly/plotly/validators/layout/yaxis/_rangemode.py new file mode 100644 index 00000000000..0b9c1eb23e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_rangemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="rangemode", parent_name="layout.yaxis", **kwargs): + super(RangemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_scaleanchor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_scaleanchor.py new file mode 100644 index 00000000000..d5a3dbe530a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_scaleanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="scaleanchor", parent_name="layout.yaxis", **kwargs): + super(ScaleanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["/^x([2-9]|[1-9][0-9]+)?$/", "/^y([2-9]|[1-9][0-9]+)?$/"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_scaleratio.py b/packages/python/plotly/plotly/validators/layout/yaxis/_scaleratio.py new file mode 100644 index 00000000000..5ba493c328d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_scaleratio.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="scaleratio", parent_name="layout.yaxis", **kwargs): + super(ScaleratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_separatethousands.py b/packages/python/plotly/plotly/validators/layout/yaxis/_separatethousands.py new file mode 100644 index 00000000000..6f1177adfc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="layout.yaxis", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showdividers.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showdividers.py new file mode 100644 index 00000000000..ac4a442babc --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showdividers.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowdividersValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showdividers", parent_name="layout.yaxis", **kwargs + ): + super(ShowdividersValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showexponent.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showexponent.py new file mode 100644 index 00000000000..9c8ab0ccca4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="layout.yaxis", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showgrid.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showgrid.py new file mode 100644 index 00000000000..74c28cfa767 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showgrid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showgrid", parent_name="layout.yaxis", **kwargs): + super(ShowgridValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showline.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showline.py new file mode 100644 index 00000000000..36c17808b32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showline", parent_name="layout.yaxis", **kwargs): + super(ShowlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showspikes.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showspikes.py new file mode 100644 index 00000000000..f8d091b9610 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showspikes.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showspikes", parent_name="layout.yaxis", **kwargs): + super(ShowspikesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "modebar"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showticklabels.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showticklabels.py new file mode 100644 index 00000000000..341a10f0f09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="layout.yaxis", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showtickprefix.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showtickprefix.py new file mode 100644 index 00000000000..9a467693255 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="layout.yaxis", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_showticksuffix.py b/packages/python/plotly/plotly/validators/layout/yaxis/_showticksuffix.py new file mode 100644 index 00000000000..731813f1905 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="layout.yaxis", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_side.py b/packages/python/plotly/plotly/validators/layout/yaxis/_side.py new file mode 100644 index 00000000000..14ed24eaefa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_side.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="layout.yaxis", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "bottom", "left", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_spikecolor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_spikecolor.py new file mode 100644 index 00000000000..fce8a9bfcfa --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_spikecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="spikecolor", parent_name="layout.yaxis", **kwargs): + super(SpikecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py b/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py new file mode 100644 index 00000000000..5e6b478118f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SpikedashValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="spikedash", parent_name="layout.yaxis", **kwargs): + super(SpikedashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_spikemode.py b/packages/python/plotly/plotly/validators/layout/yaxis/_spikemode.py new file mode 100644 index 00000000000..ca244e048bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_spikemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SpikemodeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="spikemode", parent_name="layout.yaxis", **kwargs): + super(SpikemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + flags=kwargs.pop("flags", ["toaxis", "across", "marker"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_spikesnap.py b/packages/python/plotly/plotly/validators/layout/yaxis/_spikesnap.py new file mode 100644 index 00000000000..f8d5ccab6f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_spikesnap.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SpikesnapValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="spikesnap", parent_name="layout.yaxis", **kwargs): + super(SpikesnapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["data", "cursor", "hovered data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_spikethickness.py b/packages/python/plotly/plotly/validators/layout/yaxis/_spikethickness.py new file mode 100644 index 00000000000..5336990d786 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_spikethickness.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="spikethickness", parent_name="layout.yaxis", **kwargs + ): + super(SpikethicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tick0.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tick0.py new file mode 100644 index 00000000000..6a9674e675e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="layout.yaxis", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickangle.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickangle.py new file mode 100644 index 00000000000..a94eea63139 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="tickangle", parent_name="layout.yaxis", **kwargs): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickcolor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickcolor.py new file mode 100644 index 00000000000..8739e26efed --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="tickcolor", parent_name="layout.yaxis", **kwargs): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickfont.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickfont.py new file mode 100644 index 00000000000..a4e9bd28f47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="layout.yaxis", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickformat.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickformat.py new file mode 100644 index 00000000000..43b70828115 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickformat", parent_name="layout.yaxis", **kwargs): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickformatstopdefaults.py new file mode 100644 index 00000000000..247ca9d84ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickformatstopdefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickformatstopdefaults", parent_name="layout.yaxis", **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickformatstops.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickformatstops.py new file mode 100644 index 00000000000..5a15aea7fc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="layout.yaxis", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_ticklen.py b/packages/python/plotly/plotly/validators/layout/yaxis/_ticklen.py new file mode 100644 index 00000000000..e914195ff67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="layout.yaxis", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickmode.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickmode.py new file mode 100644 index 00000000000..2e146cc0df5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="layout.yaxis", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickprefix.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickprefix.py new file mode 100644 index 00000000000..658c1a188e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickprefix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="tickprefix", parent_name="layout.yaxis", **kwargs): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_ticks.py b/packages/python/plotly/plotly/validators/layout/yaxis/_ticks.py new file mode 100644 index 00000000000..285e3bc1d3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="layout.yaxis", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickson.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickson.py new file mode 100644 index 00000000000..7ac49d07c3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickson.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksonValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickson", parent_name="layout.yaxis", **kwargs): + super(TicksonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["labels", "boundaries"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_ticksuffix.py b/packages/python/plotly/plotly/validators/layout/yaxis/_ticksuffix.py new file mode 100644 index 00000000000..d1fb695b200 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_ticksuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="ticksuffix", parent_name="layout.yaxis", **kwargs): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_ticktext.py b/packages/python/plotly/plotly/validators/layout/yaxis/_ticktext.py new file mode 100644 index 00000000000..4d965f47541 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="layout.yaxis", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_ticktextsrc.py b/packages/python/plotly/plotly/validators/layout/yaxis/_ticktextsrc.py new file mode 100644 index 00000000000..86738539349 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_ticktextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ticktextsrc", parent_name="layout.yaxis", **kwargs): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickvals.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickvals.py new file mode 100644 index 00000000000..749436119ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="layout.yaxis", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickvalssrc.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickvalssrc.py new file mode 100644 index 00000000000..0afe3ad6691 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickvalssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tickvalssrc", parent_name="layout.yaxis", **kwargs): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_tickwidth.py b/packages/python/plotly/plotly/validators/layout/yaxis/_tickwidth.py new file mode 100644 index 00000000000..d119dbadb3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_tickwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tickwidth", parent_name="layout.yaxis", **kwargs): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_title.py b/packages/python/plotly/plotly/validators/layout/yaxis/_title.py new file mode 100644 index 00000000000..2411f833b20 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_title.py @@ -0,0 +1,38 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="layout.yaxis", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this axis' title font. Note that the + title's font used to be customized by the now + deprecated `titlefont` attribute. + standoff + Sets the standoff distance (in px) between the + axis labels and the title text The default + value is a function of the axis tick labels, + the title `font.size` and the axis `linewidth`. + Note that the axis title position is always + constrained within the margins, so the actual + standoff distance is always less than the set + or default value. By setting `standoff` and + turning on `automargin`, plotly.js will push + the margins to fit the axis title at given + standoff distance. + text + Sets the title of this axis. Note that before + the existence of `title.text`, the title's + contents used to be defined as the `title` + attribute itself. This behavior has been + deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_type.py b/packages/python/plotly/plotly/validators/layout/yaxis/_type.py new file mode 100644 index 00000000000..33d2c29c50e --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="layout.yaxis", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["-", "linear", "log", "date", "category", "multicategory"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_uirevision.py b/packages/python/plotly/plotly/validators/layout/yaxis/_uirevision.py new file mode 100644 index 00000000000..f7bc7278679 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="layout.yaxis", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_visible.py b/packages/python/plotly/plotly/validators/layout/yaxis/_visible.py new file mode 100644 index 00000000000..4f845a21714 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="layout.yaxis", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_zeroline.py b/packages/python/plotly/plotly/validators/layout/yaxis/_zeroline.py new file mode 100644 index 00000000000..5196a73499d --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_zeroline.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="zeroline", parent_name="layout.yaxis", **kwargs): + super(ZerolineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_zerolinecolor.py b/packages/python/plotly/plotly/validators/layout/yaxis/_zerolinecolor.py new file mode 100644 index 00000000000..93c89f18a63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_zerolinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="zerolinecolor", parent_name="layout.yaxis", **kwargs + ): + super(ZerolinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_zerolinewidth.py b/packages/python/plotly/plotly/validators/layout/yaxis/_zerolinewidth.py new file mode 100644 index 00000000000..a9c5c9ea0af --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_zerolinewidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="zerolinewidth", parent_name="layout.yaxis", **kwargs + ): + super(ZerolinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/__init__.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/__init__.py index ddb9a57aa75..ff88d698be8 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/__init__.py @@ -1,124 +1,26 @@ -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="values", parent_name="layout.yaxis.rangebreak", **kwargs - ): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop("items", {"valType": "any", "editType": "calc"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.yaxis.rangebreak", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="pattern", parent_name="layout.yaxis.rangebreak", **kwargs - ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["day of week", "hour", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="layout.yaxis.rangebreak", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="layout.yaxis.rangebreak", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DvalueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="dvalue", parent_name="layout.yaxis.rangebreak", **kwargs - ): - super(DvalueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoundsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="bounds", parent_name="layout.yaxis.rangebreak", **kwargs - ): - super(BoundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._values import ValuesValidator + from ._templateitemname import TemplateitemnameValidator + from ._pattern import PatternValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dvalue import DvalueValidator + from ._bounds import BoundsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._values.ValuesValidator", + "._templateitemname.TemplateitemnameValidator", + "._pattern.PatternValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dvalue.DvalueValidator", + "._bounds.BoundsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_bounds.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_bounds.py new file mode 100644 index 00000000000..d2b0702597c --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_bounds.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class BoundsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="bounds", parent_name="layout.yaxis.rangebreak", **kwargs + ): + super(BoundsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_dvalue.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_dvalue.py new file mode 100644 index 00000000000..d5082b52b11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_dvalue.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DvalueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="dvalue", parent_name="layout.yaxis.rangebreak", **kwargs + ): + super(DvalueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_enabled.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_enabled.py new file mode 100644 index 00000000000..2ad9c4ee408 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="layout.yaxis.rangebreak", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_name.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_name.py new file mode 100644 index 00000000000..9b6f5f3a942 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="layout.yaxis.rangebreak", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_pattern.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_pattern.py new file mode 100644 index 00000000000..3eb05ffc29f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_pattern.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="pattern", parent_name="layout.yaxis.rangebreak", **kwargs + ): + super(PatternValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["day of week", "hour", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py new file mode 100644 index 00000000000..c5d16576108 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.yaxis.rangebreak", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_values.py b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_values.py new file mode 100644 index 00000000000..74118254314 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/rangebreak/_values.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="values", parent_name="layout.yaxis.rangebreak", **kwargs + ): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop("items", {"valType": "any", "editType": "calc"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/__init__.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/__init__.py index f4ca26abeae..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.yaxis.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.yaxis.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.yaxis.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_color.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_color.py new file mode 100644 index 00000000000..0aafe00b99a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.yaxis.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_family.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_family.py new file mode 100644 index 00000000000..3b77a28d002 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.yaxis.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_size.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_size.py new file mode 100644 index 00000000000..8565798a9d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.yaxis.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/__init__.py index be4d104dba5..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/__init__.py @@ -1,91 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="value", parent_name="layout.yaxis.tickformatstop", **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="layout.yaxis.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="layout.yaxis.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="enabled", parent_name="layout.yaxis.tickformatstop", **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="layout.yaxis.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "ticks"}, - {"valType": "any", "editType": "ticks"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..50ea34a5825 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="layout.yaxis.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "ticks"}, + {"valType": "any", "editType": "ticks"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_enabled.py new file mode 100644 index 00000000000..db92e4324f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_enabled.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="enabled", parent_name="layout.yaxis.tickformatstop", **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_name.py new file mode 100644 index 00000000000..a9a5048624b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="layout.yaxis.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..e101c7e3c71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="layout.yaxis.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_value.py new file mode 100644 index 00000000000..4c98c1a1b3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/tickformatstop/_value.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="value", parent_name="layout.yaxis.tickformatstop", **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/__init__.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/__init__.py index 7f8bb1bb43f..5b0c42e33e5 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/title/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/__init__.py @@ -1,68 +1,18 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="layout.yaxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="standoff", parent_name="layout.yaxis.title", **kwargs - ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="layout.yaxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._standoff import StandoffValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._text.TextValidator", + "._standoff.StandoffValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/_font.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/_font.py new file mode 100644 index 00000000000..81a363ea3f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/_font.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="layout.yaxis.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/_standoff.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/_standoff.py new file mode 100644 index 00000000000..12aa29d30e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/_standoff.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="standoff", parent_name="layout.yaxis.title", **kwargs + ): + super(StandoffValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/_text.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/_text.py new file mode 100644 index 00000000000..a1776133bce --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="layout.yaxis.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/font/__init__.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/__init__.py index 629801be7ad..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="layout.yaxis.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="layout.yaxis.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="layout.yaxis.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "ticks"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_color.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_color.py new file mode 100644 index 00000000000..72daecc4bf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="layout.yaxis.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_family.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_family.py new file mode 100644 index 00000000000..48e2b59483b --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="layout.yaxis.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_size.py b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_size.py new file mode 100644 index 00000000000..f460f9d404f --- /dev/null +++ b/packages/python/plotly/plotly/validators/layout/yaxis/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="layout.yaxis.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "ticks"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/__init__.py index b85b46d7b76..78dab8c605a 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/__init__.py @@ -1,1284 +1,138 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="mesh3d", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="zcalendar", parent_name="mesh3d", **kwargs): - super(ZcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="mesh3d", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="mesh3d", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="mesh3d", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="mesh3d", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="mesh3d", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="mesh3d", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="mesh3d", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="mesh3d", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VertexcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="vertexcolorsrc", parent_name="mesh3d", **kwargs): - super(VertexcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VertexcolorValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="vertexcolor", parent_name="mesh3d", **kwargs): - super(VertexcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="mesh3d", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="mesh3d", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="mesh3d", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="mesh3d", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="mesh3d", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="mesh3d", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="mesh3d", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="mesh3d", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="mesh3d", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="mesh3d", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="mesh3d", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="mesh3d", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="mesh3d", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lightposition", parent_name="mesh3d", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lightposition"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lighting", parent_name="mesh3d", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lighting"), - data_docs=kwargs.pop( - "data_docs", - """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="mesh3d", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class KsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ksrc", parent_name="mesh3d", **kwargs): - super(KsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class KValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="k", parent_name="mesh3d", **kwargs): - super(KValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class JsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="jsrc", parent_name="mesh3d", **kwargs): - super(JsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class JValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="j", parent_name="mesh3d", **kwargs): - super(JValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="isrc", parent_name="mesh3d", **kwargs): - super(IsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IntensitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="intensitysrc", parent_name="mesh3d", **kwargs): - super(IntensitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IntensitymodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="intensitymode", parent_name="mesh3d", **kwargs): - super(IntensitymodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["vertex", "cell"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IntensityValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="intensity", parent_name="mesh3d", **kwargs): - super(IntensityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="mesh3d", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="mesh3d", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="i", parent_name="mesh3d", **kwargs): - super(IValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="mesh3d", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="mesh3d", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="mesh3d", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="mesh3d", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="mesh3d", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="mesh3d", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="mesh3d", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="flatshading", parent_name="mesh3d", **kwargs): - super(FlatshadingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacecolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="facecolorsrc", parent_name="mesh3d", **kwargs): - super(FacecolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="facecolor", parent_name="mesh3d", **kwargs): - super(FacecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DelaunayaxisValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="delaunayaxis", parent_name="mesh3d", **kwargs): - super(DelaunayaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["x", "y", "z"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="mesh3d", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="mesh3d", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contour", parent_name="mesh3d", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contour"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="mesh3d", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="mesh3d", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.mesh3d. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.mesh3d.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of mesh3d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.mesh3d.colorbar.Ti - tle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - mesh3d.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - mesh3d.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="mesh3d", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="mesh3d", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "mesh3d.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="mesh3d", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="mesh3d", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="mesh3d", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="mesh3d", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="mesh3d", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlphahullValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="alphahull", parent_name="mesh3d", **kwargs): - super(AlphahullValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zcalendar import ZcalendarValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._vertexcolorsrc import VertexcolorsrcValidator + from ._vertexcolor import VertexcolorValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lightposition import LightpositionValidator + from ._lighting import LightingValidator + from ._legendgroup import LegendgroupValidator + from ._ksrc import KsrcValidator + from ._k import KValidator + from ._jsrc import JsrcValidator + from ._j import JValidator + from ._isrc import IsrcValidator + from ._intensitysrc import IntensitysrcValidator + from ._intensitymode import IntensitymodeValidator + from ._intensity import IntensityValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._i import IValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._flatshading import FlatshadingValidator + from ._facecolorsrc import FacecolorsrcValidator + from ._facecolor import FacecolorValidator + from ._delaunayaxis import DelaunayaxisValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contour import ContourValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator + from ._alphahull import AlphahullValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zcalendar.ZcalendarValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._vertexcolorsrc.VertexcolorsrcValidator", + "._vertexcolor.VertexcolorValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendgroup.LegendgroupValidator", + "._ksrc.KsrcValidator", + "._k.KValidator", + "._jsrc.JsrcValidator", + "._j.JValidator", + "._isrc.IsrcValidator", + "._intensitysrc.IntensitysrcValidator", + "._intensitymode.IntensitymodeValidator", + "._intensity.IntensityValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._i.IValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._flatshading.FlatshadingValidator", + "._facecolorsrc.FacecolorsrcValidator", + "._facecolor.FacecolorValidator", + "._delaunayaxis.DelaunayaxisValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contour.ContourValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._alphahull.AlphahullValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_alphahull.py b/packages/python/plotly/plotly/validators/mesh3d/_alphahull.py new file mode 100644 index 00000000000..78899a34396 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_alphahull.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlphahullValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="alphahull", parent_name="mesh3d", **kwargs): + super(AlphahullValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_autocolorscale.py b/packages/python/plotly/plotly/validators/mesh3d/_autocolorscale.py new file mode 100644 index 00000000000..d812fac1d8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="mesh3d", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_cauto.py b/packages/python/plotly/plotly/validators/mesh3d/_cauto.py new file mode 100644 index 00000000000..abed64c371e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="mesh3d", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_cmax.py b/packages/python/plotly/plotly/validators/mesh3d/_cmax.py new file mode 100644 index 00000000000..9bb897523ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="mesh3d", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_cmid.py b/packages/python/plotly/plotly/validators/mesh3d/_cmid.py new file mode 100644 index 00000000000..2565184c1bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="mesh3d", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_cmin.py b/packages/python/plotly/plotly/validators/mesh3d/_cmin.py new file mode 100644 index 00000000000..c4c3951a1f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="mesh3d", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_color.py b/packages/python/plotly/plotly/validators/mesh3d/_color.py new file mode 100644 index 00000000000..a1d72ada004 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="mesh3d", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "mesh3d.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_coloraxis.py b/packages/python/plotly/plotly/validators/mesh3d/_coloraxis.py new file mode 100644 index 00000000000..41a3ff51427 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="mesh3d", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_colorbar.py b/packages/python/plotly/plotly/validators/mesh3d/_colorbar.py new file mode 100644 index 00000000000..37bf4074054 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="mesh3d", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.mesh3d. + colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.mesh3d.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of mesh3d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.mesh3d.colorbar.Ti + tle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + mesh3d.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + mesh3d.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_colorscale.py b/packages/python/plotly/plotly/validators/mesh3d/_colorscale.py new file mode 100644 index 00000000000..bed88fbfd3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="mesh3d", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_contour.py b/packages/python/plotly/plotly/validators/mesh3d/_contour.py new file mode 100644 index 00000000000..74b4968b8c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_contour.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contour", parent_name="mesh3d", **kwargs): + super(ContourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contour"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_customdata.py b/packages/python/plotly/plotly/validators/mesh3d/_customdata.py new file mode 100644 index 00000000000..644bd49d2a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="mesh3d", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_customdatasrc.py b/packages/python/plotly/plotly/validators/mesh3d/_customdatasrc.py new file mode 100644 index 00000000000..8b1814280bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="mesh3d", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_delaunayaxis.py b/packages/python/plotly/plotly/validators/mesh3d/_delaunayaxis.py new file mode 100644 index 00000000000..002f0bfb2fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_delaunayaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DelaunayaxisValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="delaunayaxis", parent_name="mesh3d", **kwargs): + super(DelaunayaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["x", "y", "z"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_facecolor.py b/packages/python/plotly/plotly/validators/mesh3d/_facecolor.py new file mode 100644 index 00000000000..9e75ff89616 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_facecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="facecolor", parent_name="mesh3d", **kwargs): + super(FacecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_facecolorsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_facecolorsrc.py new file mode 100644 index 00000000000..aa68207e519 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_facecolorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FacecolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="facecolorsrc", parent_name="mesh3d", **kwargs): + super(FacecolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_flatshading.py b/packages/python/plotly/plotly/validators/mesh3d/_flatshading.py new file mode 100644 index 00000000000..807f7b063f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_flatshading.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="flatshading", parent_name="mesh3d", **kwargs): + super(FlatshadingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hoverinfo.py b/packages/python/plotly/plotly/validators/mesh3d/_hoverinfo.py new file mode 100644 index 00000000000..5d661dd47f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="mesh3d", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/mesh3d/_hoverinfosrc.py new file mode 100644 index 00000000000..23e4598df6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="mesh3d", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hoverlabel.py b/packages/python/plotly/plotly/validators/mesh3d/_hoverlabel.py new file mode 100644 index 00000000000..0642a6f7350 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="mesh3d", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hovertemplate.py b/packages/python/plotly/plotly/validators/mesh3d/_hovertemplate.py new file mode 100644 index 00000000000..36a917c7cd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="mesh3d", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/mesh3d/_hovertemplatesrc.py new file mode 100644 index 00000000000..4b6dd49aa41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="mesh3d", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hovertext.py b/packages/python/plotly/plotly/validators/mesh3d/_hovertext.py new file mode 100644 index 00000000000..64dc7b06f72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="mesh3d", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_hovertextsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_hovertextsrc.py new file mode 100644 index 00000000000..b77606013ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="mesh3d", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_i.py b/packages/python/plotly/plotly/validators/mesh3d/_i.py new file mode 100644 index 00000000000..13ba2be924e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_i.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="i", parent_name="mesh3d", **kwargs): + super(IValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_ids.py b/packages/python/plotly/plotly/validators/mesh3d/_ids.py new file mode 100644 index 00000000000..e97a375192f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="mesh3d", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_idssrc.py b/packages/python/plotly/plotly/validators/mesh3d/_idssrc.py new file mode 100644 index 00000000000..7e808cc1bd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="mesh3d", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_intensity.py b/packages/python/plotly/plotly/validators/mesh3d/_intensity.py new file mode 100644 index 00000000000..b09156f607d --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_intensity.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IntensityValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="intensity", parent_name="mesh3d", **kwargs): + super(IntensityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_intensitymode.py b/packages/python/plotly/plotly/validators/mesh3d/_intensitymode.py new file mode 100644 index 00000000000..a4f39fd158a --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_intensitymode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IntensitymodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="intensitymode", parent_name="mesh3d", **kwargs): + super(IntensitymodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["vertex", "cell"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_intensitysrc.py b/packages/python/plotly/plotly/validators/mesh3d/_intensitysrc.py new file mode 100644 index 00000000000..c695584f617 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_intensitysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IntensitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="intensitysrc", parent_name="mesh3d", **kwargs): + super(IntensitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_isrc.py b/packages/python/plotly/plotly/validators/mesh3d/_isrc.py new file mode 100644 index 00000000000..cb5d2083351 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_isrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="isrc", parent_name="mesh3d", **kwargs): + super(IsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_j.py b/packages/python/plotly/plotly/validators/mesh3d/_j.py new file mode 100644 index 00000000000..99963db6dc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_j.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class JValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="j", parent_name="mesh3d", **kwargs): + super(JValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_jsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_jsrc.py new file mode 100644 index 00000000000..95e434ea8e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_jsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class JsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="jsrc", parent_name="mesh3d", **kwargs): + super(JsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_k.py b/packages/python/plotly/plotly/validators/mesh3d/_k.py new file mode 100644 index 00000000000..90031cfe179 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_k.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class KValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="k", parent_name="mesh3d", **kwargs): + super(KValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_ksrc.py b/packages/python/plotly/plotly/validators/mesh3d/_ksrc.py new file mode 100644 index 00000000000..29344ad980c --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_ksrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class KsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ksrc", parent_name="mesh3d", **kwargs): + super(KsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_legendgroup.py b/packages/python/plotly/plotly/validators/mesh3d/_legendgroup.py new file mode 100644 index 00000000000..c1d48684514 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="mesh3d", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_lighting.py b/packages/python/plotly/plotly/validators/mesh3d/_lighting.py new file mode 100644 index 00000000000..0a5b0a6e618 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_lighting.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lighting", parent_name="mesh3d", **kwargs): + super(LightingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lighting"), + data_docs=kwargs.pop( + "data_docs", + """ + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_lightposition.py b/packages/python/plotly/plotly/validators/mesh3d/_lightposition.py new file mode 100644 index 00000000000..153670af30b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_lightposition.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lightposition", parent_name="mesh3d", **kwargs): + super(LightpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lightposition"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_meta.py b/packages/python/plotly/plotly/validators/mesh3d/_meta.py new file mode 100644 index 00000000000..cbbf6e7608e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="mesh3d", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_metasrc.py b/packages/python/plotly/plotly/validators/mesh3d/_metasrc.py new file mode 100644 index 00000000000..8630dfd831f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="mesh3d", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_name.py b/packages/python/plotly/plotly/validators/mesh3d/_name.py new file mode 100644 index 00000000000..1c101e35d64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="mesh3d", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_opacity.py b/packages/python/plotly/plotly/validators/mesh3d/_opacity.py new file mode 100644 index 00000000000..090ce27c3ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="mesh3d", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_reversescale.py b/packages/python/plotly/plotly/validators/mesh3d/_reversescale.py new file mode 100644 index 00000000000..ac5502b635f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="mesh3d", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_scene.py b/packages/python/plotly/plotly/validators/mesh3d/_scene.py new file mode 100644 index 00000000000..aa47f67bb46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="mesh3d", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_showlegend.py b/packages/python/plotly/plotly/validators/mesh3d/_showlegend.py new file mode 100644 index 00000000000..b41ad65f660 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="mesh3d", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_showscale.py b/packages/python/plotly/plotly/validators/mesh3d/_showscale.py new file mode 100644 index 00000000000..0c21e9ee9a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="mesh3d", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_stream.py b/packages/python/plotly/plotly/validators/mesh3d/_stream.py new file mode 100644 index 00000000000..581d34d608e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="mesh3d", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_text.py b/packages/python/plotly/plotly/validators/mesh3d/_text.py new file mode 100644 index 00000000000..3254bd7b4ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="mesh3d", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_textsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_textsrc.py new file mode 100644 index 00000000000..2323c5307bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="mesh3d", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_uid.py b/packages/python/plotly/plotly/validators/mesh3d/_uid.py new file mode 100644 index 00000000000..7acc612641e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="mesh3d", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_uirevision.py b/packages/python/plotly/plotly/validators/mesh3d/_uirevision.py new file mode 100644 index 00000000000..76675dcf301 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="mesh3d", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_vertexcolor.py b/packages/python/plotly/plotly/validators/mesh3d/_vertexcolor.py new file mode 100644 index 00000000000..d0f5679a8c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_vertexcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VertexcolorValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="vertexcolor", parent_name="mesh3d", **kwargs): + super(VertexcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_vertexcolorsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_vertexcolorsrc.py new file mode 100644 index 00000000000..668c6ff09a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_vertexcolorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VertexcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="vertexcolorsrc", parent_name="mesh3d", **kwargs): + super(VertexcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_visible.py b/packages/python/plotly/plotly/validators/mesh3d/_visible.py new file mode 100644 index 00000000000..79472870ae2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="mesh3d", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_x.py b/packages/python/plotly/plotly/validators/mesh3d/_x.py new file mode 100644 index 00000000000..723f48d3270 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="mesh3d", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_xcalendar.py b/packages/python/plotly/plotly/validators/mesh3d/_xcalendar.py new file mode 100644 index 00000000000..567cd10c311 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="mesh3d", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_xsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_xsrc.py new file mode 100644 index 00000000000..658b649821e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="mesh3d", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_y.py b/packages/python/plotly/plotly/validators/mesh3d/_y.py new file mode 100644 index 00000000000..4de4f993f7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="mesh3d", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_ycalendar.py b/packages/python/plotly/plotly/validators/mesh3d/_ycalendar.py new file mode 100644 index 00000000000..e30ff3acc11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="mesh3d", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_ysrc.py b/packages/python/plotly/plotly/validators/mesh3d/_ysrc.py new file mode 100644 index 00000000000..fc4809908fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="mesh3d", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_z.py b/packages/python/plotly/plotly/validators/mesh3d/_z.py new file mode 100644 index 00000000000..0de5ff8ffc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="mesh3d", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_zcalendar.py b/packages/python/plotly/plotly/validators/mesh3d/_zcalendar.py new file mode 100644 index 00000000000..dbda81c97f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_zcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="zcalendar", parent_name="mesh3d", **kwargs): + super(ZcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/_zsrc.py b/packages/python/plotly/plotly/validators/mesh3d/_zsrc.py new file mode 100644 index 00000000000..105955fb564 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="mesh3d", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/__init__.py index de370c9036b..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/__init__.py @@ -1,730 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="mesh3d.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="mesh3d.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="mesh3d.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="mesh3d.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="mesh3d.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="mesh3d.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="mesh3d.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="mesh3d.colorbar", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="mesh3d.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="mesh3d.colorbar", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="mesh3d.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="mesh3d.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="mesh3d.colorbar", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="mesh3d.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="mesh3d.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="mesh3d.colorbar", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="mesh3d.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="mesh3d.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="mesh3d.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="mesh3d.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="mesh3d.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="mesh3d.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="mesh3d.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="mesh3d.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="mesh3d.colorbar", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="mesh3d.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="mesh3d.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="mesh3d.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="mesh3d.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="mesh3d.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="mesh3d.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="mesh3d.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="mesh3d.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="mesh3d.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="mesh3d.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_bgcolor.py new file mode 100644 index 00000000000..9667a309140 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="mesh3d.colorbar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_bordercolor.py new file mode 100644 index 00000000000..8a9f29728e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="mesh3d.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_borderwidth.py new file mode 100644 index 00000000000..ad96ee72e58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="mesh3d.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_dtick.py new file mode 100644 index 00000000000..531af499166 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="mesh3d.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_exponentformat.py new file mode 100644 index 00000000000..3b3accf349d --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="mesh3d.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_len.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_len.py new file mode 100644 index 00000000000..f9d49c4306b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="mesh3d.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_lenmode.py new file mode 100644 index 00000000000..7052c894149 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="mesh3d.colorbar", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_nticks.py new file mode 100644 index 00000000000..a191b8c07d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="mesh3d.colorbar", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..061d7d8e082 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="mesh3d.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..74c7b4f0dea --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="mesh3d.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_separatethousands.py new file mode 100644 index 00000000000..66545a30fd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="mesh3d.colorbar", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showexponent.py new file mode 100644 index 00000000000..97fbcc91fd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="mesh3d.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticklabels.py new file mode 100644 index 00000000000..993c648b65a --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="mesh3d.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..e71fb09e0e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="mesh3d.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..da29a946e3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="mesh3d.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thickness.py new file mode 100644 index 00000000000..4a289164b5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="mesh3d.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..2af7c5d5967 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="mesh3d.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tick0.py new file mode 100644 index 00000000000..ff8488eb275 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="mesh3d.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickangle.py new file mode 100644 index 00000000000..6b5717c007c --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickcolor.py new file mode 100644 index 00000000000..005acc01283 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickfont.py new file mode 100644 index 00000000000..798958d5f17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="mesh3d.colorbar", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformat.py new file mode 100644 index 00000000000..6878735620e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..0fdd5aaabe8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="mesh3d.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..a39c928f60f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticklen.py new file mode 100644 index 00000000000..71bb65aefa2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="mesh3d.colorbar", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickmode.py new file mode 100644 index 00000000000..956007f9bf4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="mesh3d.colorbar", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickprefix.py new file mode 100644 index 00000000000..5f42a44c859 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticks.py new file mode 100644 index 00000000000..0facd7f9f5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="mesh3d.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..194619c736b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="mesh3d.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticktext.py new file mode 100644 index 00000000000..ca917dd020a --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="mesh3d.colorbar", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..46c69d138c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="mesh3d.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickvals.py new file mode 100644 index 00000000000..feeb0093411 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="mesh3d.colorbar", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..db9d2218721 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickwidth.py new file mode 100644 index 00000000000..a4d63951f58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="mesh3d.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_title.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_title.py new file mode 100644 index 00000000000..37d1b5d98dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="mesh3d.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_x.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_x.py new file mode 100644 index 00000000000..f977affc7d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="mesh3d.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_xanchor.py new file mode 100644 index 00000000000..ac77086cd0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="mesh3d.colorbar", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_xpad.py new file mode 100644 index 00000000000..034060dd45c --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="mesh3d.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_y.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_y.py new file mode 100644 index 00000000000..96bcb459eec --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="mesh3d.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_yanchor.py new file mode 100644 index 00000000000..8fbeacf05c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="mesh3d.colorbar", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ypad.py new file mode 100644 index 00000000000..d15f7cd5f4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="mesh3d.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/__init__.py index 6a33e85a7ef..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="mesh3d.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="mesh3d.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="mesh3d.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..85536a6b54f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="mesh3d.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..e636c77675b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="mesh3d.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..49c3410904b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="mesh3d.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py index abc7762390d..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py @@ -1,97 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="mesh3d.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="mesh3d.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="mesh3d.colorbar.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="mesh3d.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="mesh3d.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..9ca66343224 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="mesh3d.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..203b326aa2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="mesh3d.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..2c1f553d2b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="mesh3d.colorbar.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..89aacb45f96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="mesh3d.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..94beec8f2f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="mesh3d.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/__init__.py index a224a82dbd1..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="mesh3d.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="mesh3d.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="mesh3d.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_font.py new file mode 100644 index 00000000000..fb1fde45c1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="mesh3d.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_side.py new file mode 100644 index 00000000000..4ece13aa710 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="mesh3d.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_text.py new file mode 100644 index 00000000000..edb28e26efc --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="mesh3d.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/__init__.py index a6e0112249c..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="mesh3d.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="mesh3d.colorbar.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="mesh3d.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_color.py new file mode 100644 index 00000000000..203bbeb3647 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="mesh3d.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_family.py new file mode 100644 index 00000000000..36186b7aa8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="mesh3d.colorbar.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_size.py new file mode 100644 index 00000000000..d71684f874f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="mesh3d.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/contour/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/contour/__init__.py index 0f90a401b86..e59b78ead51 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/contour/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/contour/__init__.py @@ -1,42 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="mesh3d.contour", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="mesh3d.contour", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="mesh3d.contour", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._show import ShowValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/contour/_color.py b/packages/python/plotly/plotly/validators/mesh3d/contour/_color.py new file mode 100644 index 00000000000..d0ebcf7d7f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/contour/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="mesh3d.contour", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/contour/_show.py b/packages/python/plotly/plotly/validators/mesh3d/contour/_show.py new file mode 100644 index 00000000000..c2bdb557e3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/contour/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="mesh3d.contour", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/contour/_width.py b/packages/python/plotly/plotly/validators/mesh3d/contour/_width.py new file mode 100644 index 00000000000..567e9a5ba4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/contour/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="mesh3d.contour", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/__init__.py index 587b0f48edb..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="mesh3d.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="mesh3d.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="mesh3d.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_align.py new file mode 100644 index 00000000000..89ad847f6d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="mesh3d.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..697e73c5295 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..968d5b3c34c --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..a953b757215 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..32d45c70f74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..6dece0f8ab3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_font.py new file mode 100644 index 00000000000..b4939942862 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="mesh3d.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_namelength.py new file mode 100644 index 00000000000..e8411a749e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..2291f3c6c09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="mesh3d.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/__init__.py index 696d9a4047f..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="mesh3d.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="mesh3d.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="mesh3d.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="mesh3d.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="mesh3d.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="mesh3d.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_color.py new file mode 100644 index 00000000000..f6c130609d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="mesh3d.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..ba5f77dd0fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="mesh3d.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_family.py new file mode 100644 index 00000000000..157fb303bfb --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="mesh3d.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b5e86d20720 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="mesh3d.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_size.py new file mode 100644 index 00000000000..c2981638305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="mesh3d.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..772c0639eb0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="mesh3d.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/__init__.py index e1f52876012..12f1cf66154 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/lighting/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/__init__.py @@ -1,119 +1,26 @@ -import _plotly_utils.basevalidators - - -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="vertexnormalsepsilon", - parent_name="mesh3d.lighting", - **kwargs - ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="specular", parent_name="mesh3d.lighting", **kwargs): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="roughness", parent_name="mesh3d.lighting", **kwargs - ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fresnel", parent_name="mesh3d.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="facenormalsepsilon", parent_name="mesh3d.lighting", **kwargs - ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="diffuse", parent_name="mesh3d.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ambient", parent_name="mesh3d.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._vertexnormalsepsilon import VertexnormalsepsilonValidator + from ._specular import SpecularValidator + from ._roughness import RoughnessValidator + from ._fresnel import FresnelValidator + from ._facenormalsepsilon import FacenormalsepsilonValidator + from ._diffuse import DiffuseValidator + from ._ambient import AmbientValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_ambient.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_ambient.py new file mode 100644 index 00000000000..076067988f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_ambient.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ambient", parent_name="mesh3d.lighting", **kwargs): + super(AmbientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_diffuse.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_diffuse.py new file mode 100644 index 00000000000..2416267ab6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_diffuse.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="diffuse", parent_name="mesh3d.lighting", **kwargs): + super(DiffuseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py new file mode 100644 index 00000000000..1f7d74c2e61 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="facenormalsepsilon", parent_name="mesh3d.lighting", **kwargs + ): + super(FacenormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_fresnel.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_fresnel.py new file mode 100644 index 00000000000..486cb2db041 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_fresnel.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fresnel", parent_name="mesh3d.lighting", **kwargs): + super(FresnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_roughness.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_roughness.py new file mode 100644 index 00000000000..0576e09a347 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_roughness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="roughness", parent_name="mesh3d.lighting", **kwargs + ): + super(RoughnessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_specular.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_specular.py new file mode 100644 index 00000000000..b126e9912c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_specular.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="specular", parent_name="mesh3d.lighting", **kwargs): + super(SpecularValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py b/packages/python/plotly/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py new file mode 100644 index 00000000000..068e5fedbc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="vertexnormalsepsilon", + parent_name="mesh3d.lighting", + **kwargs + ): + super(VertexnormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lightposition/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/lightposition/__init__.py index 28cd69c845e..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/lightposition/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/lightposition/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="z", parent_name="mesh3d.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="mesh3d.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="mesh3d.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lightposition/_x.py b/packages/python/plotly/plotly/validators/mesh3d/lightposition/_x.py new file mode 100644 index 00000000000..607535cd110 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lightposition/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="mesh3d.lightposition", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lightposition/_y.py b/packages/python/plotly/plotly/validators/mesh3d/lightposition/_y.py new file mode 100644 index 00000000000..26ae0973174 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lightposition/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="mesh3d.lightposition", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/lightposition/_z.py b/packages/python/plotly/plotly/validators/mesh3d/lightposition/_z.py new file mode 100644 index 00000000000..b7e2ef72581 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/lightposition/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="z", parent_name="mesh3d.lightposition", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/stream/__init__.py b/packages/python/plotly/plotly/validators/mesh3d/stream/__init__.py index b503ad139ea..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/mesh3d/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/mesh3d/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="mesh3d.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="mesh3d.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/mesh3d/stream/_maxpoints.py new file mode 100644 index 00000000000..8e28ef7e7b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="mesh3d.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/mesh3d/stream/_token.py b/packages/python/plotly/plotly/validators/mesh3d/stream/_token.py new file mode 100644 index 00000000000..e823d0c971e --- /dev/null +++ b/packages/python/plotly/plotly/validators/mesh3d/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="mesh3d.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/__init__.py b/packages/python/plotly/plotly/validators/ohlc/__init__.py index 52d4c362129..b2d9e3d7bee 100644 --- a/packages/python/plotly/plotly/validators/ohlc/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/__init__.py @@ -1,664 +1,90 @@ -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="ohlc", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="ohlc", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="ohlc", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="ohlc", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="ohlc", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="ohlc", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="ohlc", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="ohlc", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="tickwidth", parent_name="ohlc", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 0.5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="ohlc", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="ohlc", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="ohlc", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="ohlc", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="ohlc", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="opensrc", parent_name="ohlc", **kwargs): - super(OpensrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="open", parent_name="ohlc", **kwargs): - super(OpenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="ohlc", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="ohlc", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="ohlc", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="ohlc", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="lowsrc", parent_name="ohlc", **kwargs): - super(LowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LowValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="low", parent_name="ohlc", **kwargs): - super(LowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="ohlc", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - Note that this style setting can also be set - per direction via `increasing.line.dash` and - `decreasing.line.dash`. - width - [object Object] Note that this style setting - can also be set per direction via - `increasing.line.width` and - `decreasing.line.width`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="ohlc", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="increasing", parent_name="ohlc", **kwargs): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Increasing"), - data_docs=kwargs.pop( - "data_docs", - """ - line - :class:`plotly.graph_objects.ohlc.increasing.Li - ne` instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="ohlc", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="ohlc", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="ohlc", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="ohlc", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="ohlc", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . - split - Show hover information (open, close, high, low) - in separate labels. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="ohlc", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="ohlc", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="highsrc", parent_name="ohlc", **kwargs): - super(HighsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="high", parent_name="ohlc", **kwargs): - super(HighValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="decreasing", parent_name="ohlc", **kwargs): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Decreasing"), - data_docs=kwargs.pop( - "data_docs", - """ - line - :class:`plotly.graph_objects.ohlc.decreasing.Li - ne` instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="ohlc", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="ohlc", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="closesrc", parent_name="ohlc", **kwargs): - super(ClosesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CloseValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="close", parent_name="ohlc", **kwargs): - super(CloseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yaxis import YaxisValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tickwidth import TickwidthValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._opensrc import OpensrcValidator + from ._open import OpenValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lowsrc import LowsrcValidator + from ._low import LowValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._increasing import IncreasingValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._highsrc import HighsrcValidator + from ._high import HighValidator + from ._decreasing import DecreasingValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._closesrc import ClosesrcValidator + from ._close import CloseValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tickwidth.TickwidthValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._opensrc.OpensrcValidator", + "._open.OpenValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lowsrc.LowsrcValidator", + "._low.LowValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._increasing.IncreasingValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._highsrc.HighsrcValidator", + "._high.HighValidator", + "._decreasing.DecreasingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._closesrc.ClosesrcValidator", + "._close.CloseValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_close.py b/packages/python/plotly/plotly/validators/ohlc/_close.py new file mode 100644 index 00000000000..abb27db914d --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_close.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CloseValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="close", parent_name="ohlc", **kwargs): + super(CloseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_closesrc.py b/packages/python/plotly/plotly/validators/ohlc/_closesrc.py new file mode 100644 index 00000000000..d215b1037e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_closesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="closesrc", parent_name="ohlc", **kwargs): + super(ClosesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_customdata.py b/packages/python/plotly/plotly/validators/ohlc/_customdata.py new file mode 100644 index 00000000000..c3c4ae36674 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="ohlc", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_customdatasrc.py b/packages/python/plotly/plotly/validators/ohlc/_customdatasrc.py new file mode 100644 index 00000000000..3fb923a513b --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="ohlc", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_decreasing.py b/packages/python/plotly/plotly/validators/ohlc/_decreasing.py new file mode 100644 index 00000000000..145b35d686e --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_decreasing.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="decreasing", parent_name="ohlc", **kwargs): + super(DecreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Decreasing"), + data_docs=kwargs.pop( + "data_docs", + """ + line + :class:`plotly.graph_objects.ohlc.decreasing.Li + ne` instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_high.py b/packages/python/plotly/plotly/validators/ohlc/_high.py new file mode 100644 index 00000000000..05174d8824d --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_high.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HighValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="high", parent_name="ohlc", **kwargs): + super(HighValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_highsrc.py b/packages/python/plotly/plotly/validators/ohlc/_highsrc.py new file mode 100644 index 00000000000..5101dbe3cb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_highsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HighsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="highsrc", parent_name="ohlc", **kwargs): + super(HighsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_hoverinfo.py b/packages/python/plotly/plotly/validators/ohlc/_hoverinfo.py new file mode 100644 index 00000000000..e267555058d --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="ohlc", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/ohlc/_hoverinfosrc.py new file mode 100644 index 00000000000..2a51489cac1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="ohlc", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_hoverlabel.py b/packages/python/plotly/plotly/validators/ohlc/_hoverlabel.py new file mode 100644 index 00000000000..8b947f19107 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_hoverlabel.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="ohlc", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . + split + Show hover information (open, close, high, low) + in separate labels. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_hovertext.py b/packages/python/plotly/plotly/validators/ohlc/_hovertext.py new file mode 100644 index 00000000000..aefab617cf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="ohlc", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_hovertextsrc.py b/packages/python/plotly/plotly/validators/ohlc/_hovertextsrc.py new file mode 100644 index 00000000000..f2c81375bc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="ohlc", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_ids.py b/packages/python/plotly/plotly/validators/ohlc/_ids.py new file mode 100644 index 00000000000..23d4d1372ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="ohlc", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_idssrc.py b/packages/python/plotly/plotly/validators/ohlc/_idssrc.py new file mode 100644 index 00000000000..e69a906a6bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="ohlc", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_increasing.py b/packages/python/plotly/plotly/validators/ohlc/_increasing.py new file mode 100644 index 00000000000..16b567ea534 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_increasing.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="increasing", parent_name="ohlc", **kwargs): + super(IncreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Increasing"), + data_docs=kwargs.pop( + "data_docs", + """ + line + :class:`plotly.graph_objects.ohlc.increasing.Li + ne` instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_legendgroup.py b/packages/python/plotly/plotly/validators/ohlc/_legendgroup.py new file mode 100644 index 00000000000..cc23df71ed0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="ohlc", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_line.py b/packages/python/plotly/plotly/validators/ohlc/_line.py new file mode 100644 index 00000000000..21cc88b8704 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_line.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="ohlc", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + Note that this style setting can also be set + per direction via `increasing.line.dash` and + `decreasing.line.dash`. + width + [object Object] Note that this style setting + can also be set per direction via + `increasing.line.width` and + `decreasing.line.width`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_low.py b/packages/python/plotly/plotly/validators/ohlc/_low.py new file mode 100644 index 00000000000..f172336f840 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_low.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LowValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="low", parent_name="ohlc", **kwargs): + super(LowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_lowsrc.py b/packages/python/plotly/plotly/validators/ohlc/_lowsrc.py new file mode 100644 index 00000000000..8358b8fdf80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_lowsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="lowsrc", parent_name="ohlc", **kwargs): + super(LowsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_meta.py b/packages/python/plotly/plotly/validators/ohlc/_meta.py new file mode 100644 index 00000000000..d6542d840cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="ohlc", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_metasrc.py b/packages/python/plotly/plotly/validators/ohlc/_metasrc.py new file mode 100644 index 00000000000..b11ec2a7250 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="ohlc", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_name.py b/packages/python/plotly/plotly/validators/ohlc/_name.py new file mode 100644 index 00000000000..f5279ed2009 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="ohlc", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_opacity.py b/packages/python/plotly/plotly/validators/ohlc/_opacity.py new file mode 100644 index 00000000000..96a13efc4f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="ohlc", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_open.py b/packages/python/plotly/plotly/validators/ohlc/_open.py new file mode 100644 index 00000000000..ea5398f3a48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_open.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="open", parent_name="ohlc", **kwargs): + super(OpenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_opensrc.py b/packages/python/plotly/plotly/validators/ohlc/_opensrc.py new file mode 100644 index 00000000000..369ad3f0fdd --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_opensrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="opensrc", parent_name="ohlc", **kwargs): + super(OpensrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_selectedpoints.py b/packages/python/plotly/plotly/validators/ohlc/_selectedpoints.py new file mode 100644 index 00000000000..860561d3efc --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="ohlc", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_showlegend.py b/packages/python/plotly/plotly/validators/ohlc/_showlegend.py new file mode 100644 index 00000000000..3a97608806c --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="ohlc", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_stream.py b/packages/python/plotly/plotly/validators/ohlc/_stream.py new file mode 100644 index 00000000000..04db29113fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="ohlc", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_text.py b/packages/python/plotly/plotly/validators/ohlc/_text.py new file mode 100644 index 00000000000..89bc7388bd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="ohlc", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_textsrc.py b/packages/python/plotly/plotly/validators/ohlc/_textsrc.py new file mode 100644 index 00000000000..2077e48f800 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="ohlc", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_tickwidth.py b/packages/python/plotly/plotly/validators/ohlc/_tickwidth.py new file mode 100644 index 00000000000..5cdeab81bad --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_tickwidth.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="tickwidth", parent_name="ohlc", **kwargs): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 0.5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_uid.py b/packages/python/plotly/plotly/validators/ohlc/_uid.py new file mode 100644 index 00000000000..7b23d209743 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="ohlc", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_uirevision.py b/packages/python/plotly/plotly/validators/ohlc/_uirevision.py new file mode 100644 index 00000000000..9859f4a5a31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="ohlc", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_visible.py b/packages/python/plotly/plotly/validators/ohlc/_visible.py new file mode 100644 index 00000000000..00d772a0d45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="ohlc", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_x.py b/packages/python/plotly/plotly/validators/ohlc/_x.py new file mode 100644 index 00000000000..ee60667941a --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="ohlc", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_xaxis.py b/packages/python/plotly/plotly/validators/ohlc/_xaxis.py new file mode 100644 index 00000000000..ca4a810ac6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="ohlc", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_xcalendar.py b/packages/python/plotly/plotly/validators/ohlc/_xcalendar.py new file mode 100644 index 00000000000..ccbc5097ea7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="ohlc", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_xsrc.py b/packages/python/plotly/plotly/validators/ohlc/_xsrc.py new file mode 100644 index 00000000000..44d1d5010ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="ohlc", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/_yaxis.py b/packages/python/plotly/plotly/validators/ohlc/_yaxis.py new file mode 100644 index 00000000000..fe1d69bffb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="ohlc", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/decreasing/__init__.py b/packages/python/plotly/plotly/validators/ohlc/decreasing/__init__.py index e4c06b8db8e..5dc13c03975 100644 --- a/packages/python/plotly/plotly/validators/ohlc/decreasing/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/decreasing/__init__.py @@ -1,25 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="ohlc.decreasing", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/decreasing/_line.py b/packages/python/plotly/plotly/validators/ohlc/decreasing/_line.py new file mode 100644 index 00000000000..e4c06b8db8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/decreasing/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="ohlc.decreasing", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/decreasing/line/__init__.py b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/__init__.py index d0bf93c3a9e..ac8bd485063 100644 --- a/packages/python/plotly/plotly/validators/ohlc/decreasing/line/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/__init__.py @@ -1,50 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="ohlc.decreasing.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__( - self, plotly_name="dash", parent_name="ohlc.decreasing.line", **kwargs - ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="ohlc.decreasing.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_color.py b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_color.py new file mode 100644 index 00000000000..16de300b94e --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="ohlc.decreasing.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_dash.py b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_dash.py new file mode 100644 index 00000000000..d8e1155daa8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_dash.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__( + self, plotly_name="dash", parent_name="ohlc.decreasing.line", **kwargs + ): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_width.py b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_width.py new file mode 100644 index 00000000000..babdde585be --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="ohlc.decreasing.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/__init__.py index cb6a3cadc84..bfe4e0a5a95 100644 --- a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/__init__.py @@ -1,188 +1,32 @@ -import _plotly_utils.basevalidators - - -class SplitValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="split", parent_name="ohlc.hoverlabel", **kwargs): - super(SplitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="ohlc.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="ohlc.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="ohlc.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="ohlc.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="ohlc.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="ohlc.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="ohlc.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="ohlc.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="ohlc.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._split import SplitValidator + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._split.SplitValidator", + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_align.py new file mode 100644 index 00000000000..c04f32a8778 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="ohlc.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..4bc5d9fcd43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="ohlc.hoverlabel", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..cfee7f4de1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="ohlc.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..3efd069cdc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="ohlc.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..4e6d92a05ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="ohlc.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..c061d893b05 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="ohlc.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_font.py new file mode 100644 index 00000000000..0d0c0614c4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="ohlc.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_namelength.py new file mode 100644 index 00000000000..276cf8f423b --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="ohlc.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..58e8f433470 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="ohlc.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_split.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_split.py new file mode 100644 index 00000000000..d5a82a363b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_split.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SplitValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="split", parent_name="ohlc.hoverlabel", **kwargs): + super(SplitValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/__init__.py index 5b89b9d544a..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="ohlc.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="ohlc.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="ohlc.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="ohlc.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="ohlc.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="ohlc.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_color.py new file mode 100644 index 00000000000..ba34e5dfc95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="ohlc.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..60ddc2d9fbe --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="ohlc.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_family.py new file mode 100644 index 00000000000..05877a133f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="ohlc.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..65d0d4d42d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="ohlc.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_size.py new file mode 100644 index 00000000000..3b9cee5d9c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="ohlc.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..296ebfbe02b --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="ohlc.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/increasing/__init__.py b/packages/python/plotly/plotly/validators/ohlc/increasing/__init__.py index 2dab469f810..5dc13c03975 100644 --- a/packages/python/plotly/plotly/validators/ohlc/increasing/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/increasing/__init__.py @@ -1,25 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="ohlc.increasing", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/increasing/_line.py b/packages/python/plotly/plotly/validators/ohlc/increasing/_line.py new file mode 100644 index 00000000000..2dab469f810 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/increasing/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="ohlc.increasing", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/increasing/line/__init__.py b/packages/python/plotly/plotly/validators/ohlc/increasing/line/__init__.py index 86117af4fea..ac8bd485063 100644 --- a/packages/python/plotly/plotly/validators/ohlc/increasing/line/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/increasing/line/__init__.py @@ -1,50 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="ohlc.increasing.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__( - self, plotly_name="dash", parent_name="ohlc.increasing.line", **kwargs - ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="ohlc.increasing.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/increasing/line/_color.py b/packages/python/plotly/plotly/validators/ohlc/increasing/line/_color.py new file mode 100644 index 00000000000..98d66c8a906 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/increasing/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="ohlc.increasing.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/increasing/line/_dash.py b/packages/python/plotly/plotly/validators/ohlc/increasing/line/_dash.py new file mode 100644 index 00000000000..f0445edd61f --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/increasing/line/_dash.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__( + self, plotly_name="dash", parent_name="ohlc.increasing.line", **kwargs + ): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/increasing/line/_width.py b/packages/python/plotly/plotly/validators/ohlc/increasing/line/_width.py new file mode 100644 index 00000000000..f7efba42cef --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/increasing/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="ohlc.increasing.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/line/__init__.py b/packages/python/plotly/plotly/validators/ohlc/line/__init__.py index d25fd9a6530..fe892bbce93 100644 --- a/packages/python/plotly/plotly/validators/ohlc/line/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/line/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="ohlc.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="ohlc.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._dash.DashValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/line/_dash.py b/packages/python/plotly/plotly/validators/ohlc/line/_dash.py new file mode 100644 index 00000000000..0b2bc4b8441 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="ohlc.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/line/_width.py b/packages/python/plotly/plotly/validators/ohlc/line/_width.py new file mode 100644 index 00000000000..345d072a3d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="ohlc.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/stream/__init__.py b/packages/python/plotly/plotly/validators/ohlc/stream/__init__.py index 0acd3b0c62c..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/ohlc/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/ohlc/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="ohlc.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="ohlc.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/ohlc/stream/_maxpoints.py new file mode 100644 index 00000000000..6f7ebf349a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="ohlc.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/ohlc/stream/_token.py b/packages/python/plotly/plotly/validators/ohlc/stream/_token.py new file mode 100644 index 00000000000..5a2c6a48cd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/ohlc/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="ohlc.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/__init__.py b/packages/python/plotly/plotly/validators/parcats/__init__.py index 4a74e69fc74..4faa97fb570 100644 --- a/packages/python/plotly/plotly/validators/parcats/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/__init__.py @@ -1,565 +1,54 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="parcats", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="parcats", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="parcats", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="parcats", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="parcats", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SortpathsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="sortpaths", parent_name="parcats", **kwargs): - super(SortpathsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["forward", "backward"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="parcats", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="parcats", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="parcats", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="parcats", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcats.line.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `count` and `probability`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - shape - Sets the shape of the paths. If `linear`, paths - are composed of straight lines. If `hspline`, - paths are composed of horizontal curved splines - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="labelfont", parent_name="parcats", **kwargs): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Labelfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="parcats", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="hoveron", parent_name="parcats", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["category", "color", "dimension"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="parcats", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "plot"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["count", "probability"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="parcats", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this parcats trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats - trace (in plot fraction). - y - Sets the vertical domain of this parcats trace - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DimensionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="dimensiondefaults", parent_name="parcats", **kwargs - ): - super(DimensionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Dimension"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="dimensions", parent_name="parcats", **kwargs): - super(DimensionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Dimension"), - data_docs=kwargs.pop( - "data_docs", - """ - categoryarray - Sets the order in which categories in this - dimension appear. Only has an effect if - `categoryorder` is set to "array". Used with - `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for categoryarray . - categoryorder - Specifies the ordering logic for the categories - in the dimension. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - displayindex - The display index of dimension, from left to - right, zero indexed, defaults to dimension - index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories - in this dimension. Only has an effect if - `categoryorder` is set to "array". Should be an - array the same length as `categoryarray` Used - with `categoryorder`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - values - Dimension values. `values[n]` represents the - category value of the `n`th point in the - dataset, therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="countssrc", parent_name="parcats", **kwargs): - super(CountssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="counts", parent_name="parcats", **kwargs): - super(CountsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BundlecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="bundlecolors", parent_name="parcats", **kwargs): - super(BundlecolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrangementValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="arrangement", parent_name="parcats", **kwargs): - super(ArrangementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["perpendicular", "freeform", "fixed"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tickfont import TickfontValidator + from ._stream import StreamValidator + from ._sortpaths import SortpathsValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._line import LineValidator + from ._labelfont import LabelfontValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverinfo import HoverinfoValidator + from ._domain import DomainValidator + from ._dimensiondefaults import DimensiondefaultsValidator + from ._dimensions import DimensionsValidator + from ._countssrc import CountssrcValidator + from ._counts import CountsValidator + from ._bundlecolors import BundlecolorsValidator + from ._arrangement import ArrangementValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tickfont.TickfontValidator", + "._stream.StreamValidator", + "._sortpaths.SortpathsValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._labelfont.LabelfontValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._dimensiondefaults.DimensiondefaultsValidator", + "._dimensions.DimensionsValidator", + "._countssrc.CountssrcValidator", + "._counts.CountsValidator", + "._bundlecolors.BundlecolorsValidator", + "._arrangement.ArrangementValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_arrangement.py b/packages/python/plotly/plotly/validators/parcats/_arrangement.py new file mode 100644 index 00000000000..a46c9496593 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_arrangement.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ArrangementValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="arrangement", parent_name="parcats", **kwargs): + super(ArrangementValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["perpendicular", "freeform", "fixed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_bundlecolors.py b/packages/python/plotly/plotly/validators/parcats/_bundlecolors.py new file mode 100644 index 00000000000..0f8c76c060c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_bundlecolors.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BundlecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="bundlecolors", parent_name="parcats", **kwargs): + super(BundlecolorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_counts.py b/packages/python/plotly/plotly/validators/parcats/_counts.py new file mode 100644 index 00000000000..068cac44033 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_counts.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CountsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="counts", parent_name="parcats", **kwargs): + super(CountsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_countssrc.py b/packages/python/plotly/plotly/validators/parcats/_countssrc.py new file mode 100644 index 00000000000..cf170d469da --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_countssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CountssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="countssrc", parent_name="parcats", **kwargs): + super(CountssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_dimensiondefaults.py b/packages/python/plotly/plotly/validators/parcats/_dimensiondefaults.py new file mode 100644 index 00000000000..ff46faa0595 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_dimensiondefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class DimensiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="dimensiondefaults", parent_name="parcats", **kwargs + ): + super(DimensiondefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Dimension"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_dimensions.py b/packages/python/plotly/plotly/validators/parcats/_dimensions.py new file mode 100644 index 00000000000..19a97fbf6bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_dimensions.py @@ -0,0 +1,66 @@ +import _plotly_utils.basevalidators + + +class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="dimensions", parent_name="parcats", **kwargs): + super(DimensionsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Dimension"), + data_docs=kwargs.pop( + "data_docs", + """ + categoryarray + Sets the order in which categories in this + dimension appear. Only has an effect if + `categoryorder` is set to "array". Used with + `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud + for categoryarray . + categoryorder + Specifies the ordering logic for the categories + in the dimension. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + displayindex + The display index of dimension, from left to + right, zero indexed, defaults to dimension + index. + label + The shown name of the dimension. + ticktext + Sets alternative tick labels for the categories + in this dimension. Only has an effect if + `categoryorder` is set to "array". Should be an + array the same length as `categoryarray` Used + with `categoryorder`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + values + Dimension values. `values[n]` represents the + category value of the `n`th point in the + dataset, therefore the `values` vector for all + dimensions must be the same (longer vectors + will be truncated). + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Shows the dimension when set to `true` (the + default). Hides the dimension for `false`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_domain.py b/packages/python/plotly/plotly/validators/parcats/_domain.py new file mode 100644 index 00000000000..c47cecdee65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="parcats", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this parcats trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this parcats trace . + x + Sets the horizontal domain of this parcats + trace (in plot fraction). + y + Sets the vertical domain of this parcats trace + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_hoverinfo.py b/packages/python/plotly/plotly/validators/parcats/_hoverinfo.py new file mode 100644 index 00000000000..e2f6cb5e6d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="parcats", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["count", "probability"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_hoveron.py b/packages/python/plotly/plotly/validators/parcats/_hoveron.py new file mode 100644 index 00000000000..af9feb818cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_hoveron.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="hoveron", parent_name="parcats", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["category", "color", "dimension"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_hovertemplate.py b/packages/python/plotly/plotly/validators/parcats/_hovertemplate.py new file mode 100644 index 00000000000..95b400aed37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_hovertemplate.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="parcats", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_labelfont.py b/packages/python/plotly/plotly/validators/parcats/_labelfont.py new file mode 100644 index 00000000000..66f64a26454 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_labelfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="labelfont", parent_name="parcats", **kwargs): + super(LabelfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Labelfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_line.py b/packages/python/plotly/plotly/validators/parcats/_line.py new file mode 100644 index 00000000000..f5191552e4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_line.py @@ -0,0 +1,135 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="parcats", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.parcats.line.Color + Bar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `count` and `probability`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + shape + Sets the shape of the paths. If `linear`, paths + are composed of straight lines. If `hspline`, + paths are composed of horizontal curved splines + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_meta.py b/packages/python/plotly/plotly/validators/parcats/_meta.py new file mode 100644 index 00000000000..898570d5d67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="parcats", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_metasrc.py b/packages/python/plotly/plotly/validators/parcats/_metasrc.py new file mode 100644 index 00000000000..69f6ae03181 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="parcats", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_name.py b/packages/python/plotly/plotly/validators/parcats/_name.py new file mode 100644 index 00000000000..9a46b057c3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="parcats", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_sortpaths.py b/packages/python/plotly/plotly/validators/parcats/_sortpaths.py new file mode 100644 index 00000000000..20a415431ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_sortpaths.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SortpathsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="sortpaths", parent_name="parcats", **kwargs): + super(SortpathsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["forward", "backward"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_stream.py b/packages/python/plotly/plotly/validators/parcats/_stream.py new file mode 100644 index 00000000000..666c7318dea --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="parcats", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_tickfont.py b/packages/python/plotly/plotly/validators/parcats/_tickfont.py new file mode 100644 index 00000000000..cf1e36ec9ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="parcats", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_uid.py b/packages/python/plotly/plotly/validators/parcats/_uid.py new file mode 100644 index 00000000000..ad6676a1087 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="parcats", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_uirevision.py b/packages/python/plotly/plotly/validators/parcats/_uirevision.py new file mode 100644 index 00000000000..d2dab719763 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="parcats", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/_visible.py b/packages/python/plotly/plotly/validators/parcats/_visible.py new file mode 100644 index 00000000000..7a9e2273b73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="parcats", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/__init__.py b/packages/python/plotly/plotly/validators/parcats/dimension/__init__.py index 4628aaa5149..223bd545ea2 100644 --- a/packages/python/plotly/plotly/validators/parcats/dimension/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/dimension/__init__.py @@ -1,158 +1,32 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="parcats.dimension", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="valuessrc", parent_name="parcats.dimension", **kwargs - ): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="parcats.dimension", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="parcats.dimension", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="parcats.dimension", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="label", parent_name="parcats.dimension", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DisplayindexValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="displayindex", parent_name="parcats.dimension", **kwargs - ): - super(DisplayindexValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="categoryorder", parent_name="parcats.dimension", **kwargs - ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["trace", "category ascending", "category descending", "array"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="categoryarraysrc", parent_name="parcats.dimension", **kwargs - ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="categoryarray", parent_name="parcats.dimension", **kwargs - ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._label import LabelValidator + from ._displayindex import DisplayindexValidator + from ._categoryorder import CategoryorderValidator + from ._categoryarraysrc import CategoryarraysrcValidator + from ._categoryarray import CategoryarrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._label.LabelValidator", + "._displayindex.DisplayindexValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_categoryarray.py b/packages/python/plotly/plotly/validators/parcats/dimension/_categoryarray.py new file mode 100644 index 00000000000..5a6eecfac4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_categoryarray.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="categoryarray", parent_name="parcats.dimension", **kwargs + ): + super(CategoryarrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_categoryarraysrc.py b/packages/python/plotly/plotly/validators/parcats/dimension/_categoryarraysrc.py new file mode 100644 index 00000000000..cbb9636a2ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_categoryarraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="categoryarraysrc", parent_name="parcats.dimension", **kwargs + ): + super(CategoryarraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_categoryorder.py b/packages/python/plotly/plotly/validators/parcats/dimension/_categoryorder.py new file mode 100644 index 00000000000..fccc115215f --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_categoryorder.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="categoryorder", parent_name="parcats.dimension", **kwargs + ): + super(CategoryorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["trace", "category ascending", "category descending", "array"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_displayindex.py b/packages/python/plotly/plotly/validators/parcats/dimension/_displayindex.py new file mode 100644 index 00000000000..641cbda728f --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_displayindex.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DisplayindexValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="displayindex", parent_name="parcats.dimension", **kwargs + ): + super(DisplayindexValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_label.py b/packages/python/plotly/plotly/validators/parcats/dimension/_label.py new file mode 100644 index 00000000000..3c8db4648ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_label.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="label", parent_name="parcats.dimension", **kwargs): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_ticktext.py b/packages/python/plotly/plotly/validators/parcats/dimension/_ticktext.py new file mode 100644 index 00000000000..3b8878a93fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="parcats.dimension", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_ticktextsrc.py b/packages/python/plotly/plotly/validators/parcats/dimension/_ticktextsrc.py new file mode 100644 index 00000000000..5d4d420e722 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="parcats.dimension", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_values.py b/packages/python/plotly/plotly/validators/parcats/dimension/_values.py new file mode 100644 index 00000000000..4b001294776 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="parcats.dimension", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_valuessrc.py b/packages/python/plotly/plotly/validators/parcats/dimension/_valuessrc.py new file mode 100644 index 00000000000..ce611345434 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_valuessrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="valuessrc", parent_name="parcats.dimension", **kwargs + ): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/dimension/_visible.py b/packages/python/plotly/plotly/validators/parcats/dimension/_visible.py new file mode 100644 index 00000000000..a7d7e93e763 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/dimension/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="parcats.dimension", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/domain/__init__.py b/packages/python/plotly/plotly/validators/parcats/domain/__init__.py index 5eadc95a36c..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/parcats/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="parcats.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="parcats.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="parcats.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="parcats.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/domain/_column.py b/packages/python/plotly/plotly/validators/parcats/domain/_column.py new file mode 100644 index 00000000000..0799d94e1c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="parcats.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/domain/_row.py b/packages/python/plotly/plotly/validators/parcats/domain/_row.py new file mode 100644 index 00000000000..d10b8f2cd2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="parcats.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/domain/_x.py b/packages/python/plotly/plotly/validators/parcats/domain/_x.py new file mode 100644 index 00000000000..e390d944cd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="parcats.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/domain/_y.py b/packages/python/plotly/plotly/validators/parcats/domain/_y.py new file mode 100644 index 00000000000..11c596a71fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="parcats.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/labelfont/__init__.py b/packages/python/plotly/plotly/validators/parcats/labelfont/__init__.py index f0810a90604..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcats/labelfont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/labelfont/__init__.py @@ -1,43 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="parcats.labelfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="parcats.labelfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="parcats.labelfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/labelfont/_color.py b/packages/python/plotly/plotly/validators/parcats/labelfont/_color.py new file mode 100644 index 00000000000..b46bb6acaf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/labelfont/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="parcats.labelfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/labelfont/_family.py b/packages/python/plotly/plotly/validators/parcats/labelfont/_family.py new file mode 100644 index 00000000000..f4fc6d16d29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/labelfont/_family.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="parcats.labelfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/labelfont/_size.py b/packages/python/plotly/plotly/validators/parcats/labelfont/_size.py new file mode 100644 index 00000000000..bbf44be12c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/labelfont/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="parcats.labelfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/__init__.py b/packages/python/plotly/plotly/validators/parcats/line/__init__.py index ac02fed3dd0..d6dc3a52000 100644 --- a/packages/python/plotly/plotly/validators/parcats/line/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/line/__init__.py @@ -1,427 +1,40 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="parcats.line", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="shape", parent_name="parcats.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["linear", "hspline"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="parcats.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="parcats.line", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="parcats.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="parcats.line", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="parcats.line", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcats - .line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcats.line.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - parcats.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcats.line.color - bar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - parcats.line.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - parcats.line.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="parcats.line", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="parcats.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "parcats.line.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="parcats.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="parcats.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="parcats.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="parcats.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="parcats.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._shape import ShapeValidator + from ._reversescale import ReversescaleValidator + from ._hovertemplate import HovertemplateValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._shape.ShapeValidator", + "._reversescale.ReversescaleValidator", + "._hovertemplate.HovertemplateValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/parcats/line/_autocolorscale.py new file mode 100644 index 00000000000..0dd6fed847b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="parcats.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_cauto.py b/packages/python/plotly/plotly/validators/parcats/line/_cauto.py new file mode 100644 index 00000000000..dd83462a050 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="parcats.line", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_cmax.py b/packages/python/plotly/plotly/validators/parcats/line/_cmax.py new file mode 100644 index 00000000000..c982d2a7fb2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="parcats.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_cmid.py b/packages/python/plotly/plotly/validators/parcats/line/_cmid.py new file mode 100644 index 00000000000..a553f23c8db --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="parcats.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_cmin.py b/packages/python/plotly/plotly/validators/parcats/line/_cmin.py new file mode 100644 index 00000000000..632312e79b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="parcats.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_color.py b/packages/python/plotly/plotly/validators/parcats/line/_color.py new file mode 100644 index 00000000000..3640e6f33eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="parcats.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "parcats.line.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_coloraxis.py b/packages/python/plotly/plotly/validators/parcats/line/_coloraxis.py new file mode 100644 index 00000000000..5d768a05442 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="parcats.line", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_colorbar.py b/packages/python/plotly/plotly/validators/parcats/line/_colorbar.py new file mode 100644 index 00000000000..bf5d856f0a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="parcats.line", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcats + .line.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.parcats.line.colorbar.tickformatstopdefaults) + , sets the default property values to use for + elements of + parcats.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcats.line.color + bar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + parcats.line.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + parcats.line.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_colorscale.py b/packages/python/plotly/plotly/validators/parcats/line/_colorscale.py new file mode 100644 index 00000000000..b13574ce748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="parcats.line", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_colorsrc.py b/packages/python/plotly/plotly/validators/parcats/line/_colorsrc.py new file mode 100644 index 00000000000..8a62686d5a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="parcats.line", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_hovertemplate.py b/packages/python/plotly/plotly/validators/parcats/line/_hovertemplate.py new file mode 100644 index 00000000000..3e35c588205 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_hovertemplate.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="parcats.line", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_reversescale.py b/packages/python/plotly/plotly/validators/parcats/line/_reversescale.py new file mode 100644 index 00000000000..7696beebcbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="parcats.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_shape.py b/packages/python/plotly/plotly/validators/parcats/line/_shape.py new file mode 100644 index 00000000000..1e2eca7a6db --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_shape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="shape", parent_name="parcats.line", **kwargs): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["linear", "hspline"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/_showscale.py b/packages/python/plotly/plotly/validators/parcats/line/_showscale.py new file mode 100644 index 00000000000..00ec3811dd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="parcats.line", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/__init__.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/__init__.py index 4dff90726da..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/parcats/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/__init__.py @@ -1,782 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="parcats.line.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="parcats.line.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="parcats.line.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="parcats.line.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="parcats.line.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="parcats.line.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="parcats.line.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="parcats.line.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="parcats.line.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="parcats.line.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="parcats.line.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="parcats.line.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="parcats.line.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="parcats.line.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="parcats.line.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="parcats.line.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="parcats.line.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="parcats.line.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="parcats.line.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="parcats.line.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="parcats.line.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="parcats.line.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="parcats.line.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="parcats.line.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="parcats.line.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="parcats.line.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="parcats.line.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_bgcolor.py new file mode 100644 index 00000000000..9a35c2401c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="parcats.line.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_bordercolor.py new file mode 100644 index 00000000000..0b2171dc9c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="parcats.line.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_borderwidth.py new file mode 100644 index 00000000000..a415aa35447 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="parcats.line.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_dtick.py new file mode 100644 index 00000000000..462b977b78d --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="parcats.line.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_exponentformat.py new file mode 100644 index 00000000000..30198358216 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_len.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_len.py new file mode 100644 index 00000000000..5e2ebfdc0d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="parcats.line.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_lenmode.py new file mode 100644 index 00000000000..76f9665fd58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="parcats.line.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_nticks.py new file mode 100644 index 00000000000..54ebecaf4f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="parcats.line.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..4c27614bb20 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="parcats.line.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..1f1f2c0a31b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="parcats.line.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_separatethousands.py new file mode 100644 index 00000000000..c4deaff5265 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showexponent.py new file mode 100644 index 00000000000..0afdfb36ba1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="parcats.line.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showticklabels.py new file mode 100644 index 00000000000..a7967a46be5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..78e255e67fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..f405292ded6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_thickness.py new file mode 100644 index 00000000000..1cd7ea1828b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="parcats.line.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..b5200bd0077 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="parcats.line.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tick0.py new file mode 100644 index 00000000000..da0c12667ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="parcats.line.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickangle.py new file mode 100644 index 00000000000..a670e887de3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickcolor.py new file mode 100644 index 00000000000..004923a26cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickfont.py new file mode 100644 index 00000000000..cfd3e9a5bad --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformat.py new file mode 100644 index 00000000000..24a4f90949a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..4f6c47f29f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..a24b47ffaf1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="parcats.line.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticklen.py new file mode 100644 index 00000000000..598bd2284aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="parcats.line.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickmode.py new file mode 100644 index 00000000000..8932a4e899f --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickprefix.py new file mode 100644 index 00000000000..7ae356acdc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticks.py new file mode 100644 index 00000000000..3c8a8161667 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="parcats.line.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..bab26914169 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="parcats.line.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticktext.py new file mode 100644 index 00000000000..bf76cdd58ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="parcats.line.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..275ee506234 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="parcats.line.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickvals.py new file mode 100644 index 00000000000..fa84fac5da7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..98a8c435daf --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickwidth.py new file mode 100644 index 00000000000..4e402086831 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="parcats.line.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_title.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_title.py new file mode 100644 index 00000000000..b9bd876adac --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="parcats.line.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_x.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_x.py new file mode 100644 index 00000000000..0f9bc8e1ad7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="parcats.line.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xanchor.py new file mode 100644 index 00000000000..fff030ce957 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="parcats.line.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xpad.py new file mode 100644 index 00000000000..4c8e7a4303b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="parcats.line.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_y.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_y.py new file mode 100644 index 00000000000..bfbb0d674df --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="parcats.line.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_yanchor.py new file mode 100644 index 00000000000..f80d0e5af27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="parcats.line.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ypad.py new file mode 100644 index 00000000000..67df42f8f26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="parcats.line.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/__init__.py index b8c50d51ead..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/__init__.py @@ -1,55 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="parcats.line.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="parcats.line.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="parcats.line.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..899692e7be9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="parcats.line.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..b3645b04405 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="parcats.line.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..7822f2ce9eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="parcats.line.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py index 7e10c42a170..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="parcats.line.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="parcats.line.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="parcats.line.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="parcats.line.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="parcats.line.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..da05759d34f --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="parcats.line.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..465b2f4a911 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="parcats.line.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..4c393b67a26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="parcats.line.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..ff816cc1d88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="parcats.line.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..bc302c74300 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="parcats.line.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/__init__.py index 07eac069b64..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="parcats.line.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="parcats.line.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="parcats.line.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_font.py new file mode 100644 index 00000000000..85cd21d283a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="parcats.line.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_side.py new file mode 100644 index 00000000000..e5efaee0e72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="parcats.line.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_text.py new file mode 100644 index 00000000000..65ff7841703 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="parcats.line.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/__init__.py index 361e538cff9..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="parcats.line.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="parcats.line.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="parcats.line.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_color.py new file mode 100644 index 00000000000..77b6e5e936b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="parcats.line.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_family.py new file mode 100644 index 00000000000..94d1be9654e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="parcats.line.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_size.py new file mode 100644 index 00000000000..7f8e984448a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/line/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="parcats.line.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/stream/__init__.py b/packages/python/plotly/plotly/validators/parcats/stream/__init__.py index d1758731e47..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/parcats/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="parcats.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="parcats.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/parcats/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/parcats/stream/_maxpoints.py new file mode 100644 index 00000000000..a25746d756a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="parcats.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/stream/_token.py b/packages/python/plotly/plotly/validators/parcats/stream/_token.py new file mode 100644 index 00000000000..eb752362123 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="parcats.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/tickfont/__init__.py b/packages/python/plotly/plotly/validators/parcats/tickfont/__init__.py index 2cbc584f192..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcats/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/tickfont/__init__.py @@ -1,43 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="parcats.tickfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="parcats.tickfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="parcats.tickfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcats/tickfont/_color.py b/packages/python/plotly/plotly/validators/parcats/tickfont/_color.py new file mode 100644 index 00000000000..d5c3265be2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/tickfont/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="parcats.tickfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/tickfont/_family.py b/packages/python/plotly/plotly/validators/parcats/tickfont/_family.py new file mode 100644 index 00000000000..91e714cd8bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/tickfont/_family.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="parcats.tickfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcats/tickfont/_size.py b/packages/python/plotly/plotly/validators/parcats/tickfont/_size.py new file mode 100644 index 00000000000..fcb1ab5e647 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcats/tickfont/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="parcats.tickfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/__init__.py b/packages/python/plotly/plotly/validators/parcoords/__init__.py index d89af241463..5e1d10ff541 100644 --- a/packages/python/plotly/plotly/validators/parcoords/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/__init__.py @@ -1,563 +1,52 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="parcoords", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="parcoords", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="parcoords", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="parcoords", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="parcoords", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangefontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="rangefont", parent_name="parcoords", **kwargs): - super(RangefontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Rangefont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="parcoords", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="parcoords", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="parcoords", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="parcoords", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcoords.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="labelside", parent_name="parcoords", **kwargs): - super(LabelsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="labelfont", parent_name="parcoords", **kwargs): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Labelfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="labelangle", parent_name="parcoords", **kwargs): - super(LabelangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="parcoords", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="parcoords", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="parcoords", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this parcoords - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords - trace (in plot fraction). - y - Sets the vertical domain of this parcoords - trace (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DimensionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="dimensiondefaults", parent_name="parcoords", **kwargs - ): - super(DimensionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Dimension"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="dimensions", parent_name="parcoords", **kwargs): - super(DimensionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Dimension"), - data_docs=kwargs.pop( - "data_docs", - """ - constraintrange - The domain range to which the filter on the - dimension is constrained. Must be an array of - `[fromValue, toValue]` with `fromValue <= - toValue`, or if `multiselect` is not disabled, - you may give an array of arrays, where each - inner array is `[fromValue, toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a - single range? - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - The domain range that represents the full, - shown axis extent. Defaults to the `values` - extent. Must be an array of `[fromValue, - toValue]` with finite numbers as elements. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticktext - Sets the text displayed at the ticks position - via `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - values - Dimension values. `values[n]` represents the - value of the `n`th point in the dataset, - therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="parcoords", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="parcoords", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tickfont import TickfontValidator + from ._stream import StreamValidator + from ._rangefont import RangefontValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._line import LineValidator + from ._labelside import LabelsideValidator + from ._labelfont import LabelfontValidator + from ._labelangle import LabelangleValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._domain import DomainValidator + from ._dimensiondefaults import DimensiondefaultsValidator + from ._dimensions import DimensionsValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tickfont.TickfontValidator", + "._stream.StreamValidator", + "._rangefont.RangefontValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._labelside.LabelsideValidator", + "._labelfont.LabelfontValidator", + "._labelangle.LabelangleValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._domain.DomainValidator", + "._dimensiondefaults.DimensiondefaultsValidator", + "._dimensions.DimensionsValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_customdata.py b/packages/python/plotly/plotly/validators/parcoords/_customdata.py new file mode 100644 index 00000000000..245ab4c2e66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="parcoords", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_customdatasrc.py b/packages/python/plotly/plotly/validators/parcoords/_customdatasrc.py new file mode 100644 index 00000000000..18b1cfc8d1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="parcoords", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_dimensiondefaults.py b/packages/python/plotly/plotly/validators/parcoords/_dimensiondefaults.py new file mode 100644 index 00000000000..4155a14576d --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_dimensiondefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class DimensiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="dimensiondefaults", parent_name="parcoords", **kwargs + ): + super(DimensiondefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Dimension"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_dimensions.py b/packages/python/plotly/plotly/validators/parcoords/_dimensions.py new file mode 100644 index 00000000000..3a0f99cb766 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_dimensions.py @@ -0,0 +1,93 @@ +import _plotly_utils.basevalidators + + +class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="dimensions", parent_name="parcoords", **kwargs): + super(DimensionsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Dimension"), + data_docs=kwargs.pop( + "data_docs", + """ + constraintrange + The domain range to which the filter on the + dimension is constrained. Must be an array of + `[fromValue, toValue]` with `fromValue <= + toValue`, or if `multiselect` is not disabled, + you may give an array of arrays, where each + inner array is `[fromValue, toValue]`. + label + The shown name of the dimension. + multiselect + Do we allow multiple selection ranges or just a + single range? + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + range + The domain range that represents the full, + shown axis extent. Defaults to the `values` + extent. Must be an array of `[fromValue, + toValue]` with finite numbers as elements. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + ticktext + Sets the text displayed at the ticks position + via `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + values + Dimension values. `values[n]` represents the + value of the `n`th point in the dataset, + therefore the `values` vector for all + dimensions must be the same (longer vectors + will be truncated). Each value must be a finite + number. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Shows the dimension when set to `true` (the + default). Hides the dimension for `false`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_domain.py b/packages/python/plotly/plotly/validators/parcoords/_domain.py new file mode 100644 index 00000000000..8de6e0334dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="parcoords", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this parcoords + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this parcoords trace . + x + Sets the horizontal domain of this parcoords + trace (in plot fraction). + y + Sets the vertical domain of this parcoords + trace (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_ids.py b/packages/python/plotly/plotly/validators/parcoords/_ids.py new file mode 100644 index 00000000000..50846c032f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="parcoords", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_idssrc.py b/packages/python/plotly/plotly/validators/parcoords/_idssrc.py new file mode 100644 index 00000000000..9228df48280 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="parcoords", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_labelangle.py b/packages/python/plotly/plotly/validators/parcoords/_labelangle.py new file mode 100644 index 00000000000..d7e2ca56b95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_labelangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="labelangle", parent_name="parcoords", **kwargs): + super(LabelangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_labelfont.py b/packages/python/plotly/plotly/validators/parcoords/_labelfont.py new file mode 100644 index 00000000000..ff2f385f776 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_labelfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="labelfont", parent_name="parcoords", **kwargs): + super(LabelfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Labelfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_labelside.py b/packages/python/plotly/plotly/validators/parcoords/_labelside.py new file mode 100644 index 00000000000..489b9111bf2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_labelside.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LabelsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="labelside", parent_name="parcoords", **kwargs): + super(LabelsideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_line.py b/packages/python/plotly/plotly/validators/parcoords/_line.py new file mode 100644 index 00000000000..34e5facf837 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_line.py @@ -0,0 +1,102 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="parcoords", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.parcoords.line.Col + orBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_meta.py b/packages/python/plotly/plotly/validators/parcoords/_meta.py new file mode 100644 index 00000000000..054e0ef3c66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="parcoords", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_metasrc.py b/packages/python/plotly/plotly/validators/parcoords/_metasrc.py new file mode 100644 index 00000000000..a38231d33da --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="parcoords", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_name.py b/packages/python/plotly/plotly/validators/parcoords/_name.py new file mode 100644 index 00000000000..a7e1d7babf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="parcoords", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_rangefont.py b/packages/python/plotly/plotly/validators/parcoords/_rangefont.py new file mode 100644 index 00000000000..e29e06b6977 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_rangefont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class RangefontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="rangefont", parent_name="parcoords", **kwargs): + super(RangefontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Rangefont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_stream.py b/packages/python/plotly/plotly/validators/parcoords/_stream.py new file mode 100644 index 00000000000..ef30225d325 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="parcoords", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_tickfont.py b/packages/python/plotly/plotly/validators/parcoords/_tickfont.py new file mode 100644 index 00000000000..41f89928710 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="parcoords", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_uid.py b/packages/python/plotly/plotly/validators/parcoords/_uid.py new file mode 100644 index 00000000000..3e2b257a1ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="parcoords", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_uirevision.py b/packages/python/plotly/plotly/validators/parcoords/_uirevision.py new file mode 100644 index 00000000000..0f367290f71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="parcoords", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/_visible.py b/packages/python/plotly/plotly/validators/parcoords/_visible.py new file mode 100644 index 00000000000..9c0e3c74e37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="parcoords", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/__init__.py b/packages/python/plotly/plotly/validators/parcoords/dimension/__init__.py index 5c7ea080d50..613722cc235 100644 --- a/packages/python/plotly/plotly/validators/parcoords/dimension/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/__init__.py @@ -1,239 +1,40 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="parcoords.dimension", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="valuessrc", parent_name="parcoords.dimension", **kwargs - ): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="values", parent_name="parcoords.dimension", **kwargs - ): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="parcoords.dimension", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="parcoords.dimension", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="parcoords.dimension", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="parcoords.dimension", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="parcoords.dimension", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="parcoords.dimension", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="range", parent_name="parcoords.dimension", **kwargs - ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="parcoords.dimension", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MultiselectValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="multiselect", parent_name="parcoords.dimension", **kwargs - ): - super(MultiselectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="label", parent_name="parcoords.dimension", **kwargs - ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstraintrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, plotly_name="constraintrange", parent_name="parcoords.dimension", **kwargs - ): - super(ConstraintrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dimensions=kwargs.pop("dimensions", "1-2"), - edit_type=kwargs.pop("edit_type", "plot"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - [ - {"valType": "number", "editType": "plot"}, - {"valType": "number", "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._tickformat import TickformatValidator + from ._templateitemname import TemplateitemnameValidator + from ._range import RangeValidator + from ._name import NameValidator + from ._multiselect import MultiselectValidator + from ._label import LabelValidator + from ._constraintrange import ConstraintrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._tickformat.TickformatValidator", + "._templateitemname.TemplateitemnameValidator", + "._range.RangeValidator", + "._name.NameValidator", + "._multiselect.MultiselectValidator", + "._label.LabelValidator", + "._constraintrange.ConstraintrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_constraintrange.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_constraintrange.py new file mode 100644 index 00000000000..2423f06a1dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_constraintrange.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class ConstraintrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="constraintrange", parent_name="parcoords.dimension", **kwargs + ): + super(ConstraintrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dimensions=kwargs.pop("dimensions", "1-2"), + edit_type=kwargs.pop("edit_type", "plot"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_label.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_label.py new file mode 100644 index 00000000000..f9c4478615b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_label.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="label", parent_name="parcoords.dimension", **kwargs + ): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_multiselect.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_multiselect.py new file mode 100644 index 00000000000..c2942361fb4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_multiselect.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MultiselectValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="multiselect", parent_name="parcoords.dimension", **kwargs + ): + super(MultiselectValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_name.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_name.py new file mode 100644 index 00000000000..90a3a776892 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="parcoords.dimension", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_range.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_range.py new file mode 100644 index 00000000000..9c58f029be3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_range.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, plotly_name="range", parent_name="parcoords.dimension", **kwargs + ): + super(RangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "editType": "plot"}, + {"valType": "number", "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_templateitemname.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_templateitemname.py new file mode 100644 index 00000000000..5c5b144f568 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="parcoords.dimension", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_tickformat.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_tickformat.py new file mode 100644 index 00000000000..edb88aba3eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="parcoords.dimension", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_ticktext.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_ticktext.py new file mode 100644 index 00000000000..6a1aad9b10c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="parcoords.dimension", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_ticktextsrc.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_ticktextsrc.py new file mode 100644 index 00000000000..27cf99272b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="parcoords.dimension", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_tickvals.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_tickvals.py new file mode 100644 index 00000000000..a8bba5ae74d --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="parcoords.dimension", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_tickvalssrc.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_tickvalssrc.py new file mode 100644 index 00000000000..2b2e0f0b690 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="parcoords.dimension", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_values.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_values.py new file mode 100644 index 00000000000..a456e7383c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_values.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="values", parent_name="parcoords.dimension", **kwargs + ): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_valuessrc.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_valuessrc.py new file mode 100644 index 00000000000..2c8b095b6ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_valuessrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="valuessrc", parent_name="parcoords.dimension", **kwargs + ): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/dimension/_visible.py b/packages/python/plotly/plotly/validators/parcoords/dimension/_visible.py new file mode 100644 index 00000000000..d655c4a95b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/dimension/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="parcoords.dimension", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/domain/__init__.py b/packages/python/plotly/plotly/validators/parcoords/domain/__init__.py index ce12175e01c..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/parcoords/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="parcoords.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="parcoords.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="parcoords.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="parcoords.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/domain/_column.py b/packages/python/plotly/plotly/validators/parcoords/domain/_column.py new file mode 100644 index 00000000000..9eb6737e4ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="parcoords.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/domain/_row.py b/packages/python/plotly/plotly/validators/parcoords/domain/_row.py new file mode 100644 index 00000000000..333997b9edf --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="parcoords.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/domain/_x.py b/packages/python/plotly/plotly/validators/parcoords/domain/_x.py new file mode 100644 index 00000000000..729879f76ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="parcoords.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/domain/_y.py b/packages/python/plotly/plotly/validators/parcoords/domain/_y.py new file mode 100644 index 00000000000..7be7f7247b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="parcoords.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + {"valType": "number", "min": 0, "max": 1, "editType": "plot"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/labelfont/__init__.py b/packages/python/plotly/plotly/validators/parcoords/labelfont/__init__.py index b6b637204bd..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcoords/labelfont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/labelfont/__init__.py @@ -1,47 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="parcoords.labelfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="parcoords.labelfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="parcoords.labelfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/labelfont/_color.py b/packages/python/plotly/plotly/validators/parcoords/labelfont/_color.py new file mode 100644 index 00000000000..00dda72a58b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/labelfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="parcoords.labelfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/labelfont/_family.py b/packages/python/plotly/plotly/validators/parcoords/labelfont/_family.py new file mode 100644 index 00000000000..7df4f011e77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/labelfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="parcoords.labelfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/labelfont/_size.py b/packages/python/plotly/plotly/validators/parcoords/labelfont/_size.py new file mode 100644 index 00000000000..8b552ba5bb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/labelfont/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="parcoords.labelfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/__init__.py b/packages/python/plotly/plotly/validators/parcoords/line/__init__.py index 31e8dac688c..7ca057d7777 100644 --- a/packages/python/plotly/plotly/validators/parcoords/line/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/line/__init__.py @@ -1,398 +1,36 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="parcoords.line", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="parcoords.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="parcoords.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="parcoords.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="parcoords.line", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcoor - ds.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcoords.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - parcoords.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcoords.line.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - parcoords.line.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - parcoords.line.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="parcoords.line", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="parcoords.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "parcoords.line.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="parcoords.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="parcoords.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="parcoords.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="parcoords.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="parcoords.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/parcoords/line/_autocolorscale.py new file mode 100644 index 00000000000..ffdcd6b63ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="parcoords.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_cauto.py b/packages/python/plotly/plotly/validators/parcoords/line/_cauto.py new file mode 100644 index 00000000000..eb25605558d --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="parcoords.line", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_cmax.py b/packages/python/plotly/plotly/validators/parcoords/line/_cmax.py new file mode 100644 index 00000000000..1ecb7aa08e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="parcoords.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_cmid.py b/packages/python/plotly/plotly/validators/parcoords/line/_cmid.py new file mode 100644 index 00000000000..06f48470ce2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="parcoords.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_cmin.py b/packages/python/plotly/plotly/validators/parcoords/line/_cmin.py new file mode 100644 index 00000000000..224015f1b8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="parcoords.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_color.py b/packages/python/plotly/plotly/validators/parcoords/line/_color.py new file mode 100644 index 00000000000..8ae3355fd4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="parcoords.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "parcoords.line.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_coloraxis.py b/packages/python/plotly/plotly/validators/parcoords/line/_coloraxis.py new file mode 100644 index 00000000000..efec21c6d15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="parcoords.line", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_colorbar.py b/packages/python/plotly/plotly/validators/parcoords/line/_colorbar.py new file mode 100644 index 00000000000..4c232563c37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="parcoords.line", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.parcoor + ds.line.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.parcoords.line.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + parcoords.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.parcoords.line.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + parcoords.line.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + parcoords.line.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_colorscale.py b/packages/python/plotly/plotly/validators/parcoords/line/_colorscale.py new file mode 100644 index 00000000000..471b1982883 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="parcoords.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_colorsrc.py b/packages/python/plotly/plotly/validators/parcoords/line/_colorsrc.py new file mode 100644 index 00000000000..c95efd7a35a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="parcoords.line", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_reversescale.py b/packages/python/plotly/plotly/validators/parcoords/line/_reversescale.py new file mode 100644 index 00000000000..7e3bf2fb787 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="parcoords.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/_showscale.py b/packages/python/plotly/plotly/validators/parcoords/line/_showscale.py new file mode 100644 index 00000000000..ef8d8e694f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="parcoords.line", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/__init__.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/__init__.py index f7c311a35ea..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/__init__.py @@ -1,798 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="parcoords.line.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="parcoords.line.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="parcoords.line.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="parcoords.line.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="parcoords.line.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="parcoords.line.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="parcoords.line.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="parcoords.line.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="parcoords.line.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="parcoords.line.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="parcoords.line.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="parcoords.line.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="parcoords.line.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="parcoords.line.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="parcoords.line.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="parcoords.line.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="parcoords.line.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_bgcolor.py new file mode 100644 index 00000000000..6b0f44e029e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="parcoords.line.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_bordercolor.py new file mode 100644 index 00000000000..992aa4fb6bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="parcoords.line.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_borderwidth.py new file mode 100644 index 00000000000..918b807f48f --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="parcoords.line.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_dtick.py new file mode 100644 index 00000000000..0b7e55bf47a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="parcoords.line.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_exponentformat.py new file mode 100644 index 00000000000..ad0ec7a54b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_len.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_len.py new file mode 100644 index 00000000000..9fec9f0c5a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="parcoords.line.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_lenmode.py new file mode 100644 index 00000000000..d562a1cae6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="parcoords.line.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_nticks.py new file mode 100644 index 00000000000..ea20d6ada6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="parcoords.line.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..3dbaaacfa20 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..3e14f6ed76a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_separatethousands.py new file mode 100644 index 00000000000..6f05d5743c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showexponent.py new file mode 100644 index 00000000000..4fccecccb18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showticklabels.py new file mode 100644 index 00000000000..af156d321ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..8be035e5f9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..e3e3e74dcd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_thickness.py new file mode 100644 index 00000000000..7ea64c99943 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="parcoords.line.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..abe0689bd4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tick0.py new file mode 100644 index 00000000000..b656fcf66b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="parcoords.line.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickangle.py new file mode 100644 index 00000000000..1228b217a04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickcolor.py new file mode 100644 index 00000000000..9588c88b39c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickfont.py new file mode 100644 index 00000000000..1d19573086e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformat.py new file mode 100644 index 00000000000..7bea3959c41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..cbbae4913c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..586f7436067 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="parcoords.line.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticklen.py new file mode 100644 index 00000000000..7943cda1388 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickmode.py new file mode 100644 index 00000000000..ba94722ad42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickprefix.py new file mode 100644 index 00000000000..a504cd7daa4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticks.py new file mode 100644 index 00000000000..d315f288cf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..551a6b3f2e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticktext.py new file mode 100644 index 00000000000..7b68929974c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..c69c73f5490 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvals.py new file mode 100644 index 00000000000..39450b9cd0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..45ebb6e564c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickwidth.py new file mode 100644 index 00000000000..5608eef161b --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_title.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_title.py new file mode 100644 index 00000000000..265398a1e17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="parcoords.line.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_x.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_x.py new file mode 100644 index 00000000000..bcca6778773 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="parcoords.line.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_xanchor.py new file mode 100644 index 00000000000..f27d97d42d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="parcoords.line.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_xpad.py new file mode 100644 index 00000000000..df81121dc2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="parcoords.line.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_y.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_y.py new file mode 100644 index 00000000000..0b1d2f9ce4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="parcoords.line.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_yanchor.py new file mode 100644 index 00000000000..ba845ba68d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="parcoords.line.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ypad.py new file mode 100644 index 00000000000..a5ec2f9f022 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="parcoords.line.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py index cb292c985b2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="parcoords.line.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="parcoords.line.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="parcoords.line.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..878a980018e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="parcoords.line.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..6452ac6b00c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="parcoords.line.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..e217d1f88c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="parcoords.line.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py index 3a47c74fc0e..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="parcoords.line.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="parcoords.line.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="parcoords.line.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="parcoords.line.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="parcoords.line.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..58d8ece059e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="parcoords.line.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..e2830ebbabd --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="parcoords.line.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..db381a3afd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="parcoords.line.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..2ea3b5a0e68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="parcoords.line.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..7410d31c834 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="parcoords.line.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/__init__.py index 6707de86d90..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="parcoords.line.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="parcoords.line.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="parcoords.line.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_font.py new file mode 100644 index 00000000000..11817941e5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="parcoords.line.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_side.py new file mode 100644 index 00000000000..01ebe302ba1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="parcoords.line.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_text.py new file mode 100644 index 00000000000..e8b0f72b77d --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="parcoords.line.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/__init__.py index 7b04f7ed4e2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="parcoords.line.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="parcoords.line.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="parcoords.line.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_color.py new file mode 100644 index 00000000000..536a078ec1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="parcoords.line.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_family.py new file mode 100644 index 00000000000..4206ac16372 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="parcoords.line.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_size.py new file mode 100644 index 00000000000..47334170bb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/line/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="parcoords.line.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/rangefont/__init__.py b/packages/python/plotly/plotly/validators/parcoords/rangefont/__init__.py index a1a4fe68d66..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcoords/rangefont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/rangefont/__init__.py @@ -1,47 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="parcoords.rangefont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="parcoords.rangefont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="parcoords.rangefont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/rangefont/_color.py b/packages/python/plotly/plotly/validators/parcoords/rangefont/_color.py new file mode 100644 index 00000000000..694d1592a75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/rangefont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="parcoords.rangefont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/rangefont/_family.py b/packages/python/plotly/plotly/validators/parcoords/rangefont/_family.py new file mode 100644 index 00000000000..c17b79c811a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/rangefont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="parcoords.rangefont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/rangefont/_size.py b/packages/python/plotly/plotly/validators/parcoords/rangefont/_size.py new file mode 100644 index 00000000000..26950c0f890 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/rangefont/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="parcoords.rangefont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/stream/__init__.py b/packages/python/plotly/plotly/validators/parcoords/stream/__init__.py index 50a1a1dd381..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/parcoords/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="parcoords.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="parcoords.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/parcoords/stream/_maxpoints.py new file mode 100644 index 00000000000..02bb8f7bfad --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="parcoords.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/stream/_token.py b/packages/python/plotly/plotly/validators/parcoords/stream/_token.py new file mode 100644 index 00000000000..13d221dce19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="parcoords.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/tickfont/__init__.py b/packages/python/plotly/plotly/validators/parcoords/tickfont/__init__.py index 5b16a0fc022..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/parcoords/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/parcoords/tickfont/__init__.py @@ -1,45 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="parcoords.tickfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="parcoords.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="parcoords.tickfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/tickfont/_color.py b/packages/python/plotly/plotly/validators/parcoords/tickfont/_color.py new file mode 100644 index 00000000000..06d3590b8de --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/tickfont/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="parcoords.tickfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/tickfont/_family.py b/packages/python/plotly/plotly/validators/parcoords/tickfont/_family.py new file mode 100644 index 00000000000..6da846d97a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="parcoords.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/parcoords/tickfont/_size.py b/packages/python/plotly/plotly/validators/parcoords/tickfont/_size.py new file mode 100644 index 00000000000..9acd135697a --- /dev/null +++ b/packages/python/plotly/plotly/validators/parcoords/tickfont/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="parcoords.tickfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/__init__.py b/packages/python/plotly/plotly/validators/pie/__init__.py index d5a80a87b83..b47270c4632 100644 --- a/packages/python/plotly/plotly/validators/pie/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/__init__.py @@ -1,911 +1,110 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="pie", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuessrc", parent_name="pie", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="pie", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="pie", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="pie", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="pie", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - position - Specifies the location of the `title`. Note - that the title's position used to be set by the - now deprecated `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no - title is displayed. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="texttemplatesrc", parent_name="pie", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="pie", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="pie", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textpositionsrc", parent_name="pie", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="pie", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="textinfo", parent_name="pie", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["label", "text", "value", "percent"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="pie", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="pie", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="pie", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SortValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="sort", parent_name="pie", **kwargs): - super(SortValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="pie", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="scalegroup", parent_name="pie", **kwargs): - super(ScalegroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RotationValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="rotation", parent_name="pie", **kwargs): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 360), - min=kwargs.pop("min", -360), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PullsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="pullsrc", parent_name="pie", **kwargs): - super(PullsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PullValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pull", parent_name="pie", **kwargs): - super(PullValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="outsidetextfont", parent_name="pie", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="pie", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="pie", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="pie", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="pie", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="pie", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - line - :class:`plotly.graph_objects.pie.marker.Line` - instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="pie", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="labelssrc", parent_name="pie", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="labels", parent_name="pie", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Label0Validator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="label0", parent_name="pie", **kwargs): - super(Label0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="insidetextorientation", parent_name="pie", **kwargs - ): - super(InsidetextorientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["horizontal", "radial", "tangential", "auto"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="insidetextfont", parent_name="pie", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="pie", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="pie", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="pie", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="pie", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="pie", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="pie", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="pie", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="pie", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="pie", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["label", "text", "value", "percent", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoleValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="hole", parent_name="pie", **kwargs): - super(HoleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="pie", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this pie trace . - row - If there is a layout grid, use the domain for - this row in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace - (in plot fraction). - y - Sets the vertical domain of this pie trace (in - plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DlabelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dlabel", parent_name="pie", **kwargs): - super(DlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="direction", parent_name="pie", **kwargs): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["clockwise", "counterclockwise"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="pie", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="pie", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="automargin", parent_name="pie", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._title import TitleValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textinfo import TextinfoValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._sort import SortValidator + from ._showlegend import ShowlegendValidator + from ._scalegroup import ScalegroupValidator + from ._rotation import RotationValidator + from ._pullsrc import PullsrcValidator + from ._pull import PullValidator + from ._outsidetextfont import OutsidetextfontValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._labelssrc import LabelssrcValidator + from ._labels import LabelsValidator + from ._label0 import Label0Validator + from ._insidetextorientation import InsidetextorientationValidator + from ._insidetextfont import InsidetextfontValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._hole import HoleValidator + from ._domain import DomainValidator + from ._dlabel import DlabelValidator + from ._direction import DirectionValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._automargin import AutomarginValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._title.TitleValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sort.SortValidator", + "._showlegend.ShowlegendValidator", + "._scalegroup.ScalegroupValidator", + "._rotation.RotationValidator", + "._pullsrc.PullsrcValidator", + "._pull.PullValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._label0.Label0Validator", + "._insidetextorientation.InsidetextorientationValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._hole.HoleValidator", + "._domain.DomainValidator", + "._dlabel.DlabelValidator", + "._direction.DirectionValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._automargin.AutomarginValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/_automargin.py b/packages/python/plotly/plotly/validators/pie/_automargin.py new file mode 100644 index 00000000000..44d2dd9cc98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_automargin.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="automargin", parent_name="pie", **kwargs): + super(AutomarginValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_customdata.py b/packages/python/plotly/plotly/validators/pie/_customdata.py new file mode 100644 index 00000000000..e93d14fa796 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="pie", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_customdatasrc.py b/packages/python/plotly/plotly/validators/pie/_customdatasrc.py new file mode 100644 index 00000000000..289893cf876 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="pie", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_direction.py b/packages/python/plotly/plotly/validators/pie/_direction.py new file mode 100644 index 00000000000..9f3fe8b8dcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_direction.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="direction", parent_name="pie", **kwargs): + super(DirectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["clockwise", "counterclockwise"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_dlabel.py b/packages/python/plotly/plotly/validators/pie/_dlabel.py new file mode 100644 index 00000000000..de2d4051890 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_dlabel.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DlabelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dlabel", parent_name="pie", **kwargs): + super(DlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_domain.py b/packages/python/plotly/plotly/validators/pie/_domain.py new file mode 100644 index 00000000000..1adbed33d38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_domain.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="pie", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this pie trace . + row + If there is a layout grid, use the domain for + this row in the grid for this pie trace . + x + Sets the horizontal domain of this pie trace + (in plot fraction). + y + Sets the vertical domain of this pie trace (in + plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hole.py b/packages/python/plotly/plotly/validators/pie/_hole.py new file mode 100644 index 00000000000..28ddaff59af --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hole.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoleValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="hole", parent_name="pie", **kwargs): + super(HoleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hoverinfo.py b/packages/python/plotly/plotly/validators/pie/_hoverinfo.py new file mode 100644 index 00000000000..92d4cf247ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="pie", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["label", "text", "value", "percent", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/pie/_hoverinfosrc.py new file mode 100644 index 00000000000..6e6a8343548 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="pie", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hoverlabel.py b/packages/python/plotly/plotly/validators/pie/_hoverlabel.py new file mode 100644 index 00000000000..7071e808b9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="pie", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hovertemplate.py b/packages/python/plotly/plotly/validators/pie/_hovertemplate.py new file mode 100644 index 00000000000..a1ce2e21740 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="pie", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/pie/_hovertemplatesrc.py new file mode 100644 index 00000000000..3ebdeadc068 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="pie", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hovertext.py b/packages/python/plotly/plotly/validators/pie/_hovertext.py new file mode 100644 index 00000000000..91226d2b401 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="pie", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_hovertextsrc.py b/packages/python/plotly/plotly/validators/pie/_hovertextsrc.py new file mode 100644 index 00000000000..27c5b744643 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="pie", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_ids.py b/packages/python/plotly/plotly/validators/pie/_ids.py new file mode 100644 index 00000000000..974be11ab0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="pie", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_idssrc.py b/packages/python/plotly/plotly/validators/pie/_idssrc.py new file mode 100644 index 00000000000..0e65f34e871 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="pie", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_insidetextfont.py b/packages/python/plotly/plotly/validators/pie/_insidetextfont.py new file mode 100644 index 00000000000..8a588bfbf32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_insidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="pie", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_insidetextorientation.py b/packages/python/plotly/plotly/validators/pie/_insidetextorientation.py new file mode 100644 index 00000000000..82210251bd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_insidetextorientation.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="insidetextorientation", parent_name="pie", **kwargs + ): + super(InsidetextorientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["horizontal", "radial", "tangential", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_label0.py b/packages/python/plotly/plotly/validators/pie/_label0.py new file mode 100644 index 00000000000..eb51836b363 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_label0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Label0Validator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="label0", parent_name="pie", **kwargs): + super(Label0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_labels.py b/packages/python/plotly/plotly/validators/pie/_labels.py new file mode 100644 index 00000000000..b591763136b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_labels.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="labels", parent_name="pie", **kwargs): + super(LabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_labelssrc.py b/packages/python/plotly/plotly/validators/pie/_labelssrc.py new file mode 100644 index 00000000000..f853ac78e17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_labelssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelssrc", parent_name="pie", **kwargs): + super(LabelssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_legendgroup.py b/packages/python/plotly/plotly/validators/pie/_legendgroup.py new file mode 100644 index 00000000000..9860225303d --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="pie", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_marker.py b/packages/python/plotly/plotly/validators/pie/_marker.py new file mode 100644 index 00000000000..72433762426 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_marker.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="pie", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + colors + Sets the color of each sector. If not + specified, the default trace color set is used + to pick the sector colors. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + line + :class:`plotly.graph_objects.pie.marker.Line` + instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_meta.py b/packages/python/plotly/plotly/validators/pie/_meta.py new file mode 100644 index 00000000000..e384052a080 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="pie", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_metasrc.py b/packages/python/plotly/plotly/validators/pie/_metasrc.py new file mode 100644 index 00000000000..298fcc309fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="pie", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_name.py b/packages/python/plotly/plotly/validators/pie/_name.py new file mode 100644 index 00000000000..139b4971833 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="pie", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_opacity.py b/packages/python/plotly/plotly/validators/pie/_opacity.py new file mode 100644 index 00000000000..bd16561c3cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="pie", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_outsidetextfont.py b/packages/python/plotly/plotly/validators/pie/_outsidetextfont.py new file mode 100644 index 00000000000..ec3f9578b37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_outsidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="outsidetextfont", parent_name="pie", **kwargs): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_pull.py b/packages/python/plotly/plotly/validators/pie/_pull.py new file mode 100644 index 00000000000..b83d1ec4892 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_pull.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class PullValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pull", parent_name="pie", **kwargs): + super(PullValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_pullsrc.py b/packages/python/plotly/plotly/validators/pie/_pullsrc.py new file mode 100644 index 00000000000..24a56f7ebea --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_pullsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PullsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="pullsrc", parent_name="pie", **kwargs): + super(PullsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_rotation.py b/packages/python/plotly/plotly/validators/pie/_rotation.py new file mode 100644 index 00000000000..e8012335f01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_rotation.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class RotationValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="rotation", parent_name="pie", **kwargs): + super(RotationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 360), + min=kwargs.pop("min", -360), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_scalegroup.py b/packages/python/plotly/plotly/validators/pie/_scalegroup.py new file mode 100644 index 00000000000..0e6f83e3f9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_scalegroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="scalegroup", parent_name="pie", **kwargs): + super(ScalegroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_showlegend.py b/packages/python/plotly/plotly/validators/pie/_showlegend.py new file mode 100644 index 00000000000..6868befb354 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="pie", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_sort.py b/packages/python/plotly/plotly/validators/pie/_sort.py new file mode 100644 index 00000000000..11ee25aedbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_sort.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SortValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="sort", parent_name="pie", **kwargs): + super(SortValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_stream.py b/packages/python/plotly/plotly/validators/pie/_stream.py new file mode 100644 index 00000000000..db76672596d --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="pie", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_text.py b/packages/python/plotly/plotly/validators/pie/_text.py new file mode 100644 index 00000000000..246b0c2c39f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="pie", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_textfont.py b/packages/python/plotly/plotly/validators/pie/_textfont.py new file mode 100644 index 00000000000..807ac30bbb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="pie", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_textinfo.py b/packages/python/plotly/plotly/validators/pie/_textinfo.py new file mode 100644 index 00000000000..97f0318fe3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_textinfo.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="pie", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["label", "text", "value", "percent"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_textposition.py b/packages/python/plotly/plotly/validators/pie/_textposition.py new file mode 100644 index 00000000000..ff6fb9477e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_textposition.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="pie", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_textpositionsrc.py b/packages/python/plotly/plotly/validators/pie/_textpositionsrc.py new file mode 100644 index 00000000000..a4e5f131d07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_textpositionsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textpositionsrc", parent_name="pie", **kwargs): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_textsrc.py b/packages/python/plotly/plotly/validators/pie/_textsrc.py new file mode 100644 index 00000000000..e0171bdfc69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="pie", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_texttemplate.py b/packages/python/plotly/plotly/validators/pie/_texttemplate.py new file mode 100644 index 00000000000..bcabcce18b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="pie", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/pie/_texttemplatesrc.py new file mode 100644 index 00000000000..bb969b0a583 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_texttemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="pie", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_title.py b/packages/python/plotly/plotly/validators/pie/_title.py new file mode 100644 index 00000000000..de0cb128cbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_title.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="pie", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + position + Specifies the location of the `title`. Note + that the title's position used to be set by the + now deprecated `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no + title is displayed. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_uid.py b/packages/python/plotly/plotly/validators/pie/_uid.py new file mode 100644 index 00000000000..9985f3b9c7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="pie", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_uirevision.py b/packages/python/plotly/plotly/validators/pie/_uirevision.py new file mode 100644 index 00000000000..41fcae41889 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="pie", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_values.py b/packages/python/plotly/plotly/validators/pie/_values.py new file mode 100644 index 00000000000..21c6a4c058c --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="pie", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_valuessrc.py b/packages/python/plotly/plotly/validators/pie/_valuessrc.py new file mode 100644 index 00000000000..b7780855949 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_valuessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="pie", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/_visible.py b/packages/python/plotly/plotly/validators/pie/_visible.py new file mode 100644 index 00000000000..0fc27882cf2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="pie", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/domain/__init__.py b/packages/python/plotly/plotly/validators/pie/domain/__init__.py index c7bcf03814b..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/pie/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="pie.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="pie.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="pie.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="pie.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/domain/_column.py b/packages/python/plotly/plotly/validators/pie/domain/_column.py new file mode 100644 index 00000000000..1ebb51ce5df --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="pie.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/domain/_row.py b/packages/python/plotly/plotly/validators/pie/domain/_row.py new file mode 100644 index 00000000000..c1bfdbc6118 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="pie.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/domain/_x.py b/packages/python/plotly/plotly/validators/pie/domain/_x.py new file mode 100644 index 00000000000..3d133c0a60c --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="pie.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/domain/_y.py b/packages/python/plotly/plotly/validators/pie/domain/_y.py new file mode 100644 index 00000000000..4901b8670a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="pie.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/__init__.py index b033e859021..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/pie/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/__init__.py @@ -1,174 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="pie.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="pie.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="pie.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="pie.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="pie.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="pie.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="pie.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="pie.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="pie.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_align.py new file mode 100644 index 00000000000..f262ae7fdcd --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="pie.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..ccb444a66de --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="pie.hoverlabel", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..7a8adb58cac --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="pie.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..8684e3e6494 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="pie.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..de96c336133 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="pie.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..a015903d003 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="pie.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_font.py new file mode 100644 index 00000000000..8c30a828e6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="pie.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_namelength.py new file mode 100644 index 00000000000..86324404b6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="pie.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..5983538cb0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="pie.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/__init__.py index f5ad617bc3d..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="pie.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="pie.hoverlabel.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="pie.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="pie.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="pie.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="pie.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_color.py new file mode 100644 index 00000000000..bcebe7f102b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="pie.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..4a66414a7e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="pie.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_family.py new file mode 100644 index 00000000000..063089a12d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="pie.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..63dc086c459 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="pie.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_size.py new file mode 100644 index 00000000000..fa04d765fc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="pie.hoverlabel.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..c0c6674d423 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="pie.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/__init__.py index 558d178ff34..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/pie/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/__init__.py @@ -1,96 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="pie.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="pie.insidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="pie.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="pie.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="pie.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="pie.insidetextfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/_color.py new file mode 100644 index 00000000000..a9d1b1e4d03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="pie.insidetextfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..e68ccf7d1d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="pie.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/_family.py new file mode 100644 index 00000000000..00c045cb3c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="pie.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..52386f7ef26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="pie.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/_size.py new file mode 100644 index 00000000000..cd20b82ba76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="pie.insidetextfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/pie/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..38efd4becd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="pie.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/__init__.py b/packages/python/plotly/plotly/validators/pie/marker/__init__.py index 51c28558e4d..1577e0e840b 100644 --- a/packages/python/plotly/plotly/validators/pie/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/marker/__init__.py @@ -1,56 +1,18 @@ -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="pie.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the line enclosing each - sector. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorssrc", parent_name="pie.marker", **kwargs): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="colors", parent_name="pie.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._colorssrc import ColorssrcValidator + from ._colors import ColorsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colors.ColorsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/_colors.py b/packages/python/plotly/plotly/validators/pie/marker/_colors.py new file mode 100644 index 00000000000..989df8487d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/_colors.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="colors", parent_name="pie.marker", **kwargs): + super(ColorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/_colorssrc.py b/packages/python/plotly/plotly/validators/pie/marker/_colorssrc.py new file mode 100644 index 00000000000..e501579156e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/_colorssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorssrc", parent_name="pie.marker", **kwargs): + super(ColorssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/_line.py b/packages/python/plotly/plotly/validators/pie/marker/_line.py new file mode 100644 index 00000000000..1363d07d82e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/_line.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="pie.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/line/__init__.py b/packages/python/plotly/plotly/validators/pie/marker/line/__init__.py index c9b4b4d5e19..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/pie/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/marker/line/__init__.py @@ -1,57 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="widthsrc", parent_name="pie.marker.line", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="pie.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="pie.marker.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="pie.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/line/_color.py b/packages/python/plotly/plotly/validators/pie/marker/line/_color.py new file mode 100644 index 00000000000..15307ac2b06 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="pie.marker.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/pie/marker/line/_colorsrc.py new file mode 100644 index 00000000000..fccad527b88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/line/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="pie.marker.line", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/line/_width.py b/packages/python/plotly/plotly/validators/pie/marker/line/_width.py new file mode 100644 index 00000000000..7cef7477ec6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="pie.marker.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/pie/marker/line/_widthsrc.py new file mode 100644 index 00000000000..e9fb1e58492 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/marker/line/_widthsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="widthsrc", parent_name="pie.marker.line", **kwargs): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/__init__.py index 9f091c4393a..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/pie/outsidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="pie.outsidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="pie.outsidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="pie.outsidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="pie.outsidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="pie.outsidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="pie.outsidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/_color.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_color.py new file mode 100644 index 00000000000..b588827bff3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="pie.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_colorsrc.py new file mode 100644 index 00000000000..b4ca37f6037 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="pie.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/_family.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_family.py new file mode 100644 index 00000000000..9775391fbab --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="pie.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_familysrc.py new file mode 100644 index 00000000000..79c6b8068fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="pie.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/_size.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_size.py new file mode 100644 index 00000000000..a0ae9378d19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="pie.outsidetextfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/outsidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_sizesrc.py new file mode 100644 index 00000000000..bcead05cfdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/outsidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="pie.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/stream/__init__.py b/packages/python/plotly/plotly/validators/pie/stream/__init__.py index dff50ad5e18..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/pie/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="pie.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="pie.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/pie/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/pie/stream/_maxpoints.py new file mode 100644 index 00000000000..17f5fad8f3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="pie.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/stream/_token.py b/packages/python/plotly/plotly/validators/pie/stream/_token.py new file mode 100644 index 00000000000..6205f2e416c --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="pie.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/__init__.py b/packages/python/plotly/plotly/validators/pie/textfont/__init__.py index e61efc73d35..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/pie/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/textfont/__init__.py @@ -1,88 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="pie.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="pie.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="familysrc", parent_name="pie.textfont", **kwargs): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="pie.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="pie.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="pie.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/_color.py b/packages/python/plotly/plotly/validators/pie/textfont/_color.py new file mode 100644 index 00000000000..714bfbec477 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="pie.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/pie/textfont/_colorsrc.py new file mode 100644 index 00000000000..ed2d7db8614 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/textfont/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="pie.textfont", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/_family.py b/packages/python/plotly/plotly/validators/pie/textfont/_family.py new file mode 100644 index 00000000000..d65c40d4494 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/textfont/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="pie.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/pie/textfont/_familysrc.py new file mode 100644 index 00000000000..bc54b8b793f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/textfont/_familysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="familysrc", parent_name="pie.textfont", **kwargs): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/_size.py b/packages/python/plotly/plotly/validators/pie/textfont/_size.py new file mode 100644 index 00000000000..016d7fcff3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="pie.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/pie/textfont/_sizesrc.py new file mode 100644 index 00000000000..8c40fd2cb65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/textfont/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="pie.textfont", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/__init__.py b/packages/python/plotly/plotly/validators/pie/title/__init__.py index 5336cfe334e..e46144d81ce 100644 --- a/packages/python/plotly/plotly/validators/pie/title/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/title/__init__.py @@ -1,86 +1,18 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="pie.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="position", parent_name="pie.title", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle center", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="pie.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._position import PositionValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._text.TextValidator", + "._position.PositionValidator", + "._font.FontValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/_font.py b/packages/python/plotly/plotly/validators/pie/title/_font.py new file mode 100644 index 00000000000..68b92800a6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="pie.title", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/_position.py b/packages/python/plotly/plotly/validators/pie/title/_position.py new file mode 100644 index 00000000000..4363037db44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/_position.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="position", parent_name="pie.title", **kwargs): + super(PositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle center", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/_text.py b/packages/python/plotly/plotly/validators/pie/title/_text.py new file mode 100644 index 00000000000..bf1bcd39b09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="pie.title", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/__init__.py b/packages/python/plotly/plotly/validators/pie/title/font/__init__.py index 5aaac578edb..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/pie/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/title/font/__init__.py @@ -1,88 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="pie.title.font", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="pie.title.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="familysrc", parent_name="pie.title.font", **kwargs): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="pie.title.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="pie.title.font", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="pie.title.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/_color.py b/packages/python/plotly/plotly/validators/pie/title/font/_color.py new file mode 100644 index 00000000000..aeaa32f07b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/font/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="pie.title.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/_colorsrc.py b/packages/python/plotly/plotly/validators/pie/title/font/_colorsrc.py new file mode 100644 index 00000000000..e9c52efe540 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/font/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="pie.title.font", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/_family.py b/packages/python/plotly/plotly/validators/pie/title/font/_family.py new file mode 100644 index 00000000000..8b658bcaf83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/font/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="pie.title.font", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/_familysrc.py b/packages/python/plotly/plotly/validators/pie/title/font/_familysrc.py new file mode 100644 index 00000000000..e337f4b5bb2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/font/_familysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="familysrc", parent_name="pie.title.font", **kwargs): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/_size.py b/packages/python/plotly/plotly/validators/pie/title/font/_size.py new file mode 100644 index 00000000000..437ec43d23d --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/font/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="pie.title.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pie/title/font/_sizesrc.py b/packages/python/plotly/plotly/validators/pie/title/font/_sizesrc.py new file mode 100644 index 00000000000..f604ce09509 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pie/title/font/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="pie.title.font", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/__init__.py b/packages/python/plotly/plotly/validators/pointcloud/__init__.py index 989ad2a6a5d..92498ebdc93 100644 --- a/packages/python/plotly/plotly/validators/pointcloud/__init__.py +++ b/packages/python/plotly/plotly/validators/pointcloud/__init__.py @@ -1,571 +1,80 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="pointcloud", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YboundssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="yboundssrc", parent_name="pointcloud", **kwargs): - super(YboundssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YboundsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ybounds", parent_name="pointcloud", **kwargs): - super(YboundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="pointcloud", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="pointcloud", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xysrc", parent_name="pointcloud", **kwargs): - super(XysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XyValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="xy", parent_name="pointcloud", **kwargs): - super(XyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="pointcloud", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XboundssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xboundssrc", parent_name="pointcloud", **kwargs): - super(XboundssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XboundsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="xbounds", parent_name="pointcloud", **kwargs): - super(XboundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="pointcloud", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="pointcloud", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="pointcloud", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="pointcloud", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="pointcloud", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="pointcloud", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="pointcloud", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="pointcloud", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="pointcloud", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="pointcloud", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="pointcloud", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="pointcloud", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="pointcloud", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="pointcloud", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - blend - Determines if colors are blended together for a - translucency effect in case `opacity` is - specified as a value less then `1`. Setting - `blend` to `true` reduces zoom/pan speed if - used with large numbers of points. - border - :class:`plotly.graph_objects.pointcloud.marker. - Border` instance or dict with compatible - properties - color - Sets the marker fill color. It accepts a - specific color.If the color is not fully opaque - and there are hundreds of thousandsof points, - it may cause slower zooming and panning. - opacity - Sets the marker opacity. The default value is - `1` (fully opaque). If the markers are not - fully opaque and there are hundreds of - thousands of points, it may cause slower - zooming and panning. Opacity fades the color - even if `blend` is left on `false` even if - there is no translucency effect in that case. - sizemax - Sets the maximum size (in px) of the rendered - marker points. Effective when the `pointcloud` - shows only few points. - sizemin - Sets the minimum size (in px) of the rendered - marker points, effective when the `pointcloud` - shows a million or more points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="pointcloud", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IndicessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="indicessrc", parent_name="pointcloud", **kwargs): - super(IndicessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IndicesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="indices", parent_name="pointcloud", **kwargs): - super(IndicesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="pointcloud", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="pointcloud", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="pointcloud", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="pointcloud", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="pointcloud", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="pointcloud", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="pointcloud", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._yboundssrc import YboundssrcValidator + from ._ybounds import YboundsValidator + from ._yaxis import YaxisValidator + from ._y import YValidator + from ._xysrc import XysrcValidator + from ._xy import XyValidator + from ._xsrc import XsrcValidator + from ._xboundssrc import XboundssrcValidator + from ._xbounds import XboundsValidator + from ._xaxis import XaxisValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._indicessrc import IndicessrcValidator + from ._indices import IndicesValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._yboundssrc.YboundssrcValidator", + "._ybounds.YboundsValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xysrc.XysrcValidator", + "._xy.XyValidator", + "._xsrc.XsrcValidator", + "._xboundssrc.XboundssrcValidator", + "._xbounds.XboundsValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._indicessrc.IndicessrcValidator", + "._indices.IndicesValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_customdata.py b/packages/python/plotly/plotly/validators/pointcloud/_customdata.py new file mode 100644 index 00000000000..c87aa88c93d --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="pointcloud", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_customdatasrc.py b/packages/python/plotly/plotly/validators/pointcloud/_customdatasrc.py new file mode 100644 index 00000000000..23237af71c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="pointcloud", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_hoverinfo.py b/packages/python/plotly/plotly/validators/pointcloud/_hoverinfo.py new file mode 100644 index 00000000000..2fffddaad4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="pointcloud", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/pointcloud/_hoverinfosrc.py new file mode 100644 index 00000000000..6a8900148bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="pointcloud", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_hoverlabel.py b/packages/python/plotly/plotly/validators/pointcloud/_hoverlabel.py new file mode 100644 index 00000000000..7b050553fa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="pointcloud", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_ids.py b/packages/python/plotly/plotly/validators/pointcloud/_ids.py new file mode 100644 index 00000000000..4140eb4af58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="pointcloud", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_idssrc.py b/packages/python/plotly/plotly/validators/pointcloud/_idssrc.py new file mode 100644 index 00000000000..8d0f181af64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="pointcloud", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_indices.py b/packages/python/plotly/plotly/validators/pointcloud/_indices.py new file mode 100644 index 00000000000..e8a27c80f65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_indices.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IndicesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="indices", parent_name="pointcloud", **kwargs): + super(IndicesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_indicessrc.py b/packages/python/plotly/plotly/validators/pointcloud/_indicessrc.py new file mode 100644 index 00000000000..9fb55db3937 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_indicessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IndicessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="indicessrc", parent_name="pointcloud", **kwargs): + super(IndicessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_legendgroup.py b/packages/python/plotly/plotly/validators/pointcloud/_legendgroup.py new file mode 100644 index 00000000000..bc05fced833 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="pointcloud", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_marker.py b/packages/python/plotly/plotly/validators/pointcloud/_marker.py new file mode 100644 index 00000000000..f146827ee35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_marker.py @@ -0,0 +1,47 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="pointcloud", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + blend + Determines if colors are blended together for a + translucency effect in case `opacity` is + specified as a value less then `1`. Setting + `blend` to `true` reduces zoom/pan speed if + used with large numbers of points. + border + :class:`plotly.graph_objects.pointcloud.marker. + Border` instance or dict with compatible + properties + color + Sets the marker fill color. It accepts a + specific color.If the color is not fully opaque + and there are hundreds of thousandsof points, + it may cause slower zooming and panning. + opacity + Sets the marker opacity. The default value is + `1` (fully opaque). If the markers are not + fully opaque and there are hundreds of + thousands of points, it may cause slower + zooming and panning. Opacity fades the color + even if `blend` is left on `false` even if + there is no translucency effect in that case. + sizemax + Sets the maximum size (in px) of the rendered + marker points. Effective when the `pointcloud` + shows only few points. + sizemin + Sets the minimum size (in px) of the rendered + marker points, effective when the `pointcloud` + shows a million or more points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_meta.py b/packages/python/plotly/plotly/validators/pointcloud/_meta.py new file mode 100644 index 00000000000..3476ef34dfe --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="pointcloud", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_metasrc.py b/packages/python/plotly/plotly/validators/pointcloud/_metasrc.py new file mode 100644 index 00000000000..5a0d5066aac --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="pointcloud", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_name.py b/packages/python/plotly/plotly/validators/pointcloud/_name.py new file mode 100644 index 00000000000..ac151324f3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="pointcloud", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_opacity.py b/packages/python/plotly/plotly/validators/pointcloud/_opacity.py new file mode 100644 index 00000000000..deeca766273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="pointcloud", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_showlegend.py b/packages/python/plotly/plotly/validators/pointcloud/_showlegend.py new file mode 100644 index 00000000000..c81daaa7991 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="pointcloud", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_stream.py b/packages/python/plotly/plotly/validators/pointcloud/_stream.py new file mode 100644 index 00000000000..b8915359fd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="pointcloud", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_text.py b/packages/python/plotly/plotly/validators/pointcloud/_text.py new file mode 100644 index 00000000000..5541c79dfb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="pointcloud", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_textsrc.py b/packages/python/plotly/plotly/validators/pointcloud/_textsrc.py new file mode 100644 index 00000000000..87a631eebb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="pointcloud", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_uid.py b/packages/python/plotly/plotly/validators/pointcloud/_uid.py new file mode 100644 index 00000000000..92f57ac9cf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="pointcloud", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_uirevision.py b/packages/python/plotly/plotly/validators/pointcloud/_uirevision.py new file mode 100644 index 00000000000..5555efc9e2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="pointcloud", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_visible.py b/packages/python/plotly/plotly/validators/pointcloud/_visible.py new file mode 100644 index 00000000000..98718430196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="pointcloud", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_x.py b/packages/python/plotly/plotly/validators/pointcloud/_x.py new file mode 100644 index 00000000000..bc1172e3b5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="pointcloud", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_xaxis.py b/packages/python/plotly/plotly/validators/pointcloud/_xaxis.py new file mode 100644 index 00000000000..0068f68e9c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="pointcloud", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_xbounds.py b/packages/python/plotly/plotly/validators/pointcloud/_xbounds.py new file mode 100644 index 00000000000..a177f8d3eb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_xbounds.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XboundsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="xbounds", parent_name="pointcloud", **kwargs): + super(XboundsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_xboundssrc.py b/packages/python/plotly/plotly/validators/pointcloud/_xboundssrc.py new file mode 100644 index 00000000000..0dec1da3e78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_xboundssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XboundssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xboundssrc", parent_name="pointcloud", **kwargs): + super(XboundssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_xsrc.py b/packages/python/plotly/plotly/validators/pointcloud/_xsrc.py new file mode 100644 index 00000000000..8033a4c4b43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="pointcloud", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_xy.py b/packages/python/plotly/plotly/validators/pointcloud/_xy.py new file mode 100644 index 00000000000..1fd53c4513e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_xy.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XyValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="xy", parent_name="pointcloud", **kwargs): + super(XyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_xysrc.py b/packages/python/plotly/plotly/validators/pointcloud/_xysrc.py new file mode 100644 index 00000000000..c0dc8152ec6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_xysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xysrc", parent_name="pointcloud", **kwargs): + super(XysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_y.py b/packages/python/plotly/plotly/validators/pointcloud/_y.py new file mode 100644 index 00000000000..cf993b5f0f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="pointcloud", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_yaxis.py b/packages/python/plotly/plotly/validators/pointcloud/_yaxis.py new file mode 100644 index 00000000000..454545b8e80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="pointcloud", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_ybounds.py b/packages/python/plotly/plotly/validators/pointcloud/_ybounds.py new file mode 100644 index 00000000000..3dec24ed178 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_ybounds.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YboundsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ybounds", parent_name="pointcloud", **kwargs): + super(YboundsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_yboundssrc.py b/packages/python/plotly/plotly/validators/pointcloud/_yboundssrc.py new file mode 100644 index 00000000000..43c8b94ae35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_yboundssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YboundssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="yboundssrc", parent_name="pointcloud", **kwargs): + super(YboundssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/_ysrc.py b/packages/python/plotly/plotly/validators/pointcloud/_ysrc.py new file mode 100644 index 00000000000..e858bcfb72b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="pointcloud", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/__init__.py index ba64dc49400..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/__init__.py @@ -1,185 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="pointcloud.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="pointcloud.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_align.py new file mode 100644 index 00000000000..257d97b42fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..94d86965092 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..3d0a449fe50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..239ef8a9a9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..b7b4722c8d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..3ae41d7e0d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="pointcloud.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_font.py new file mode 100644 index 00000000000..d43b2fa8cc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f17b690d8e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..5f3a861c0ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="pointcloud.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/__init__.py index 3f0f71ba80f..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/__init__.py @@ -1,103 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="pointcloud.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="pointcloud.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="pointcloud.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="pointcloud.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="pointcloud.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="pointcloud.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_color.py new file mode 100644 index 00000000000..730942050c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="pointcloud.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..fc7b049a00b --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="pointcloud.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_family.py new file mode 100644 index 00000000000..bbfc7b0b0fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="pointcloud.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b429638a067 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="pointcloud.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_size.py new file mode 100644 index 00000000000..392724c8d69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="pointcloud.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..e5d8a48096e --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="pointcloud.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/__init__.py b/packages/python/plotly/plotly/validators/pointcloud/marker/__init__.py index 11150c3fd20..60b336e2643 100644 --- a/packages/python/plotly/plotly/validators/pointcloud/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/__init__.py @@ -1,107 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="pointcloud.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0.1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemax", parent_name="pointcloud.marker", **kwargs - ): - super(SizemaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0.1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="pointcloud.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="pointcloud.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="border", parent_name="pointcloud.marker", **kwargs): - super(BorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Border"), - data_docs=kwargs.pop( - "data_docs", - """ - arearatio - Specifies what fraction of the marker area is - covered with the border. - color - Sets the stroke color. It accepts a specific - color. If the color is not fully opaque and - there are hundreds of thousands of points, it - may cause slower zooming and panning. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BlendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="blend", parent_name="pointcloud.marker", **kwargs): - super(BlendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizemin import SizeminValidator + from ._sizemax import SizemaxValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator + from ._border import BorderValidator + from ._blend import BlendValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizemin.SizeminValidator", + "._sizemax.SizemaxValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + "._border.BorderValidator", + "._blend.BlendValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/_blend.py b/packages/python/plotly/plotly/validators/pointcloud/marker/_blend.py new file mode 100644 index 00000000000..a7159c96a6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/_blend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BlendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="blend", parent_name="pointcloud.marker", **kwargs): + super(BlendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/_border.py b/packages/python/plotly/plotly/validators/pointcloud/marker/_border.py new file mode 100644 index 00000000000..4f7cf13d37a --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/_border.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class BorderValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="border", parent_name="pointcloud.marker", **kwargs): + super(BorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Border"), + data_docs=kwargs.pop( + "data_docs", + """ + arearatio + Specifies what fraction of the marker area is + covered with the border. + color + Sets the stroke color. It accepts a specific + color. If the color is not fully opaque and + there are hundreds of thousands of points, it + may cause slower zooming and panning. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/_color.py b/packages/python/plotly/plotly/validators/pointcloud/marker/_color.py new file mode 100644 index 00000000000..e26044b970d --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="pointcloud.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/_opacity.py b/packages/python/plotly/plotly/validators/pointcloud/marker/_opacity.py new file mode 100644 index 00000000000..0aacfbc4c4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="pointcloud.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/_sizemax.py b/packages/python/plotly/plotly/validators/pointcloud/marker/_sizemax.py new file mode 100644 index 00000000000..336b0e6ab5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/_sizemax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemax", parent_name="pointcloud.marker", **kwargs + ): + super(SizemaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0.1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/_sizemin.py b/packages/python/plotly/plotly/validators/pointcloud/marker/_sizemin.py new file mode 100644 index 00000000000..9a3badfd812 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/_sizemin.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="pointcloud.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0.1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/border/__init__.py b/packages/python/plotly/plotly/validators/pointcloud/marker/border/__init__.py index 6ea1e9bc1da..b40bee3870b 100644 --- a/packages/python/plotly/plotly/validators/pointcloud/marker/border/__init__.py +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/border/__init__.py @@ -1,33 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator + from ._arearatio import ArearatioValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="pointcloud.marker.border", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArearatioValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="arearatio", parent_name="pointcloud.marker.border", **kwargs - ): - super(ArearatioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator", "._arearatio.ArearatioValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/border/_arearatio.py b/packages/python/plotly/plotly/validators/pointcloud/marker/border/_arearatio.py new file mode 100644 index 00000000000..481437b45cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/border/_arearatio.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ArearatioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="arearatio", parent_name="pointcloud.marker.border", **kwargs + ): + super(ArearatioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/marker/border/_color.py b/packages/python/plotly/plotly/validators/pointcloud/marker/border/_color.py new file mode 100644 index 00000000000..873d1c025f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/marker/border/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="pointcloud.marker.border", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/stream/__init__.py b/packages/python/plotly/plotly/validators/pointcloud/stream/__init__.py index a2d602f76f2..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/pointcloud/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/pointcloud/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="pointcloud.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="pointcloud.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/pointcloud/stream/_maxpoints.py new file mode 100644 index 00000000000..5dda0948901 --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="pointcloud.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/pointcloud/stream/_token.py b/packages/python/plotly/plotly/validators/pointcloud/stream/_token.py new file mode 100644 index 00000000000..73afdebe3dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/pointcloud/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="pointcloud.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/__init__.py b/packages/python/plotly/plotly/validators/sankey/__init__.py index 2e8deeecfd1..05c5a527be7 100644 --- a/packages/python/plotly/plotly/validators/sankey/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/__init__.py @@ -1,589 +1,56 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="sankey", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="valuesuffix", parent_name="sankey", **kwargs): - super(ValuesuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="valueformat", parent_name="sankey", **kwargs): - super(ValueformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="sankey", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="sankey", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="sankey", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="sankey", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="sankey", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="sankey", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NodeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="node", parent_name="sankey", **kwargs): - super(NodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Node"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the `node` color. It can be a single - value, or an array for specifying color for - each `node`. If `node.color` is omitted, then - the default `Plotly` color palette will be - cycled through to have a variety of colors. - These defaults are not fully opaque, to allow - some visibility of what is beneath the node. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - customdata - Assigns extra data to each node. - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - groups - Groups of nodes. Each group is defined by an - array with the indices of the nodes it - contains. Multiple groups can be specified. - hoverinfo - Determines which trace information appear when - hovering nodes. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.node.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - label - The shown name of the node. - labelsrc - Sets the source reference on Chart Studio Cloud - for label . - line - :class:`plotly.graph_objects.sankey.node.Line` - instance or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - The normalized vertical position of the node. - ysrc - Sets the source reference on Chart Studio Cloud - for y . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="sankey", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="sankey", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="sankey", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LinkValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="link", parent_name="sankey", **kwargs): - super(LinkValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Link"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the `link` color. It can be a single - value, or an array for specifying color for - each `link`. If `link.color` is omitted, then - by default, a translucent grey link will be - used. - colorscales - A tuple of :class:`plotly.graph_objects.sankey. - link.Colorscale` instances or dicts with - compatible properties - colorscaledefaults - When used in a template (as layout.template.dat - a.sankey.link.colorscaledefaults), sets the - default property values to use for elements of - sankey.link.colorscales - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - customdata - Assigns extra data to each link. - customdatasrc - Sets the source reference on Chart Studio Cloud - for customdata . - hoverinfo - Determines which trace information appear when - hovering links. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.link.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{2019-01-01|%A}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - for details on the date formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for hovertemplate . - label - The shown name of the link. - labelsrc - Sets the source reference on Chart Studio Cloud - for label . - line - :class:`plotly.graph_objects.sankey.link.Line` - instance or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on Chart Studio Cloud - for source . - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on Chart Studio Cloud - for target . - value - A numeric value representing the flow volume - value. - valuesrc - Sets the source reference on Chart Studio Cloud - for value . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="sankey", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="sankey", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="sankey", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="sankey", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", []), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="sankey", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for - this row in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace - (in plot fraction). - y - Sets the vertical domain of this sankey trace - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="sankey", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="sankey", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrangementValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="arrangement", parent_name="sankey", **kwargs): - super(ArrangementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["snap", "perpendicular", "freeform", "fixed"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuesuffix import ValuesuffixValidator + from ._valueformat import ValueformatValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textfont import TextfontValidator + from ._stream import StreamValidator + from ._selectedpoints import SelectedpointsValidator + from ._orientation import OrientationValidator + from ._node import NodeValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._link import LinkValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfo import HoverinfoValidator + from ._domain import DomainValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._arrangement import ArrangementValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuesuffix.ValuesuffixValidator", + "._valueformat.ValueformatValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textfont.TextfontValidator", + "._stream.StreamValidator", + "._selectedpoints.SelectedpointsValidator", + "._orientation.OrientationValidator", + "._node.NodeValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._link.LinkValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._arrangement.ArrangementValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_arrangement.py b/packages/python/plotly/plotly/validators/sankey/_arrangement.py new file mode 100644 index 00000000000..d6eef144088 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_arrangement.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ArrangementValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="arrangement", parent_name="sankey", **kwargs): + super(ArrangementValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["snap", "perpendicular", "freeform", "fixed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_customdata.py b/packages/python/plotly/plotly/validators/sankey/_customdata.py new file mode 100644 index 00000000000..4e011850e52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="sankey", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_customdatasrc.py b/packages/python/plotly/plotly/validators/sankey/_customdatasrc.py new file mode 100644 index 00000000000..b22e67f7138 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="sankey", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_domain.py b/packages/python/plotly/plotly/validators/sankey/_domain.py new file mode 100644 index 00000000000..a443aee64f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_domain.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="sankey", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this sankey trace . + row + If there is a layout grid, use the domain for + this row in the grid for this sankey trace . + x + Sets the horizontal domain of this sankey trace + (in plot fraction). + y + Sets the vertical domain of this sankey trace + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_hoverinfo.py b/packages/python/plotly/plotly/validators/sankey/_hoverinfo.py new file mode 100644 index 00000000000..d57c3b4655b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="sankey", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", []), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_hoverlabel.py b/packages/python/plotly/plotly/validators/sankey/_hoverlabel.py new file mode 100644 index 00000000000..aecd151baed --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="sankey", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_ids.py b/packages/python/plotly/plotly/validators/sankey/_ids.py new file mode 100644 index 00000000000..936f315051d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="sankey", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_idssrc.py b/packages/python/plotly/plotly/validators/sankey/_idssrc.py new file mode 100644 index 00000000000..9083d884be9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="sankey", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_link.py b/packages/python/plotly/plotly/validators/sankey/_link.py new file mode 100644 index 00000000000..b2d99b45743 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_link.py @@ -0,0 +1,107 @@ +import _plotly_utils.basevalidators + + +class LinkValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="link", parent_name="sankey", **kwargs): + super(LinkValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Link"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the `link` color. It can be a single + value, or an array for specifying color for + each `link`. If `link.color` is omitted, then + by default, a translucent grey link will be + used. + colorscales + A tuple of :class:`plotly.graph_objects.sankey. + link.Colorscale` instances or dicts with + compatible properties + colorscaledefaults + When used in a template (as layout.template.dat + a.sankey.link.colorscaledefaults), sets the + default property values to use for elements of + sankey.link.colorscales + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + customdata + Assigns extra data to each link. + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + hoverinfo + Determines which trace information appear when + hovering links. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverlabel + :class:`plotly.graph_objects.sankey.link.Hoverl + abel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + label + The shown name of the link. + labelsrc + Sets the source reference on Chart Studio Cloud + for label . + line + :class:`plotly.graph_objects.sankey.link.Line` + instance or dict with compatible properties + source + An integer number `[0..nodes.length - 1]` that + represents the source node. + sourcesrc + Sets the source reference on Chart Studio Cloud + for source . + target + An integer number `[0..nodes.length - 1]` that + represents the target node. + targetsrc + Sets the source reference on Chart Studio Cloud + for target . + value + A numeric value representing the flow volume + value. + valuesrc + Sets the source reference on Chart Studio Cloud + for value . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_meta.py b/packages/python/plotly/plotly/validators/sankey/_meta.py new file mode 100644 index 00000000000..21846ff2e6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="sankey", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_metasrc.py b/packages/python/plotly/plotly/validators/sankey/_metasrc.py new file mode 100644 index 00000000000..f300f81d97a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="sankey", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_name.py b/packages/python/plotly/plotly/validators/sankey/_name.py new file mode 100644 index 00000000000..85ac845bc19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="sankey", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_node.py b/packages/python/plotly/plotly/validators/sankey/_node.py new file mode 100644 index 00000000000..d3faf95e58d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_node.py @@ -0,0 +1,100 @@ +import _plotly_utils.basevalidators + + +class NodeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="node", parent_name="sankey", **kwargs): + super(NodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Node"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the `node` color. It can be a single + value, or an array for specifying color for + each `node`. If `node.color` is omitted, then + the default `Plotly` color palette will be + cycled through to have a variety of colors. + These defaults are not fully opaque, to allow + some visibility of what is beneath the node. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + customdata + Assigns extra data to each node. + customdatasrc + Sets the source reference on Chart Studio Cloud + for customdata . + groups + Groups of nodes. Each group is defined by an + array with the indices of the nodes it + contains. Multiple groups can be specified. + hoverinfo + Determines which trace information appear when + hovering nodes. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverlabel + :class:`plotly.graph_objects.sankey.node.Hoverl + abel` instance or dict with compatible + properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plotly.com/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud + for hovertemplate . + label + The shown name of the node. + labelsrc + Sets the source reference on Chart Studio Cloud + for label . + line + :class:`plotly.graph_objects.sankey.node.Line` + instance or dict with compatible properties + pad + Sets the padding (in px) between the `nodes`. + thickness + Sets the thickness (in px) of the `nodes`. + x + The normalized horizontal position of the node. + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + The normalized vertical position of the node. + ysrc + Sets the source reference on Chart Studio Cloud + for y . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_orientation.py b/packages/python/plotly/plotly/validators/sankey/_orientation.py new file mode 100644 index 00000000000..6b3d6cdf939 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="sankey", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_selectedpoints.py b/packages/python/plotly/plotly/validators/sankey/_selectedpoints.py new file mode 100644 index 00000000000..1c8396f3347 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="sankey", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_stream.py b/packages/python/plotly/plotly/validators/sankey/_stream.py new file mode 100644 index 00000000000..e908ed5f258 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="sankey", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_textfont.py b/packages/python/plotly/plotly/validators/sankey/_textfont.py new file mode 100644 index 00000000000..c401db00529 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_textfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="sankey", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_uid.py b/packages/python/plotly/plotly/validators/sankey/_uid.py new file mode 100644 index 00000000000..a48cd885267 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="sankey", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_uirevision.py b/packages/python/plotly/plotly/validators/sankey/_uirevision.py new file mode 100644 index 00000000000..be4381cc97a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="sankey", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_valueformat.py b/packages/python/plotly/plotly/validators/sankey/_valueformat.py new file mode 100644 index 00000000000..5694305bcac --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_valueformat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="valueformat", parent_name="sankey", **kwargs): + super(ValueformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_valuesuffix.py b/packages/python/plotly/plotly/validators/sankey/_valuesuffix.py new file mode 100644 index 00000000000..f28d258d696 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_valuesuffix.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="valuesuffix", parent_name="sankey", **kwargs): + super(ValuesuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/_visible.py b/packages/python/plotly/plotly/validators/sankey/_visible.py new file mode 100644 index 00000000000..46a0a1a1d14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="sankey", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/domain/__init__.py b/packages/python/plotly/plotly/validators/sankey/domain/__init__.py index e9b80643266..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/sankey/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="sankey.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="sankey.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="sankey.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="sankey.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/domain/_column.py b/packages/python/plotly/plotly/validators/sankey/domain/_column.py new file mode 100644 index 00000000000..26d8f0f233a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="sankey.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/domain/_row.py b/packages/python/plotly/plotly/validators/sankey/domain/_row.py new file mode 100644 index 00000000000..0d5a4e71acf --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="sankey.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/domain/_x.py b/packages/python/plotly/plotly/validators/sankey/domain/_x.py new file mode 100644 index 00000000000..210f812da89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="sankey.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/domain/_y.py b/packages/python/plotly/plotly/validators/sankey/domain/_y.py new file mode 100644 index 00000000000..ea6334a7934 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="sankey.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/__init__.py index 77dc411ee91..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/sankey/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="sankey.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="sankey.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="sankey.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="sankey.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="sankey.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="sankey.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="sankey.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="sankey.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="sankey.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_align.py new file mode 100644 index 00000000000..9d08e51c4a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="sankey.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..44ef114292d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="sankey.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..a0435ee5d08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="sankey.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..c35d15ffdf4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="sankey.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..cf9dd26c84a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="sankey.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..ca372aa722a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="sankey.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_font.py new file mode 100644 index 00000000000..2033a87bb81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="sankey.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_namelength.py new file mode 100644 index 00000000000..bc9e103a3a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="sankey.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..8b9c1dfa487 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="sankey.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/__init__.py index 589ca3d170e..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sankey.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="sankey.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="sankey.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="sankey.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sankey.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sankey.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_color.py new file mode 100644 index 00000000000..32910021b3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sankey.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..ef6a1392673 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sankey.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_family.py new file mode 100644 index 00000000000..84d73f26d9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="sankey.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..95444f6793b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="sankey.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_size.py new file mode 100644 index 00000000000..01579824066 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="sankey.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..f2e8722b29c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sankey.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/__init__.py b/packages/python/plotly/plotly/validators/sankey/link/__init__.py index ab516c6b36d..434b444c22c 100644 --- a/packages/python/plotly/plotly/validators/sankey/link/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/link/__init__.py @@ -1,380 +1,50 @@ -import _plotly_utils.basevalidators - - -class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuesrc", parent_name="sankey.link", **kwargs): - super(ValuesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="value", parent_name="sankey.link", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TargetsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="targetsrc", parent_name="sankey.link", **kwargs): - super(TargetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TargetValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="target", parent_name="sankey.link", **kwargs): - super(TargetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourcesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sourcesrc", parent_name="sankey.link", **kwargs): - super(SourcesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SourceValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="source", parent_name="sankey.link", **kwargs): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="sankey.link", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the `line` around each - `link`. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the `line` around - each `link`. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="labelsrc", parent_name="sankey.link", **kwargs): - super(LabelsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="label", parent_name="sankey.link", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="sankey.link", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="sankey.link", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="sankey.link", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="sankey.link", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["all", "none", "skip"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="sankey.link", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="sankey.link", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="sankey.link", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorscaledefaults", parent_name="sankey.link", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Colorscale"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscalesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="colorscales", parent_name="sankey.link", **kwargs): - super(ColorscalesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Colorscale"), - data_docs=kwargs.pop( - "data_docs", - """ - cmax - Sets the upper bound of the color domain. - cmin - Sets the lower bound of the color domain. - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - label - The label of the links to color based on their - concentration within a flow. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="sankey.link", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._valuesrc import ValuesrcValidator + from ._value import ValueValidator + from ._targetsrc import TargetsrcValidator + from ._target import TargetValidator + from ._sourcesrc import SourcesrcValidator + from ._source import SourceValidator + from ._line import LineValidator + from ._labelsrc import LabelsrcValidator + from ._label import LabelValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfo import HoverinfoValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorsrc import ColorsrcValidator + from ._colorscaledefaults import ColorscaledefaultsValidator + from ._colorscales import ColorscalesValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valuesrc.ValuesrcValidator", + "._value.ValueValidator", + "._targetsrc.TargetsrcValidator", + "._target.TargetValidator", + "._sourcesrc.SourcesrcValidator", + "._source.SourceValidator", + "._line.LineValidator", + "._labelsrc.LabelsrcValidator", + "._label.LabelValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorsrc.ColorsrcValidator", + "._colorscaledefaults.ColorscaledefaultsValidator", + "._colorscales.ColorscalesValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_color.py b/packages/python/plotly/plotly/validators/sankey/link/_color.py new file mode 100644 index 00000000000..12fe676db75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="sankey.link", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_colorscaledefaults.py b/packages/python/plotly/plotly/validators/sankey/link/_colorscaledefaults.py new file mode 100644 index 00000000000..d91392def50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_colorscaledefaults.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorscaledefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorscaledefaults", parent_name="sankey.link", **kwargs + ): + super(ColorscaledefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Colorscale"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_colorscales.py b/packages/python/plotly/plotly/validators/sankey/link/_colorscales.py new file mode 100644 index 00000000000..4e56a57f6da --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_colorscales.py @@ -0,0 +1,58 @@ +import _plotly_utils.basevalidators + + +class ColorscalesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="colorscales", parent_name="sankey.link", **kwargs): + super(ColorscalesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Colorscale"), + data_docs=kwargs.pop( + "data_docs", + """ + cmax + Sets the upper bound of the color domain. + cmin + Sets the lower bound of the color domain. + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + label + The label of the links to color based on their + concentration within a flow. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/link/_colorsrc.py new file mode 100644 index 00000000000..857eb0a995c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="sankey.link", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_customdata.py b/packages/python/plotly/plotly/validators/sankey/link/_customdata.py new file mode 100644 index 00000000000..a0990e45e56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="sankey.link", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_customdatasrc.py b/packages/python/plotly/plotly/validators/sankey/link/_customdatasrc.py new file mode 100644 index 00000000000..40efef76bf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="sankey.link", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_hoverinfo.py b/packages/python/plotly/plotly/validators/sankey/link/_hoverinfo.py new file mode 100644 index 00000000000..46cec12d97c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_hoverinfo.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="sankey.link", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["all", "none", "skip"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_hoverlabel.py b/packages/python/plotly/plotly/validators/sankey/link/_hoverlabel.py new file mode 100644 index 00000000000..54fade7bb44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="sankey.link", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_hovertemplate.py b/packages/python/plotly/plotly/validators/sankey/link/_hovertemplate.py new file mode 100644 index 00000000000..43d4a559984 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="sankey.link", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/sankey/link/_hovertemplatesrc.py new file mode 100644 index 00000000000..9791067d5a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="sankey.link", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_label.py b/packages/python/plotly/plotly/validators/sankey/link/_label.py new file mode 100644 index 00000000000..52068fc7c60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_label.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="label", parent_name="sankey.link", **kwargs): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_labelsrc.py b/packages/python/plotly/plotly/validators/sankey/link/_labelsrc.py new file mode 100644 index 00000000000..2a9538f51ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_labelsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelsrc", parent_name="sankey.link", **kwargs): + super(LabelsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_line.py b/packages/python/plotly/plotly/validators/sankey/link/_line.py new file mode 100644 index 00000000000..3cadbb4e286 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_line.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="sankey.link", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the `line` around each + `link`. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the `line` around + each `link`. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_source.py b/packages/python/plotly/plotly/validators/sankey/link/_source.py new file mode 100644 index 00000000000..65c7b8fad41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_source.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SourceValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="source", parent_name="sankey.link", **kwargs): + super(SourceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_sourcesrc.py b/packages/python/plotly/plotly/validators/sankey/link/_sourcesrc.py new file mode 100644 index 00000000000..05bdf46409f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_sourcesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SourcesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sourcesrc", parent_name="sankey.link", **kwargs): + super(SourcesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_target.py b/packages/python/plotly/plotly/validators/sankey/link/_target.py new file mode 100644 index 00000000000..9db44a821b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_target.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TargetValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="target", parent_name="sankey.link", **kwargs): + super(TargetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_targetsrc.py b/packages/python/plotly/plotly/validators/sankey/link/_targetsrc.py new file mode 100644 index 00000000000..8a58f0df9bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_targetsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TargetsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="targetsrc", parent_name="sankey.link", **kwargs): + super(TargetsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_value.py b/packages/python/plotly/plotly/validators/sankey/link/_value.py new file mode 100644 index 00000000000..5c3e16e63ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_value.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="value", parent_name="sankey.link", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/_valuesrc.py b/packages/python/plotly/plotly/validators/sankey/link/_valuesrc.py new file mode 100644 index 00000000000..07fa5e288e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/_valuesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuesrc", parent_name="sankey.link", **kwargs): + super(ValuesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/__init__.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/__init__.py index 3e4c9797f0b..c3883464ebd 100644 --- a/packages/python/plotly/plotly/validators/sankey/link/colorscale/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="sankey.link.colorscale", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="sankey.link.colorscale", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="label", parent_name="sankey.link.colorscale", **kwargs - ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="sankey.link.colorscale", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="sankey.link.colorscale", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="sankey.link.colorscale", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._label import LabelValidator + from ._colorscale import ColorscaleValidator + from ._cmin import CminValidator + from ._cmax import CmaxValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._label.LabelValidator", + "._colorscale.ColorscaleValidator", + "._cmin.CminValidator", + "._cmax.CmaxValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/_cmax.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_cmax.py new file mode 100644 index 00000000000..8ff75676214 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_cmax.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="sankey.link.colorscale", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/_cmin.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_cmin.py new file mode 100644 index 00000000000..1f95cd10262 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_cmin.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="sankey.link.colorscale", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/_colorscale.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_colorscale.py new file mode 100644 index 00000000000..f2651d29054 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="sankey.link.colorscale", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/_label.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_label.py new file mode 100644 index 00000000000..56a5a8d4aee --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_label.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="label", parent_name="sankey.link.colorscale", **kwargs + ): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/_name.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_name.py new file mode 100644 index 00000000000..b60bd111c31 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="sankey.link.colorscale", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/colorscale/_templateitemname.py b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_templateitemname.py new file mode 100644 index 00000000000..0419bfe6c51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/colorscale/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="sankey.link.colorscale", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/__init__.py index 67f692b0b16..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/__init__.py @@ -1,188 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="sankey.link.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="sankey.link.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="sankey.link.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_align.py new file mode 100644 index 00000000000..b983b5b08c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..3587e1aba99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..b8f23945510 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..0862f6b2a5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..58d1abf56f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..17fd199427a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="sankey.link.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_font.py new file mode 100644 index 00000000000..a45f370c226 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_namelength.py new file mode 100644 index 00000000000..73b7ac9c2a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="sankey.link.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3d9f6c069ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="sankey.link.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/__init__.py index 8b89e74800a..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/__init__.py @@ -1,106 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sankey.link.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="sankey.link.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="sankey.link.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="sankey.link.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="sankey.link.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sankey.link.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_color.py new file mode 100644 index 00000000000..57fd24362c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sankey.link.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..8515571458d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="sankey.link.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_family.py new file mode 100644 index 00000000000..511eda43072 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="sankey.link.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..42fa5ee99b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="sankey.link.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_size.py new file mode 100644 index 00000000000..5ceef5d346a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="sankey.link.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..a1fce89c985 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sankey.link.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/line/__init__.py b/packages/python/plotly/plotly/validators/sankey/link/line/__init__.py index 25d80a6fee7..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/sankey/link/line/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/link/line/__init__.py @@ -1,61 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="sankey.link.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="sankey.link.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sankey.link.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="sankey.link.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/line/_color.py b/packages/python/plotly/plotly/validators/sankey/link/line/_color.py new file mode 100644 index 00000000000..36ff754abf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="sankey.link.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/line/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/link/line/_colorsrc.py new file mode 100644 index 00000000000..aad29459d0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sankey.link.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/line/_width.py b/packages/python/plotly/plotly/validators/sankey/link/line/_width.py new file mode 100644 index 00000000000..11a12773b27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="sankey.link.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/link/line/_widthsrc.py b/packages/python/plotly/plotly/validators/sankey/link/line/_widthsrc.py new file mode 100644 index 00000000000..ab44485dcd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/link/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="sankey.link.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/__init__.py b/packages/python/plotly/plotly/validators/sankey/node/__init__.py index ed43ab3a3dc..33e3ac82e42 100644 --- a/packages/python/plotly/plotly/validators/sankey/node/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/node/__init__.py @@ -1,322 +1,48 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="sankey.node", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="sankey.node", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="sankey.node", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="sankey.node", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="thickness", parent_name="sankey.node", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pad", parent_name="sankey.node", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="sankey.node", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the `line` around each - `node`. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the `line` around - each `node`. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="labelsrc", parent_name="sankey.node", **kwargs): - super(LabelsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="label", parent_name="sankey.node", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="sankey.node", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="sankey.node", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="sankey.node", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="sankey.node", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["all", "none", "skip"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GroupsValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="groups", parent_name="sankey.node", **kwargs): - super(GroupsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dimensions=kwargs.pop("dimensions", 2), - edit_type=kwargs.pop("edit_type", "calc"), - free_length=kwargs.pop("free_length", True), - implied_edits=kwargs.pop("implied_edits", {"x": [], "y": []}), - items=kwargs.pop("items", {"valType": "number", "editType": "calc"}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="sankey.node", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="sankey.node", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="sankey.node", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="sankey.node", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._x import XValidator + from ._thickness import ThicknessValidator + from ._pad import PadValidator + from ._line import LineValidator + from ._labelsrc import LabelsrcValidator + from ._label import LabelValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfo import HoverinfoValidator + from ._groups import GroupsValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + "._thickness.ThicknessValidator", + "._pad.PadValidator", + "._line.LineValidator", + "._labelsrc.LabelsrcValidator", + "._label.LabelValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfo.HoverinfoValidator", + "._groups.GroupsValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_color.py b/packages/python/plotly/plotly/validators/sankey/node/_color.py new file mode 100644 index 00000000000..0e308eee924 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="sankey.node", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/node/_colorsrc.py new file mode 100644 index 00000000000..7625e588168 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="sankey.node", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_customdata.py b/packages/python/plotly/plotly/validators/sankey/node/_customdata.py new file mode 100644 index 00000000000..b958e60f2be --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="sankey.node", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_customdatasrc.py b/packages/python/plotly/plotly/validators/sankey/node/_customdatasrc.py new file mode 100644 index 00000000000..cd9ae88caa4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="sankey.node", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_groups.py b/packages/python/plotly/plotly/validators/sankey/node/_groups.py new file mode 100644 index 00000000000..75a9d62f09d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_groups.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class GroupsValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="groups", parent_name="sankey.node", **kwargs): + super(GroupsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dimensions=kwargs.pop("dimensions", 2), + edit_type=kwargs.pop("edit_type", "calc"), + free_length=kwargs.pop("free_length", True), + implied_edits=kwargs.pop("implied_edits", {"x": [], "y": []}), + items=kwargs.pop("items", {"valType": "number", "editType": "calc"}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_hoverinfo.py b/packages/python/plotly/plotly/validators/sankey/node/_hoverinfo.py new file mode 100644 index 00000000000..80cbb0c3807 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_hoverinfo.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="sankey.node", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["all", "none", "skip"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_hoverlabel.py b/packages/python/plotly/plotly/validators/sankey/node/_hoverlabel.py new file mode 100644 index 00000000000..1899adb8335 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="sankey.node", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_hovertemplate.py b/packages/python/plotly/plotly/validators/sankey/node/_hovertemplate.py new file mode 100644 index 00000000000..526b16dfa35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="sankey.node", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/sankey/node/_hovertemplatesrc.py new file mode 100644 index 00000000000..1db37019c16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="sankey.node", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_label.py b/packages/python/plotly/plotly/validators/sankey/node/_label.py new file mode 100644 index 00000000000..e06618179ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_label.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="label", parent_name="sankey.node", **kwargs): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_labelsrc.py b/packages/python/plotly/plotly/validators/sankey/node/_labelsrc.py new file mode 100644 index 00000000000..146aebc5ddb --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_labelsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelsrc", parent_name="sankey.node", **kwargs): + super(LabelsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_line.py b/packages/python/plotly/plotly/validators/sankey/node/_line.py new file mode 100644 index 00000000000..08299d10f4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_line.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="sankey.node", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the `line` around each + `node`. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the `line` around + each `node`. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_pad.py b/packages/python/plotly/plotly/validators/sankey/node/_pad.py new file mode 100644 index 00000000000..3f81b401bc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_pad.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pad", parent_name="sankey.node", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_thickness.py b/packages/python/plotly/plotly/validators/sankey/node/_thickness.py new file mode 100644 index 00000000000..31f8b9be558 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_thickness.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="thickness", parent_name="sankey.node", **kwargs): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_x.py b/packages/python/plotly/plotly/validators/sankey/node/_x.py new file mode 100644 index 00000000000..11e796ae004 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="sankey.node", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_xsrc.py b/packages/python/plotly/plotly/validators/sankey/node/_xsrc.py new file mode 100644 index 00000000000..f5edd95e3bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="sankey.node", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_y.py b/packages/python/plotly/plotly/validators/sankey/node/_y.py new file mode 100644 index 00000000000..05b1f8b3795 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="sankey.node", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/_ysrc.py b/packages/python/plotly/plotly/validators/sankey/node/_ysrc.py new file mode 100644 index 00000000000..c5951a024da --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="sankey.node", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/__init__.py index 97dbaf78fea..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/__init__.py @@ -1,188 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="sankey.node.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="sankey.node.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="sankey.node.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_align.py new file mode 100644 index 00000000000..57fbb1df126 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..2612336f57b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..344a2dbc7c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..8c282b2431c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..04a737c7037 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..39073b69a7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="sankey.node.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_font.py new file mode 100644 index 00000000000..054f74111ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_namelength.py new file mode 100644 index 00000000000..39a90e9e25c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="sankey.node.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..a2afd8cf2a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="sankey.node.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/__init__.py index 8326336c023..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/__init__.py @@ -1,106 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sankey.node.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="sankey.node.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="sankey.node.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="sankey.node.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="sankey.node.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sankey.node.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_color.py new file mode 100644 index 00000000000..080a491f2db --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sankey.node.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..25f5fadafee --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="sankey.node.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_family.py new file mode 100644 index 00000000000..e51dacead60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="sankey.node.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..79ab1f6c0ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="sankey.node.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_size.py new file mode 100644 index 00000000000..52694a83120 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="sankey.node.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..71761426aca --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sankey.node.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/line/__init__.py b/packages/python/plotly/plotly/validators/sankey/node/line/__init__.py index ce800d92688..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/sankey/node/line/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/node/line/__init__.py @@ -1,61 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="sankey.node.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="sankey.node.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sankey.node.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="sankey.node.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/line/_color.py b/packages/python/plotly/plotly/validators/sankey/node/line/_color.py new file mode 100644 index 00000000000..1b8251bfa24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="sankey.node.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/line/_colorsrc.py b/packages/python/plotly/plotly/validators/sankey/node/line/_colorsrc.py new file mode 100644 index 00000000000..a87aa186d14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sankey.node.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/line/_width.py b/packages/python/plotly/plotly/validators/sankey/node/line/_width.py new file mode 100644 index 00000000000..76aa88ecbf1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="sankey.node.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/node/line/_widthsrc.py b/packages/python/plotly/plotly/validators/sankey/node/line/_widthsrc.py new file mode 100644 index 00000000000..d255c1be6ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/node/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="sankey.node.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/stream/__init__.py b/packages/python/plotly/plotly/validators/sankey/stream/__init__.py index a0ec7ca36ab..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/sankey/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="sankey.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="sankey.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/sankey/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/sankey/stream/_maxpoints.py new file mode 100644 index 00000000000..905e63ed848 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="sankey.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/stream/_token.py b/packages/python/plotly/plotly/validators/sankey/stream/_token.py new file mode 100644 index 00000000000..7b5309087e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="sankey.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/textfont/__init__.py b/packages/python/plotly/plotly/validators/sankey/textfont/__init__.py index 7a16a4ec501..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/sankey/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/textfont/__init__.py @@ -1,43 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="sankey.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="sankey.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="sankey.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/sankey/textfont/_color.py b/packages/python/plotly/plotly/validators/sankey/textfont/_color.py new file mode 100644 index 00000000000..4eed14bda7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/textfont/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="sankey.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/textfont/_family.py b/packages/python/plotly/plotly/validators/sankey/textfont/_family.py new file mode 100644 index 00000000000..f3da5865672 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/textfont/_family.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="sankey.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sankey/textfont/_size.py b/packages/python/plotly/plotly/validators/sankey/textfont/_size.py new file mode 100644 index 00000000000..d4251acb63d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sankey/textfont/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="sankey.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/__init__.py b/packages/python/plotly/plotly/validators/scatter/__init__.py index 10d6ac079a1..5a5f980f0df 100644 --- a/packages/python/plotly/plotly/validators/scatter/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/__init__.py @@ -1,1342 +1,134 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="scatter", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="scatter", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="scatter", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="scatter", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="scatter", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="scatter", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="scatter", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="scatter", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="scatter", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="scatter", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scatter", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="scatter", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatter.unselected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.unselected - .Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scatter", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scatter", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="tsrc", parent_name="scatter", **kwargs): - super(TsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="texttemplatesrc", parent_name="scatter", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="scatter", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scatter", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textpositionsrc", parent_name="scatter", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="scatter", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scatter", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scatter", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="t", parent_name="scatter", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scatter", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StackgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="stackgroup", parent_name="scatter", **kwargs): - super(StackgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StackgapsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="stackgaps", parent_name="scatter", **kwargs): - super(StackgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["infer zero", "interpolate"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scatter", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="scatter", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scatter", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatter.selected.M - arker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.selected.T - extfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="rsrc", parent_name="scatter", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="r", parent_name="scatter", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="scatter", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatter", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scatter", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scatter", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scatter", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scatter", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scatter", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter.marker.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scatter.marker.Gra - dient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatter.marker.Lin - e` instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatter", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - simplify - Simplifies lines by removing nearly-collinear - points. When transitioning lines, it may be - desirable to disable this so that the number of - points along the resulting SVG path is - unaffected. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="scatter", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scatter", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scatter", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="scatter", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scatter", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="scatter", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="scatter", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoveron", parent_name="scatter", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - flags=kwargs.pop("flags", ["points", "fills"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scatter", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="scatter", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scatter", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GroupnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="groupnorm", parent_name="scatter", **kwargs): - super(GroupnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["", "fraction", "percent"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scatter", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scatter", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "none", - "tozeroy", - "tozerox", - "tonexty", - "tonextx", - "toself", - "tonext", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorYValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_y", parent_name="scatter", **kwargs): - super(ErrorYValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorY"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorXValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_x", parent_name="scatter", **kwargs): - super(ErrorXValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorX"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="scatter", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="scatter", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="scatter", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scatter", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="scatter", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cliponaxis", parent_name="scatter", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tsrc import TsrcValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._t import TValidator + from ._stream import StreamValidator + from ._stackgroup import StackgroupValidator + from ._stackgaps import StackgapsValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._rsrc import RsrcValidator + from ._r import RValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._groupnorm import GroupnormValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._error_y import Error_YValidator + from ._error_x import Error_XValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator + from ._cliponaxis import CliponaxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tsrc.TsrcValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._t.TValidator", + "._stream.StreamValidator", + "._stackgroup.StackgroupValidator", + "._stackgaps.StackgapsValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r.RValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._groupnorm.GroupnormValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_cliponaxis.py b/packages/python/plotly/plotly/validators/scatter/_cliponaxis.py new file mode 100644 index 00000000000..7c7b7438cd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_cliponaxis.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cliponaxis", parent_name="scatter", **kwargs): + super(CliponaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_connectgaps.py b/packages/python/plotly/plotly/validators/scatter/_connectgaps.py new file mode 100644 index 00000000000..45454b8f98a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="scatter", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_customdata.py b/packages/python/plotly/plotly/validators/scatter/_customdata.py new file mode 100644 index 00000000000..3a884792f92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scatter", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_customdatasrc.py b/packages/python/plotly/plotly/validators/scatter/_customdatasrc.py new file mode 100644 index 00000000000..79b2b9399d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="scatter", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_dx.py b/packages/python/plotly/plotly/validators/scatter/_dx.py new file mode 100644 index 00000000000..3f75a242845 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_dx.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="scatter", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_dy.py b/packages/python/plotly/plotly/validators/scatter/_dy.py new file mode 100644 index 00000000000..648a588f148 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_dy.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="scatter", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_error_x.py b/packages/python/plotly/plotly/validators/scatter/_error_x.py new file mode 100644 index 00000000000..d9628f78223 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_error_x.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_x", parent_name="scatter", **kwargs): + super(Error_XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorX"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_error_y.py b/packages/python/plotly/plotly/validators/scatter/_error_y.py new file mode 100644 index 00000000000..5e9e0928446 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_error_y.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_y", parent_name="scatter", **kwargs): + super(Error_YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorY"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_fill.py b/packages/python/plotly/plotly/validators/scatter/_fill.py new file mode 100644 index 00000000000..670b7af3078 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_fill.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scatter", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "none", + "tozeroy", + "tozerox", + "tonexty", + "tonextx", + "toself", + "tonext", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_fillcolor.py b/packages/python/plotly/plotly/validators/scatter/_fillcolor.py new file mode 100644 index 00000000000..eb28d5bbd83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_fillcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scatter", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_groupnorm.py b/packages/python/plotly/plotly/validators/scatter/_groupnorm.py new file mode 100644 index 00000000000..cbc1e3ab66b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_groupnorm.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GroupnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="groupnorm", parent_name="scatter", **kwargs): + super(GroupnormValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["", "fraction", "percent"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hoverinfo.py b/packages/python/plotly/plotly/validators/scatter/_hoverinfo.py new file mode 100644 index 00000000000..8c0f39771c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scatter", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scatter/_hoverinfosrc.py new file mode 100644 index 00000000000..cdea5cf305b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="scatter", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hoverlabel.py b/packages/python/plotly/plotly/validators/scatter/_hoverlabel.py new file mode 100644 index 00000000000..f08b88cf0d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scatter", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hoveron.py b/packages/python/plotly/plotly/validators/scatter/_hoveron.py new file mode 100644 index 00000000000..a7726f58c1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hoveron.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoveron", parent_name="scatter", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + flags=kwargs.pop("flags", ["points", "fills"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hovertemplate.py b/packages/python/plotly/plotly/validators/scatter/_hovertemplate.py new file mode 100644 index 00000000000..379b860d315 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="scatter", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scatter/_hovertemplatesrc.py new file mode 100644 index 00000000000..a4fc12328b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="scatter", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hovertext.py b/packages/python/plotly/plotly/validators/scatter/_hovertext.py new file mode 100644 index 00000000000..0dae2cfa7bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scatter", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scatter/_hovertextsrc.py new file mode 100644 index 00000000000..7a22f58d408 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="scatter", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_ids.py b/packages/python/plotly/plotly/validators/scatter/_ids.py new file mode 100644 index 00000000000..634fe38ccbb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_ids.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scatter", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_idssrc.py b/packages/python/plotly/plotly/validators/scatter/_idssrc.py new file mode 100644 index 00000000000..ce968cdf660 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scatter", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_legendgroup.py b/packages/python/plotly/plotly/validators/scatter/_legendgroup.py new file mode 100644 index 00000000000..6bf4597539f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="scatter", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_line.py b/packages/python/plotly/plotly/validators/scatter/_line.py new file mode 100644 index 00000000000..b3c197f0fc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_line.py @@ -0,0 +1,41 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatter", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + simplify + Simplifies lines by removing nearly-collinear + points. When transitioning lines, it may be + desirable to disable this so that the number of + points along the resulting SVG path is + unaffected. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_marker.py b/packages/python/plotly/plotly/validators/scatter/_marker.py new file mode 100644 index 00000000000..95b6567358b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_marker.py @@ -0,0 +1,146 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scatter", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatter.marker.Col + orBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scatter.marker.Gra + dient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scatter.marker.Lin + e` instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_meta.py b/packages/python/plotly/plotly/validators/scatter/_meta.py new file mode 100644 index 00000000000..4ad5d488173 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scatter", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_metasrc.py b/packages/python/plotly/plotly/validators/scatter/_metasrc.py new file mode 100644 index 00000000000..42343484908 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scatter", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_mode.py b/packages/python/plotly/plotly/validators/scatter/_mode.py new file mode 100644 index 00000000000..114fea53fd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scatter", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_name.py b/packages/python/plotly/plotly/validators/scatter/_name.py new file mode 100644 index 00000000000..6c838a4a1d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scatter", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_opacity.py b/packages/python/plotly/plotly/validators/scatter/_opacity.py new file mode 100644 index 00000000000..d7fed888f88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatter", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_orientation.py b/packages/python/plotly/plotly/validators/scatter/_orientation.py new file mode 100644 index 00000000000..91f4265f011 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="scatter", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_r.py b/packages/python/plotly/plotly/validators/scatter/_r.py new file mode 100644 index 00000000000..940c065737f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="r", parent_name="scatter", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_rsrc.py b/packages/python/plotly/plotly/validators/scatter/_rsrc.py new file mode 100644 index 00000000000..92a3e6c7f85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_rsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="rsrc", parent_name="scatter", **kwargs): + super(RsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_selected.py b/packages/python/plotly/plotly/validators/scatter/_selected.py new file mode 100644 index 00000000000..168d4ea59e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scatter", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatter.selected.M + arker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatter.selected.T + extfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_selectedpoints.py b/packages/python/plotly/plotly/validators/scatter/_selectedpoints.py new file mode 100644 index 00000000000..b45155ccde8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="scatter", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_showlegend.py b/packages/python/plotly/plotly/validators/scatter/_showlegend.py new file mode 100644 index 00000000000..08b112d75e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scatter", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_stackgaps.py b/packages/python/plotly/plotly/validators/scatter/_stackgaps.py new file mode 100644 index 00000000000..64d9bbf484f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_stackgaps.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class StackgapsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="stackgaps", parent_name="scatter", **kwargs): + super(StackgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["infer zero", "interpolate"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_stackgroup.py b/packages/python/plotly/plotly/validators/scatter/_stackgroup.py new file mode 100644 index 00000000000..a6b44dda75e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_stackgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StackgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="stackgroup", parent_name="scatter", **kwargs): + super(StackgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_stream.py b/packages/python/plotly/plotly/validators/scatter/_stream.py new file mode 100644 index 00000000000..ffc473903e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scatter", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_t.py b/packages/python/plotly/plotly/validators/scatter/_t.py new file mode 100644 index 00000000000..3e52ae8b06d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_t.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="t", parent_name="scatter", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_text.py b/packages/python/plotly/plotly/validators/scatter/_text.py new file mode 100644 index 00000000000..3b0692448dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scatter", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_textfont.py b/packages/python/plotly/plotly/validators/scatter/_textfont.py new file mode 100644 index 00000000000..1798fb8cf4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scatter", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_textposition.py b/packages/python/plotly/plotly/validators/scatter/_textposition.py new file mode 100644 index 00000000000..c601f8eea21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_textposition.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="scatter", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scatter/_textpositionsrc.py new file mode 100644 index 00000000000..3ee857a059f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_textpositionsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textpositionsrc", parent_name="scatter", **kwargs): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_textsrc.py b/packages/python/plotly/plotly/validators/scatter/_textsrc.py new file mode 100644 index 00000000000..4fed554f769 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scatter", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_texttemplate.py b/packages/python/plotly/plotly/validators/scatter/_texttemplate.py new file mode 100644 index 00000000000..25855374e2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scatter", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scatter/_texttemplatesrc.py new file mode 100644 index 00000000000..ec2e399c435 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_texttemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="scatter", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_tsrc.py b/packages/python/plotly/plotly/validators/scatter/_tsrc.py new file mode 100644 index 00000000000..1665c47537d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_tsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="tsrc", parent_name="scatter", **kwargs): + super(TsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_uid.py b/packages/python/plotly/plotly/validators/scatter/_uid.py new file mode 100644 index 00000000000..7be3eb0a9db --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_uid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scatter", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_uirevision.py b/packages/python/plotly/plotly/validators/scatter/_uirevision.py new file mode 100644 index 00000000000..d60f5635a14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scatter", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_unselected.py b/packages/python/plotly/plotly/validators/scatter/_unselected.py new file mode 100644 index 00000000000..daaeb8e9359 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="scatter", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatter.unselected + .Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatter.unselected + .Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_visible.py b/packages/python/plotly/plotly/validators/scatter/_visible.py new file mode 100644 index 00000000000..7ab152e286a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scatter", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_x.py b/packages/python/plotly/plotly/validators/scatter/_x.py new file mode 100644 index 00000000000..3a61becdb9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_x.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="scatter", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_x0.py b/packages/python/plotly/plotly/validators/scatter/_x0.py new file mode 100644 index 00000000000..255f747e767 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_x0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="scatter", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_xaxis.py b/packages/python/plotly/plotly/validators/scatter/_xaxis.py new file mode 100644 index 00000000000..5871683fd5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="scatter", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_xcalendar.py b/packages/python/plotly/plotly/validators/scatter/_xcalendar.py new file mode 100644 index 00000000000..6c1ef922717 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="scatter", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_xsrc.py b/packages/python/plotly/plotly/validators/scatter/_xsrc.py new file mode 100644 index 00000000000..2f44ac19598 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="scatter", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_y.py b/packages/python/plotly/plotly/validators/scatter/_y.py new file mode 100644 index 00000000000..7e466773aaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_y.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="scatter", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_y0.py b/packages/python/plotly/plotly/validators/scatter/_y0.py new file mode 100644 index 00000000000..d6a6e0d26af --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_y0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="scatter", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_yaxis.py b/packages/python/plotly/plotly/validators/scatter/_yaxis.py new file mode 100644 index 00000000000..9e182ee5820 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="scatter", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_ycalendar.py b/packages/python/plotly/plotly/validators/scatter/_ycalendar.py new file mode 100644 index 00000000000..8642739a94e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="scatter", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/_ysrc.py b/packages/python/plotly/plotly/validators/scatter/_ysrc.py new file mode 100644 index 00000000000..46602fe6d03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="scatter", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/__init__.py b/packages/python/plotly/plotly/validators/scatter/error_x/__init__.py index 3826fd348fa..e4688233f0f 100644 --- a/packages/python/plotly/plotly/validators/scatter/error_x/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/error_x/__init__.py @@ -1,229 +1,42 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="scatter.error_x", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scatter.error_x", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scatter.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scatter.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scatter.error_x", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="traceref", parent_name="scatter.error_x", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter.error_x", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scatter.error_x", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CopyYstyleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="copy_ystyle", parent_name="scatter.error_x", **kwargs - ): - super(CopyYstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="arraysrc", parent_name="scatter.error_x", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scatter.error_x", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scatter.error_x", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scatter.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._copy_ystyle import Copy_YstyleValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_array.py b/packages/python/plotly/plotly/validators/scatter/error_x/_array.py new file mode 100644 index 00000000000..81471c64856 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scatter.error_x", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_arrayminus.py b/packages/python/plotly/plotly/validators/scatter/error_x/_arrayminus.py new file mode 100644 index 00000000000..a19eaaa95be --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scatter.error_x", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scatter/error_x/_arrayminussrc.py new file mode 100644 index 00000000000..5ad1ff4cdc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scatter.error_x", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_arraysrc.py b/packages/python/plotly/plotly/validators/scatter/error_x/_arraysrc.py new file mode 100644 index 00000000000..3f27ace9791 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_arraysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="arraysrc", parent_name="scatter.error_x", **kwargs): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_color.py b/packages/python/plotly/plotly/validators/scatter/error_x/_color.py new file mode 100644 index 00000000000..54b1879db1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter.error_x", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_copy_ystyle.py b/packages/python/plotly/plotly/validators/scatter/error_x/_copy_ystyle.py new file mode 100644 index 00000000000..2618543cd4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_copy_ystyle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="copy_ystyle", parent_name="scatter.error_x", **kwargs + ): + super(Copy_YstyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_symmetric.py b/packages/python/plotly/plotly/validators/scatter/error_x/_symmetric.py new file mode 100644 index 00000000000..487b029f542 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scatter.error_x", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_thickness.py b/packages/python/plotly/plotly/validators/scatter/error_x/_thickness.py new file mode 100644 index 00000000000..e7749d30a11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter.error_x", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_traceref.py b/packages/python/plotly/plotly/validators/scatter/error_x/_traceref.py new file mode 100644 index 00000000000..45a49db35bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_traceref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="traceref", parent_name="scatter.error_x", **kwargs): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_tracerefminus.py b/packages/python/plotly/plotly/validators/scatter/error_x/_tracerefminus.py new file mode 100644 index 00000000000..088bec3ebf7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scatter.error_x", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_type.py b/packages/python/plotly/plotly/validators/scatter/error_x/_type.py new file mode 100644 index 00000000000..f303331c346 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scatter.error_x", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_value.py b/packages/python/plotly/plotly/validators/scatter/error_x/_value.py new file mode 100644 index 00000000000..0817ab7f17f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scatter.error_x", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_valueminus.py b/packages/python/plotly/plotly/validators/scatter/error_x/_valueminus.py new file mode 100644 index 00000000000..d492338c9c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scatter.error_x", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_visible.py b/packages/python/plotly/plotly/validators/scatter/error_x/_visible.py new file mode 100644 index 00000000000..2a332f4107c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="scatter.error_x", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_x/_width.py b/packages/python/plotly/plotly/validators/scatter/error_x/_width.py new file mode 100644 index 00000000000..bdb61fc7ec1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_x/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter.error_x", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/__init__.py b/packages/python/plotly/plotly/validators/scatter/error_y/__init__.py index 96a460cba96..0a508f0c655 100644 --- a/packages/python/plotly/plotly/validators/scatter/error_y/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/error_y/__init__.py @@ -1,213 +1,40 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="scatter.error_y", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scatter.error_y", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scatter.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scatter.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scatter.error_y", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="traceref", parent_name="scatter.error_y", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter.error_y", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scatter.error_y", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="arraysrc", parent_name="scatter.error_y", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scatter.error_y", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scatter.error_y", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scatter.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_array.py b/packages/python/plotly/plotly/validators/scatter/error_y/_array.py new file mode 100644 index 00000000000..675e8a0316d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scatter.error_y", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_arrayminus.py b/packages/python/plotly/plotly/validators/scatter/error_y/_arrayminus.py new file mode 100644 index 00000000000..d9059f45079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scatter.error_y", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scatter/error_y/_arrayminussrc.py new file mode 100644 index 00000000000..86235b83253 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scatter.error_y", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_arraysrc.py b/packages/python/plotly/plotly/validators/scatter/error_y/_arraysrc.py new file mode 100644 index 00000000000..f763e60ec79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_arraysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="arraysrc", parent_name="scatter.error_y", **kwargs): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_color.py b/packages/python/plotly/plotly/validators/scatter/error_y/_color.py new file mode 100644 index 00000000000..73460c45f80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter.error_y", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_symmetric.py b/packages/python/plotly/plotly/validators/scatter/error_y/_symmetric.py new file mode 100644 index 00000000000..3e01846694f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scatter.error_y", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_thickness.py b/packages/python/plotly/plotly/validators/scatter/error_y/_thickness.py new file mode 100644 index 00000000000..d5a0a27f88a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter.error_y", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_traceref.py b/packages/python/plotly/plotly/validators/scatter/error_y/_traceref.py new file mode 100644 index 00000000000..c69daba7d26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_traceref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="traceref", parent_name="scatter.error_y", **kwargs): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_tracerefminus.py b/packages/python/plotly/plotly/validators/scatter/error_y/_tracerefminus.py new file mode 100644 index 00000000000..b6e60e21d30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scatter.error_y", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_type.py b/packages/python/plotly/plotly/validators/scatter/error_y/_type.py new file mode 100644 index 00000000000..2fd5221a440 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scatter.error_y", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_value.py b/packages/python/plotly/plotly/validators/scatter/error_y/_value.py new file mode 100644 index 00000000000..1a9c7298cef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scatter.error_y", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_valueminus.py b/packages/python/plotly/plotly/validators/scatter/error_y/_valueminus.py new file mode 100644 index 00000000000..09635f60f1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scatter.error_y", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_visible.py b/packages/python/plotly/plotly/validators/scatter/error_y/_visible.py new file mode 100644 index 00000000000..71a4edc85e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="scatter.error_y", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/error_y/_width.py b/packages/python/plotly/plotly/validators/scatter/error_y/_width.py new file mode 100644 index 00000000000..7cdb74a2a35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/error_y/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter.error_y", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/__init__.py index 02b00cd292b..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scatter/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="scatter.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scatter.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="scatter.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="scatter.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scatter.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scatter.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatter.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scatter.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="scatter.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_align.py new file mode 100644 index 00000000000..265a7d0a42b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="scatter.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..9812dc8be1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scatter.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..5fbebc599ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatter.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..6fbff4551cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scatter.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..d4deaa4330c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scatter.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..1676885f2a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="scatter.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_font.py new file mode 100644 index 00000000000..b4ad01a9cc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="scatter.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelength.py new file mode 100644 index 00000000000..8e545752b66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scatter.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..782b328d01e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="scatter.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/__init__.py index fa1cc70aa57..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatter.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatter.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scatter.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatter.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_color.py new file mode 100644 index 00000000000..6acbef69540 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..b7c5c0b292a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_family.py new file mode 100644 index 00000000000..2133dad96cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatter.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..9ca8f2f64a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scatter.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_size.py new file mode 100644 index 00000000000..f817fbe05f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatter.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..f5972d74af1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatter.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/__init__.py b/packages/python/plotly/plotly/validators/scatter/line/__init__.py index c2ae534c909..45fc1fec96f 100644 --- a/packages/python/plotly/plotly/validators/scatter/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/line/__init__.py @@ -1,91 +1,24 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="smoothing", parent_name="scatter.line", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SimplifyValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="simplify", parent_name="scatter.line", **kwargs): - super(SimplifyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="shape", parent_name="scatter.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["linear", "spline", "hv", "vh", "hvh", "vhv"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="scatter.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._simplify import SimplifyValidator + from ._shape import ShapeValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._simplify.SimplifyValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/_color.py b/packages/python/plotly/plotly/validators/scatter/line/_color.py new file mode 100644 index 00000000000..5a9a5c4afdd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/_dash.py b/packages/python/plotly/plotly/validators/scatter/line/_dash.py new file mode 100644 index 00000000000..7aebef5304a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="scatter.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/_shape.py b/packages/python/plotly/plotly/validators/scatter/line/_shape.py new file mode 100644 index 00000000000..13f0fa2d093 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/line/_shape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="shape", parent_name="scatter.line", **kwargs): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["linear", "spline", "hv", "vh", "hvh", "vhv"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/_simplify.py b/packages/python/plotly/plotly/validators/scatter/line/_simplify.py new file mode 100644 index 00000000000..a2327d637c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/line/_simplify.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SimplifyValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="simplify", parent_name="scatter.line", **kwargs): + super(SimplifyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/_smoothing.py b/packages/python/plotly/plotly/validators/scatter/line/_smoothing.py new file mode 100644 index 00000000000..d0d6a2c47da --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/line/_smoothing.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="smoothing", parent_name="scatter.line", **kwargs): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/line/_width.py b/packages/python/plotly/plotly/validators/scatter/line/_width.py new file mode 100644 index 00000000000..0ed205b7112 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/__init__.py index b06aa92cec6..bcd2242a57a 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/__init__.py @@ -1,980 +1,60 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="symbolsrc", parent_name="scatter.marker", **kwargs): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="scatter.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="scatter.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizeref", parent_name="scatter.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="sizemode", parent_name="scatter.marker", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizemin", parent_name="scatter.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scatter.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="scatter.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatter.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scatter.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatter.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxdisplayed", parent_name="scatter.marker", **kwargs - ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatter.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="gradient", parent_name="scatter.marker", **kwargs): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Gradient"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="scatter.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatter.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="scatter.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter.marker.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scatter.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="scatter.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "scatter.marker.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scatter.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scatter.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scatter.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="scatter.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scatter.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._maxdisplayed import MaxdisplayedValidator + from ._line import LineValidator + from ._gradient import GradientValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatter/marker/_autocolorscale.py new file mode 100644 index 00000000000..5f6a5e62af2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scatter.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_cauto.py b/packages/python/plotly/plotly/validators/scatter/marker/_cauto.py new file mode 100644 index 00000000000..1e6e8ff0f63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="scatter.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_cmax.py b/packages/python/plotly/plotly/validators/scatter/marker/_cmax.py new file mode 100644 index 00000000000..6b742f759c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scatter.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_cmid.py b/packages/python/plotly/plotly/validators/scatter/marker/_cmid.py new file mode 100644 index 00000000000..0f255afecda --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scatter.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_cmin.py b/packages/python/plotly/plotly/validators/scatter/marker/_cmin.py new file mode 100644 index 00000000000..ef68c8f93a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scatter.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_color.py b/packages/python/plotly/plotly/validators/scatter/marker/_color.py new file mode 100644 index 00000000000..8484a5b3afa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "scatter.marker.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scatter/marker/_coloraxis.py new file mode 100644 index 00000000000..8814940d608 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="scatter.marker", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scatter/marker/_colorbar.py new file mode 100644 index 00000000000..b6d48ece118 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="scatter.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + .marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatter.marker.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + scatter.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter.marker.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scatter.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scatter/marker/_colorscale.py new file mode 100644 index 00000000000..2fc6c913e1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatter.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter/marker/_colorsrc.py new file mode 100644 index 00000000000..ad4b1b1736d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="scatter.marker", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_gradient.py b/packages/python/plotly/plotly/validators/scatter/marker/_gradient.py new file mode 100644 index 00000000000..8c5d7582d83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_gradient.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="gradient", parent_name="scatter.marker", **kwargs): + super(GradientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Gradient"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_line.py b/packages/python/plotly/plotly/validators/scatter/marker/_line.py new file mode 100644 index 00000000000..15591922d98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatter.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_maxdisplayed.py b/packages/python/plotly/plotly/validators/scatter/marker/_maxdisplayed.py new file mode 100644 index 00000000000..53fe9704bfe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_maxdisplayed.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxdisplayed", parent_name="scatter.marker", **kwargs + ): + super(MaxdisplayedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatter/marker/_opacity.py new file mode 100644 index 00000000000..f60b0dcdd42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatter.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scatter/marker/_opacitysrc.py new file mode 100644 index 00000000000..b37b0b0a2d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scatter.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scatter/marker/_reversescale.py new file mode 100644 index 00000000000..76d2ea4046d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatter.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_showscale.py b/packages/python/plotly/plotly/validators/scatter/marker/_showscale.py new file mode 100644 index 00000000000..aa388a4bde0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="scatter.marker", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_size.py b/packages/python/plotly/plotly/validators/scatter/marker/_size.py new file mode 100644 index 00000000000..60713a89cd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scatter.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scatter/marker/_sizemin.py new file mode 100644 index 00000000000..405fe6b5e54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_sizemin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizemin", parent_name="scatter.marker", **kwargs): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scatter/marker/_sizemode.py new file mode 100644 index 00000000000..35fdc173fb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_sizemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="sizemode", parent_name="scatter.marker", **kwargs): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scatter/marker/_sizeref.py new file mode 100644 index 00000000000..d43d8539e88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_sizeref.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizeref", parent_name="scatter.marker", **kwargs): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scatter/marker/_sizesrc.py new file mode 100644 index 00000000000..095bacc18bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="scatter.marker", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_symbol.py b/packages/python/plotly/plotly/validators/scatter/marker/_symbol.py new file mode 100644 index 00000000000..a6db8a3f773 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="scatter.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scatter/marker/_symbolsrc.py new file mode 100644 index 00000000000..d65f086234f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/_symbolsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="symbolsrc", parent_name="scatter.marker", **kwargs): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/__init__.py index 515073565ce..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/__init__.py @@ -1,798 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scatter.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="scatter.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scatter.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scatter.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="scatter.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scatter.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="scatter.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scatter.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="scatter.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="scatter.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scatter.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scatter.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scatter.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="scatter.marker.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scatter.marker.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatter.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..41f4b8530f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatter.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..5bb94320b1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scatter.marker.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..7bfc1d7482b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="scatter.marker.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..31c2904ad15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scatter.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..d372fe4bf87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_len.py new file mode 100644 index 00000000000..c3ab6a4b50b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scatter.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..7ef157f43a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="scatter.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..d109283e5ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="scatter.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..918e2fdb6de --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..8284cf70a68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..020cc78d33b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..aa0730efdf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..1ccf240df0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..34478677a5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..05faf22b1a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..ea4b308bf63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..5d534bfebff --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..4a1953a1232 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scatter.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..fb40508438a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..a4d8baa4d50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..5adb3010cdb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..35a22a73609 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..cbbb1a672ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..d5f982e968d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scatter.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..d6d81c401d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..9d9082042cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..512564c019e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..0980eb4f94c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..8cd6a6ba1e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..0828c1d3ef1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..6ec5e121c18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..4d4d184cb3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..ea782069a51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..b1a79815e28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_title.py new file mode 100644 index 00000000000..0a53a8d5759 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scatter.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_x.py new file mode 100644 index 00000000000..dd51c9f75ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scatter.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..61300e85e00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="scatter.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..3441457c430 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scatter.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_y.py new file mode 100644 index 00000000000..d72d4dc48f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scatter.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..0b02a4790b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="scatter.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..4ea7582037c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scatter.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py index 7b1cb5c6752..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatter.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatter.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatter.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..b7c01ebc1ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatter.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..f557628b9d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatter.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..b1551753ce3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatter.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py index a11d0efbcbf..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scatter.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scatter.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scatter.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scatter.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scatter.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..60ce0484815 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scatter.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..db99d063c27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scatter.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..46af8d2d5f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scatter.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..13ec5515f0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scatter.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..fb08c71c02a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scatter.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/__init__.py index f38d66a3397..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="scatter.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="scatter.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scatter.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..aa8e106e82b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scatter.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..42f2f634c50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="scatter.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..077ecdad11f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="scatter.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/__init__.py index b64e59421aa..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatter.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatter.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatter.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..231a7a8c36e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatter.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..54db8431977 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatter.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..1f5dbb0011b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatter.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/gradient/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/gradient/__init__.py index 0abbb748897..5193d7a59a5 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/gradient/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/gradient/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="typesrc", parent_name="scatter.marker.gradient", **kwargs - ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="scatter.marker.gradient", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter.marker.gradient", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.marker.gradient", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._typesrc import TypesrcValidator + from ._type import TypeValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/gradient/_color.py b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_color.py new file mode 100644 index 00000000000..4107df82956 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.marker.gradient", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/gradient/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_colorsrc.py new file mode 100644 index 00000000000..4fa53003764 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter.marker.gradient", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/gradient/_type.py b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_type.py new file mode 100644 index 00000000000..53ce6e58cfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_type.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="scatter.marker.gradient", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/gradient/_typesrc.py b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_typesrc.py new file mode 100644 index 00000000000..576efed4198 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/gradient/_typesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="typesrc", parent_name="scatter.marker.gradient", **kwargs + ): + super(TypesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scatter/marker/line/__init__.py index 165609fdd55..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scatter/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/__init__.py @@ -1,200 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scatter.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatter.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatter.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatter.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatter.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scatter.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scatter.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scatter.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatter.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scatter.marker.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..729db2f6aff --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scatter.marker.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_cauto.py new file mode 100644 index 00000000000..c9593b8034f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatter.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_cmax.py new file mode 100644 index 00000000000..85071a0a3b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scatter.marker.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_cmid.py new file mode 100644 index 00000000000..af9664048cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scatter.marker.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_cmin.py new file mode 100644 index 00000000000..76d4ac57d74 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scatter.marker.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_color.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_color.py new file mode 100644 index 00000000000..ef21bbaf16a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_color.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatter.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_coloraxis.py new file mode 100644 index 00000000000..e19a97ec68d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatter.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_colorscale.py new file mode 100644 index 00000000000..761b377c7d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatter.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_colorsrc.py new file mode 100644 index 00000000000..fe0d884973c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py new file mode 100644 index 00000000000..4c6ceafadd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_width.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_width.py new file mode 100644 index 00000000000..dddce8d7c45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_width.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatter.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scatter/marker/line/_widthsrc.py new file mode 100644 index 00000000000..c9f952e8a87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scatter.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/__init__.py b/packages/python/plotly/plotly/validators/scatter/selected/__init__.py index b311d8e20e2..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatter/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/selected/__init__.py @@ -1,44 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatter.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scatter.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/_marker.py b/packages/python/plotly/plotly/validators/scatter/selected/_marker.py new file mode 100644 index 00000000000..9f08fea4980 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/selected/_marker.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scatter.selected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/_textfont.py b/packages/python/plotly/plotly/validators/scatter/selected/_textfont.py new file mode 100644 index 00000000000..da36cae661e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatter.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatter/selected/marker/__init__.py index d380b28dbc9..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatter/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/selected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatter.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatter.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scatter/selected/marker/_color.py new file mode 100644 index 00000000000..6411ff59b52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatter/selected/marker/_opacity.py new file mode 100644 index 00000000000..6b9e74a44c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatter.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scatter/selected/marker/_size.py new file mode 100644 index 00000000000..46c28f6a859 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatter.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatter/selected/textfont/__init__.py index d7a15fa0e68..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatter/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/selected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.selected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatter/selected/textfont/_color.py new file mode 100644 index 00000000000..d7a15fa0e68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/selected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.selected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/stream/__init__.py b/packages/python/plotly/plotly/validators/scatter/stream/__init__.py index f4498ee0a57..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scatter/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="scatter.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="scatter.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scatter/stream/_maxpoints.py new file mode 100644 index 00000000000..481d4d13a60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="scatter.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/stream/_token.py b/packages/python/plotly/plotly/validators/scatter/stream/_token.py new file mode 100644 index 00000000000..e9b00e4b386 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="scatter.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatter/textfont/__init__.py index bef62ee6e67..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatter/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/textfont/__init__.py @@ -1,92 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="scatter.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scatter.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scatter.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="scatter.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/_color.py b/packages/python/plotly/plotly/validators/scatter/textfont/_color.py new file mode 100644 index 00000000000..0dc00e21388 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter/textfont/_colorsrc.py new file mode 100644 index 00000000000..5b7b57efea4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/_family.py b/packages/python/plotly/plotly/validators/scatter/textfont/_family.py new file mode 100644 index 00000000000..77f0c61a64d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/textfont/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="scatter.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scatter/textfont/_familysrc.py new file mode 100644 index 00000000000..0910b3f2c96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scatter.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/_size.py b/packages/python/plotly/plotly/validators/scatter/textfont/_size.py new file mode 100644 index 00000000000..245caf0931a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scatter.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scatter/textfont/_sizesrc.py new file mode 100644 index 00000000000..7f54708d73c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/textfont/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="scatter.textfont", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/__init__.py b/packages/python/plotly/plotly/validators/scatter/unselected/__init__.py index cbf056b44bd..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatter/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatter.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatter.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/_marker.py b/packages/python/plotly/plotly/validators/scatter/unselected/_marker.py new file mode 100644 index 00000000000..4b060c400ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatter.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scatter/unselected/_textfont.py new file mode 100644 index 00000000000..90831122e76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatter.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatter/unselected/marker/__init__.py index db49ab40a86..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatter/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/unselected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatter.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatter.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scatter/unselected/marker/_color.py new file mode 100644 index 00000000000..f90a99ffa82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatter/unselected/marker/_opacity.py new file mode 100644 index 00000000000..5430a2f0659 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatter.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scatter/unselected/marker/_size.py new file mode 100644 index 00000000000..5a299f45b85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatter.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatter/unselected/textfont/__init__.py index 6daeae64df5..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatter/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/unselected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter.unselected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatter/unselected/textfont/_color.py new file mode 100644 index 00000000000..6daeae64df5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter/unselected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter.unselected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/__init__.py index 086f8f9e252..f8a2d72a128 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/__init__.py @@ -1,1268 +1,108 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="scatter3d", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="zcalendar", parent_name="scatter3d", **kwargs): - super(ZcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="scatter3d", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="scatter3d", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="scatter3d", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="scatter3d", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="scatter3d", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="scatter3d", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="scatter3d", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scatter3d", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scatter3d", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scatter3d", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scatter3d", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="scatter3d", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scatter3d", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scatter3d", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="scatter3d", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scatter3d", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scatter3d", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfacecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="surfacecolor", parent_name="scatter3d", **kwargs): - super(SurfacecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfaceaxisValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="surfaceaxis", parent_name="scatter3d", **kwargs): - super(SurfaceaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [-1, 0, 1, 2]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scatter3d", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scatter3d", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="scatter3d", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="projection", parent_name="scatter3d", **kwargs): - super(ProjectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Projection"), - data_docs=kwargs.pop( - "data_docs", - """ - x - :class:`plotly.graph_objects.scatter3d.projecti - on.X` instance or dict with compatible - properties - y - :class:`plotly.graph_objects.scatter3d.projecti - on.Y` instance or dict with compatible - properties - z - :class:`plotly.graph_objects.scatter3d.projecti - on.Z` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatter3d", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scatter3d", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scatter3d", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scatter3d", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scatter3d", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scatter3d", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.scatter3d.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. Note that the marker - opacity for scatter3d traces must be a scalar - value for performance reasons. To set a - blending opacity value (i.e. which is not - transparent), set "marker.color" to an rgba - color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatter3d", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="scatter3d", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scatter3d", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scatter3d", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="scatter3d", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scatter3d", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scatter3d", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="scatter3d", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scatter3d", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="scatter3d", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scatter3d", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_z", parent_name="scatter3d", **kwargs): - super(ErrorZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorZ"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorYValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_y", parent_name="scatter3d", **kwargs): - super(ErrorYValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorY"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorXValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_x", parent_name="scatter3d", **kwargs): - super(ErrorXValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorX"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="scatter3d", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scatter3d", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="scatter3d", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zcalendar import ZcalendarValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._surfacecolor import SurfacecolorValidator + from ._surfaceaxis import SurfaceaxisValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._projection import ProjectionValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._error_z import Error_ZValidator + from ._error_y import Error_YValidator + from ._error_x import Error_XValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zcalendar.ZcalendarValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._surfacecolor.SurfacecolorValidator", + "._surfaceaxis.SurfaceaxisValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._projection.ProjectionValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._error_z.Error_ZValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_connectgaps.py b/packages/python/plotly/plotly/validators/scatter3d/_connectgaps.py new file mode 100644 index 00000000000..e793945d16c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="scatter3d", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_customdata.py b/packages/python/plotly/plotly/validators/scatter3d/_customdata.py new file mode 100644 index 00000000000..e63a5b64da7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scatter3d", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_customdatasrc.py b/packages/python/plotly/plotly/validators/scatter3d/_customdatasrc.py new file mode 100644 index 00000000000..8dea51464e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="scatter3d", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_error_x.py b/packages/python/plotly/plotly/validators/scatter3d/_error_x.py new file mode 100644 index 00000000000..a0dc09ed89c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_error_x.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_x", parent_name="scatter3d", **kwargs): + super(Error_XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorX"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_error_y.py b/packages/python/plotly/plotly/validators/scatter3d/_error_y.py new file mode 100644 index 00000000000..86be81243f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_error_y.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_y", parent_name="scatter3d", **kwargs): + super(Error_YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorY"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_zstyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_error_z.py b/packages/python/plotly/plotly/validators/scatter3d/_error_z.py new file mode 100644 index 00000000000..743ee76c300 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_error_z.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class Error_ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_z", parent_name="scatter3d", **kwargs): + super(Error_ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorZ"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hoverinfo.py b/packages/python/plotly/plotly/validators/scatter3d/_hoverinfo.py new file mode 100644 index 00000000000..d0594679569 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scatter3d", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scatter3d/_hoverinfosrc.py new file mode 100644 index 00000000000..092552f833b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="scatter3d", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hoverlabel.py b/packages/python/plotly/plotly/validators/scatter3d/_hoverlabel.py new file mode 100644 index 00000000000..bd2c4a050c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scatter3d", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hovertemplate.py b/packages/python/plotly/plotly/validators/scatter3d/_hovertemplate.py new file mode 100644 index 00000000000..2b38adab436 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="scatter3d", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scatter3d/_hovertemplatesrc.py new file mode 100644 index 00000000000..fec661e6fd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scatter3d", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hovertext.py b/packages/python/plotly/plotly/validators/scatter3d/_hovertext.py new file mode 100644 index 00000000000..220eef34a55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scatter3d", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scatter3d/_hovertextsrc.py new file mode 100644 index 00000000000..faa7b392471 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="scatter3d", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_ids.py b/packages/python/plotly/plotly/validators/scatter3d/_ids.py new file mode 100644 index 00000000000..41e4531f965 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scatter3d", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_idssrc.py b/packages/python/plotly/plotly/validators/scatter3d/_idssrc.py new file mode 100644 index 00000000000..456ef415c1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scatter3d", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_legendgroup.py b/packages/python/plotly/plotly/validators/scatter3d/_legendgroup.py new file mode 100644 index 00000000000..75af5f47b01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="scatter3d", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_line.py b/packages/python/plotly/plotly/validators/scatter3d/_line.py new file mode 100644 index 00000000000..73b13e19326 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_line.py @@ -0,0 +1,106 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatter3d", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatter3d.line.Col + orBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + dash + Sets the dash style of the lines. + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_marker.py b/packages/python/plotly/plotly/validators/scatter3d/_marker.py new file mode 100644 index 00000000000..7036b763874 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_marker.py @@ -0,0 +1,137 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scatter3d", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatter3d.marker.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.scatter3d.marker.L + ine` instance or dict with compatible + properties + opacity + Sets the marker opacity. Note that the marker + opacity for scatter3d traces must be a scalar + value for performance reasons. To set a + blending opacity value (i.e. which is not + transparent), set "marker.color" to an rgba + color and use its alpha channel. + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_meta.py b/packages/python/plotly/plotly/validators/scatter3d/_meta.py new file mode 100644 index 00000000000..e7ecacc55c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scatter3d", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_metasrc.py b/packages/python/plotly/plotly/validators/scatter3d/_metasrc.py new file mode 100644 index 00000000000..8f36c0ba937 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scatter3d", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_mode.py b/packages/python/plotly/plotly/validators/scatter3d/_mode.py new file mode 100644 index 00000000000..32a2d972e71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scatter3d", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_name.py b/packages/python/plotly/plotly/validators/scatter3d/_name.py new file mode 100644 index 00000000000..96d540e9225 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scatter3d", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_opacity.py b/packages/python/plotly/plotly/validators/scatter3d/_opacity.py new file mode 100644 index 00000000000..c46a4bd85bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatter3d", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_projection.py b/packages/python/plotly/plotly/validators/scatter3d/_projection.py new file mode 100644 index 00000000000..f9f45cbaf65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_projection.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="projection", parent_name="scatter3d", **kwargs): + super(ProjectionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Projection"), + data_docs=kwargs.pop( + "data_docs", + """ + x + :class:`plotly.graph_objects.scatter3d.projecti + on.X` instance or dict with compatible + properties + y + :class:`plotly.graph_objects.scatter3d.projecti + on.Y` instance or dict with compatible + properties + z + :class:`plotly.graph_objects.scatter3d.projecti + on.Z` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_scene.py b/packages/python/plotly/plotly/validators/scatter3d/_scene.py new file mode 100644 index 00000000000..bdf2528ec5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="scatter3d", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_showlegend.py b/packages/python/plotly/plotly/validators/scatter3d/_showlegend.py new file mode 100644 index 00000000000..ee956414f96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scatter3d", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_stream.py b/packages/python/plotly/plotly/validators/scatter3d/_stream.py new file mode 100644 index 00000000000..9345c09b263 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scatter3d", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_surfaceaxis.py b/packages/python/plotly/plotly/validators/scatter3d/_surfaceaxis.py new file mode 100644 index 00000000000..c6d03828a70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_surfaceaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SurfaceaxisValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="surfaceaxis", parent_name="scatter3d", **kwargs): + super(SurfaceaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [-1, 0, 1, 2]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_surfacecolor.py b/packages/python/plotly/plotly/validators/scatter3d/_surfacecolor.py new file mode 100644 index 00000000000..4fe62d033ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_surfacecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SurfacecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="surfacecolor", parent_name="scatter3d", **kwargs): + super(SurfacecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_text.py b/packages/python/plotly/plotly/validators/scatter3d/_text.py new file mode 100644 index 00000000000..355f917a363 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scatter3d", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_textfont.py b/packages/python/plotly/plotly/validators/scatter3d/_textfont.py new file mode 100644 index 00000000000..38b5b17571d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_textfont.py @@ -0,0 +1,43 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scatter3d", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_textposition.py b/packages/python/plotly/plotly/validators/scatter3d/_textposition.py new file mode 100644 index 00000000000..bac19626123 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_textposition.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="scatter3d", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scatter3d/_textpositionsrc.py new file mode 100644 index 00000000000..51d5e137bfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scatter3d", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_textsrc.py b/packages/python/plotly/plotly/validators/scatter3d/_textsrc.py new file mode 100644 index 00000000000..5c75e603231 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scatter3d", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_texttemplate.py b/packages/python/plotly/plotly/validators/scatter3d/_texttemplate.py new file mode 100644 index 00000000000..2b732daa4cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scatter3d", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scatter3d/_texttemplatesrc.py new file mode 100644 index 00000000000..c8521c4af68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatter3d", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_uid.py b/packages/python/plotly/plotly/validators/scatter3d/_uid.py new file mode 100644 index 00000000000..a00eda80d59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scatter3d", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_uirevision.py b/packages/python/plotly/plotly/validators/scatter3d/_uirevision.py new file mode 100644 index 00000000000..a0bc7c7aad9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scatter3d", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_visible.py b/packages/python/plotly/plotly/validators/scatter3d/_visible.py new file mode 100644 index 00000000000..4a79d60e4d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scatter3d", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_x.py b/packages/python/plotly/plotly/validators/scatter3d/_x.py new file mode 100644 index 00000000000..7e3647390f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="scatter3d", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_xcalendar.py b/packages/python/plotly/plotly/validators/scatter3d/_xcalendar.py new file mode 100644 index 00000000000..c1f5fe43cbb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="scatter3d", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_xsrc.py b/packages/python/plotly/plotly/validators/scatter3d/_xsrc.py new file mode 100644 index 00000000000..9818c470f5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="scatter3d", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_y.py b/packages/python/plotly/plotly/validators/scatter3d/_y.py new file mode 100644 index 00000000000..bc3a7b232fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="scatter3d", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_ycalendar.py b/packages/python/plotly/plotly/validators/scatter3d/_ycalendar.py new file mode 100644 index 00000000000..63654ba56b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="scatter3d", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_ysrc.py b/packages/python/plotly/plotly/validators/scatter3d/_ysrc.py new file mode 100644 index 00000000000..1853c85c2fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="scatter3d", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_z.py b/packages/python/plotly/plotly/validators/scatter3d/_z.py new file mode 100644 index 00000000000..405857d7ac1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="scatter3d", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_zcalendar.py b/packages/python/plotly/plotly/validators/scatter3d/_zcalendar.py new file mode 100644 index 00000000000..9ae45f862eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_zcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="zcalendar", parent_name="scatter3d", **kwargs): + super(ZcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/_zsrc.py b/packages/python/plotly/plotly/validators/scatter3d/_zsrc.py new file mode 100644 index 00000000000..b5033533b6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="scatter3d", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/__init__.py index ab0ca6cc4ff..6964063fb45 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/error_x/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/__init__.py @@ -1,235 +1,42 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter3d.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="scatter3d.error_x", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scatter3d.error_x", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scatter3d.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scatter3d.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scatter3d.error_x", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="scatter3d.error_x", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter3d.error_x", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scatter3d.error_x", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CopyZstyleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="copy_zstyle", parent_name="scatter3d.error_x", **kwargs - ): - super(CopyZstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter3d.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="scatter3d.error_x", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scatter3d.error_x", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scatter3d.error_x", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scatter3d.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._copy_zstyle import Copy_ZstyleValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_zstyle.Copy_ZstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_array.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_array.py new file mode 100644 index 00000000000..25ef79e5ecf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scatter3d.error_x", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminus.py new file mode 100644 index 00000000000..65d64fabf5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scatter3d.error_x", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminussrc.py new file mode 100644 index 00000000000..159dbff9da6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scatter3d.error_x", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_arraysrc.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_arraysrc.py new file mode 100644 index 00000000000..7fb4f0a1b5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="scatter3d.error_x", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_color.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_color.py new file mode 100644 index 00000000000..785d719ef70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter3d.error_x", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_copy_zstyle.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_copy_zstyle.py new file mode 100644 index 00000000000..d90aaaf5893 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_copy_zstyle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class Copy_ZstyleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="copy_zstyle", parent_name="scatter3d.error_x", **kwargs + ): + super(Copy_ZstyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_symmetric.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_symmetric.py new file mode 100644 index 00000000000..4c15267b887 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scatter3d.error_x", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_thickness.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_thickness.py new file mode 100644 index 00000000000..e156da11c08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter3d.error_x", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_traceref.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_traceref.py new file mode 100644 index 00000000000..ba0c19e93f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="scatter3d.error_x", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_tracerefminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_tracerefminus.py new file mode 100644 index 00000000000..f561b58a4e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scatter3d.error_x", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_type.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_type.py new file mode 100644 index 00000000000..e0f66a41fab --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scatter3d.error_x", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_value.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_value.py new file mode 100644 index 00000000000..020ff8c7d77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scatter3d.error_x", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_valueminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_valueminus.py new file mode 100644 index 00000000000..e0116a6b226 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scatter3d.error_x", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_visible.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_visible.py new file mode 100644 index 00000000000..77bfbea2457 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="scatter3d.error_x", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_x/_width.py b/packages/python/plotly/plotly/validators/scatter3d/error_x/_width.py new file mode 100644 index 00000000000..97fa13aa75b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_x/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter3d.error_x", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/__init__.py index d9ca5428436..6964063fb45 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/error_y/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/__init__.py @@ -1,235 +1,42 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter3d.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="scatter3d.error_y", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scatter3d.error_y", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scatter3d.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scatter3d.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scatter3d.error_y", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="scatter3d.error_y", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter3d.error_y", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scatter3d.error_y", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CopyZstyleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="copy_zstyle", parent_name="scatter3d.error_y", **kwargs - ): - super(CopyZstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter3d.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="scatter3d.error_y", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scatter3d.error_y", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scatter3d.error_y", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scatter3d.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._copy_zstyle import Copy_ZstyleValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_zstyle.Copy_ZstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_array.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_array.py new file mode 100644 index 00000000000..7fd9be649a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scatter3d.error_y", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_arrayminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_arrayminus.py new file mode 100644 index 00000000000..21d501d474e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scatter3d.error_y", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_arrayminussrc.py new file mode 100644 index 00000000000..3d2389ebcee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scatter3d.error_y", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_arraysrc.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_arraysrc.py new file mode 100644 index 00000000000..eb8367a5809 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="scatter3d.error_y", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_color.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_color.py new file mode 100644 index 00000000000..08bd3b1d4b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter3d.error_y", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_copy_zstyle.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_copy_zstyle.py new file mode 100644 index 00000000000..77d21b055da --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_copy_zstyle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class Copy_ZstyleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="copy_zstyle", parent_name="scatter3d.error_y", **kwargs + ): + super(Copy_ZstyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_symmetric.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_symmetric.py new file mode 100644 index 00000000000..913a9607f65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scatter3d.error_y", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_thickness.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_thickness.py new file mode 100644 index 00000000000..fe9d67a8ffa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter3d.error_y", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_traceref.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_traceref.py new file mode 100644 index 00000000000..791ffa8a94a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="scatter3d.error_y", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_tracerefminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_tracerefminus.py new file mode 100644 index 00000000000..09c888b4dc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scatter3d.error_y", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_type.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_type.py new file mode 100644 index 00000000000..23a8120c928 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scatter3d.error_y", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_value.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_value.py new file mode 100644 index 00000000000..9e1a965ca7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scatter3d.error_y", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_valueminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_valueminus.py new file mode 100644 index 00000000000..ebb2dc152f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scatter3d.error_y", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_visible.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_visible.py new file mode 100644 index 00000000000..8e09afc442a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="scatter3d.error_y", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_y/_width.py b/packages/python/plotly/plotly/validators/scatter3d/error_y/_width.py new file mode 100644 index 00000000000..f68da382fef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_y/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter3d.error_y", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/__init__.py index 408582ed547..0a508f0c655 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/error_z/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/__init__.py @@ -1,219 +1,40 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter3d.error_z", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="scatter3d.error_z", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scatter3d.error_z", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scatter3d.error_z", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scatter3d.error_z", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scatter3d.error_z", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="scatter3d.error_z", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter3d.error_z", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scatter3d.error_z", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter3d.error_z", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="scatter3d.error_z", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scatter3d.error_z", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scatter3d.error_z", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scatter3d.error_z", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_array.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_array.py new file mode 100644 index 00000000000..e69b2670e29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scatter3d.error_z", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_arrayminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_arrayminus.py new file mode 100644 index 00000000000..a5c9952cc98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scatter3d.error_z", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_arrayminussrc.py new file mode 100644 index 00000000000..0439b0a8e82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scatter3d.error_z", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_arraysrc.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_arraysrc.py new file mode 100644 index 00000000000..ed14bd7f251 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="scatter3d.error_z", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_color.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_color.py new file mode 100644 index 00000000000..4574deb5571 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter3d.error_z", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_symmetric.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_symmetric.py new file mode 100644 index 00000000000..4681c7925be --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scatter3d.error_z", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_thickness.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_thickness.py new file mode 100644 index 00000000000..4d24b928301 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter3d.error_z", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_traceref.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_traceref.py new file mode 100644 index 00000000000..34e6c5d8863 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="scatter3d.error_z", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_tracerefminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_tracerefminus.py new file mode 100644 index 00000000000..c5f0277f469 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scatter3d.error_z", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_type.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_type.py new file mode 100644 index 00000000000..94d8115f9f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scatter3d.error_z", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_value.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_value.py new file mode 100644 index 00000000000..abff1b2fd1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scatter3d.error_z", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_valueminus.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_valueminus.py new file mode 100644 index 00000000000..9b04b85dc00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scatter3d.error_z", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_visible.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_visible.py new file mode 100644 index 00000000000..7b61466c0d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="scatter3d.error_z", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/error_z/_width.py b/packages/python/plotly/plotly/validators/scatter3d/error_z/_width.py new file mode 100644 index 00000000000..706af53a6e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/error_z/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter3d.error_z", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/__init__.py index dabd625dbe0..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/__init__.py @@ -1,182 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scatter3d.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_align.py new file mode 100644 index 00000000000..edb5df70260 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..8c974a7ac26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..e02de9d874d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..fa0c29e1911 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..fe9c4f872fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..71561ed8816 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_font.py new file mode 100644 index 00000000000..82115e78a0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_namelength.py new file mode 100644 index 00000000000..c4f58c61747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..eaacd78f8bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="scatter3d.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/__init__.py index 57b0ee227df..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatter3d.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatter3d.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scatter3d.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatter3d.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter3d.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter3d.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_color.py new file mode 100644 index 00000000000..18842c6625a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter3d.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..01f0272a2b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter3d.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_family.py new file mode 100644 index 00000000000..9bd61fe5a90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatter3d.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b235c8d3088 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scatter3d.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_size.py new file mode 100644 index 00000000000..736ec5bf856 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatter3d.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..3be5efa4a75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatter3d.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/line/__init__.py index 05da3181436..16deedabd53 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/line/__init__.py @@ -1,430 +1,40 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatter3d.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="scatter3d.line", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatter3d.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="dash", parent_name="scatter3d.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="scatter3d.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatter3d.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="scatter3d.line", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter3d.line.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.line.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scatter3d.line.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.line.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="scatter3d.line", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter3d.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "scatter3d.line.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scatter3d.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scatter3d.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scatter3d.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="scatter3d.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scatter3d.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._dash import DashValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._dash.DashValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatter3d/line/_autocolorscale.py new file mode 100644 index 00000000000..0132ddba194 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scatter3d.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_cauto.py b/packages/python/plotly/plotly/validators/scatter3d/line/_cauto.py new file mode 100644 index 00000000000..cb82a9e727e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="scatter3d.line", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_cmax.py b/packages/python/plotly/plotly/validators/scatter3d/line/_cmax.py new file mode 100644 index 00000000000..dc30ac62d52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scatter3d.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_cmid.py b/packages/python/plotly/plotly/validators/scatter3d/line/_cmid.py new file mode 100644 index 00000000000..13fde43de52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scatter3d.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_cmin.py b/packages/python/plotly/plotly/validators/scatter3d/line/_cmin.py new file mode 100644 index 00000000000..cfa97ae171b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scatter3d.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_color.py b/packages/python/plotly/plotly/validators/scatter3d/line/_color.py new file mode 100644 index 00000000000..81fc2d6fd9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter3d.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "scatter3d.line.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scatter3d/line/_coloraxis.py new file mode 100644 index 00000000000..34c4bbe9db7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="scatter3d.line", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_colorbar.py b/packages/python/plotly/plotly/validators/scatter3d/line/_colorbar.py new file mode 100644 index 00000000000..1522dd9f946 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="scatter3d.line", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + 3d.line.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatter3d.line.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + scatter3d.line.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.line.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scatter3d.line.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.line.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_colorscale.py b/packages/python/plotly/plotly/validators/scatter3d/line/_colorscale.py new file mode 100644 index 00000000000..828830f5e01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatter3d.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/line/_colorsrc.py new file mode 100644 index 00000000000..233ad38f55a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="scatter3d.line", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_dash.py b/packages/python/plotly/plotly/validators/scatter3d/line/_dash.py new file mode 100644 index 00000000000..841e67a4d3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="dash", parent_name="scatter3d.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_reversescale.py b/packages/python/plotly/plotly/validators/scatter3d/line/_reversescale.py new file mode 100644 index 00000000000..ebe2bd93dd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatter3d.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_showscale.py b/packages/python/plotly/plotly/validators/scatter3d/line/_showscale.py new file mode 100644 index 00000000000..f1e036934c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="scatter3d.line", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/_width.py b/packages/python/plotly/plotly/validators/scatter3d/line/_width.py new file mode 100644 index 00000000000..110ed8d0a5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatter3d.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/__init__.py index 14bde0d253b..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/__init__.py @@ -1,798 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scatter3d.line.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatter3d.line.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_bgcolor.py new file mode 100644 index 00000000000..e2941264d29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_bordercolor.py new file mode 100644 index 00000000000..e65ecc9c5e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_borderwidth.py new file mode 100644 index 00000000000..e3957e6bc45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_dtick.py new file mode 100644 index 00000000000..2855d9d2fc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_exponentformat.py new file mode 100644 index 00000000000..b9136caadda --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_len.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_len.py new file mode 100644 index 00000000000..4c3ff86516c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_lenmode.py new file mode 100644 index 00000000000..117deef8c6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_nticks.py new file mode 100644 index 00000000000..02665f89c6a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..2b9763bc70e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..2a38e027dd9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_separatethousands.py new file mode 100644 index 00000000000..87267de43cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showexponent.py new file mode 100644 index 00000000000..0b656e4a549 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showticklabels.py new file mode 100644 index 00000000000..15374bca7a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..e969e5a9210 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..ce3c17ddd48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_thickness.py new file mode 100644 index 00000000000..19292569f25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..842e6c87db9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tick0.py new file mode 100644 index 00000000000..ff2b49f1a77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickangle.py new file mode 100644 index 00000000000..9829718a0fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickcolor.py new file mode 100644 index 00000000000..0fb55627fcb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickfont.py new file mode 100644 index 00000000000..227838e9781 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformat.py new file mode 100644 index 00000000000..c3cc39a0945 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..20899016411 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..1aeca386844 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scatter3d.line.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticklen.py new file mode 100644 index 00000000000..cb302067c89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickmode.py new file mode 100644 index 00000000000..44e2b80369b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickprefix.py new file mode 100644 index 00000000000..890300ebdd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticks.py new file mode 100644 index 00000000000..f2e42a655c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..2a925d17d64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticktext.py new file mode 100644 index 00000000000..7e371e8affb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..884526f06f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickvals.py new file mode 100644 index 00000000000..3ce8162747e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..8662d0ca1f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickwidth.py new file mode 100644 index 00000000000..a349dbb3eaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_title.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_title.py new file mode 100644 index 00000000000..e96d6ffeead --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_x.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_x.py new file mode 100644 index 00000000000..4cd57b59c5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_xanchor.py new file mode 100644 index 00000000000..612aefc0838 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_xpad.py new file mode 100644 index 00000000000..7d12ce428a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_y.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_y.py new file mode 100644 index 00000000000..c97ba01a29e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_yanchor.py new file mode 100644 index 00000000000..e49a0b461e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ypad.py new file mode 100644 index 00000000000..c5b1553a648 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scatter3d.line.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py index 6ccc9caf32b..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatter3d.line.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatter3d.line.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatter3d.line.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..5abf8ea8cd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatter3d.line.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..df08a1cc6d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatter3d.line.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..e8f6ec2886f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatter3d.line.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py index f8dd736ab4d..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scatter3d.line.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scatter3d.line.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scatter3d.line.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scatter3d.line.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scatter3d.line.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..a8231a56c5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scatter3d.line.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..8b611e7754b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scatter3d.line.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..e5589a97289 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scatter3d.line.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..8bcb4f3287f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scatter3d.line.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..e28c941a954 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scatter3d.line.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/__init__.py index bf6ce5fb974..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="scatter3d.line.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="scatter3d.line.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scatter3d.line.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_font.py new file mode 100644 index 00000000000..8033e0fc3d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scatter3d.line.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_side.py new file mode 100644 index 00000000000..04bfcc5608c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="scatter3d.line.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_text.py new file mode 100644 index 00000000000..c81668ef8b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="scatter3d.line.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py index 6b8db31d7a4..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatter3d.line.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatter3d.line.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatter3d.line.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_color.py new file mode 100644 index 00000000000..1a4cb42464a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatter3d.line.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_family.py new file mode 100644 index 00000000000..d9dba40af26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatter3d.line.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_size.py new file mode 100644 index 00000000000..3597d50eac8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatter3d.line.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/__init__.py index 5acf3f994d8..4f1ac906e3e 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/__init__.py @@ -1,648 +1,54 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scatter3d.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="scatter3d.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "circle", - "circle-open", - "square", - "square-open", - "diamond", - "diamond-open", - "cross", - "x", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="scatter3d.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scatter3d.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizemin", parent_name="scatter3d.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scatter3d.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scatter3d.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatter3d.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatter3d.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatter3d.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter3d.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatter3d.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scatter3d.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scatter3d.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.marker.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scatter3d.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatter3d.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatter3d.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter3d.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatter3d.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scatter3d.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scatter3d.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scatter3d.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="scatter3d.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scatter3d.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_autocolorscale.py new file mode 100644 index 00000000000..c8e3c575ed1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scatter3d.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_cauto.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_cauto.py new file mode 100644 index 00000000000..61b9b815ead --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="scatter3d.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_cmax.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_cmax.py new file mode 100644 index 00000000000..8b89ea4ba37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scatter3d.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_cmid.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_cmid.py new file mode 100644 index 00000000000..740983d49d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scatter3d.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_cmin.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_cmin.py new file mode 100644 index 00000000000..1336a7240b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scatter3d.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_color.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_color.py new file mode 100644 index 00000000000..6eb6b4ce81e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_color.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter3d.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatter3d.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_coloraxis.py new file mode 100644 index 00000000000..7c40942d976 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatter3d.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_colorbar.py new file mode 100644 index 00000000000..943bc73e346 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scatter3d.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + 3d.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatter3d.marker.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + scatter3d.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatter3d.marker.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scatter3d.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatter3d.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_colorscale.py new file mode 100644 index 00000000000..7c0eed77313 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatter3d.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_colorsrc.py new file mode 100644 index 00000000000..99afa8e9b0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter3d.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_line.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_line.py new file mode 100644 index 00000000000..2534fa87463 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_line.py @@ -0,0 +1,101 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatter3d.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_opacity.py new file mode 100644 index 00000000000..dcf698d2a80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatter3d.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_reversescale.py new file mode 100644 index 00000000000..09943a375fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatter3d.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_showscale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_showscale.py new file mode 100644 index 00000000000..70b52f3e215 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scatter3d.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_size.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_size.py new file mode 100644 index 00000000000..c8dde1bce18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scatter3d.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizemin.py new file mode 100644 index 00000000000..02a2f63ecc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizemin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizemin", parent_name="scatter3d.marker", **kwargs): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizemode.py new file mode 100644 index 00000000000..6a6717677c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scatter3d.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizeref.py new file mode 100644 index 00000000000..63ce52961b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizeref.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizesrc.py new file mode 100644 index 00000000000..ece4128a82a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="scatter3d.marker", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_symbol.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_symbol.py new file mode 100644 index 00000000000..81de82d3fea --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_symbol.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="scatter3d.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "circle", + "circle-open", + "square", + "square-open", + "diamond", + "diamond-open", + "cross", + "x", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scatter3d/marker/_symbolsrc.py new file mode 100644 index 00000000000..fb68228fca9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scatter3d.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/__init__.py index 06a69c4ec4b..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/__init__.py @@ -1,819 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scatter3d.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatter3d.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..53da6d50aad --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..c9ca559e879 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..a80daa45e92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..0c97bfaa079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..c7a9a5db6d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_len.py new file mode 100644 index 00000000000..a10b9c2e7b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..7bcda78bd9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..5897373c518 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..d768b681e00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..d27ea51c2e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..1f3d3d7bc96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..192937f695a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..6341af107d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..9d8dffdc18e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..5c0701450d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..61c75577d62 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..46e6ee36625 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..d10b272ab6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..cacacf7a3e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..5ede8a89c0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..50a607d684d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..eda4666cfa6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..4a145373ffc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..d0ebeb5060f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..9222b35a147 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..99c965e4e28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..fa33e8a6729 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..481830a65bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..7f8fbcf5d41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..49008f737b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..9f2ad33c854 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..6545ac2e2cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..04077389473 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scatter3d.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..4d66f9c9343 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_title.py new file mode 100644 index 00000000000..c6df04db3e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_x.py new file mode 100644 index 00000000000..dba6f390d70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..ae18dd9af53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..94ec9728d0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_y.py new file mode 100644 index 00000000000..3b685c5d393 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..4532f3293e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..b5dc3f4294a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scatter3d.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py index 6da45d3a4a5..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatter3d.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatter3d.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatter3d.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..881d54de64e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatter3d.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..439a7151be9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatter3d.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..79b0a9c2941 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatter3d.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py index 2e87ace6d74..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scatter3d.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scatter3d.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scatter3d.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scatter3d.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scatter3d.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..1a3189797b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scatter3d.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..6e5a1eaaf89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scatter3d.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..ed2cb11430d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scatter3d.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..24d337c9a94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scatter3d.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..167690a6534 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scatter3d.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/__init__.py index 6d7ca7782f2..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scatter3d.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scatter3d.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scatter3d.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..9e68df2d64a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scatter3d.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..e1ddfd4290b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scatter3d.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..f984063cdff --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scatter3d.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py index 65200ab7146..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatter3d.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatter3d.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatter3d.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..d772ab1934d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatter3d.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..9b6dc79dcfc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatter3d.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..b13c8980aca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatter3d.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/__init__.py index 65c7ee7172a..819b114137b 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/__init__.py @@ -1,191 +1,34 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatter3d.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatter3d.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter3d.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatter3d.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatter3d.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatter3d.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatter3d.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scatter3d.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scatter3d.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scatter3d.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatter3d.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scatter3d.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..e4a467268d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scatter3d.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cauto.py new file mode 100644 index 00000000000..35de5a47f80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatter3d.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmax.py new file mode 100644 index 00000000000..122e0869d38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scatter3d.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmid.py new file mode 100644 index 00000000000..7ea0afbd8da --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scatter3d.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmin.py new file mode 100644 index 00000000000..56b285723b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scatter3d.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_color.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_color.py new file mode 100644 index 00000000000..361ec19d9a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatter3d.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatter3d.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_coloraxis.py new file mode 100644 index 00000000000..bd2b10affd6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatter3d.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_colorscale.py new file mode 100644 index 00000000000..767603d09ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatter3d.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_colorsrc.py new file mode 100644 index 00000000000..ae44796885f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter3d.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_reversescale.py new file mode 100644 index 00000000000..78f906fce2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatter3d.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/marker/line/_width.py b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_width.py new file mode 100644 index 00000000000..4508750a7d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatter3d.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/projection/__init__.py index f079014a014..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/projection/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/__init__.py @@ -1,76 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="z", parent_name="scatter3d.projection", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Z"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the z axis. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="y", parent_name="scatter3d.projection", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Y"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the y axis. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="x", parent_name="scatter3d.projection", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "X"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the x axis. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/_x.py b/packages/python/plotly/plotly/validators/scatter3d/projection/_x.py new file mode 100644 index 00000000000..ddd6ba9c259 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/_x.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="x", parent_name="scatter3d.projection", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "X"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of + the projection marker points. + show + Sets whether or not projections are shown along + the x axis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/_y.py b/packages/python/plotly/plotly/validators/scatter3d/projection/_y.py new file mode 100644 index 00000000000..17798dc4527 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/_y.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="y", parent_name="scatter3d.projection", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Y"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of + the projection marker points. + show + Sets whether or not projections are shown along + the y axis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/_z.py b/packages/python/plotly/plotly/validators/scatter3d/projection/_z.py new file mode 100644 index 00000000000..cda3c7699d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/_z.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="z", parent_name="scatter3d.projection", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Z"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the projection color. + scale + Sets the scale factor determining the size of + the projection marker points. + show + Sets whether or not projections are shown along + the z axis. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/x/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/projection/x/__init__.py index 0a0f0641a7f..133300bffd7 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/projection/x/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/x/__init__.py @@ -1,50 +1,18 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="show", parent_name="scatter3d.projection.x", **kwargs - ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="scale", parent_name="scatter3d.projection.x", **kwargs - ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatter3d.projection.x", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._scale import ScaleValidator + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._scale.ScaleValidator", + "._opacity.OpacityValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/x/_opacity.py b/packages/python/plotly/plotly/validators/scatter3d/projection/x/_opacity.py new file mode 100644 index 00000000000..29536e0bbcb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/x/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatter3d.projection.x", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/x/_scale.py b/packages/python/plotly/plotly/validators/scatter3d/projection/x/_scale.py new file mode 100644 index 00000000000..6003e4d8d8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/x/_scale.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="scale", parent_name="scatter3d.projection.x", **kwargs + ): + super(ScaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/x/_show.py b/packages/python/plotly/plotly/validators/scatter3d/projection/x/_show.py new file mode 100644 index 00000000000..0f8f333c23e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/x/_show.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="show", parent_name="scatter3d.projection.x", **kwargs + ): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/y/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/projection/y/__init__.py index cb4fb552a0e..133300bffd7 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/projection/y/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/y/__init__.py @@ -1,50 +1,18 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="show", parent_name="scatter3d.projection.y", **kwargs - ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="scale", parent_name="scatter3d.projection.y", **kwargs - ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatter3d.projection.y", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._scale import ScaleValidator + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._scale.ScaleValidator", + "._opacity.OpacityValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/y/_opacity.py b/packages/python/plotly/plotly/validators/scatter3d/projection/y/_opacity.py new file mode 100644 index 00000000000..1e02a3e7efd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/y/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatter3d.projection.y", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/y/_scale.py b/packages/python/plotly/plotly/validators/scatter3d/projection/y/_scale.py new file mode 100644 index 00000000000..f758d984167 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/y/_scale.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="scale", parent_name="scatter3d.projection.y", **kwargs + ): + super(ScaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/y/_show.py b/packages/python/plotly/plotly/validators/scatter3d/projection/y/_show.py new file mode 100644 index 00000000000..0a4516bd71e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/y/_show.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="show", parent_name="scatter3d.projection.y", **kwargs + ): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/z/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/projection/z/__init__.py index f60cf53418a..133300bffd7 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/projection/z/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/z/__init__.py @@ -1,50 +1,18 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="show", parent_name="scatter3d.projection.z", **kwargs - ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="scale", parent_name="scatter3d.projection.z", **kwargs - ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatter3d.projection.z", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._scale import ScaleValidator + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._scale.ScaleValidator", + "._opacity.OpacityValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/z/_opacity.py b/packages/python/plotly/plotly/validators/scatter3d/projection/z/_opacity.py new file mode 100644 index 00000000000..f01040990b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/z/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatter3d.projection.z", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/z/_scale.py b/packages/python/plotly/plotly/validators/scatter3d/projection/z/_scale.py new file mode 100644 index 00000000000..0a13c1a2d2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/z/_scale.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="scale", parent_name="scatter3d.projection.z", **kwargs + ): + super(ScaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/projection/z/_show.py b/packages/python/plotly/plotly/validators/scatter3d/projection/z/_show.py new file mode 100644 index 00000000000..ba40ba4e762 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/projection/z/_show.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="show", parent_name="scatter3d.projection.z", **kwargs + ): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/stream/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/stream/__init__.py index 074cb58bb7f..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="scatter3d.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scatter3d.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scatter3d/stream/_maxpoints.py new file mode 100644 index 00000000000..8b8aef32e14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scatter3d.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/stream/_token.py b/packages/python/plotly/plotly/validators/scatter3d/stream/_token.py new file mode 100644 index 00000000000..909810292e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="scatter3d.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/textfont/__init__.py index e9863f6a725..dbc0e04f6d2 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/textfont/__init__.py @@ -1,80 +1,22 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatter3d.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scatter3d.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatter3d.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatter3d.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatter3d.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/textfont/_color.py b/packages/python/plotly/plotly/validators/scatter3d/textfont/_color.py new file mode 100644 index 00000000000..2eb87e90bd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatter3d.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scatter3d/textfont/_colorsrc.py new file mode 100644 index 00000000000..fa0a720cb94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatter3d.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/textfont/_family.py b/packages/python/plotly/plotly/validators/scatter3d/textfont/_family.py new file mode 100644 index 00000000000..3322c6f07fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatter3d.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/textfont/_size.py b/packages/python/plotly/plotly/validators/scatter3d/textfont/_size.py new file mode 100644 index 00000000000..a1f61f00881 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scatter3d.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatter3d/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scatter3d/textfont/_sizesrc.py new file mode 100644 index 00000000000..8f1ff7461cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatter3d/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatter3d.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/__init__.py index ac83dc145d1..a57dd396657 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/__init__.py @@ -1,952 +1,102 @@ -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="scattercarpet", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="scattercarpet", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scattercarpet", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="scattercarpet", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattercarpet.unse - lected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.unse - lected.Textfont` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scattercarpet", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scattercarpet", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scattercarpet", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="texttemplate", parent_name="scattercarpet", **kwargs - ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scattercarpet", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scattercarpet", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="textposition", parent_name="scattercarpet", **kwargs - ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scattercarpet", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scattercarpet", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scattercarpet", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scattercarpet", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="scattercarpet", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scattercarpet", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattercarpet.sele - cted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.sele - cted.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scattercarpet", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scattercarpet", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scattercarpet", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scattercarpet", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scattercarpet", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scattercarpet", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattercarpet.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scattercarpet.mark - er.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattercarpet.mark - er.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scattercarpet", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="scattercarpet", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scattercarpet", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scattercarpet", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="scattercarpet", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scattercarpet", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scattercarpet", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="scattercarpet", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoveron", parent_name="scattercarpet", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - flags=kwargs.pop("flags", ["points", "fills"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scattercarpet", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="scattercarpet", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scattercarpet", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["a", "b", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scattercarpet", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scattercarpet", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "toself", "tonext"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="scattercarpet", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scattercarpet", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="connectgaps", parent_name="scattercarpet", **kwargs - ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CarpetValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="carpet", parent_name="scattercarpet", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="bsrc", parent_name="scattercarpet", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="b", parent_name="scattercarpet", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="asrc", parent_name="scattercarpet", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="a", parent_name="scattercarpet", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yaxis import YaxisValidator + from ._xaxis import XaxisValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator + from ._carpet import CarpetValidator + from ._bsrc import BsrcValidator + from ._b import BValidator + from ._asrc import AsrcValidator + from ._a import AValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._carpet.CarpetValidator", + "._bsrc.BsrcValidator", + "._b.BValidator", + "._asrc.AsrcValidator", + "._a.AValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_a.py b/packages/python/plotly/plotly/validators/scattercarpet/_a.py new file mode 100644 index 00000000000..5aa31ee1018 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_a.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="a", parent_name="scattercarpet", **kwargs): + super(AValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_asrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_asrc.py new file mode 100644 index 00000000000..007c2996c55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_asrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="asrc", parent_name="scattercarpet", **kwargs): + super(AsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_b.py b/packages/python/plotly/plotly/validators/scattercarpet/_b.py new file mode 100644 index 00000000000..ae5c3db4974 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_b.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="b", parent_name="scattercarpet", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_bsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_bsrc.py new file mode 100644 index 00000000000..b6a4091a8ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_bsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="bsrc", parent_name="scattercarpet", **kwargs): + super(BsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_carpet.py b/packages/python/plotly/plotly/validators/scattercarpet/_carpet.py new file mode 100644 index 00000000000..a9ebb42e49d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_carpet.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CarpetValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="carpet", parent_name="scattercarpet", **kwargs): + super(CarpetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_connectgaps.py b/packages/python/plotly/plotly/validators/scattercarpet/_connectgaps.py new file mode 100644 index 00000000000..5ed18868f59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_connectgaps.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="connectgaps", parent_name="scattercarpet", **kwargs + ): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_customdata.py b/packages/python/plotly/plotly/validators/scattercarpet/_customdata.py new file mode 100644 index 00000000000..7835d5b7951 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scattercarpet", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_customdatasrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_customdatasrc.py new file mode 100644 index 00000000000..2907a40a045 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="scattercarpet", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_fill.py b/packages/python/plotly/plotly/validators/scattercarpet/_fill.py new file mode 100644 index 00000000000..9aa5eed5cc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_fill.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scattercarpet", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "toself", "tonext"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_fillcolor.py b/packages/python/plotly/plotly/validators/scattercarpet/_fillcolor.py new file mode 100644 index 00000000000..d3f67232521 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scattercarpet", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hoverinfo.py b/packages/python/plotly/plotly/validators/scattercarpet/_hoverinfo.py new file mode 100644 index 00000000000..1557dfec029 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scattercarpet", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["a", "b", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_hoverinfosrc.py new file mode 100644 index 00000000000..7a0ab33305d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="scattercarpet", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hoverlabel.py b/packages/python/plotly/plotly/validators/scattercarpet/_hoverlabel.py new file mode 100644 index 00000000000..52161c12469 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scattercarpet", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hoveron.py b/packages/python/plotly/plotly/validators/scattercarpet/_hoveron.py new file mode 100644 index 00000000000..1b13d0d1223 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hoveron.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoveron", parent_name="scattercarpet", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + flags=kwargs.pop("flags", ["points", "fills"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hovertemplate.py b/packages/python/plotly/plotly/validators/scattercarpet/_hovertemplate.py new file mode 100644 index 00000000000..d86b5de5852 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="scattercarpet", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_hovertemplatesrc.py new file mode 100644 index 00000000000..e9a14d9b81a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scattercarpet", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hovertext.py b/packages/python/plotly/plotly/validators/scattercarpet/_hovertext.py new file mode 100644 index 00000000000..c53f35cb0af --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scattercarpet", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_hovertextsrc.py new file mode 100644 index 00000000000..0a80e2b5b2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="scattercarpet", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_ids.py b/packages/python/plotly/plotly/validators/scattercarpet/_ids.py new file mode 100644 index 00000000000..6466935ccc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scattercarpet", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_idssrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_idssrc.py new file mode 100644 index 00000000000..e0f36237c1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scattercarpet", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_legendgroup.py b/packages/python/plotly/plotly/validators/scattercarpet/_legendgroup.py new file mode 100644 index 00000000000..529e933ff01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="scattercarpet", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_line.py b/packages/python/plotly/plotly/validators/scattercarpet/_line.py new file mode 100644 index 00000000000..6aedfe8c437 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_line.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scattercarpet", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_marker.py b/packages/python/plotly/plotly/validators/scattercarpet/_marker.py new file mode 100644 index 00000000000..720bdb8cc77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_marker.py @@ -0,0 +1,147 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scattercarpet", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattercarpet.mark + er.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scattercarpet.mark + er.Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scattercarpet.mark + er.Line` instance or dict with compatible + properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_meta.py b/packages/python/plotly/plotly/validators/scattercarpet/_meta.py new file mode 100644 index 00000000000..295c3282b60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scattercarpet", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_metasrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_metasrc.py new file mode 100644 index 00000000000..92f8ca92253 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scattercarpet", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_mode.py b/packages/python/plotly/plotly/validators/scattercarpet/_mode.py new file mode 100644 index 00000000000..543611ecedd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scattercarpet", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_name.py b/packages/python/plotly/plotly/validators/scattercarpet/_name.py new file mode 100644 index 00000000000..0129fddcf3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scattercarpet", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_opacity.py b/packages/python/plotly/plotly/validators/scattercarpet/_opacity.py new file mode 100644 index 00000000000..e174b545066 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scattercarpet", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_selected.py b/packages/python/plotly/plotly/validators/scattercarpet/_selected.py new file mode 100644 index 00000000000..60d1417a943 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scattercarpet", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattercarpet.sele + cted.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattercarpet.sele + cted.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_selectedpoints.py b/packages/python/plotly/plotly/validators/scattercarpet/_selectedpoints.py new file mode 100644 index 00000000000..11af7ba82e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="scattercarpet", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_showlegend.py b/packages/python/plotly/plotly/validators/scattercarpet/_showlegend.py new file mode 100644 index 00000000000..3f25c5ff2d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scattercarpet", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_stream.py b/packages/python/plotly/plotly/validators/scattercarpet/_stream.py new file mode 100644 index 00000000000..33226055e14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scattercarpet", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_text.py b/packages/python/plotly/plotly/validators/scattercarpet/_text.py new file mode 100644 index 00000000000..085cc3e2677 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scattercarpet", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_textfont.py b/packages/python/plotly/plotly/validators/scattercarpet/_textfont.py new file mode 100644 index 00000000000..982507db605 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scattercarpet", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_textposition.py b/packages/python/plotly/plotly/validators/scattercarpet/_textposition.py new file mode 100644 index 00000000000..7152c068cbe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_textposition.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="textposition", parent_name="scattercarpet", **kwargs + ): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_textpositionsrc.py new file mode 100644 index 00000000000..375e10c6305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scattercarpet", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_textsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_textsrc.py new file mode 100644 index 00000000000..e160dfa350a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scattercarpet", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_texttemplate.py b/packages/python/plotly/plotly/validators/scattercarpet/_texttemplate.py new file mode 100644 index 00000000000..3bb44e04486 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_texttemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scattercarpet", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scattercarpet/_texttemplatesrc.py new file mode 100644 index 00000000000..8378f1349bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattercarpet", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_uid.py b/packages/python/plotly/plotly/validators/scattercarpet/_uid.py new file mode 100644 index 00000000000..5611bb0832b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scattercarpet", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_uirevision.py b/packages/python/plotly/plotly/validators/scattercarpet/_uirevision.py new file mode 100644 index 00000000000..466ee00f4d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scattercarpet", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_unselected.py b/packages/python/plotly/plotly/validators/scattercarpet/_unselected.py new file mode 100644 index 00000000000..7679d16b49c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="scattercarpet", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattercarpet.unse + lected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattercarpet.unse + lected.Textfont` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_visible.py b/packages/python/plotly/plotly/validators/scattercarpet/_visible.py new file mode 100644 index 00000000000..f7ff4421e76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scattercarpet", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_xaxis.py b/packages/python/plotly/plotly/validators/scattercarpet/_xaxis.py new file mode 100644 index 00000000000..2748cd56ac6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="scattercarpet", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/_yaxis.py b/packages/python/plotly/plotly/validators/scattercarpet/_yaxis.py new file mode 100644 index 00000000000..a807243244e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="scattercarpet", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/__init__.py index b8d61ecf765..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/__init__.py @@ -1,191 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="scattercarpet.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scattercarpet.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scattercarpet.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="scattercarpet.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scattercarpet.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scattercarpet.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scattercarpet.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scattercarpet.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scattercarpet.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_align.py new file mode 100644 index 00000000000..c5e592d4bf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scattercarpet.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..8c5d52d9404 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scattercarpet.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..45bc498e273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scattercarpet.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..45907650de2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scattercarpet.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..eedab3d43fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scattercarpet.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..23b61c96d30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="scattercarpet.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_font.py new file mode 100644 index 00000000000..8b552a6f769 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scattercarpet.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_namelength.py new file mode 100644 index 00000000000..064ce394bee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scattercarpet.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..8b86a3cfe9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="scattercarpet.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/__init__.py index 8c0611c0568..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/__init__.py @@ -1,112 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="scattercarpet.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattercarpet.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="scattercarpet.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattercarpet.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scattercarpet.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattercarpet.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_color.py new file mode 100644 index 00000000000..6076cef6c15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattercarpet.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..c52022cae58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scattercarpet.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_family.py new file mode 100644 index 00000000000..f49bd78a3e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattercarpet.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..7f58b7edb92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="scattercarpet.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_size.py new file mode 100644 index 00000000000..520d968101f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattercarpet.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..2a0a0c4f40d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="scattercarpet.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/line/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/line/__init__.py index fccd7393f58..73e814e94f3 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/line/__init__.py @@ -1,77 +1,22 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scattercarpet.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="smoothing", parent_name="scattercarpet.line", **kwargs - ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="shape", parent_name="scattercarpet.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["linear", "spline"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="scattercarpet.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattercarpet.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._shape import ShapeValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/line/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/line/_color.py new file mode 100644 index 00000000000..7a0853cf98d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattercarpet.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/line/_dash.py b/packages/python/plotly/plotly/validators/scattercarpet/line/_dash.py new file mode 100644 index 00000000000..3368c3418c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="scattercarpet.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/line/_shape.py b/packages/python/plotly/plotly/validators/scattercarpet/line/_shape.py new file mode 100644 index 00000000000..c61ca6aa62a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/line/_shape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="shape", parent_name="scattercarpet.line", **kwargs): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["linear", "spline"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/line/_smoothing.py b/packages/python/plotly/plotly/validators/scattercarpet/line/_smoothing.py new file mode 100644 index 00000000000..dad431b7668 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/line/_smoothing.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="smoothing", parent_name="scattercarpet.line", **kwargs + ): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/line/_width.py b/packages/python/plotly/plotly/validators/scattercarpet/line/_width.py new file mode 100644 index 00000000000..4dc0f473328 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scattercarpet.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/__init__.py index 5804f176674..bcd2242a57a 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/__init__.py @@ -1,1017 +1,60 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scattercarpet.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="symbol", parent_name="scattercarpet.marker", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattercarpet.marker", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizeref", parent_name="scattercarpet.marker", **kwargs - ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="scattercarpet.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattercarpet.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scattercarpet.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scattercarpet.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scattercarpet.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scattercarpet.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxdisplayed", parent_name="scattercarpet.marker", **kwargs - ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="scattercarpet.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="gradient", parent_name="scattercarpet.marker", **kwargs - ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Gradient"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattercarpet.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scattercarpet.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scattercarpet.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - carpet.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattercarpet.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattercarpet.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattercarpet.mark - er.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scattercarpet.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattercarpet.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattercarpet.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattercarpet.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattercarpet.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scattercarpet.marker", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scattercarpet.marker", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scattercarpet.marker", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scattercarpet.marker", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scattercarpet.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._maxdisplayed import MaxdisplayedValidator + from ._line import LineValidator + from ._gradient import GradientValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_autocolorscale.py new file mode 100644 index 00000000000..6907d55337f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scattercarpet.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_cauto.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cauto.py new file mode 100644 index 00000000000..28fec680fb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scattercarpet.marker", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmax.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmax.py new file mode 100644 index 00000000000..3edc94ac7b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scattercarpet.marker", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmid.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmid.py new file mode 100644 index 00000000000..7a172a3f7d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scattercarpet.marker", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmin.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmin.py new file mode 100644 index 00000000000..9b63451e464 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scattercarpet.marker", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_color.py new file mode 100644 index 00000000000..297c1609768 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattercarpet.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattercarpet.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_coloraxis.py new file mode 100644 index 00000000000..c422bfa37e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattercarpet.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorbar.py new file mode 100644 index 00000000000..0d801c6dc11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scattercarpet.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + carpet.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattercarpet.marker.colorbar.tickformatstopd + efaults), sets the default property values to + use for elements of + scattercarpet.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattercarpet.mark + er.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scattercarpet.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattercarpet.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorscale.py new file mode 100644 index 00000000000..385fb69dcb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scattercarpet.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorsrc.py new file mode 100644 index 00000000000..ae0f2b5f63e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattercarpet.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_gradient.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_gradient.py new file mode 100644 index 00000000000..be1e6bb704e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_gradient.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="gradient", parent_name="scattercarpet.marker", **kwargs + ): + super(GradientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Gradient"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_line.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_line.py new file mode 100644 index 00000000000..d5fc5871484 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_line.py @@ -0,0 +1,106 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="scattercarpet.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_maxdisplayed.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_maxdisplayed.py new file mode 100644 index 00000000000..762d5b88e07 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_maxdisplayed.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxdisplayed", parent_name="scattercarpet.marker", **kwargs + ): + super(MaxdisplayedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_opacity.py new file mode 100644 index 00000000000..da625eb8036 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scattercarpet.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_opacitysrc.py new file mode 100644 index 00000000000..04a0a1d1bfb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scattercarpet.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_reversescale.py new file mode 100644 index 00000000000..fb52f94eebe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scattercarpet.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_showscale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_showscale.py new file mode 100644 index 00000000000..bb42e672595 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scattercarpet.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_size.py new file mode 100644 index 00000000000..47b9f1d7b9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattercarpet.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemin.py new file mode 100644 index 00000000000..e2453b981f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="scattercarpet.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py new file mode 100644 index 00000000000..4535bd3a12b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizeref.py new file mode 100644 index 00000000000..0760df9d8d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizeref.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizeref", parent_name="scattercarpet.marker", **kwargs + ): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizesrc.py new file mode 100644 index 00000000000..75bc2519460 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattercarpet.marker", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_symbol.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_symbol.py new file mode 100644 index 00000000000..808c9842593 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_symbol.py @@ -0,0 +1,304 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="symbol", parent_name="scattercarpet.marker", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/_symbolsrc.py new file mode 100644 index 00000000000..371e120d66c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scattercarpet.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/__init__.py index 0d46e06b7b0..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/__init__.py @@ -1,861 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="yanchor", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="xanchor", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="tickvals", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="ticktext", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="tickmode", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="ticklen", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickfont", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="nticks", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="lenmode", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scattercarpet.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="scattercarpet.marker.colorbar", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..05e39e56d44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..4fea5ff26e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..d86487e794c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..b71976631e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..20e4d187331 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_len.py new file mode 100644 index 00000000000..470413aadee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..af796d3bfe1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="lenmode", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..7d1844a3b20 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_nticks.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="nticks", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..12922159fbd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..2e3c6b763b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..c5dddeef11c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..878cbdd399a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..a880385dae6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..89d30b1b2ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..4f57445b7cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..52e6f48246f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..4911ade07ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..497eff2ed92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..52ce43b000b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..947a3dd9ed1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..0441a5757e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickfont", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..a0e90c31749 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..c7ce408cc04 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..c5bab793709 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..8769fa584a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="ticklen", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..a28da3cd6a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="tickmode", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..ce5bfdac933 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..ecacb5b8755 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..0612972cc2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..37c7bc6a16d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="ticktext", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..502c9d80883 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..345c122e64e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="tickvals", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..6c8f7b5d520 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..a8bd9e1cbcc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_title.py new file mode 100644 index 00000000000..cfdf8d500a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_x.py new file mode 100644 index 00000000000..ccff3a4d84b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..37229c18098 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="xanchor", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..a414b28e276 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_y.py new file mode 100644 index 00000000000..5f0a8a09c2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..77aa9d471b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="yanchor", + parent_name="scattercarpet.marker.colorbar", + **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..5ead63c0502 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scattercarpet.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py index 09c678bd5a2..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattercarpet.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattercarpet.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattercarpet.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..2f86eec51d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattercarpet.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..33130973051 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattercarpet.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..ddd9fa8d1c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattercarpet.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py index 7ed7b931cc7..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scattercarpet.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scattercarpet.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scattercarpet.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scattercarpet.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scattercarpet.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..0ffd845263d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scattercarpet.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..a0612696801 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scattercarpet.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..a7ac35ee3b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scattercarpet.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..2e85c2e6edb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scattercarpet.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..1e07f54d3ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scattercarpet.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py index 3878611f770..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scattercarpet.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scattercarpet.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scattercarpet.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..e7b9511c8eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scattercarpet.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..cc3c147206b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scattercarpet.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..2b5cd8c953f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scattercarpet.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py index da8e278cbd1..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattercarpet.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattercarpet.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattercarpet.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..db800ee7772 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattercarpet.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..9015bd8ca80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattercarpet.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..4ef9f398f78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattercarpet.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/__init__.py index d9cfbf86594..5193d7a59a5 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/__init__.py @@ -1,71 +1,20 @@ -import _plotly_utils.basevalidators - - -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="typesrc", - parent_name="scattercarpet.marker.gradient", - **kwargs - ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="scattercarpet.marker.gradient", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scattercarpet.marker.gradient", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattercarpet.marker.gradient", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._typesrc import TypesrcValidator + from ._type import TypeValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_color.py new file mode 100644 index 00000000000..8a43f92a2e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattercarpet.marker.gradient", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py new file mode 100644 index 00000000000..18f24fc4beb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scattercarpet.marker.gradient", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_type.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_type.py new file mode 100644 index 00000000000..fa197d8771b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_type.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="scattercarpet.marker.gradient", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_typesrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_typesrc.py new file mode 100644 index 00000000000..af3edcc13a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_typesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="typesrc", + parent_name="scattercarpet.marker.gradient", + **kwargs + ): + super(TypesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/__init__.py index 49d120837d8..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/__init__.py @@ -1,213 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scattercarpet.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scattercarpet.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="reversescale", - parent_name="scattercarpet.marker.line", - **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattercarpet.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, - plotly_name="colorscale", - parent_name="scattercarpet.marker.line", - **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattercarpet.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattercarpet.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattercarpet.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scattercarpet.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scattercarpet.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scattercarpet.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scattercarpet.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scattercarpet.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..36e0cd6cb4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scattercarpet.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cauto.py new file mode 100644 index 00000000000..90d0619e825 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scattercarpet.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmax.py new file mode 100644 index 00000000000..b5eeb793936 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scattercarpet.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmid.py new file mode 100644 index 00000000000..18d8785ef8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scattercarpet.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmin.py new file mode 100644 index 00000000000..6a68cad47ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scattercarpet.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_color.py new file mode 100644 index 00000000000..b8bfaf14d09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattercarpet.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattercarpet.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_coloraxis.py new file mode 100644 index 00000000000..7beb60151e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattercarpet.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_colorscale.py new file mode 100644 index 00000000000..d29811f5038 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_colorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, + plotly_name="colorscale", + parent_name="scattercarpet.marker.line", + **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_colorsrc.py new file mode 100644 index 00000000000..9f70842c19f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattercarpet.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_reversescale.py new file mode 100644 index 00000000000..75b3c04f4d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_reversescale.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="reversescale", + parent_name="scattercarpet.marker.line", + **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_width.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_width.py new file mode 100644 index 00000000000..052b35c24e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scattercarpet.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_widthsrc.py new file mode 100644 index 00000000000..290dbb0fcee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scattercarpet.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/__init__.py index ee90aaa3b93..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/__init__.py @@ -1,46 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scattercarpet.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattercarpet.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/_marker.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/_marker.py new file mode 100644 index 00000000000..2eaf27bd4fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattercarpet.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/_textfont.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/_textfont.py new file mode 100644 index 00000000000..0754b245e81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scattercarpet.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/__init__.py index aa7162752e9..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/__init__.py @@ -1,52 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattercarpet.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scattercarpet.selected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattercarpet.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_color.py new file mode 100644 index 00000000000..359b1b467a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattercarpet.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_opacity.py new file mode 100644 index 00000000000..6ee4f01fa7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scattercarpet.selected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_size.py new file mode 100644 index 00000000000..35bf017995e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattercarpet.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/__init__.py index 8d2849f921e..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattercarpet.selected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/_color.py new file mode 100644 index 00000000000..8d2849f921e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/selected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattercarpet.selected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/stream/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/stream/__init__.py index ff9443f7a07..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="scattercarpet.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scattercarpet.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scattercarpet/stream/_maxpoints.py new file mode 100644 index 00000000000..6eb42d85558 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scattercarpet.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/stream/_token.py b/packages/python/plotly/plotly/validators/scattercarpet/stream/_token.py new file mode 100644 index 00000000000..cedf3d60ea2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="scattercarpet.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/__init__.py index 5e3bde1e65e..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattercarpet.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattercarpet.textfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scattercarpet.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scattercarpet.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattercarpet.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattercarpet.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_color.py new file mode 100644 index 00000000000..5c5ed27a2f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattercarpet.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_colorsrc.py new file mode 100644 index 00000000000..e9545b31e56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattercarpet.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/_family.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_family.py new file mode 100644 index 00000000000..0b60e02aa2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scattercarpet.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_familysrc.py new file mode 100644 index 00000000000..5bb098ad736 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scattercarpet.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_size.py new file mode 100644 index 00000000000..7f0b97b95aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattercarpet.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_sizesrc.py new file mode 100644 index 00000000000..69c47e52ec2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattercarpet.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/__init__.py index 3a82475c89a..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scattercarpet.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattercarpet.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/_marker.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/_marker.py new file mode 100644 index 00000000000..7a79e3a40cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattercarpet.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/_textfont.py new file mode 100644 index 00000000000..2ead9d8b11e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scattercarpet.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/__init__.py index 9e403e99581..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/__init__.py @@ -1,58 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattercarpet.unselected.marker", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scattercarpet.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattercarpet.unselected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_color.py new file mode 100644 index 00000000000..1a0896e08c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattercarpet.unselected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_opacity.py new file mode 100644 index 00000000000..075a58aa0fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scattercarpet.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_size.py new file mode 100644 index 00000000000..90e880cb341 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/marker/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattercarpet.unselected.marker", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/__init__.py index 9cb3ae7a067..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattercarpet.unselected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/_color.py new file mode 100644 index 00000000000..9cb3ae7a067 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattercarpet/unselected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattercarpet.unselected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/__init__.py index a3da82f5e69..0af7bf8f211 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/__init__.py @@ -1,952 +1,106 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scattergeo", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="scattergeo", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattergeo.unselec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.unselec - ted.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scattergeo", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scattergeo", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scattergeo", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="scattergeo", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scattergeo", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scattergeo", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="scattergeo", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scattergeo", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scattergeo", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scattergeo", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scattergeo", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="scattergeo", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scattergeo", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattergeo.selecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.selecte - d.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scattergeo", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scattergeo", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scattergeo", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scattergeo", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scattergeo", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scattergeo", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergeo.marker. - ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scattergeo.marker. - Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattergeo.marker. - Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="lonsrc", parent_name="scattergeo", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lon", parent_name="scattergeo", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="locationssrc", parent_name="scattergeo", **kwargs): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="locations", parent_name="scattergeo", **kwargs): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="locationmode", parent_name="scattergeo", **kwargs): - super(LocationmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", ["ISO-3", "USA-states", "country names", "geojson-id"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scattergeo", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="scattergeo", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="latsrc", parent_name="scattergeo", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lat", parent_name="scattergeo", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scattergeo", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scattergeo", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="scattergeo", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scattergeo", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scattergeo", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="scattergeo", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scattergeo", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="scattergeo", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scattergeo", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["lon", "lat", "location", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="geojson", parent_name="scattergeo", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GeoValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="geo", parent_name="scattergeo", **kwargs): - super(GeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "geo"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scattergeo", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scattergeo", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "toself"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="featureidkey", parent_name="scattergeo", **kwargs): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="scattergeo", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scattergeo", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="scattergeo", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._lonsrc import LonsrcValidator + from ._lon import LonValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._locationmode import LocationmodeValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._latsrc import LatsrcValidator + from ._lat import LatValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._geojson import GeojsonValidator + from ._geo import GeoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._featureidkey import FeatureidkeyValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._locationmode.LocationmodeValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._geo.GeoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_connectgaps.py b/packages/python/plotly/plotly/validators/scattergeo/_connectgaps.py new file mode 100644 index 00000000000..cecc9e895f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="scattergeo", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_customdata.py b/packages/python/plotly/plotly/validators/scattergeo/_customdata.py new file mode 100644 index 00000000000..0e1c67cb0f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scattergeo", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_customdatasrc.py b/packages/python/plotly/plotly/validators/scattergeo/_customdatasrc.py new file mode 100644 index 00000000000..6e688aa6aec --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="scattergeo", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_featureidkey.py b/packages/python/plotly/plotly/validators/scattergeo/_featureidkey.py new file mode 100644 index 00000000000..ce1b28c5520 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_featureidkey.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="featureidkey", parent_name="scattergeo", **kwargs): + super(FeatureidkeyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_fill.py b/packages/python/plotly/plotly/validators/scattergeo/_fill.py new file mode 100644 index 00000000000..e1f169b962e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_fill.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scattergeo", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "toself"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_fillcolor.py b/packages/python/plotly/plotly/validators/scattergeo/_fillcolor.py new file mode 100644 index 00000000000..a6450f7a7e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scattergeo", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_geo.py b/packages/python/plotly/plotly/validators/scattergeo/_geo.py new file mode 100644 index 00000000000..0488f297cfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_geo.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class GeoValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="geo", parent_name="scattergeo", **kwargs): + super(GeoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "geo"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_geojson.py b/packages/python/plotly/plotly/validators/scattergeo/_geojson.py new file mode 100644 index 00000000000..c53cff5c870 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_geojson.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="geojson", parent_name="scattergeo", **kwargs): + super(GeojsonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hoverinfo.py b/packages/python/plotly/plotly/validators/scattergeo/_hoverinfo.py new file mode 100644 index 00000000000..1943250e29d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scattergeo", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["lon", "lat", "location", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scattergeo/_hoverinfosrc.py new file mode 100644 index 00000000000..207e634af5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="scattergeo", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hoverlabel.py b/packages/python/plotly/plotly/validators/scattergeo/_hoverlabel.py new file mode 100644 index 00000000000..3a35aea5851 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scattergeo", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hovertemplate.py b/packages/python/plotly/plotly/validators/scattergeo/_hovertemplate.py new file mode 100644 index 00000000000..8f1712181ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="scattergeo", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scattergeo/_hovertemplatesrc.py new file mode 100644 index 00000000000..fcf23ece822 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scattergeo", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hovertext.py b/packages/python/plotly/plotly/validators/scattergeo/_hovertext.py new file mode 100644 index 00000000000..689770d422a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scattergeo", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scattergeo/_hovertextsrc.py new file mode 100644 index 00000000000..9535c80edac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="scattergeo", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_ids.py b/packages/python/plotly/plotly/validators/scattergeo/_ids.py new file mode 100644 index 00000000000..f2cb7118b03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scattergeo", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_idssrc.py b/packages/python/plotly/plotly/validators/scattergeo/_idssrc.py new file mode 100644 index 00000000000..fb150a87598 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scattergeo", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_lat.py b/packages/python/plotly/plotly/validators/scattergeo/_lat.py new file mode 100644 index 00000000000..fc3ab97b5f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_lat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lat", parent_name="scattergeo", **kwargs): + super(LatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_latsrc.py b/packages/python/plotly/plotly/validators/scattergeo/_latsrc.py new file mode 100644 index 00000000000..d81a5005dc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_latsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="latsrc", parent_name="scattergeo", **kwargs): + super(LatsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_legendgroup.py b/packages/python/plotly/plotly/validators/scattergeo/_legendgroup.py new file mode 100644 index 00000000000..2917476bd10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="scattergeo", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_line.py b/packages/python/plotly/plotly/validators/scattergeo/_line.py new file mode 100644 index 00000000000..a803c7a4ff7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scattergeo", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_locationmode.py b/packages/python/plotly/plotly/validators/scattergeo/_locationmode.py new file mode 100644 index 00000000000..7eb40171e0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_locationmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LocationmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="locationmode", parent_name="scattergeo", **kwargs): + super(LocationmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", ["ISO-3", "USA-states", "country names", "geojson-id"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_locations.py b/packages/python/plotly/plotly/validators/scattergeo/_locations.py new file mode 100644 index 00000000000..4958e4d6c71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_locations.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="locations", parent_name="scattergeo", **kwargs): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_locationssrc.py b/packages/python/plotly/plotly/validators/scattergeo/_locationssrc.py new file mode 100644 index 00000000000..ee97715ab7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_locationssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="locationssrc", parent_name="scattergeo", **kwargs): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_lon.py b/packages/python/plotly/plotly/validators/scattergeo/_lon.py new file mode 100644 index 00000000000..b5ce9c06e26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_lon.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lon", parent_name="scattergeo", **kwargs): + super(LonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_lonsrc.py b/packages/python/plotly/plotly/validators/scattergeo/_lonsrc.py new file mode 100644 index 00000000000..224498137a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_lonsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="lonsrc", parent_name="scattergeo", **kwargs): + super(LonsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_marker.py b/packages/python/plotly/plotly/validators/scattergeo/_marker.py new file mode 100644 index 00000000000..c4ad6613d66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_marker.py @@ -0,0 +1,144 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scattergeo", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattergeo.marker. + ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scattergeo.marker. + Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scattergeo.marker. + Line` instance or dict with compatible + properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_meta.py b/packages/python/plotly/plotly/validators/scattergeo/_meta.py new file mode 100644 index 00000000000..827f16393cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scattergeo", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_metasrc.py b/packages/python/plotly/plotly/validators/scattergeo/_metasrc.py new file mode 100644 index 00000000000..d9b542b3337 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scattergeo", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_mode.py b/packages/python/plotly/plotly/validators/scattergeo/_mode.py new file mode 100644 index 00000000000..acfd3bc3cf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scattergeo", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_name.py b/packages/python/plotly/plotly/validators/scattergeo/_name.py new file mode 100644 index 00000000000..af70138580f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scattergeo", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_opacity.py b/packages/python/plotly/plotly/validators/scattergeo/_opacity.py new file mode 100644 index 00000000000..07d9b36f83f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scattergeo", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_selected.py b/packages/python/plotly/plotly/validators/scattergeo/_selected.py new file mode 100644 index 00000000000..b6a2f933147 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scattergeo", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattergeo.selecte + d.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergeo.selecte + d.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_selectedpoints.py b/packages/python/plotly/plotly/validators/scattergeo/_selectedpoints.py new file mode 100644 index 00000000000..c669a7d2ba0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="scattergeo", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_showlegend.py b/packages/python/plotly/plotly/validators/scattergeo/_showlegend.py new file mode 100644 index 00000000000..6d0ab8a80aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scattergeo", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_stream.py b/packages/python/plotly/plotly/validators/scattergeo/_stream.py new file mode 100644 index 00000000000..f8930d5895f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scattergeo", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_text.py b/packages/python/plotly/plotly/validators/scattergeo/_text.py new file mode 100644 index 00000000000..a2296a683a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scattergeo", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_textfont.py b/packages/python/plotly/plotly/validators/scattergeo/_textfont.py new file mode 100644 index 00000000000..cbffcfe85c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scattergeo", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_textposition.py b/packages/python/plotly/plotly/validators/scattergeo/_textposition.py new file mode 100644 index 00000000000..77773054420 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_textposition.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="scattergeo", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scattergeo/_textpositionsrc.py new file mode 100644 index 00000000000..dc91c9a7c56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scattergeo", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_textsrc.py b/packages/python/plotly/plotly/validators/scattergeo/_textsrc.py new file mode 100644 index 00000000000..5c787a93924 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scattergeo", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_texttemplate.py b/packages/python/plotly/plotly/validators/scattergeo/_texttemplate.py new file mode 100644 index 00000000000..fcca5d0592d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scattergeo", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scattergeo/_texttemplatesrc.py new file mode 100644 index 00000000000..3d594aff6f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattergeo", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_uid.py b/packages/python/plotly/plotly/validators/scattergeo/_uid.py new file mode 100644 index 00000000000..05326c368a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scattergeo", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_uirevision.py b/packages/python/plotly/plotly/validators/scattergeo/_uirevision.py new file mode 100644 index 00000000000..3be8d976ae7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scattergeo", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_unselected.py b/packages/python/plotly/plotly/validators/scattergeo/_unselected.py new file mode 100644 index 00000000000..7a0f2f69df2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="scattergeo", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattergeo.unselec + ted.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergeo.unselec + ted.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/_visible.py b/packages/python/plotly/plotly/validators/scattergeo/_visible.py new file mode 100644 index 00000000000..0565bfe658c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scattergeo", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/__init__.py index ea1252fe019..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/__init__.py @@ -1,185 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="scattergeo.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scattergeo.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_align.py new file mode 100644 index 00000000000..2afbefad83f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..6c4d6fef3fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..42c06d2a2e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..19a26ef251b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..1a0a3765069 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..07b0388f043 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="scattergeo.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_font.py new file mode 100644 index 00000000000..d8ae78aa15e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_namelength.py new file mode 100644 index 00000000000..2bf513dfb86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..e3610177bb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="scattergeo.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/__init__.py index ef225a1d77a..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/__init__.py @@ -1,103 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattergeo.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattergeo.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="scattergeo.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scattergeo.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergeo.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_color.py new file mode 100644 index 00000000000..dea131af5e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..99bdeb5c3d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergeo.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_family.py new file mode 100644 index 00000000000..19560d6dd9c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scattergeo.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..4479789fc79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="scattergeo.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_size.py new file mode 100644 index 00000000000..dcc82967265 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattergeo.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..bcffad850e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattergeo.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/line/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/line/__init__.py index c4636fe5cd8..ac8bd485063 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/line/__init__.py @@ -1,44 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scattergeo.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="scattergeo.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergeo.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/line/_color.py b/packages/python/plotly/plotly/validators/scattergeo/line/_color.py new file mode 100644 index 00000000000..a14fc65082e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergeo.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/line/_dash.py b/packages/python/plotly/plotly/validators/scattergeo/line/_dash.py new file mode 100644 index 00000000000..4990166fa15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="scattergeo.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/line/_width.py b/packages/python/plotly/plotly/validators/scattergeo/line/_width.py new file mode 100644 index 00000000000..7b307b00196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scattergeo.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/__init__.py index ca16d454736..1502d629913 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/__init__.py @@ -1,984 +1,58 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scattergeo.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="scattergeo.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattergeo.marker", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizeref", parent_name="scattergeo.marker", **kwargs - ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scattergeo.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="scattergeo.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scattergeo.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scattergeo.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scattergeo.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scattergeo.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scattergeo.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scattergeo.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="gradient", parent_name="scattergeo.marker", **kwargs - ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Gradient"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergeo.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scattergeo.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scattergeo.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - geo.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergeo.marker.colorbar.tickformatstopdefa - ults), sets the default property values to use - for elements of - scattergeo.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergeo.marker. - colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scattergeo.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattergeo.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattergeo.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergeo.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattergeo.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scattergeo.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scattergeo.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scattergeo.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="scattergeo.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scattergeo.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._gradient import GradientValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_autocolorscale.py new file mode 100644 index 00000000000..0c1025b1431 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scattergeo.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_cauto.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_cauto.py new file mode 100644 index 00000000000..98179051179 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="scattergeo.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_cmax.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_cmax.py new file mode 100644 index 00000000000..cf3e31ff521 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scattergeo.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_cmid.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_cmid.py new file mode 100644 index 00000000000..f5d442435a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scattergeo.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_cmin.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_cmin.py new file mode 100644 index 00000000000..9d7955ef417 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scattergeo.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_color.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_color.py new file mode 100644 index 00000000000..0c1632ade29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_color.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergeo.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattergeo.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_coloraxis.py new file mode 100644 index 00000000000..d7bf925fcb4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattergeo.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_colorbar.py new file mode 100644 index 00000000000..fc03858e095 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scattergeo.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + geo.marker.colorbar.Tickformatstop` instances + or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattergeo.marker.colorbar.tickformatstopdefa + ults), sets the default property values to use + for elements of + scattergeo.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergeo.marker. + colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scattergeo.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattergeo.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_colorscale.py new file mode 100644 index 00000000000..d7ee77cb4e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scattergeo.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_colorsrc.py new file mode 100644 index 00000000000..a4c80a550f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergeo.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_gradient.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_gradient.py new file mode 100644 index 00000000000..907cbdfd505 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_gradient.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="gradient", parent_name="scattergeo.marker", **kwargs + ): + super(GradientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Gradient"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_line.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_line.py new file mode 100644 index 00000000000..4f5fad78364 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scattergeo.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_opacity.py new file mode 100644 index 00000000000..72a5546d1e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scattergeo.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_opacitysrc.py new file mode 100644 index 00000000000..8a41d225b12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scattergeo.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_reversescale.py new file mode 100644 index 00000000000..f7528304fc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scattergeo.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_showscale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_showscale.py new file mode 100644 index 00000000000..2ad553d14c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scattergeo.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_size.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_size.py new file mode 100644 index 00000000000..ed724134f24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scattergeo.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizemin.py new file mode 100644 index 00000000000..b7ea8fe342b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizemin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="scattergeo.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizemode.py new file mode 100644 index 00000000000..d1485ea5894 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scattergeo.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizeref.py new file mode 100644 index 00000000000..babc8639ec2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizeref.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizeref", parent_name="scattergeo.marker", **kwargs + ): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizesrc.py new file mode 100644 index 00000000000..450ee030332 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattergeo.marker", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_symbol.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_symbol.py new file mode 100644 index 00000000000..3d2a868f77c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="scattergeo.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/_symbolsrc.py new file mode 100644 index 00000000000..3d39be9f65b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scattergeo.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/__init__.py index 149d12d65bb..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/__init__.py @@ -1,831 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scattergeo.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scattergeo.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..16cad59ac68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..92cddc60331 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..87fbc17a800 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..9c0065fd4a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..7d24563ffe0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_len.py new file mode 100644 index 00000000000..ea787b5e582 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..043cdcfa437 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..9186e2c2519 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..0d7ccad9507 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..798c1bcd91a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..22f0be06273 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..1269e6a067c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..7469913e853 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..c5a99939595 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..9c5fc3bdb78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..d72ea1b346e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..b70de143a68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..08d4988dc27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..78a23fbf184 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..68d94ef0c66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..eebf766df50 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..578a6889aca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..88bda5e02e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..c9859e1c0eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..1da510adde3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..105ee306c4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..1e86dc6e28a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..da1b55dc09f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..166b274ca22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..4ec517d88cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..0e562fc1b3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..cd9e939d7a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..4d4469e6521 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..799ecd9dc5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="scattergeo.marker.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_title.py new file mode 100644 index 00000000000..4ec548b5195 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_x.py new file mode 100644 index 00000000000..479e1e3230c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..9fa69df4817 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..9c431cbd6a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_y.py new file mode 100644 index 00000000000..7c3b4db305b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..67b03ed8e09 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..0695818f373 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scattergeo.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py index 6775886cd13..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattergeo.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattergeo.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattergeo.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..620904ffcac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattergeo.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..fe4d6257338 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattergeo.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..36b0dc7bf11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattergeo.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py index a3d46cd4d95..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scattergeo.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scattergeo.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scattergeo.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scattergeo.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scattergeo.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..634138051fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scattergeo.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..7d44cf4686a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scattergeo.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..9459b94206f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scattergeo.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..fae6091cbc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scattergeo.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..02e68bf9391 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scattergeo.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/__init__.py index e30f588665d..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scattergeo.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scattergeo.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scattergeo.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..9e7fed28c73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scattergeo.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..c56c17077d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scattergeo.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..7439cbadc26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scattergeo.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py index aaa8390c6b4..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattergeo.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattergeo.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattergeo.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..8e428be433e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattergeo.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..eb83f3f1059 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattergeo.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..2b72fab94b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattergeo.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py index f70226d0a47..5193d7a59a5 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="typesrc", parent_name="scattergeo.marker.gradient", **kwargs - ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="scattergeo.marker.gradient", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergeo.marker.gradient", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.marker.gradient", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._typesrc import TypesrcValidator + from ._type import TypeValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_color.py b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_color.py new file mode 100644 index 00000000000..3b5228b4119 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.marker.gradient", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_colorsrc.py new file mode 100644 index 00000000000..256918fdc0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergeo.marker.gradient", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_type.py b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_type.py new file mode 100644 index 00000000000..fc9abb2d12c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_type.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="scattergeo.marker.gradient", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_typesrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_typesrc.py new file mode 100644 index 00000000000..3da80714a5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/gradient/_typesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="typesrc", parent_name="scattergeo.marker.gradient", **kwargs + ): + super(TypesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/__init__.py index 4e04ff1dc44..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/__init__.py @@ -1,207 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scattergeo.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scattergeo.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scattergeo.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergeo.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scattergeo.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattergeo.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattergeo.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scattergeo.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scattergeo.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scattergeo.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scattergeo.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scattergeo.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..1f23099e7df --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scattergeo.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cauto.py new file mode 100644 index 00000000000..ba7d9e4ed98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scattergeo.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmax.py new file mode 100644 index 00000000000..30bb9ed0c5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scattergeo.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmid.py new file mode 100644 index 00000000000..0e9dbd96fa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scattergeo.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmin.py new file mode 100644 index 00000000000..a56978a2cd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scattergeo.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_color.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_color.py new file mode 100644 index 00000000000..b4da8f8023e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattergeo.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_coloraxis.py new file mode 100644 index 00000000000..2a0bcad279c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattergeo.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_colorscale.py new file mode 100644 index 00000000000..289cb46aa4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scattergeo.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_colorsrc.py new file mode 100644 index 00000000000..0d3139e0d25 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergeo.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_reversescale.py new file mode 100644 index 00000000000..1bf3e51fe5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scattergeo.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_width.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_width.py new file mode 100644 index 00000000000..8302e0f5905 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scattergeo.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_widthsrc.py new file mode 100644 index 00000000000..35db48326f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scattergeo.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py index 4a0658d0847..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py @@ -1,46 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scattergeo.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattergeo.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/_marker.py b/packages/python/plotly/plotly/validators/scattergeo/selected/_marker.py new file mode 100644 index 00000000000..625761d26d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattergeo.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/_textfont.py b/packages/python/plotly/plotly/validators/scattergeo/selected/_textfont.py new file mode 100644 index 00000000000..2275aff89d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scattergeo.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/__init__.py index 966036e37af..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattergeo.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scattergeo.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_color.py new file mode 100644 index 00000000000..f35d506d899 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_opacity.py new file mode 100644 index 00000000000..7626a0f2bb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scattergeo.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_size.py new file mode 100644 index 00000000000..fa7ac2eaabb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattergeo.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/__init__.py index 16a39e52c66..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.selected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/_color.py new file mode 100644 index 00000000000..16a39e52c66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/selected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.selected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/stream/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/stream/__init__.py index 89ed38e4b19..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="scattergeo.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scattergeo.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scattergeo/stream/_maxpoints.py new file mode 100644 index 00000000000..8fd78143542 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scattergeo.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/stream/_token.py b/packages/python/plotly/plotly/validators/scattergeo/stream/_token.py new file mode 100644 index 00000000000..87378c5c2cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="scattergeo.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/__init__.py index cfb15b70f89..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/__init__.py @@ -1,98 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattergeo.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scattergeo.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scattergeo.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scattergeo.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergeo.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/_color.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/_color.py new file mode 100644 index 00000000000..ec4041e1c0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/_colorsrc.py new file mode 100644 index 00000000000..3aae0e29c6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergeo.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/_family.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/_family.py new file mode 100644 index 00000000000..3e5b1e2c848 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scattergeo.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/_familysrc.py new file mode 100644 index 00000000000..a2b4a5ec9ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scattergeo.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/_size.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/_size.py new file mode 100644 index 00000000000..f25abf0c0f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scattergeo.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scattergeo/textfont/_sizesrc.py new file mode 100644 index 00000000000..e7e115e380a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattergeo.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/__init__.py index 59904da9065..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scattergeo.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattergeo.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/_marker.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/_marker.py new file mode 100644 index 00000000000..b40192a08cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattergeo.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/_textfont.py new file mode 100644 index 00000000000..5ed87594703 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scattergeo.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/__init__.py index 730ccf5e11f..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/__init__.py @@ -1,52 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattergeo.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scattergeo.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergeo.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_color.py new file mode 100644 index 00000000000..02c60a638c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergeo.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_opacity.py new file mode 100644 index 00000000000..8049661bbac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scattergeo.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_size.py new file mode 100644 index 00000000000..055387e8557 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattergeo.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/__init__.py index 90cf56087f3..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattergeo.unselected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/_color.py new file mode 100644 index 00000000000..90cf56087f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergeo/unselected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattergeo.unselected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/__init__.py b/packages/python/plotly/plotly/validators/scattergl/__init__.py index 80f0aabdbda..12b66a4e1b9 100644 --- a/packages/python/plotly/plotly/validators/scattergl/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/__init__.py @@ -1,1173 +1,114 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="scattergl", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="scattergl", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="scattergl", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="scattergl", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="scattergl", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="scattergl", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="scattergl", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="scattergl", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="scattergl", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="scattergl", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scattergl", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="scattergl", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattergl.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.unselect - ed.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scattergl", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scattergl", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scattergl", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="scattergl", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scattergl", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scattergl", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="scattergl", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scattergl", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scattergl", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scattergl", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scattergl", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="scattergl", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scattergl", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattergl.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.selected - .Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scattergl", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scattergl", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scattergl", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scattergl", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scattergl", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scattergl", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergl.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.scattergl.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scattergl", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="scattergl", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scattergl", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scattergl", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="scattergl", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scattergl", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scattergl", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="scattergl", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scattergl", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="scattergl", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scattergl", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scattergl", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scattergl", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "none", - "tozeroy", - "tozerox", - "tonexty", - "tonextx", - "toself", - "tonext", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorYValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_y", parent_name="scattergl", **kwargs): - super(ErrorYValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorY"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ErrorXValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="error_x", parent_name="scattergl", **kwargs): - super(ErrorXValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ErrorX"), - data_docs=kwargs.pop( - "data_docs", - """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for arrayminus . - arraysrc - Sets the source reference on Chart Studio Cloud - for array . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="scattergl", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="scattergl", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="scattergl", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scattergl", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="scattergl", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._error_y import Error_YValidator + from ._error_x import Error_XValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_connectgaps.py b/packages/python/plotly/plotly/validators/scattergl/_connectgaps.py new file mode 100644 index 00000000000..a7b6e0a0475 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="scattergl", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_customdata.py b/packages/python/plotly/plotly/validators/scattergl/_customdata.py new file mode 100644 index 00000000000..c169d03d56f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scattergl", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_customdatasrc.py b/packages/python/plotly/plotly/validators/scattergl/_customdatasrc.py new file mode 100644 index 00000000000..be3e362c75c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="scattergl", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_dx.py b/packages/python/plotly/plotly/validators/scattergl/_dx.py new file mode 100644 index 00000000000..916f6dccef3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_dx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="scattergl", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_dy.py b/packages/python/plotly/plotly/validators/scattergl/_dy.py new file mode 100644 index 00000000000..689e8955394 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_dy.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="scattergl", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_error_x.py b/packages/python/plotly/plotly/validators/scattergl/_error_x.py new file mode 100644 index 00000000000..5f84be2fc2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_error_x.py @@ -0,0 +1,73 @@ +import _plotly_utils.basevalidators + + +class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_x", parent_name="scattergl", **kwargs): + super(Error_XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorX"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_error_y.py b/packages/python/plotly/plotly/validators/scattergl/_error_y.py new file mode 100644 index 00000000000..0117cf80237 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_error_y.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="error_y", parent_name="scattergl", **kwargs): + super(Error_YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ErrorY"), + data_docs=kwargs.pop( + "data_docs", + """ + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud + for arrayminus . + arraysrc + Sets the source reference on Chart Studio Cloud + for array . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_fill.py b/packages/python/plotly/plotly/validators/scattergl/_fill.py new file mode 100644 index 00000000000..6b3849af4da --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_fill.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scattergl", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "none", + "tozeroy", + "tozerox", + "tonexty", + "tonextx", + "toself", + "tonext", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_fillcolor.py b/packages/python/plotly/plotly/validators/scattergl/_fillcolor.py new file mode 100644 index 00000000000..75b2f5bfd58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scattergl", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hoverinfo.py b/packages/python/plotly/plotly/validators/scattergl/_hoverinfo.py new file mode 100644 index 00000000000..b521aba5c7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scattergl", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scattergl/_hoverinfosrc.py new file mode 100644 index 00000000000..a05766e9c5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="scattergl", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hoverlabel.py b/packages/python/plotly/plotly/validators/scattergl/_hoverlabel.py new file mode 100644 index 00000000000..1a5d0137167 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scattergl", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hovertemplate.py b/packages/python/plotly/plotly/validators/scattergl/_hovertemplate.py new file mode 100644 index 00000000000..26e7c231f4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="scattergl", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scattergl/_hovertemplatesrc.py new file mode 100644 index 00000000000..583c6b5f687 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scattergl", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hovertext.py b/packages/python/plotly/plotly/validators/scattergl/_hovertext.py new file mode 100644 index 00000000000..bd5d43a371e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scattergl", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scattergl/_hovertextsrc.py new file mode 100644 index 00000000000..7ad143e3b01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="scattergl", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_ids.py b/packages/python/plotly/plotly/validators/scattergl/_ids.py new file mode 100644 index 00000000000..3ef7064a832 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scattergl", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_idssrc.py b/packages/python/plotly/plotly/validators/scattergl/_idssrc.py new file mode 100644 index 00000000000..366819a3892 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scattergl", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_legendgroup.py b/packages/python/plotly/plotly/validators/scattergl/_legendgroup.py new file mode 100644 index 00000000000..0c140ff68b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="scattergl", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_line.py b/packages/python/plotly/plotly/validators/scattergl/_line.py new file mode 100644 index 00000000000..cebf81273ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scattergl", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values + correspond to step-wise line shapes. + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_marker.py b/packages/python/plotly/plotly/validators/scattergl/_marker.py new file mode 100644 index 00000000000..1799982f36e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_marker.py @@ -0,0 +1,140 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scattergl", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattergl.marker.C + olorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.scattergl.marker.L + ine` instance or dict with compatible + properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_meta.py b/packages/python/plotly/plotly/validators/scattergl/_meta.py new file mode 100644 index 00000000000..821ffd572d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scattergl", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_metasrc.py b/packages/python/plotly/plotly/validators/scattergl/_metasrc.py new file mode 100644 index 00000000000..4ecf38a5ff9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scattergl", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_mode.py b/packages/python/plotly/plotly/validators/scattergl/_mode.py new file mode 100644 index 00000000000..5423fe72359 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scattergl", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_name.py b/packages/python/plotly/plotly/validators/scattergl/_name.py new file mode 100644 index 00000000000..b29f23d72ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scattergl", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_opacity.py b/packages/python/plotly/plotly/validators/scattergl/_opacity.py new file mode 100644 index 00000000000..43f1f135046 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scattergl", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_selected.py b/packages/python/plotly/plotly/validators/scattergl/_selected.py new file mode 100644 index 00000000000..885f71fcb64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scattergl", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattergl.selected + .Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergl.selected + .Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_selectedpoints.py b/packages/python/plotly/plotly/validators/scattergl/_selectedpoints.py new file mode 100644 index 00000000000..91f2ddae4a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="scattergl", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_showlegend.py b/packages/python/plotly/plotly/validators/scattergl/_showlegend.py new file mode 100644 index 00000000000..31ecff3c3de --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scattergl", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_stream.py b/packages/python/plotly/plotly/validators/scattergl/_stream.py new file mode 100644 index 00000000000..5f2f37cf19e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scattergl", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_text.py b/packages/python/plotly/plotly/validators/scattergl/_text.py new file mode 100644 index 00000000000..8af9e1231ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scattergl", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_textfont.py b/packages/python/plotly/plotly/validators/scattergl/_textfont.py new file mode 100644 index 00000000000..9f7e3a057a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scattergl", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_textposition.py b/packages/python/plotly/plotly/validators/scattergl/_textposition.py new file mode 100644 index 00000000000..77052449f15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_textposition.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="scattergl", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scattergl/_textpositionsrc.py new file mode 100644 index 00000000000..1133d357c4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scattergl", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_textsrc.py b/packages/python/plotly/plotly/validators/scattergl/_textsrc.py new file mode 100644 index 00000000000..acf8d9621a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scattergl", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_texttemplate.py b/packages/python/plotly/plotly/validators/scattergl/_texttemplate.py new file mode 100644 index 00000000000..89705409a4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scattergl", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scattergl/_texttemplatesrc.py new file mode 100644 index 00000000000..9f7ba903c43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattergl", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_uid.py b/packages/python/plotly/plotly/validators/scattergl/_uid.py new file mode 100644 index 00000000000..14b2c06e54b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scattergl", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_uirevision.py b/packages/python/plotly/plotly/validators/scattergl/_uirevision.py new file mode 100644 index 00000000000..ba053989f0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scattergl", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_unselected.py b/packages/python/plotly/plotly/validators/scattergl/_unselected.py new file mode 100644 index 00000000000..02eb050c44e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="scattergl", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattergl.unselect + ed.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scattergl.unselect + ed.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_visible.py b/packages/python/plotly/plotly/validators/scattergl/_visible.py new file mode 100644 index 00000000000..370312ae7f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scattergl", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_x.py b/packages/python/plotly/plotly/validators/scattergl/_x.py new file mode 100644 index 00000000000..d508190aa40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="scattergl", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_x0.py b/packages/python/plotly/plotly/validators/scattergl/_x0.py new file mode 100644 index 00000000000..9afd3d79465 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="scattergl", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_xaxis.py b/packages/python/plotly/plotly/validators/scattergl/_xaxis.py new file mode 100644 index 00000000000..033ed341967 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="scattergl", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_xcalendar.py b/packages/python/plotly/plotly/validators/scattergl/_xcalendar.py new file mode 100644 index 00000000000..49620aacc4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="scattergl", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_xsrc.py b/packages/python/plotly/plotly/validators/scattergl/_xsrc.py new file mode 100644 index 00000000000..edf461828c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="scattergl", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_y.py b/packages/python/plotly/plotly/validators/scattergl/_y.py new file mode 100644 index 00000000000..51bcdee36c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="scattergl", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_y0.py b/packages/python/plotly/plotly/validators/scattergl/_y0.py new file mode 100644 index 00000000000..27d742e6c4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="scattergl", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_yaxis.py b/packages/python/plotly/plotly/validators/scattergl/_yaxis.py new file mode 100644 index 00000000000..33eaf83e5e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="scattergl", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_ycalendar.py b/packages/python/plotly/plotly/validators/scattergl/_ycalendar.py new file mode 100644 index 00000000000..c4b293868c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="scattergl", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/_ysrc.py b/packages/python/plotly/plotly/validators/scattergl/_ysrc.py new file mode 100644 index 00000000000..93678c8ed3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="scattergl", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/__init__.py b/packages/python/plotly/plotly/validators/scattergl/error_x/__init__.py index 2bfdf925cec..e4688233f0f 100644 --- a/packages/python/plotly/plotly/validators/scattergl/error_x/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/__init__.py @@ -1,235 +1,42 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scattergl.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="scattergl.error_x", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scattergl.error_x", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scattergl.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scattergl.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scattergl.error_x", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="scattergl.error_x", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scattergl.error_x", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scattergl.error_x", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CopyYstyleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="copy_ystyle", parent_name="scattergl.error_x", **kwargs - ): - super(CopyYstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergl.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="scattergl.error_x", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scattergl.error_x", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scattergl.error_x", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scattergl.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._copy_ystyle import Copy_YstyleValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_array.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_array.py new file mode 100644 index 00000000000..a48d385b308 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scattergl.error_x", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_arrayminus.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_arrayminus.py new file mode 100644 index 00000000000..01d8a44f99f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scattergl.error_x", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_arrayminussrc.py new file mode 100644 index 00000000000..bc55011e842 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scattergl.error_x", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_arraysrc.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_arraysrc.py new file mode 100644 index 00000000000..ae2c9aca4cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="scattergl.error_x", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_color.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_color.py new file mode 100644 index 00000000000..fc742e97bd7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergl.error_x", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_copy_ystyle.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_copy_ystyle.py new file mode 100644 index 00000000000..2a3187409a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_copy_ystyle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="copy_ystyle", parent_name="scattergl.error_x", **kwargs + ): + super(Copy_YstyleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_symmetric.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_symmetric.py new file mode 100644 index 00000000000..4dba1ed16fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scattergl.error_x", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_thickness.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_thickness.py new file mode 100644 index 00000000000..3fdab16a6e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scattergl.error_x", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_traceref.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_traceref.py new file mode 100644 index 00000000000..146b7e57194 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="scattergl.error_x", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_tracerefminus.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_tracerefminus.py new file mode 100644 index 00000000000..8c9952dc5ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scattergl.error_x", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_type.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_type.py new file mode 100644 index 00000000000..9538a40b4ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scattergl.error_x", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_value.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_value.py new file mode 100644 index 00000000000..5528178d235 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scattergl.error_x", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_valueminus.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_valueminus.py new file mode 100644 index 00000000000..f5fd42bfd88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scattergl.error_x", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_visible.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_visible.py new file mode 100644 index 00000000000..2c429c9f36e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="scattergl.error_x", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_x/_width.py b/packages/python/plotly/plotly/validators/scattergl/error_x/_width.py new file mode 100644 index 00000000000..2f0c4baad7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_x/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scattergl.error_x", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/__init__.py b/packages/python/plotly/plotly/validators/scattergl/error_y/__init__.py index 6a595b193a3..0a508f0c655 100644 --- a/packages/python/plotly/plotly/validators/scattergl/error_y/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/__init__.py @@ -1,219 +1,40 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scattergl.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="scattergl.error_y", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="valueminus", parent_name="scattergl.error_y", **kwargs - ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="value", parent_name="scattergl.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="type", parent_name="scattergl.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="tracerefminus", parent_name="scattergl.error_y", **kwargs - ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="traceref", parent_name="scattergl.error_y", **kwargs - ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scattergl.error_y", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="symmetric", parent_name="scattergl.error_y", **kwargs - ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergl.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arraysrc", parent_name="scattergl.error_y", **kwargs - ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="arrayminussrc", parent_name="scattergl.error_y", **kwargs - ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="arrayminus", parent_name="scattergl.error_y", **kwargs - ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="array", parent_name="scattergl.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._valueminus import ValueminusValidator + from ._value import ValueValidator + from ._type import TypeValidator + from ._tracerefminus import TracerefminusValidator + from ._traceref import TracerefValidator + from ._thickness import ThicknessValidator + from ._symmetric import SymmetricValidator + from ._color import ColorValidator + from ._arraysrc import ArraysrcValidator + from ._arrayminussrc import ArrayminussrcValidator + from ._arrayminus import ArrayminusValidator + from ._array import ArrayValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_array.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_array.py new file mode 100644 index 00000000000..a76f3488c15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_array.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="array", parent_name="scattergl.error_y", **kwargs): + super(ArrayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_arrayminus.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_arrayminus.py new file mode 100644 index 00000000000..7f004a8270f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_arrayminus.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="arrayminus", parent_name="scattergl.error_y", **kwargs + ): + super(ArrayminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_arrayminussrc.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_arrayminussrc.py new file mode 100644 index 00000000000..34ea482e7a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_arrayminussrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arrayminussrc", parent_name="scattergl.error_y", **kwargs + ): + super(ArrayminussrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_arraysrc.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_arraysrc.py new file mode 100644 index 00000000000..6af78d2b716 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_arraysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="arraysrc", parent_name="scattergl.error_y", **kwargs + ): + super(ArraysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_color.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_color.py new file mode 100644 index 00000000000..04e6872d563 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergl.error_y", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_symmetric.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_symmetric.py new file mode 100644 index 00000000000..6274865b156 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_symmetric.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="symmetric", parent_name="scattergl.error_y", **kwargs + ): + super(SymmetricValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_thickness.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_thickness.py new file mode 100644 index 00000000000..f68ab4829dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scattergl.error_y", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_traceref.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_traceref.py new file mode 100644 index 00000000000..ef2d0478a5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_traceref.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="traceref", parent_name="scattergl.error_y", **kwargs + ): + super(TracerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_tracerefminus.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_tracerefminus.py new file mode 100644 index 00000000000..d3cf4ccc463 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_tracerefminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="tracerefminus", parent_name="scattergl.error_y", **kwargs + ): + super(TracerefminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_type.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_type.py new file mode 100644 index 00000000000..fb43d963c27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_type.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="type", parent_name="scattergl.error_y", **kwargs): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_value.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_value.py new file mode 100644 index 00000000000..884e353538e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_value.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="value", parent_name="scattergl.error_y", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_valueminus.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_valueminus.py new file mode 100644 index 00000000000..ba1a7fa7a2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_valueminus.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="valueminus", parent_name="scattergl.error_y", **kwargs + ): + super(ValueminusValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_visible.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_visible.py new file mode 100644 index 00000000000..52da47ea2a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="scattergl.error_y", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/error_y/_width.py b/packages/python/plotly/plotly/validators/scattergl/error_y/_width.py new file mode 100644 index 00000000000..948c4bde790 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/error_y/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scattergl.error_y", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/__init__.py index 64da3b993ae..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/__init__.py @@ -1,182 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="scattergl.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scattergl.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scattergl.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="scattergl.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scattergl.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scattergl.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scattergl.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scattergl.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scattergl.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_align.py new file mode 100644 index 00000000000..33f1275ffdd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scattergl.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..3b1c8d8c071 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scattergl.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..ccebe0dc8f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scattergl.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..7ac0f0b67dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scattergl.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..1889abea911 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scattergl.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..edff4703fee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="scattergl.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_font.py new file mode 100644 index 00000000000..6408bfbec0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scattergl.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_namelength.py new file mode 100644 index 00000000000..a3880eb7d6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scattergl.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3e409dd0b98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="scattergl.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/__init__.py index ca8a85c50f5..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattergl.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattergl.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scattergl.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scattergl.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergl.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergl.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_color.py new file mode 100644 index 00000000000..fb18694ed79 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergl.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..7d1f0110942 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergl.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_family.py new file mode 100644 index 00000000000..e965b8e3fc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scattergl.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..7bf4315987d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scattergl.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_size.py new file mode 100644 index 00000000000..d68058f65c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattergl.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..28a1fa2b7c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattergl.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/line/__init__.py b/packages/python/plotly/plotly/validators/scattergl/line/__init__.py index e840019812f..a5e1facdfc3 100644 --- a/packages/python/plotly/plotly/validators/scattergl/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/line/__init__.py @@ -1,59 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scattergl.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="shape", parent_name="scattergl.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["linear", "hv", "vh", "hvh", "vhv"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="dash", parent_name="scattergl.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergl.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._shape import ShapeValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/line/_color.py b/packages/python/plotly/plotly/validators/scattergl/line/_color.py new file mode 100644 index 00000000000..12b7ffe73ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergl.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/line/_dash.py b/packages/python/plotly/plotly/validators/scattergl/line/_dash.py new file mode 100644 index 00000000000..9c970bf0bb9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="dash", parent_name="scattergl.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/line/_shape.py b/packages/python/plotly/plotly/validators/scattergl/line/_shape.py new file mode 100644 index 00000000000..a82da0f1b02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/line/_shape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="shape", parent_name="scattergl.line", **kwargs): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["linear", "hv", "vh", "hvh", "vhv"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/line/_width.py b/packages/python/plotly/plotly/validators/scattergl/line/_width.py new file mode 100644 index 00000000000..29a1b729c9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scattergl.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/__init__.py index eaf36fcceed..33bd66663fd 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/__init__.py @@ -1,943 +1,56 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scattergl.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="scattergl.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="scattergl.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizeref", parent_name="scattergl.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scattergl.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizemin", parent_name="scattergl.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scattergl.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scattergl.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scattergl.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scattergl.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scattergl.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scattergl.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergl.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scattergl.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scattergl.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - gl.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergl.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scattergl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergl.marker.c - olorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - scattergl.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattergl.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattergl.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergl.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattergl.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scattergl.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scattergl.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scattergl.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="scattergl.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scattergl.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattergl/marker/_autocolorscale.py new file mode 100644 index 00000000000..ffaa5ec3319 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scattergl.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_cauto.py b/packages/python/plotly/plotly/validators/scattergl/marker/_cauto.py new file mode 100644 index 00000000000..8187dfb6d49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="scattergl.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_cmax.py b/packages/python/plotly/plotly/validators/scattergl/marker/_cmax.py new file mode 100644 index 00000000000..935a078b41c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scattergl.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_cmid.py b/packages/python/plotly/plotly/validators/scattergl/marker/_cmid.py new file mode 100644 index 00000000000..95f5ca7e0b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scattergl.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_cmin.py b/packages/python/plotly/plotly/validators/scattergl/marker/_cmin.py new file mode 100644 index 00000000000..0eb3904d1b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scattergl.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_color.py b/packages/python/plotly/plotly/validators/scattergl/marker/_color.py new file mode 100644 index 00000000000..f5ad3baa159 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_color.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergl.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattergl.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scattergl/marker/_coloraxis.py new file mode 100644 index 00000000000..2578a949532 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattergl.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scattergl/marker/_colorbar.py new file mode 100644 index 00000000000..d667221e721 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scattergl.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + gl.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattergl.marker.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + scattergl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattergl.marker.c + olorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + scattergl.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattergl.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scattergl/marker/_colorscale.py new file mode 100644 index 00000000000..6d262eec0bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scattergl.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/_colorsrc.py new file mode 100644 index 00000000000..5f0daac7db4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergl.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_line.py b/packages/python/plotly/plotly/validators/scattergl/marker/_line.py new file mode 100644 index 00000000000..243b51f6e77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scattergl.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattergl/marker/_opacity.py new file mode 100644 index 00000000000..aa59b4bb134 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scattergl.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/_opacitysrc.py new file mode 100644 index 00000000000..1950f8e9298 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scattergl.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scattergl/marker/_reversescale.py new file mode 100644 index 00000000000..0909291519c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scattergl.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_showscale.py b/packages/python/plotly/plotly/validators/scattergl/marker/_showscale.py new file mode 100644 index 00000000000..ae9bad275fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scattergl.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_size.py b/packages/python/plotly/plotly/validators/scattergl/marker/_size.py new file mode 100644 index 00000000000..9b181bfc675 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scattergl.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scattergl/marker/_sizemin.py new file mode 100644 index 00000000000..46c0e38217f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_sizemin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizemin", parent_name="scattergl.marker", **kwargs): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scattergl/marker/_sizemode.py new file mode 100644 index 00000000000..0b501f687b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scattergl.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scattergl/marker/_sizeref.py new file mode 100644 index 00000000000..9d5701399f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_sizeref.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizeref", parent_name="scattergl.marker", **kwargs): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/_sizesrc.py new file mode 100644 index 00000000000..3f7c89639da --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="scattergl.marker", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_symbol.py b/packages/python/plotly/plotly/validators/scattergl/marker/_symbol.py new file mode 100644 index 00000000000..8f637e92fb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="scattergl.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/_symbolsrc.py new file mode 100644 index 00000000000..0a2980f6bf1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scattergl.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/__init__.py index f5a20edae0e..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/__init__.py @@ -1,819 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scattergl.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scattergl.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..d4687bf5fa2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..a2df91b36f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..b169fd0121d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..2ff0b10643f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..24a71de57cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_len.py new file mode 100644 index 00000000000..43a7b652e1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..ca4165fd1b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..cda7861e353 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..7a98c3a1d37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..9b5550a2a0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..01c5dc11356 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..b742947ce42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..f2aa7ae133a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..4001f280ffc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..61c485a1b38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..967a8e32d15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..cfc31663055 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..82c7bd0d682 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..53d90aa40aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..30542ba2db7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..8013afdf7ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..4d20d597682 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..7caf6a935cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..f2bbbbf449a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..32d7120318d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..2ba4e1f7a51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..84666601311 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..baa3a17f237 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..86d2adb2f8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..4b971ad735d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..d77a510f34e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..7cfd00f6142 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..b9bca8f553b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scattergl.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..d4f89832e22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_title.py new file mode 100644 index 00000000000..d2222460630 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_x.py new file mode 100644 index 00000000000..a4540473b6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..c2147ec7d39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..60d02eb1701 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_y.py new file mode 100644 index 00000000000..3ec8f0aa988 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..81c90ce781b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..b5c66d9b18e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scattergl.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py index 1afd69c5779..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattergl.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattergl.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattergl.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..241df75a7b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattergl.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..6c5fb52ec96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattergl.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..ab7db65f0a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattergl.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py index 03741d76a10..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scattergl.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scattergl.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scattergl.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scattergl.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scattergl.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..644de2e3993 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scattergl.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..aeed7728a38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scattergl.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..49efabf4e19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scattergl.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..994e2df4255 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scattergl.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..100b02285d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scattergl.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/__init__.py index e08b42c5d7e..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scattergl.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scattergl.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scattergl.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..073b616cbb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scattergl.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..6c390294d2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scattergl.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..a4d6b4bcb71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scattergl.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py index ac8f6fc5782..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattergl.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattergl.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattergl.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..aec67af87dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattergl.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..94332172341 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattergl.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..6479df8df52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattergl.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/__init__.py index d0dbee7862d..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scattergl/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/__init__.py @@ -1,207 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scattergl.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scattergl.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scattergl.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergl.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scattergl.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattergl.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergl.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattergl.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scattergl.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scattergl.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scattergl.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scattergl.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scattergl.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..7cec8394aee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scattergl.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cauto.py new file mode 100644 index 00000000000..6748836b78c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scattergl.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmax.py new file mode 100644 index 00000000000..85bb9ec7c92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scattergl.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmid.py new file mode 100644 index 00000000000..1216902536a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scattergl.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmin.py new file mode 100644 index 00000000000..a082bde26fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scattergl.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_color.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_color.py new file mode 100644 index 00000000000..3b050ce2685 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergl.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattergl.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_coloraxis.py new file mode 100644 index 00000000000..9fa7430261c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattergl.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_colorscale.py new file mode 100644 index 00000000000..bc58acbc079 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scattergl.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_colorsrc.py new file mode 100644 index 00000000000..965b0d8dfe1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergl.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_reversescale.py new file mode 100644 index 00000000000..611c8573ab6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scattergl.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_width.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_width.py new file mode 100644 index 00000000000..e8234988cd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scattergl.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scattergl/marker/line/_widthsrc.py new file mode 100644 index 00000000000..2fed10acb8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scattergl.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/__init__.py b/packages/python/plotly/plotly/validators/scattergl/selected/__init__.py index 678b1e505a3..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scattergl/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/selected/__init__.py @@ -1,46 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scattergl.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattergl.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/_marker.py b/packages/python/plotly/plotly/validators/scattergl/selected/_marker.py new file mode 100644 index 00000000000..3a2615315ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattergl.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/_textfont.py b/packages/python/plotly/plotly/validators/scattergl/selected/_textfont.py new file mode 100644 index 00000000000..1d3ae2e500b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scattergl.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattergl/selected/marker/__init__.py index a46badceca9..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattergl/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/selected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattergl.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scattergl.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergl.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scattergl/selected/marker/_color.py new file mode 100644 index 00000000000..95e3de71fe6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergl.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattergl/selected/marker/_opacity.py new file mode 100644 index 00000000000..674d1001d2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scattergl.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scattergl/selected/marker/_size.py new file mode 100644 index 00000000000..08adc91a533 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattergl.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattergl/selected/textfont/__init__.py index 34e32d5ccc3..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scattergl/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/selected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergl.selected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scattergl/selected/textfont/_color.py new file mode 100644 index 00000000000..34e32d5ccc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/selected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergl.selected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/stream/__init__.py b/packages/python/plotly/plotly/validators/scattergl/stream/__init__.py index b29f6cb3ba0..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scattergl/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="scattergl.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scattergl.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scattergl/stream/_maxpoints.py new file mode 100644 index 00000000000..b13f46f3ed3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scattergl.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/stream/_token.py b/packages/python/plotly/plotly/validators/scattergl/stream/_token.py new file mode 100644 index 00000000000..a4607a08eaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="scattergl.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattergl/textfont/__init__.py index f506c244071..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattergl/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/__init__.py @@ -1,96 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattergl.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scattergl.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scattergl.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scattergl.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattergl.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattergl.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/_color.py b/packages/python/plotly/plotly/validators/scattergl/textfont/_color.py new file mode 100644 index 00000000000..339878d6b4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattergl.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scattergl/textfont/_colorsrc.py new file mode 100644 index 00000000000..48a36a5fb08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattergl.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/_family.py b/packages/python/plotly/plotly/validators/scattergl/textfont/_family.py new file mode 100644 index 00000000000..e8a0ff03e4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scattergl.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scattergl/textfont/_familysrc.py new file mode 100644 index 00000000000..9ed2a5f479f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scattergl.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/_size.py b/packages/python/plotly/plotly/validators/scattergl/textfont/_size.py new file mode 100644 index 00000000000..71dfda9e1b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scattergl.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scattergl/textfont/_sizesrc.py new file mode 100644 index 00000000000..a50484aa2c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattergl.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/__init__.py b/packages/python/plotly/plotly/validators/scattergl/unselected/__init__.py index 9d9734cc61c..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scattergl/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scattergl.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattergl.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/_marker.py b/packages/python/plotly/plotly/validators/scattergl/unselected/_marker.py new file mode 100644 index 00000000000..92e6e2a7291 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattergl.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scattergl/unselected/_textfont.py new file mode 100644 index 00000000000..4e65d2496e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scattergl.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/__init__.py index 80fe998c1d8..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattergl/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattergl.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scattergl.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergl.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_color.py new file mode 100644 index 00000000000..191f9edaa47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergl.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_opacity.py new file mode 100644 index 00000000000..09ce466eeb3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scattergl.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_size.py new file mode 100644 index 00000000000..f4958daf431 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattergl.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/__init__.py index a859ce9ce4f..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattergl.unselected.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/_color.py new file mode 100644 index 00000000000..a859ce9ce4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattergl/unselected/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattergl.unselected.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/__init__.py index d057b5e7b4f..333b92b5cbc 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/__init__.py @@ -1,861 +1,96 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scattermapbox", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="scattermapbox", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattermapbox.unse - lected.Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scattermapbox", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scattermapbox", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scattermapbox", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="texttemplate", parent_name="scattermapbox", **kwargs - ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scattermapbox", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="textposition", parent_name="scattermapbox", **kwargs - ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scattermapbox", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scattermapbox", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="scattermapbox", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "mapbox"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scattermapbox", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scattermapbox", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="scattermapbox", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scattermapbox", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scattermapbox.sele - cted.Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scattermapbox", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scattermapbox", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scattermapbox", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scattermapbox", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scattermapbox", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scattermapbox", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattermapbox.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that - the array `marker.color` and `marker.size` are - only available for "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="lonsrc", parent_name="scattermapbox", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lon", parent_name="scattermapbox", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scattermapbox", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="scattermapbox", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="latsrc", parent_name="scattermapbox", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="lat", parent_name="scattermapbox", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scattermapbox", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scattermapbox", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="scattermapbox", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scattermapbox", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scattermapbox", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="scattermapbox", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scattermapbox", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="scattermapbox", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scattermapbox", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["lon", "lat", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scattermapbox", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scattermapbox", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "toself"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="scattermapbox", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scattermapbox", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="connectgaps", parent_name="scattermapbox", **kwargs - ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BelowValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="below", parent_name="scattermapbox", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._lonsrc import LonsrcValidator + from ._lon import LonValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._latsrc import LatsrcValidator + from ._lat import LatValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator + from ._below import BelowValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._below.BelowValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_below.py b/packages/python/plotly/plotly/validators/scattermapbox/_below.py new file mode 100644 index 00000000000..d9c02944515 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_below.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BelowValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="below", parent_name="scattermapbox", **kwargs): + super(BelowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_connectgaps.py b/packages/python/plotly/plotly/validators/scattermapbox/_connectgaps.py new file mode 100644 index 00000000000..f706680c0d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_connectgaps.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="connectgaps", parent_name="scattermapbox", **kwargs + ): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_customdata.py b/packages/python/plotly/plotly/validators/scattermapbox/_customdata.py new file mode 100644 index 00000000000..46c02f02457 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scattermapbox", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_customdatasrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_customdatasrc.py new file mode 100644 index 00000000000..fff626dc4a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="scattermapbox", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_fill.py b/packages/python/plotly/plotly/validators/scattermapbox/_fill.py new file mode 100644 index 00000000000..b75d4cbcdd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_fill.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scattermapbox", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "toself"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_fillcolor.py b/packages/python/plotly/plotly/validators/scattermapbox/_fillcolor.py new file mode 100644 index 00000000000..053f68bc053 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scattermapbox", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hoverinfo.py b/packages/python/plotly/plotly/validators/scattermapbox/_hoverinfo.py new file mode 100644 index 00000000000..646e017b8d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scattermapbox", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["lon", "lat", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_hoverinfosrc.py new file mode 100644 index 00000000000..9d61b73cf88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="scattermapbox", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hoverlabel.py b/packages/python/plotly/plotly/validators/scattermapbox/_hoverlabel.py new file mode 100644 index 00000000000..15863a3a13b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scattermapbox", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplate.py b/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplate.py new file mode 100644 index 00000000000..00e03194d70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="scattermapbox", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplatesrc.py new file mode 100644 index 00000000000..607039594e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scattermapbox", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hovertext.py b/packages/python/plotly/plotly/validators/scattermapbox/_hovertext.py new file mode 100644 index 00000000000..beb042f7d4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scattermapbox", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_hovertextsrc.py new file mode 100644 index 00000000000..3959b193981 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="scattermapbox", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_ids.py b/packages/python/plotly/plotly/validators/scattermapbox/_ids.py new file mode 100644 index 00000000000..702decce073 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scattermapbox", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_idssrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_idssrc.py new file mode 100644 index 00000000000..2a807997877 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scattermapbox", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_lat.py b/packages/python/plotly/plotly/validators/scattermapbox/_lat.py new file mode 100644 index 00000000000..0f3884946d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_lat.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lat", parent_name="scattermapbox", **kwargs): + super(LatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_latsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_latsrc.py new file mode 100644 index 00000000000..841a7eece39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_latsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="latsrc", parent_name="scattermapbox", **kwargs): + super(LatsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_legendgroup.py b/packages/python/plotly/plotly/validators/scattermapbox/_legendgroup.py new file mode 100644 index 00000000000..e5f6b14a287 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="scattermapbox", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_line.py b/packages/python/plotly/plotly/validators/scattermapbox/_line.py new file mode 100644 index 00000000000..d5d2f43c3a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_line.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scattermapbox", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_lon.py b/packages/python/plotly/plotly/validators/scattermapbox/_lon.py new file mode 100644 index 00000000000..694839a2ba4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_lon.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="lon", parent_name="scattermapbox", **kwargs): + super(LonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_lonsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_lonsrc.py new file mode 100644 index 00000000000..0b77c00898f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_lonsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="lonsrc", parent_name="scattermapbox", **kwargs): + super(LonsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_marker.py b/packages/python/plotly/plotly/validators/scattermapbox/_marker.py new file mode 100644 index 00000000000..122992f2e9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_marker.py @@ -0,0 +1,134 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scattermapbox", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scattermapbox.mark + er.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol. Full list: + https://www.mapbox.com/maki-icons/ Note that + the array `marker.color` and `marker.size` are + only available for "circle" symbols. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_meta.py b/packages/python/plotly/plotly/validators/scattermapbox/_meta.py new file mode 100644 index 00000000000..3f65a80e585 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scattermapbox", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_metasrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_metasrc.py new file mode 100644 index 00000000000..311d824e444 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scattermapbox", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_mode.py b/packages/python/plotly/plotly/validators/scattermapbox/_mode.py new file mode 100644 index 00000000000..bd7318c3f34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scattermapbox", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_name.py b/packages/python/plotly/plotly/validators/scattermapbox/_name.py new file mode 100644 index 00000000000..5e5c7bfc031 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scattermapbox", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_opacity.py b/packages/python/plotly/plotly/validators/scattermapbox/_opacity.py new file mode 100644 index 00000000000..7efc6b40aa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scattermapbox", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_selected.py b/packages/python/plotly/plotly/validators/scattermapbox/_selected.py new file mode 100644 index 00000000000..0e18f0963bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_selected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scattermapbox", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattermapbox.sele + cted.Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_selectedpoints.py b/packages/python/plotly/plotly/validators/scattermapbox/_selectedpoints.py new file mode 100644 index 00000000000..9bb9feff673 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="scattermapbox", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_showlegend.py b/packages/python/plotly/plotly/validators/scattermapbox/_showlegend.py new file mode 100644 index 00000000000..2d9325a42cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scattermapbox", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_stream.py b/packages/python/plotly/plotly/validators/scattermapbox/_stream.py new file mode 100644 index 00000000000..c608676d579 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scattermapbox", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_subplot.py b/packages/python/plotly/plotly/validators/scattermapbox/_subplot.py new file mode 100644 index 00000000000..b563ea78a13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="scattermapbox", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "mapbox"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_text.py b/packages/python/plotly/plotly/validators/scattermapbox/_text.py new file mode 100644 index 00000000000..abc9c665268 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scattermapbox", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_textfont.py b/packages/python/plotly/plotly/validators/scattermapbox/_textfont.py new file mode 100644 index 00000000000..d53a3caf6b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_textfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scattermapbox", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_textposition.py b/packages/python/plotly/plotly/validators/scattermapbox/_textposition.py new file mode 100644 index 00000000000..dbc9b8e6d4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_textposition.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="textposition", parent_name="scattermapbox", **kwargs + ): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_textsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_textsrc.py new file mode 100644 index 00000000000..a42e2e62e42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scattermapbox", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_texttemplate.py b/packages/python/plotly/plotly/validators/scattermapbox/_texttemplate.py new file mode 100644 index 00000000000..3452a00b54f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_texttemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scattermapbox", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scattermapbox/_texttemplatesrc.py new file mode 100644 index 00000000000..598e593ed59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattermapbox", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_uid.py b/packages/python/plotly/plotly/validators/scattermapbox/_uid.py new file mode 100644 index 00000000000..23b9fcc8e15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scattermapbox", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_uirevision.py b/packages/python/plotly/plotly/validators/scattermapbox/_uirevision.py new file mode 100644 index 00000000000..aa23defa153 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scattermapbox", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_unselected.py b/packages/python/plotly/plotly/validators/scattermapbox/_unselected.py new file mode 100644 index 00000000000..9ea27ccbb0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_unselected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="scattermapbox", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scattermapbox.unse + lected.Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/_visible.py b/packages/python/plotly/plotly/validators/scattermapbox/_visible.py new file mode 100644 index 00000000000..bcf5087a9f4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scattermapbox", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/__init__.py index 003c6fee205..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/__init__.py @@ -1,191 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="scattermapbox.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scattermapbox.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scattermapbox.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="scattermapbox.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scattermapbox.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scattermapbox.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scattermapbox.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scattermapbox.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scattermapbox.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_align.py new file mode 100644 index 00000000000..f82124d1f49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scattermapbox.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..82eb7964db3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scattermapbox.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..cb8c0e9672b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scattermapbox.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..18bbda1e391 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scattermapbox.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..d39679ca23f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scattermapbox.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..e6dd2fa17a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="scattermapbox.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_font.py new file mode 100644 index 00000000000..429261d0e56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scattermapbox.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_namelength.py new file mode 100644 index 00000000000..a8662b208d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scattermapbox.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..f7f1cb4415b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="scattermapbox.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/__init__.py index 3699bb6424e..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/__init__.py @@ -1,112 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="scattermapbox.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattermapbox.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="scattermapbox.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattermapbox.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scattermapbox.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattermapbox.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_color.py new file mode 100644 index 00000000000..eacbd84414f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattermapbox.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..22aca29218c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scattermapbox.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_family.py new file mode 100644 index 00000000000..35c82803c5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattermapbox.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..6ed1607eb65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="scattermapbox.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_size.py new file mode 100644 index 00000000000..307dca85b0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattermapbox.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..1388204899e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="scattermapbox.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/line/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/line/__init__.py index 88654e6413c..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/line/__init__.py @@ -1,27 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scattermapbox.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scattermapbox.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/line/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/line/_color.py new file mode 100644 index 00000000000..d07bcddb0db --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scattermapbox.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/line/_width.py b/packages/python/plotly/plotly/validators/scattermapbox/line/_width.py new file mode 100644 index 00000000000..9801df19df0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scattermapbox.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/__init__.py index 8c0fa16305f..3918ff6831d 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/__init__.py @@ -1,570 +1,54 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scattermapbox.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="symbol", parent_name="scattermapbox.marker", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scattermapbox.marker", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizeref", parent_name="scattermapbox.marker", **kwargs - ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scattermapbox.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="scattermapbox.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattermapbox.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scattermapbox.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scattermapbox.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scattermapbox.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scattermapbox.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scattermapbox.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scattermapbox.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scattermapbox.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - mapbox.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattermapbox.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattermapbox.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermapbox.mark - er.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scattermapbox.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scattermapbox.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scattermapbox.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattermapbox.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scattermapbox.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scattermapbox.marker", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scattermapbox.marker", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scattermapbox.marker", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scattermapbox.marker", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scattermapbox.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_autocolorscale.py new file mode 100644 index 00000000000..593da9ca6ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scattermapbox.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_cauto.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cauto.py new file mode 100644 index 00000000000..d74990f1aeb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scattermapbox.marker", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmax.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmax.py new file mode 100644 index 00000000000..bb483e292e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scattermapbox.marker", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmid.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmid.py new file mode 100644 index 00000000000..8e47779dadc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scattermapbox.marker", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmin.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmin.py new file mode 100644 index 00000000000..142d7ecfa7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scattermapbox.marker", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_color.py new file mode 100644 index 00000000000..dde20becae2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattermapbox.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scattermapbox.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_coloraxis.py new file mode 100644 index 00000000000..8c14eed09ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scattermapbox.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorbar.py new file mode 100644 index 00000000000..0cacd5fae94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scattermapbox.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + mapbox.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scattermapbox.marker.colorbar.tickformatstopd + efaults), sets the default property values to + use for elements of + scattermapbox.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scattermapbox.mark + er.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scattermapbox.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scattermapbox.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorscale.py new file mode 100644 index 00000000000..4df9db5f9b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scattermapbox.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorsrc.py new file mode 100644 index 00000000000..e1eb6f2fafb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scattermapbox.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_opacity.py new file mode 100644 index 00000000000..61e2cf89e26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scattermapbox.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_opacitysrc.py new file mode 100644 index 00000000000..4d422de7db0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scattermapbox.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_reversescale.py new file mode 100644 index 00000000000..db4e44c1942 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scattermapbox.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_showscale.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_showscale.py new file mode 100644 index 00000000000..7011461e86c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scattermapbox.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_size.py new file mode 100644 index 00000000000..2ad783816c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattermapbox.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizemin.py new file mode 100644 index 00000000000..0143284926d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizemin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="scattermapbox.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizemode.py new file mode 100644 index 00000000000..1da0dc0220e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scattermapbox.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizeref.py new file mode 100644 index 00000000000..7031b7244f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizeref.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizeref", parent_name="scattermapbox.marker", **kwargs + ): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizesrc.py new file mode 100644 index 00000000000..5bc41b67f12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scattermapbox.marker", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_symbol.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_symbol.py new file mode 100644 index 00000000000..de6985295d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_symbol.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="symbol", parent_name="scattermapbox.marker", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/_symbolsrc.py new file mode 100644 index 00000000000..571469683d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scattermapbox.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/__init__.py index 19630efe402..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/__init__.py @@ -1,861 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="yanchor", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="xanchor", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="tickvals", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="ticktext", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="tickmode", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="ticklen", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickfont", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="nticks", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="lenmode", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scattermapbox.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="scattermapbox.marker.colorbar", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..b2e186c47b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..00efd856194 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..d891382a4ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..4724201aa95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..45e77138ed3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_len.py new file mode 100644 index 00000000000..cc39fc3d7db --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..00b4c6fc911 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="lenmode", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..2510e92fd70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_nticks.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="nticks", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..a644851390b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..f560d335b78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..9a3567c8c2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..b82e046065f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..2e0483ffbcc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..bf590e6b3e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..abee44fdf55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..9cc4897d845 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..088e1787cbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..ea4bcb1bc10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..e78f28e1c8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..08fc28ce554 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..187a5c5dd7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickfont", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..b62d5e15c43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..761a2e69625 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..783dfcc3cc6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..db15290fd82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="ticklen", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..86aa9d85b6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="tickmode", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..afd90f02f42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..648b45f1c77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..387737e9d64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..3eeb6b4a65e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="ticktext", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..7b007f2b6df --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..feb7bbf7419 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="tickvals", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..7c6de27128c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..ae3d1b67f38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_title.py new file mode 100644 index 00000000000..2afb40b034a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_x.py new file mode 100644 index 00000000000..a0661835b34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..1d57ccc6632 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="xanchor", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..7978cb66e54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_y.py new file mode 100644 index 00000000000..aac2e2a0b01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..1c9b5bf35a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="yanchor", + parent_name="scattermapbox.marker.colorbar", + **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..0afeade567f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scattermapbox.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py index bdf3e66b646..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattermapbox.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattermapbox.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattermapbox.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..d52937d7596 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattermapbox.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..f556195a0ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattermapbox.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..9654e6e1120 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattermapbox.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py index 152c434c5bb..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scattermapbox.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scattermapbox.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scattermapbox.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scattermapbox.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scattermapbox.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..ed648da01a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scattermapbox.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..c640a7c6a45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scattermapbox.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..bc1b3e954cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scattermapbox.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..18d70120bcd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scattermapbox.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..4860d09f036 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scattermapbox.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py index 1331b067b76..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scattermapbox.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scattermapbox.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scattermapbox.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..959caf0b4a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scattermapbox.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..36dad67542f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scattermapbox.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..a9f6e8552d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scattermapbox.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py index 3ff117f99aa..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattermapbox.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scattermapbox.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattermapbox.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..8519aab2f30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattermapbox.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..84f02ab8782 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scattermapbox.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..0db45f5a1fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattermapbox.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/selected/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/selected/__init__.py index 7d501e68251..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/selected/__init__.py @@ -1,24 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattermapbox.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/selected/_marker.py b/packages/python/plotly/plotly/validators/scattermapbox/selected/_marker.py new file mode 100644 index 00000000000..7d501e68251 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattermapbox.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/__init__.py index d8614871d18..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/__init__.py @@ -1,52 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattermapbox.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scattermapbox.selected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattermapbox.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_color.py new file mode 100644 index 00000000000..45e6970ae0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattermapbox.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_opacity.py new file mode 100644 index 00000000000..730513ab3ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scattermapbox.selected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_size.py new file mode 100644 index 00000000000..72d01357d2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattermapbox.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/stream/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/stream/__init__.py index 2aa07a6b36d..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="scattermapbox.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scattermapbox.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scattermapbox/stream/_maxpoints.py new file mode 100644 index 00000000000..88ca9cf993e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scattermapbox.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/stream/_token.py b/packages/python/plotly/plotly/validators/scattermapbox/stream/_token.py new file mode 100644 index 00000000000..a6a093fcb0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="scattermapbox.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/textfont/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/textfont/__init__.py index 48586d9005d..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/textfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scattermapbox.textfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scattermapbox.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scattermapbox.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/textfont/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/textfont/_color.py new file mode 100644 index 00000000000..63555509837 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/textfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scattermapbox.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/textfont/_family.py b/packages/python/plotly/plotly/validators/scattermapbox/textfont/_family.py new file mode 100644 index 00000000000..919f0abc3e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/textfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scattermapbox.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/textfont/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/textfont/_size.py new file mode 100644 index 00000000000..6bdab470de1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/textfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scattermapbox.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/unselected/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/unselected/__init__.py index a6e65a7fdaf..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/unselected/__init__.py @@ -1,27 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scattermapbox.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/unselected/_marker.py b/packages/python/plotly/plotly/validators/scattermapbox/unselected/_marker.py new file mode 100644 index 00000000000..a6e65a7fdaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scattermapbox.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/__init__.py index a13cf9590da..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/__init__.py @@ -1,58 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scattermapbox.unselected.marker", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scattermapbox.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scattermapbox.unselected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_color.py new file mode 100644 index 00000000000..498ee53a6bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scattermapbox.unselected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_opacity.py new file mode 100644 index 00000000000..82c11f9df11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scattermapbox.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_size.py new file mode 100644 index 00000000000..66c59485530 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scattermapbox/unselected/marker/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scattermapbox.unselected.marker", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/__init__.py index 1e8d401272d..da8063f79e7 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/__init__.py @@ -1,1004 +1,110 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scatterpolar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="scatterpolar", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Textfont` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="scatterpolar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scatterpolar", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="thetaunit", parent_name="scatterpolar", **kwargs): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["radians", "degrees", "gradians"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="thetasrc", parent_name="scatterpolar", **kwargs): - super(ThetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="theta0", parent_name="scatterpolar", **kwargs): - super(Theta0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="theta", parent_name="scatterpolar", **kwargs): - super(ThetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scatterpolar", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="texttemplate", parent_name="scatterpolar", **kwargs - ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scatterpolar", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scatterpolar", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="textposition", parent_name="scatterpolar", **kwargs - ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scatterpolar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scatterpolar", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="scatterpolar", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "polar"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scatterpolar", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="scatterpolar", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="scatterpolar", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scatterpolar", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatterpolar.selec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.selec - ted.Textfont` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="rsrc", parent_name="scatterpolar", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class R0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="r0", parent_name="scatterpolar", **kwargs): - super(R0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="r", parent_name="scatterpolar", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatterpolar", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scatterpolar", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scatterpolar", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scatterpolar", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scatterpolar", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scatterpolar", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolar.marke - r.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scatterpolar.marke - r.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterpolar.marke - r.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatterpolar", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="scatterpolar", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scatterpolar", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scatterpolar", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="scatterpolar", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scatterpolar", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scatterpolar", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="scatterpolar", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoveron", parent_name="scatterpolar", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - flags=kwargs.pop("flags", ["points", "fills"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="scatterpolar", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="scatterpolar", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolar", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["r", "theta", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scatterpolar", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scatterpolar", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "toself", "tonext"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtheta", parent_name="scatterpolar", **kwargs): - super(DthetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DrValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dr", parent_name="scatterpolar", **kwargs): - super(DrValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="scatterpolar", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="scatterpolar", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="scatterpolar", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cliponaxis", parent_name="scatterpolar", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._thetaunit import ThetaunitValidator + from ._thetasrc import ThetasrcValidator + from ._theta0 import Theta0Validator + from ._theta import ThetaValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._rsrc import RsrcValidator + from ._r0 import R0Validator + from ._r import RValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._dtheta import DthetaValidator + from ._dr import DrValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator + from ._cliponaxis import CliponaxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._thetaunit.ThetaunitValidator", + "._thetasrc.ThetasrcValidator", + "._theta0.Theta0Validator", + "._theta.ThetaValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r0.R0Validator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._dtheta.DthetaValidator", + "._dr.DrValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_cliponaxis.py b/packages/python/plotly/plotly/validators/scatterpolar/_cliponaxis.py new file mode 100644 index 00000000000..1728b027356 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_cliponaxis.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cliponaxis", parent_name="scatterpolar", **kwargs): + super(CliponaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_connectgaps.py b/packages/python/plotly/plotly/validators/scatterpolar/_connectgaps.py new file mode 100644 index 00000000000..60e146cf7b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="scatterpolar", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_customdata.py b/packages/python/plotly/plotly/validators/scatterpolar/_customdata.py new file mode 100644 index 00000000000..9f990c47cf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="scatterpolar", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_customdatasrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_customdatasrc.py new file mode 100644 index 00000000000..fe16b2f48b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="scatterpolar", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_dr.py b/packages/python/plotly/plotly/validators/scatterpolar/_dr.py new file mode 100644 index 00000000000..5462f47ed39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_dr.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DrValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dr", parent_name="scatterpolar", **kwargs): + super(DrValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_dtheta.py b/packages/python/plotly/plotly/validators/scatterpolar/_dtheta.py new file mode 100644 index 00000000000..21888d4f94b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_dtheta.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtheta", parent_name="scatterpolar", **kwargs): + super(DthetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_fill.py b/packages/python/plotly/plotly/validators/scatterpolar/_fill.py new file mode 100644 index 00000000000..e435f40f565 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_fill.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scatterpolar", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "toself", "tonext"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_fillcolor.py b/packages/python/plotly/plotly/validators/scatterpolar/_fillcolor.py new file mode 100644 index 00000000000..ec9295fb1e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scatterpolar", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hoverinfo.py b/packages/python/plotly/plotly/validators/scatterpolar/_hoverinfo.py new file mode 100644 index 00000000000..442acf2e18b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolar", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["r", "theta", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_hoverinfosrc.py new file mode 100644 index 00000000000..5cc54c97680 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="scatterpolar", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hoverlabel.py b/packages/python/plotly/plotly/validators/scatterpolar/_hoverlabel.py new file mode 100644 index 00000000000..e45017cbc2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="scatterpolar", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hoveron.py b/packages/python/plotly/plotly/validators/scatterpolar/_hoveron.py new file mode 100644 index 00000000000..20e38ce1236 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hoveron.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoveron", parent_name="scatterpolar", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + flags=kwargs.pop("flags", ["points", "fills"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hovertemplate.py b/packages/python/plotly/plotly/validators/scatterpolar/_hovertemplate.py new file mode 100644 index 00000000000..7f6abe476d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="scatterpolar", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_hovertemplatesrc.py new file mode 100644 index 00000000000..4f19d10c031 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scatterpolar", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hovertext.py b/packages/python/plotly/plotly/validators/scatterpolar/_hovertext.py new file mode 100644 index 00000000000..d2e751094f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scatterpolar", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_hovertextsrc.py new file mode 100644 index 00000000000..8b98eb65d6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="scatterpolar", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_ids.py b/packages/python/plotly/plotly/validators/scatterpolar/_ids.py new file mode 100644 index 00000000000..8d778631173 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scatterpolar", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_idssrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_idssrc.py new file mode 100644 index 00000000000..79303ef9953 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scatterpolar", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_legendgroup.py b/packages/python/plotly/plotly/validators/scatterpolar/_legendgroup.py new file mode 100644 index 00000000000..739b80447d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="scatterpolar", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_line.py b/packages/python/plotly/plotly/validators/scatterpolar/_line.py new file mode 100644 index 00000000000..897866f72c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_line.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatterpolar", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_marker.py b/packages/python/plotly/plotly/validators/scatterpolar/_marker.py new file mode 100644 index 00000000000..7a422e436ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_marker.py @@ -0,0 +1,147 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scatterpolar", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatterpolar.marke + r.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scatterpolar.marke + r.Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scatterpolar.marke + r.Line` instance or dict with compatible + properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_meta.py b/packages/python/plotly/plotly/validators/scatterpolar/_meta.py new file mode 100644 index 00000000000..9ed4e6706bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scatterpolar", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_metasrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_metasrc.py new file mode 100644 index 00000000000..cb89da465d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scatterpolar", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_mode.py b/packages/python/plotly/plotly/validators/scatterpolar/_mode.py new file mode 100644 index 00000000000..0468d99cffd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scatterpolar", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_name.py b/packages/python/plotly/plotly/validators/scatterpolar/_name.py new file mode 100644 index 00000000000..e2bd52e8f21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scatterpolar", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolar/_opacity.py new file mode 100644 index 00000000000..510434243cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatterpolar", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_r.py b/packages/python/plotly/plotly/validators/scatterpolar/_r.py new file mode 100644 index 00000000000..f0a46d0d296 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="r", parent_name="scatterpolar", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_r0.py b/packages/python/plotly/plotly/validators/scatterpolar/_r0.py new file mode 100644 index 00000000000..539c96932b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_r0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class R0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="r0", parent_name="scatterpolar", **kwargs): + super(R0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_rsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_rsrc.py new file mode 100644 index 00000000000..aa7f5fba5e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_rsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="rsrc", parent_name="scatterpolar", **kwargs): + super(RsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_selected.py b/packages/python/plotly/plotly/validators/scatterpolar/_selected.py new file mode 100644 index 00000000000..0444d3d1af8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scatterpolar", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatterpolar.selec + ted.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterpolar.selec + ted.Textfont` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_selectedpoints.py b/packages/python/plotly/plotly/validators/scatterpolar/_selectedpoints.py new file mode 100644 index 00000000000..675431b9774 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="scatterpolar", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_showlegend.py b/packages/python/plotly/plotly/validators/scatterpolar/_showlegend.py new file mode 100644 index 00000000000..919909732e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="scatterpolar", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_stream.py b/packages/python/plotly/plotly/validators/scatterpolar/_stream.py new file mode 100644 index 00000000000..56991aa3910 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scatterpolar", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_subplot.py b/packages/python/plotly/plotly/validators/scatterpolar/_subplot.py new file mode 100644 index 00000000000..6b852fc3342 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="scatterpolar", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "polar"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_text.py b/packages/python/plotly/plotly/validators/scatterpolar/_text.py new file mode 100644 index 00000000000..8724f80253a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scatterpolar", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_textfont.py b/packages/python/plotly/plotly/validators/scatterpolar/_textfont.py new file mode 100644 index 00000000000..9ccbcd4e250 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scatterpolar", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_textposition.py b/packages/python/plotly/plotly/validators/scatterpolar/_textposition.py new file mode 100644 index 00000000000..1cefdfb5230 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_textposition.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="textposition", parent_name="scatterpolar", **kwargs + ): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_textpositionsrc.py new file mode 100644 index 00000000000..9e8a73e7d2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scatterpolar", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_textsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_textsrc.py new file mode 100644 index 00000000000..b6723e2eafb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scatterpolar", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_texttemplate.py b/packages/python/plotly/plotly/validators/scatterpolar/_texttemplate.py new file mode 100644 index 00000000000..065c71da949 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_texttemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scatterpolar", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_texttemplatesrc.py new file mode 100644 index 00000000000..682d8d769d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatterpolar", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_theta.py b/packages/python/plotly/plotly/validators/scatterpolar/_theta.py new file mode 100644 index 00000000000..717c0989eac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_theta.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="theta", parent_name="scatterpolar", **kwargs): + super(ThetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_theta0.py b/packages/python/plotly/plotly/validators/scatterpolar/_theta0.py new file mode 100644 index 00000000000..4f754a793e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_theta0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="theta0", parent_name="scatterpolar", **kwargs): + super(Theta0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_thetasrc.py b/packages/python/plotly/plotly/validators/scatterpolar/_thetasrc.py new file mode 100644 index 00000000000..46d50809fba --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_thetasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="thetasrc", parent_name="scatterpolar", **kwargs): + super(ThetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_thetaunit.py b/packages/python/plotly/plotly/validators/scatterpolar/_thetaunit.py new file mode 100644 index 00000000000..dbb60c52779 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_thetaunit.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="thetaunit", parent_name="scatterpolar", **kwargs): + super(ThetaunitValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["radians", "degrees", "gradians"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_uid.py b/packages/python/plotly/plotly/validators/scatterpolar/_uid.py new file mode 100644 index 00000000000..100a7a0fed4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scatterpolar", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_uirevision.py b/packages/python/plotly/plotly/validators/scatterpolar/_uirevision.py new file mode 100644 index 00000000000..4f9c15a3199 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="scatterpolar", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_unselected.py b/packages/python/plotly/plotly/validators/scatterpolar/_unselected.py new file mode 100644 index 00000000000..c4fca07fcec --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_unselected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="scatterpolar", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatterpolar.unsel + ected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterpolar.unsel + ected.Textfont` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/_visible.py b/packages/python/plotly/plotly/validators/scatterpolar/_visible.py new file mode 100644 index 00000000000..29e947291b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scatterpolar", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/__init__.py index 52d817ee900..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/__init__.py @@ -1,188 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="scatterpolar.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="scatterpolar.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scatterpolar.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_align.py new file mode 100644 index 00000000000..ef8f5e253d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..31522c92215 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..3825f661694 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..5b1781dfc83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..3764db3e0f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..83893c4fe4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="scatterpolar.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_font.py new file mode 100644 index 00000000000..2c1813d81ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f2f71f8493a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="scatterpolar.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3aa15d7a1a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="scatterpolar.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/__init__.py index 432cafb24f7..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/__init__.py @@ -1,109 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="scatterpolar.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolar.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="scatterpolar.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatterpolar.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scatterpolar.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolar.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_color.py new file mode 100644 index 00000000000..e86b1b742a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolar.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..dd4089393db --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scatterpolar.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_family.py new file mode 100644 index 00000000000..15f8e1436e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatterpolar.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..c12993c9777 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="scatterpolar.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_size.py new file mode 100644 index 00000000000..7773c4c8af4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolar.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..1f0e5df3fb0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="scatterpolar.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/line/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/line/__init__.py index 927da0bea00..73e814e94f3 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/line/__init__.py @@ -1,77 +1,22 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="scatterpolar.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="smoothing", parent_name="scatterpolar.line", **kwargs - ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="shape", parent_name="scatterpolar.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["linear", "spline"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="scatterpolar.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="scatterpolar.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._shape import ShapeValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/line/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/line/_color.py new file mode 100644 index 00000000000..ed7efff9848 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="scatterpolar.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/line/_dash.py b/packages/python/plotly/plotly/validators/scatterpolar/line/_dash.py new file mode 100644 index 00000000000..9d02e911b5d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="scatterpolar.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/line/_shape.py b/packages/python/plotly/plotly/validators/scatterpolar/line/_shape.py new file mode 100644 index 00000000000..bd7e8b41443 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/line/_shape.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="shape", parent_name="scatterpolar.line", **kwargs): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["linear", "spline"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/line/_smoothing.py b/packages/python/plotly/plotly/validators/scatterpolar/line/_smoothing.py new file mode 100644 index 00000000000..defb2e8cf37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/line/_smoothing.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="smoothing", parent_name="scatterpolar.line", **kwargs + ): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/line/_width.py b/packages/python/plotly/plotly/validators/scatterpolar/line/_width.py new file mode 100644 index 00000000000..5df3ccdfd9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="scatterpolar.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/__init__.py index 5a5a4a6b97c..bcd2242a57a 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/__init__.py @@ -1,1007 +1,60 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scatterpolar.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="symbol", parent_name="scatterpolar.marker", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatterpolar.marker", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizeref", parent_name="scatterpolar.marker", **kwargs - ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scatterpolar.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="scatterpolar.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="scatterpolar.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scatterpolar.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatterpolar.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scatterpolar.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatterpolar.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxdisplayed", parent_name="scatterpolar.marker", **kwargs - ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatterpolar.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="gradient", parent_name="scatterpolar.marker", **kwargs - ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Gradient"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterpolar.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatterpolar.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scatterpolar.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polar.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolar.marker.colorbar.tickformatstopde - faults), sets the default property values to - use for elements of - scatterpolar.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolar.marke - r.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scatterpolar.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatterpolar.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatterpolar.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolar.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatterpolar.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="scatterpolar.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="scatterpolar.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="scatterpolar.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatterpolar.marker", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="scatterpolar.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._maxdisplayed import MaxdisplayedValidator + from ._line import LineValidator + from ._gradient import GradientValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_autocolorscale.py new file mode 100644 index 00000000000..6d250d2f25e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="scatterpolar.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_cauto.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cauto.py new file mode 100644 index 00000000000..beeec63c24d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatterpolar.marker", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmax.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmax.py new file mode 100644 index 00000000000..7eb47d55d7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="scatterpolar.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmid.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmid.py new file mode 100644 index 00000000000..2b7f71c92de --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="scatterpolar.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmin.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmin.py new file mode 100644 index 00000000000..f458fde4edf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="scatterpolar.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_color.py new file mode 100644 index 00000000000..be6b60614de --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolar.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatterpolar.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_coloraxis.py new file mode 100644 index 00000000000..e226abcc953 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatterpolar.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorbar.py new file mode 100644 index 00000000000..14c27d298fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scatterpolar.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + polar.marker.colorbar.Tickformatstop` instances + or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatterpolar.marker.colorbar.tickformatstopde + faults), sets the default property values to + use for elements of + scatterpolar.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolar.marke + r.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scatterpolar.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatterpolar.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorscale.py new file mode 100644 index 00000000000..3861bfa0196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatterpolar.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorsrc.py new file mode 100644 index 00000000000..00d52ab7baf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterpolar.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_gradient.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_gradient.py new file mode 100644 index 00000000000..1b2808ea3d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_gradient.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="gradient", parent_name="scatterpolar.marker", **kwargs + ): + super(GradientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Gradient"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_line.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_line.py new file mode 100644 index 00000000000..952f7a36109 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatterpolar.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_maxdisplayed.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_maxdisplayed.py new file mode 100644 index 00000000000..ef6b48b31ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_maxdisplayed.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxdisplayed", parent_name="scatterpolar.marker", **kwargs + ): + super(MaxdisplayedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_opacity.py new file mode 100644 index 00000000000..6f6d008eb4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatterpolar.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_opacitysrc.py new file mode 100644 index 00000000000..eae999bf43c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scatterpolar.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_reversescale.py new file mode 100644 index 00000000000..37d0ac4a4c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatterpolar.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_showscale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_showscale.py new file mode 100644 index 00000000000..a1a2d28f7e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scatterpolar.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_size.py new file mode 100644 index 00000000000..1b85d8c2ed5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="scatterpolar.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizemin.py new file mode 100644 index 00000000000..18cd87718f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizemin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="scatterpolar.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizemode.py new file mode 100644 index 00000000000..c438f7ef2a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scatterpolar.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizeref.py new file mode 100644 index 00000000000..3ae69d8469e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizeref.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizeref", parent_name="scatterpolar.marker", **kwargs + ): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizesrc.py new file mode 100644 index 00000000000..c5571b052ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatterpolar.marker", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_symbol.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_symbol.py new file mode 100644 index 00000000000..cb363646133 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_symbol.py @@ -0,0 +1,304 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="symbol", parent_name="scatterpolar.marker", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/_symbolsrc.py new file mode 100644 index 00000000000..d798d8e0aa7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scatterpolar.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/__init__.py index 7e0494a339a..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/__init__.py @@ -1,858 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="yanchor", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="xanchor", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="tickvals", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="ticktext", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="tickmode", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="ticklen", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickfont", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="lenmode", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="scatterpolar.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="scatterpolar.marker.colorbar", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..0aa67603ff4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..8fb50f8c080 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..22538a03ced --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..b3bc4224099 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..e63db4da986 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_len.py new file mode 100644 index 00000000000..3866eb60abc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..a66754dded1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="lenmode", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..a355ba72cc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..a59ffa17532 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..e9fcfbe84b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..cf5659c780b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..eafb95f6e90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..bc428796966 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..79f183916c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..64f73dec674 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..edebabfb368 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..8e2f391d644 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..ed8ea91af4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..875b6d68979 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..39b8815b888 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..4b05dd4f330 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickfont", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..ff850163a5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..c99119168a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..a4e37b65a3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..4f475ce9389 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="ticklen", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..6b18e10c8b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="tickmode", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..cdc4028eb4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..a9733c8fb4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..53069980d51 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..9b1f9442333 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="ticktext", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..9be893c883d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..78afa978916 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="tickvals", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..7a38b9480f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..5fbe4a126bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_title.py new file mode 100644 index 00000000000..3ef83a4a52c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_x.py new file mode 100644 index 00000000000..d0075797512 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..4cb1838d035 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="xanchor", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..eaf4c6c17cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_y.py new file mode 100644 index 00000000000..7b4e1f16f60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..266cb86fb56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="yanchor", + parent_name="scatterpolar.marker.colorbar", + **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..3ec4d14fa0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scatterpolar.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py index ceedf12c5a8..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterpolar.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterpolar.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolar.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..57ff15d3c16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolar.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..35e3e5bf7a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterpolar.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..4b5c45ecb7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterpolar.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py index 12651ce05d7..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scatterpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scatterpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scatterpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scatterpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scatterpolar.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..f79a82ea0b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scatterpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..f534ec7ccdc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scatterpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..f548989cca6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scatterpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..d4b1b2f583e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scatterpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..e39151e9943 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scatterpolar.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py index f4b913f8cc1..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scatterpolar.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scatterpolar.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scatterpolar.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..d9f681a6915 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scatterpolar.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..56775c98bc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scatterpolar.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..a8cc24b85d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scatterpolar.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py index dfd5db3d4d3..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterpolar.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterpolar.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolar.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..5511fb71580 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolar.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..68230b81238 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterpolar.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..234aa1efb85 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterpolar.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/__init__.py index 249bbb326de..5193d7a59a5 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/__init__.py @@ -1,71 +1,20 @@ -import _plotly_utils.basevalidators - - -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="typesrc", - parent_name="scatterpolar.marker.gradient", - **kwargs - ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="scatterpolar.marker.gradient", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scatterpolar.marker.gradient", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolar.marker.gradient", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._typesrc import TypesrcValidator + from ._type import TypeValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_color.py new file mode 100644 index 00000000000..fe280951cd1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolar.marker.gradient", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py new file mode 100644 index 00000000000..85716551dce --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scatterpolar.marker.gradient", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_type.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_type.py new file mode 100644 index 00000000000..fe3bc500a73 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_type.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="scatterpolar.marker.gradient", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_typesrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_typesrc.py new file mode 100644 index 00000000000..70612445b99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/gradient/_typesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="typesrc", + parent_name="scatterpolar.marker.gradient", + **kwargs + ): + super(TypesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/__init__.py index 65155d4fa33..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/__init__.py @@ -1,210 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scatterpolar.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatterpolar.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="reversescale", - parent_name="scatterpolar.marker.line", - **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterpolar.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatterpolar.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatterpolar.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolar.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatterpolar.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scatterpolar.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scatterpolar.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scatterpolar.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatterpolar.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scatterpolar.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..ca7016341b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scatterpolar.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cauto.py new file mode 100644 index 00000000000..a31654e299e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatterpolar.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmax.py new file mode 100644 index 00000000000..0566e9d5c46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scatterpolar.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmid.py new file mode 100644 index 00000000000..cfcb66fcab3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scatterpolar.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmin.py new file mode 100644 index 00000000000..5e3b2af0b14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scatterpolar.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_color.py new file mode 100644 index 00000000000..c7dbfefaae6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolar.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatterpolar.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_coloraxis.py new file mode 100644 index 00000000000..124f56dd894 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatterpolar.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_colorscale.py new file mode 100644 index 00000000000..b72d044501c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatterpolar.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_colorsrc.py new file mode 100644 index 00000000000..bc5dd635801 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterpolar.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_reversescale.py new file mode 100644 index 00000000000..c104f1fa8f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_reversescale.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="reversescale", + parent_name="scatterpolar.marker.line", + **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_width.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_width.py new file mode 100644 index 00000000000..dc72b400059 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatterpolar.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_widthsrc.py new file mode 100644 index 00000000000..44512562a6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scatterpolar.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/__init__.py index e2f5dc3cc64..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/__init__.py @@ -1,46 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatterpolar.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatterpolar.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/_marker.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/_marker.py new file mode 100644 index 00000000000..95c80f1a6e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatterpolar.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/_textfont.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/_textfont.py new file mode 100644 index 00000000000..644b7805fba --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatterpolar.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/__init__.py index e325a515aff..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/__init__.py @@ -1,52 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolar.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scatterpolar.selected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolar.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_color.py new file mode 100644 index 00000000000..84039776650 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolar.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_opacity.py new file mode 100644 index 00000000000..2d77c8e6b78 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scatterpolar.selected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_size.py new file mode 100644 index 00000000000..50378685a81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolar.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/__init__.py index e26019cfcce..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolar.selected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/_color.py new file mode 100644 index 00000000000..e26019cfcce --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/selected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolar.selected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/stream/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/stream/__init__.py index 69abf0290d7..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="scatterpolar.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scatterpolar.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scatterpolar/stream/_maxpoints.py new file mode 100644 index 00000000000..f8044c456bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scatterpolar.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/stream/_token.py b/packages/python/plotly/plotly/validators/scatterpolar/stream/_token.py new file mode 100644 index 00000000000..8ffefc8f775 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="scatterpolar.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/__init__.py index ef69a130c33..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatterpolar.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolar.textfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scatterpolar.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatterpolar.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterpolar.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolar.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_color.py new file mode 100644 index 00000000000..14a03f1b537 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolar.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_colorsrc.py new file mode 100644 index 00000000000..b68a7d95e4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterpolar.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/_family.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_family.py new file mode 100644 index 00000000000..b52617eceb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatterpolar.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_familysrc.py new file mode 100644 index 00000000000..c4703c698a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scatterpolar.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_size.py new file mode 100644 index 00000000000..bf747e16dd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolar.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_sizesrc.py new file mode 100644 index 00000000000..2f7e2e16ad0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatterpolar.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/__init__.py index c2ed13bebb9..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatterpolar.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatterpolar.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/_marker.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/_marker.py new file mode 100644 index 00000000000..498fdb3fbc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatterpolar.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/_textfont.py new file mode 100644 index 00000000000..09ccec16581 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatterpolar.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/__init__.py index 2479b7a4b62..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/__init__.py @@ -1,55 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolar.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scatterpolar.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolar.unselected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_color.py new file mode 100644 index 00000000000..3ba8ba9faa4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolar.unselected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_opacity.py new file mode 100644 index 00000000000..f152c2ea412 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scatterpolar.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_size.py new file mode 100644 index 00000000000..fc06a45ec15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolar.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/__init__.py index 76fd1f0a998..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolar.unselected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/_color.py new file mode 100644 index 00000000000..76fd1f0a998 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolar/unselected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolar.unselected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py index 12d5a86189b..352ec1cddfd 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py @@ -1,983 +1,106 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scatterpolargl", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="unselected", parent_name="scatterpolargl", **kwargs - ): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Textfont` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="scatterpolargl", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scatterpolargl", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="thetaunit", parent_name="scatterpolargl", **kwargs): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["radians", "degrees", "gradians"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="thetasrc", parent_name="scatterpolargl", **kwargs): - super(ThetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="theta0", parent_name="scatterpolargl", **kwargs): - super(Theta0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="theta", parent_name="scatterpolargl", **kwargs): - super(ThetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scatterpolargl", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="texttemplate", parent_name="scatterpolargl", **kwargs - ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scatterpolargl", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scatterpolargl", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="textposition", parent_name="scatterpolargl", **kwargs - ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scatterpolargl", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scatterpolargl", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="scatterpolargl", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "polar"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scatterpolargl", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlegend", parent_name="scatterpolargl", **kwargs - ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="scatterpolargl", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scatterpolargl", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Textfont` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="rsrc", parent_name="scatterpolargl", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class R0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="r0", parent_name="scatterpolargl", **kwargs): - super(R0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="r", parent_name="scatterpolargl", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatterpolargl", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scatterpolargl", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scatterpolargl", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scatterpolargl", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scatterpolargl", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scatterpolargl", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolargl.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.scatterpolargl.mar - ker.Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatterpolargl", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="scatterpolargl", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scatterpolargl", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scatterpolargl", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="scatterpolargl", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scatterpolargl", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scatterpolargl", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="scatterpolargl", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="hoverlabel", parent_name="scatterpolargl", **kwargs - ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="scatterpolargl", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolargl", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["r", "theta", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scatterpolargl", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scatterpolargl", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "none", - "tozeroy", - "tozerox", - "tonexty", - "tonextx", - "toself", - "tonext", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dtheta", parent_name="scatterpolargl", **kwargs): - super(DthetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DrValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dr", parent_name="scatterpolargl", **kwargs): - super(DrValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="scatterpolargl", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="customdata", parent_name="scatterpolargl", **kwargs - ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="connectgaps", parent_name="scatterpolargl", **kwargs - ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._thetaunit import ThetaunitValidator + from ._thetasrc import ThetasrcValidator + from ._theta0 import Theta0Validator + from ._theta import ThetaValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._rsrc import RsrcValidator + from ._r0 import R0Validator + from ._r import RValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._dtheta import DthetaValidator + from ._dr import DrValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._connectgaps import ConnectgapsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._thetaunit.ThetaunitValidator", + "._thetasrc.ThetasrcValidator", + "._theta0.Theta0Validator", + "._theta.ThetaValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r0.R0Validator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._dtheta.DthetaValidator", + "._dr.DrValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_connectgaps.py b/packages/python/plotly/plotly/validators/scatterpolargl/_connectgaps.py new file mode 100644 index 00000000000..3a2d4ea50a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_connectgaps.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="connectgaps", parent_name="scatterpolargl", **kwargs + ): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_customdata.py b/packages/python/plotly/plotly/validators/scatterpolargl/_customdata.py new file mode 100644 index 00000000000..eb186a60a65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_customdata.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="customdata", parent_name="scatterpolargl", **kwargs + ): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_customdatasrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_customdatasrc.py new file mode 100644 index 00000000000..d4d96ba2d16 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="scatterpolargl", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_dr.py b/packages/python/plotly/plotly/validators/scatterpolargl/_dr.py new file mode 100644 index 00000000000..104ab577879 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_dr.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DrValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dr", parent_name="scatterpolargl", **kwargs): + super(DrValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_dtheta.py b/packages/python/plotly/plotly/validators/scatterpolargl/_dtheta.py new file mode 100644 index 00000000000..f7b5c5db08d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_dtheta.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dtheta", parent_name="scatterpolargl", **kwargs): + super(DthetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_fill.py b/packages/python/plotly/plotly/validators/scatterpolargl/_fill.py new file mode 100644 index 00000000000..0d020cebfc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_fill.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scatterpolargl", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "none", + "tozeroy", + "tozerox", + "tonexty", + "tonextx", + "toself", + "tonext", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_fillcolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/_fillcolor.py new file mode 100644 index 00000000000..b7224a327a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scatterpolargl", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfo.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfo.py new file mode 100644 index 00000000000..bb4dbdee532 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolargl", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["r", "theta", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfosrc.py new file mode 100644 index 00000000000..da481160a01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="scatterpolargl", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hoverlabel.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hoverlabel.py new file mode 100644 index 00000000000..1e29f265ad8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hoverlabel.py @@ -0,0 +1,53 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="hoverlabel", parent_name="scatterpolargl", **kwargs + ): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hovertemplate.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertemplate.py new file mode 100644 index 00000000000..76178431498 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="scatterpolargl", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertemplatesrc.py new file mode 100644 index 00000000000..65e06985c33 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scatterpolargl", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hovertext.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertext.py new file mode 100644 index 00000000000..339f216fdf0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scatterpolargl", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertextsrc.py new file mode 100644 index 00000000000..a6fa2d028e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="scatterpolargl", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_ids.py b/packages/python/plotly/plotly/validators/scatterpolargl/_ids.py new file mode 100644 index 00000000000..2c742a29764 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scatterpolargl", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_idssrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_idssrc.py new file mode 100644 index 00000000000..bfce918c221 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scatterpolargl", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_legendgroup.py b/packages/python/plotly/plotly/validators/scatterpolargl/_legendgroup.py new file mode 100644 index 00000000000..c22eab40cd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="scatterpolargl", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_line.py b/packages/python/plotly/plotly/validators/scatterpolargl/_line.py new file mode 100644 index 00000000000..3c5cf983fed --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatterpolargl", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values + correspond to step-wise line shapes. + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_marker.py b/packages/python/plotly/plotly/validators/scatterpolargl/_marker.py new file mode 100644 index 00000000000..c04ae34bb41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_marker.py @@ -0,0 +1,140 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scatterpolargl", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatterpolargl.mar + ker.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.scatterpolargl.mar + ker.Line` instance or dict with compatible + properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_meta.py b/packages/python/plotly/plotly/validators/scatterpolargl/_meta.py new file mode 100644 index 00000000000..372b640e403 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scatterpolargl", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_metasrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_metasrc.py new file mode 100644 index 00000000000..d39fb44549d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scatterpolargl", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_mode.py b/packages/python/plotly/plotly/validators/scatterpolargl/_mode.py new file mode 100644 index 00000000000..066c57c8498 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scatterpolargl", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_name.py b/packages/python/plotly/plotly/validators/scatterpolargl/_name.py new file mode 100644 index 00000000000..6805e923ad6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scatterpolargl", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolargl/_opacity.py new file mode 100644 index 00000000000..635a0177130 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatterpolargl", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_r.py b/packages/python/plotly/plotly/validators/scatterpolargl/_r.py new file mode 100644 index 00000000000..0444498f3d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_r.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="r", parent_name="scatterpolargl", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_r0.py b/packages/python/plotly/plotly/validators/scatterpolargl/_r0.py new file mode 100644 index 00000000000..054d8ee47d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_r0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class R0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="r0", parent_name="scatterpolargl", **kwargs): + super(R0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_rsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_rsrc.py new file mode 100644 index 00000000000..4bf9c0f898c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_rsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="rsrc", parent_name="scatterpolargl", **kwargs): + super(RsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_selected.py b/packages/python/plotly/plotly/validators/scatterpolargl/_selected.py new file mode 100644 index 00000000000..434ea2ce704 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scatterpolargl", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatterpolargl.sel + ected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterpolargl.sel + ected.Textfont` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_selectedpoints.py b/packages/python/plotly/plotly/validators/scatterpolargl/_selectedpoints.py new file mode 100644 index 00000000000..f2a3559f8ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="scatterpolargl", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_showlegend.py b/packages/python/plotly/plotly/validators/scatterpolargl/_showlegend.py new file mode 100644 index 00000000000..50c7d714f1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_showlegend.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlegend", parent_name="scatterpolargl", **kwargs + ): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_stream.py b/packages/python/plotly/plotly/validators/scatterpolargl/_stream.py new file mode 100644 index 00000000000..a06679ea880 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scatterpolargl", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_subplot.py b/packages/python/plotly/plotly/validators/scatterpolargl/_subplot.py new file mode 100644 index 00000000000..6bf5dd1744d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="scatterpolargl", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "polar"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_text.py b/packages/python/plotly/plotly/validators/scatterpolargl/_text.py new file mode 100644 index 00000000000..c4921d9ffc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scatterpolargl", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_textfont.py b/packages/python/plotly/plotly/validators/scatterpolargl/_textfont.py new file mode 100644 index 00000000000..4291045b4b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scatterpolargl", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_textposition.py b/packages/python/plotly/plotly/validators/scatterpolargl/_textposition.py new file mode 100644 index 00000000000..1a87bf1fec2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_textposition.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="textposition", parent_name="scatterpolargl", **kwargs + ): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_textpositionsrc.py new file mode 100644 index 00000000000..7ade7702f83 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scatterpolargl", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_textsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_textsrc.py new file mode 100644 index 00000000000..383f9c0361e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scatterpolargl", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_texttemplate.py b/packages/python/plotly/plotly/validators/scatterpolargl/_texttemplate.py new file mode 100644 index 00000000000..05b56c3ba6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_texttemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scatterpolargl", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_texttemplatesrc.py new file mode 100644 index 00000000000..69004e08707 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatterpolargl", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_theta.py b/packages/python/plotly/plotly/validators/scatterpolargl/_theta.py new file mode 100644 index 00000000000..e93c316ebb3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_theta.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="theta", parent_name="scatterpolargl", **kwargs): + super(ThetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_theta0.py b/packages/python/plotly/plotly/validators/scatterpolargl/_theta0.py new file mode 100644 index 00000000000..3c700339e7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_theta0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="theta0", parent_name="scatterpolargl", **kwargs): + super(Theta0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_thetasrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/_thetasrc.py new file mode 100644 index 00000000000..aa10182f1d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_thetasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="thetasrc", parent_name="scatterpolargl", **kwargs): + super(ThetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_thetaunit.py b/packages/python/plotly/plotly/validators/scatterpolargl/_thetaunit.py new file mode 100644 index 00000000000..64b363e79f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_thetaunit.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="thetaunit", parent_name="scatterpolargl", **kwargs): + super(ThetaunitValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["radians", "degrees", "gradians"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_uid.py b/packages/python/plotly/plotly/validators/scatterpolargl/_uid.py new file mode 100644 index 00000000000..198c26e7cee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scatterpolargl", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_uirevision.py b/packages/python/plotly/plotly/validators/scatterpolargl/_uirevision.py new file mode 100644 index 00000000000..c2e6a03d221 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="scatterpolargl", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_unselected.py b/packages/python/plotly/plotly/validators/scatterpolargl/_unselected.py new file mode 100644 index 00000000000..c30b9667377 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_unselected.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="unselected", parent_name="scatterpolargl", **kwargs + ): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatterpolargl.uns + elected.Marker` instance or dict with + compatible properties + textfont + :class:`plotly.graph_objects.scatterpolargl.uns + elected.Textfont` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/_visible.py b/packages/python/plotly/plotly/validators/scatterpolargl/_visible.py new file mode 100644 index 00000000000..4bd9ab93a45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scatterpolargl", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/__init__.py index ee44c00b56a..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/__init__.py @@ -1,197 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="scatterpolargl.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="namelength", - parent_name="scatterpolargl.hoverlabel", - **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scatterpolargl.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="scatterpolargl.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scatterpolargl.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bgcolorsrc", - parent_name="scatterpolargl.hoverlabel", - **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatterpolargl.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scatterpolargl.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scatterpolargl.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_align.py new file mode 100644 index 00000000000..6bff2ccf199 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scatterpolargl.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..ba4384d0400 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scatterpolargl.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..58e6219b177 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatterpolargl.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..958f18195e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bgcolorsrc", + parent_name="scatterpolargl.hoverlabel", + **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..33f585af349 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scatterpolargl.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..747c4a2721e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="scatterpolargl.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_font.py new file mode 100644 index 00000000000..0e8d9b15ebd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scatterpolargl.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f8395547fa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_namelength.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="namelength", + parent_name="scatterpolargl.hoverlabel", + **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..1dbe9ce4dfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="scatterpolargl.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py index 54c6ce0b344..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py @@ -1,115 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="scatterpolargl.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolargl.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="scatterpolargl.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterpolargl.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scatterpolargl.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.hoverlabel.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_color.py new file mode 100644 index 00000000000..2e6047d7891 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.hoverlabel.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..d5bd7d3da9c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scatterpolargl.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_family.py new file mode 100644 index 00000000000..3fbbeaa0133 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterpolargl.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..1fa56ff1459 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="scatterpolargl.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_size.py new file mode 100644 index 00000000000..a05e0ce3d3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolargl.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..9e6798ac15a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="scatterpolargl.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/line/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/line/__init__.py index 33552f31e0d..a5e1facdfc3 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/line/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatterpolargl.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="shape", parent_name="scatterpolargl.line", **kwargs - ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["linear", "hv", "vh", "hvh", "vhv"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="dash", parent_name="scatterpolargl.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolargl.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._shape import ShapeValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/line/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/line/_color.py new file mode 100644 index 00000000000..2e8273392e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolargl.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/line/_dash.py b/packages/python/plotly/plotly/validators/scatterpolargl/line/_dash.py new file mode 100644 index 00000000000..fa179cf2c58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="dash", parent_name="scatterpolargl.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/line/_shape.py b/packages/python/plotly/plotly/validators/scatterpolargl/line/_shape.py new file mode 100644 index 00000000000..34f453dd4c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/line/_shape.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="shape", parent_name="scatterpolargl.line", **kwargs + ): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["linear", "hv", "vh", "hvh", "vhv"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/line/_width.py b/packages/python/plotly/plotly/validators/scatterpolargl/line/_width.py new file mode 100644 index 00000000000..4622784537f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatterpolargl.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/__init__.py index 1ac40bf6d47..33bd66663fd 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/__init__.py @@ -1,970 +1,56 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scatterpolargl.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="symbol", parent_name="scatterpolargl.marker", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatterpolargl.marker", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizeref", parent_name="scatterpolargl.marker", **kwargs - ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scatterpolargl.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="scatterpolargl.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolargl.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scatterpolargl.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatterpolargl.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scatterpolargl.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatterpolargl.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="scatterpolargl.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterpolargl.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatterpolargl.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scatterpolargl.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polargl.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolargl.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterpolargl.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolargl.mar - ker.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scatterpolargl.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatterpolargl.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatterpolargl.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolargl.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatterpolargl.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scatterpolargl.marker", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scatterpolargl.marker", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scatterpolargl.marker", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatterpolargl.marker", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scatterpolargl.marker", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_autocolorscale.py new file mode 100644 index 00000000000..44d85b1a8bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scatterpolargl.marker", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cauto.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cauto.py new file mode 100644 index 00000000000..beb4329ce35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatterpolargl.marker", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmax.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmax.py new file mode 100644 index 00000000000..6f19f274196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scatterpolargl.marker", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmid.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmid.py new file mode 100644 index 00000000000..d7866b4955a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scatterpolargl.marker", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmin.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmin.py new file mode 100644 index 00000000000..d563757261d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scatterpolargl.marker", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_color.py new file mode 100644 index 00000000000..4181c017d82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolargl.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatterpolargl.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_coloraxis.py new file mode 100644 index 00000000000..51e73c868b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatterpolargl.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorbar.py new file mode 100644 index 00000000000..f45d87f201b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scatterpolargl.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + polargl.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatterpolargl.marker.colorbar.tickformatstop + defaults), sets the default property values to + use for elements of + scatterpolargl.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterpolargl.mar + ker.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scatterpolargl.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatterpolargl.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorscale.py new file mode 100644 index 00000000000..12718e17240 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatterpolargl.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorsrc.py new file mode 100644 index 00000000000..c47cb6940ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterpolargl.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_line.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_line.py new file mode 100644 index 00000000000..5c2ae304636 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_line.py @@ -0,0 +1,106 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="scatterpolargl.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_opacity.py new file mode 100644 index 00000000000..b0519405180 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatterpolargl.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_opacitysrc.py new file mode 100644 index 00000000000..f0c77393363 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scatterpolargl.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_reversescale.py new file mode 100644 index 00000000000..f891637d3d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatterpolargl.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_showscale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_showscale.py new file mode 100644 index 00000000000..2140eacbc19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scatterpolargl.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_size.py new file mode 100644 index 00000000000..57e852ff377 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolargl.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizemin.py new file mode 100644 index 00000000000..83858f931cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizemin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="scatterpolargl.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizemode.py new file mode 100644 index 00000000000..63361396940 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scatterpolargl.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizeref.py new file mode 100644 index 00000000000..8e084b04abb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizeref.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizeref", parent_name="scatterpolargl.marker", **kwargs + ): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizesrc.py new file mode 100644 index 00000000000..df609ad89d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatterpolargl.marker", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_symbol.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_symbol.py new file mode 100644 index 00000000000..f7fdf95e95e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_symbol.py @@ -0,0 +1,304 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="symbol", parent_name="scatterpolargl.marker", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_symbolsrc.py new file mode 100644 index 00000000000..03021ed9378 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scatterpolargl.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/__init__.py index 8ab16766d59..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/__init__.py @@ -1,873 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scatterpolargl.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="yanchor", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scatterpolargl.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scatterpolargl.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="xanchor", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scatterpolargl.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, - plotly_name="title", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="tickvals", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="ticktext", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="ticks", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="tickmode", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="ticklen", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickfont", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, - plotly_name="tick0", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="nticks", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="lenmode", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scatterpolargl.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, - plotly_name="dtick", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="scatterpolargl.marker.colorbar", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..13e9f46ffc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..93fe2c44f59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..876509ef89d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..8141e4b2a72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, + plotly_name="dtick", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..b610949945e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_len.py new file mode 100644 index 00000000000..03d8d7de2b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scatterpolargl.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..4cec85a062d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="lenmode", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..b90ba424616 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="nticks", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..fd21693cff3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..159d7f41cbe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..09f7a04df36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..5754ca0f409 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..b1a8a33dd5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..11fcc6ab0bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..30c64856f99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..c964d17861a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..ee2573098b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..7f2b41ed46e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, + plotly_name="tick0", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..912db14bf24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..1b877b581fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..4ae94be6758 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickfont", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..063376aa901 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..6d27ebdca1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..0ef33576f80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..0f2018847ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="ticklen", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..1206ee2c6bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="tickmode", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..f0d197c2024 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..358bfa4049b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="ticks", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..1d82fa1c029 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..41fa09f9f38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="ticktext", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..b95e0386930 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..9803a9fda35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="tickvals", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..29564354edf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..0fcd880c96f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_title.py new file mode 100644 index 00000000000..c5bac5dfd2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_title.py @@ -0,0 +1,36 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, + plotly_name="title", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_x.py new file mode 100644 index 00000000000..87d673da882 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scatterpolargl.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..a76e963b2d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="xanchor", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..17ddca86bb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scatterpolargl.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_y.py new file mode 100644 index 00000000000..c42cf98ca2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scatterpolargl.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..7b1b5ddd8f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="yanchor", + parent_name="scatterpolargl.marker.colorbar", + **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..35a6161302b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scatterpolargl.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py index a5a3cce7f87..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterpolargl.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterpolargl.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..970680b7fd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..3aff2a08ed6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterpolargl.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..a1dca47d6df --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterpolargl.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py index 52bfefa5293..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scatterpolargl.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scatterpolargl.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scatterpolargl.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scatterpolargl.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scatterpolargl.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..689fcd9901e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scatterpolargl.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..efe346ade20 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scatterpolargl.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..4eb0ea9c722 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scatterpolargl.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..498842b896b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scatterpolargl.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..ede54658b1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scatterpolargl.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py index 0df1a1c7d23..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scatterpolargl.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scatterpolargl.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scatterpolargl.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..789c06da4d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scatterpolargl.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..399b977b5fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scatterpolargl.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..626fe74ba3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scatterpolargl.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py index e3023245993..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterpolargl.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterpolargl.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..b09b9998061 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..bacd111ec39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterpolargl.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..06360e03568 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterpolargl.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/__init__.py index 453035f51de..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/__init__.py @@ -1,216 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="reversescale", - parent_name="scatterpolargl.marker.line", - **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, - plotly_name="colorscale", - parent_name="scatterpolargl.marker.line", - **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, - plotly_name="coloraxis", - parent_name="scatterpolargl.marker.line", - **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatterpolargl.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatterpolargl.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scatterpolargl.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..2e8f0f60256 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scatterpolargl.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cauto.py new file mode 100644 index 00000000000..7bfaf5ae2f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmax.py new file mode 100644 index 00000000000..0f798c09554 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmid.py new file mode 100644 index 00000000000..5f6c1e2be1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmin.py new file mode 100644 index 00000000000..74dc7ae9152 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_color.py new file mode 100644 index 00000000000..99a1de6d747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatterpolargl.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_coloraxis.py new file mode 100644 index 00000000000..acfa25439c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_coloraxis.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, + plotly_name="coloraxis", + parent_name="scatterpolargl.marker.line", + **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_colorscale.py new file mode 100644 index 00000000000..26752c3a14e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_colorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, + plotly_name="colorscale", + parent_name="scatterpolargl.marker.line", + **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_colorsrc.py new file mode 100644 index 00000000000..12fcb9721a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_reversescale.py new file mode 100644 index 00000000000..18c6f56137e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_reversescale.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="reversescale", + parent_name="scatterpolargl.marker.line", + **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_width.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_width.py new file mode 100644 index 00000000000..e0b8f8ee48c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_widthsrc.py new file mode 100644 index 00000000000..1d44739feaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scatterpolargl.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/__init__.py index 8d0c643518d..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/__init__.py @@ -1,46 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatterpolargl.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatterpolargl.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/_marker.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/_marker.py new file mode 100644 index 00000000000..fde7d3e098c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatterpolargl.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/_textfont.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/_textfont.py new file mode 100644 index 00000000000..43981e52cd0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatterpolargl.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/__init__.py index 03b6daba3ba..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/__init__.py @@ -1,55 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolargl.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scatterpolargl.selected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.selected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_color.py new file mode 100644 index 00000000000..931550a709c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.selected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_opacity.py new file mode 100644 index 00000000000..453b18d9a58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scatterpolargl.selected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_size.py new file mode 100644 index 00000000000..a76473878df --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolargl.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/__init__.py index dc20c42406b..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.selected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/_color.py new file mode 100644 index 00000000000..dc20c42406b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/selected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.selected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/stream/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/stream/__init__.py index bc8b13ab6f8..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="scatterpolargl.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scatterpolargl.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scatterpolargl/stream/_maxpoints.py new file mode 100644 index 00000000000..dbe407784ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scatterpolargl.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/stream/_token.py b/packages/python/plotly/plotly/validators/scatterpolargl/stream/_token.py new file mode 100644 index 00000000000..0177ddf2dc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="scatterpolargl.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/__init__.py index 8a7187c935b..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatterpolargl.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterpolargl.textfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scatterpolargl.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatterpolargl.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterpolargl.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterpolargl.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_color.py new file mode 100644 index 00000000000..c907d478ba0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterpolargl.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_colorsrc.py new file mode 100644 index 00000000000..0baabb5c641 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterpolargl.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_family.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_family.py new file mode 100644 index 00000000000..ec9587f91cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatterpolargl.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_familysrc.py new file mode 100644 index 00000000000..9a3bade6c02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scatterpolargl.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_size.py new file mode 100644 index 00000000000..ada9ea63ad4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterpolargl.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_sizesrc.py new file mode 100644 index 00000000000..25bb0bdf6b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatterpolargl.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/__init__.py index 34dcc51e6e8..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatterpolargl.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatterpolargl.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/_marker.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/_marker.py new file mode 100644 index 00000000000..e7ad8b1b02c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatterpolargl.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/_textfont.py new file mode 100644 index 00000000000..e82de729307 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatterpolargl.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/__init__.py index c4483184c16..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/__init__.py @@ -1,58 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterpolargl.unselected.marker", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scatterpolargl.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.unselected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_color.py new file mode 100644 index 00000000000..3ac2925b104 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.unselected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_opacity.py new file mode 100644 index 00000000000..4d7ca1b1aa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scatterpolargl.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_size.py new file mode 100644 index 00000000000..867af452dda --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterpolargl.unselected.marker", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/__init__.py index 5f0de35f082..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterpolargl.unselected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/_color.py new file mode 100644 index 00000000000..5f0de35f082 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterpolargl/unselected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterpolargl.unselected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/__init__.py index 74b6ecb476e..41e4234a688 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/__init__.py @@ -1,992 +1,106 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="scatterternary", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="unselected", parent_name="scatterternary", **kwargs - ): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatterternary.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.uns - elected.Textfont` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="uirevision", parent_name="scatterternary", **kwargs - ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="scatterternary", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="scatterternary", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="texttemplate", parent_name="scatterternary", **kwargs - ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="scatterternary", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="scatterternary", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="textposition", parent_name="scatterternary", **kwargs - ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="scatterternary", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="scatterternary", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SumValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sum", parent_name="scatterternary", **kwargs): - super(SumValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="subplot", parent_name="scatterternary", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "ternary"), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="scatterternary", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showlegend", parent_name="scatterternary", **kwargs - ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="selectedpoints", parent_name="scatterternary", **kwargs - ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="scatterternary", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.scatterternary.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterternary.sel - ected.Textfont` instance or dict with - compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="scatterternary", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="scatterternary", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="mode", parent_name="scatterternary", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["lines", "markers", "text"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="scatterternary", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="scatterternary", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="scatterternary", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterternary.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - gradient - :class:`plotly.graph_objects.scatterternary.mar - ker.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterternary.mar - ker.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="scatterternary", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="legendgroup", parent_name="scatterternary", **kwargs - ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="scatterternary", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="scatterternary", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertextsrc", parent_name="scatterternary", **kwargs - ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="scatterternary", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="scatterternary", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="hovertemplate", parent_name="scatterternary", **kwargs - ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoveron", parent_name="scatterternary", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - flags=kwargs.pop("flags", ["points", "fills"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="hoverlabel", parent_name="scatterternary", **kwargs - ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="scatterternary", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="scatterternary", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["a", "b", "c", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="scatterternary", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="fill", parent_name="scatterternary", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "toself", "tonext"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="customdatasrc", parent_name="scatterternary", **kwargs - ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="customdata", parent_name="scatterternary", **kwargs - ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="csrc", parent_name="scatterternary", **kwargs): - super(CsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="connectgaps", parent_name="scatterternary", **kwargs - ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cliponaxis", parent_name="scatterternary", **kwargs - ): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="c", parent_name="scatterternary", **kwargs): - super(CValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="bsrc", parent_name="scatterternary", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="b", parent_name="scatterternary", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="asrc", parent_name="scatterternary", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="a", parent_name="scatterternary", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._sum import SumValidator + from ._subplot import SubplotValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._mode import ModeValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._fill import FillValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._csrc import CsrcValidator + from ._connectgaps import ConnectgapsValidator + from ._cliponaxis import CliponaxisValidator + from ._c import CValidator + from ._bsrc import BsrcValidator + from ._b import BValidator + from ._asrc import AsrcValidator + from ._a import AValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._sum.SumValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._csrc.CsrcValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + "._c.CValidator", + "._bsrc.BsrcValidator", + "._b.BValidator", + "._asrc.AsrcValidator", + "._a.AValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_a.py b/packages/python/plotly/plotly/validators/scatterternary/_a.py new file mode 100644 index 00000000000..8408461f3a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_a.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="a", parent_name="scatterternary", **kwargs): + super(AValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_asrc.py b/packages/python/plotly/plotly/validators/scatterternary/_asrc.py new file mode 100644 index 00000000000..32366581d42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_asrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="asrc", parent_name="scatterternary", **kwargs): + super(AsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_b.py b/packages/python/plotly/plotly/validators/scatterternary/_b.py new file mode 100644 index 00000000000..74a859e5fc0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_b.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="b", parent_name="scatterternary", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_bsrc.py b/packages/python/plotly/plotly/validators/scatterternary/_bsrc.py new file mode 100644 index 00000000000..854997b38bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_bsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="bsrc", parent_name="scatterternary", **kwargs): + super(BsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_c.py b/packages/python/plotly/plotly/validators/scatterternary/_c.py new file mode 100644 index 00000000000..2a064fc4a67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_c.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="c", parent_name="scatterternary", **kwargs): + super(CValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_cliponaxis.py b/packages/python/plotly/plotly/validators/scatterternary/_cliponaxis.py new file mode 100644 index 00000000000..3a3f477d0e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_cliponaxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cliponaxis", parent_name="scatterternary", **kwargs + ): + super(CliponaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_connectgaps.py b/packages/python/plotly/plotly/validators/scatterternary/_connectgaps.py new file mode 100644 index 00000000000..5e0016c3422 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_connectgaps.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="connectgaps", parent_name="scatterternary", **kwargs + ): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_csrc.py b/packages/python/plotly/plotly/validators/scatterternary/_csrc.py new file mode 100644 index 00000000000..25a37e50c7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_csrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="csrc", parent_name="scatterternary", **kwargs): + super(CsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_customdata.py b/packages/python/plotly/plotly/validators/scatterternary/_customdata.py new file mode 100644 index 00000000000..d598e3f8cf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_customdata.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="customdata", parent_name="scatterternary", **kwargs + ): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_customdatasrc.py b/packages/python/plotly/plotly/validators/scatterternary/_customdatasrc.py new file mode 100644 index 00000000000..26b0ef364a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_customdatasrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="customdatasrc", parent_name="scatterternary", **kwargs + ): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_fill.py b/packages/python/plotly/plotly/validators/scatterternary/_fill.py new file mode 100644 index 00000000000..3bed07c7c29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_fill.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="fill", parent_name="scatterternary", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "toself", "tonext"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_fillcolor.py b/packages/python/plotly/plotly/validators/scatterternary/_fillcolor.py new file mode 100644 index 00000000000..f4deab110b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="scatterternary", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hoverinfo.py b/packages/python/plotly/plotly/validators/scatterternary/_hoverinfo.py new file mode 100644 index 00000000000..045140fff0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="scatterternary", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["a", "b", "c", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/scatterternary/_hoverinfosrc.py new file mode 100644 index 00000000000..9890146bd8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hoverinfosrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hoverinfosrc", parent_name="scatterternary", **kwargs + ): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hoverlabel.py b/packages/python/plotly/plotly/validators/scatterternary/_hoverlabel.py new file mode 100644 index 00000000000..529a4f9cc40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hoverlabel.py @@ -0,0 +1,53 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="hoverlabel", parent_name="scatterternary", **kwargs + ): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hoveron.py b/packages/python/plotly/plotly/validators/scatterternary/_hoveron.py new file mode 100644 index 00000000000..64a05f98f90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hoveron.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoveron", parent_name="scatterternary", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + flags=kwargs.pop("flags", ["points", "fills"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hovertemplate.py b/packages/python/plotly/plotly/validators/scatterternary/_hovertemplate.py new file mode 100644 index 00000000000..39863ce7e2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hovertemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="hovertemplate", parent_name="scatterternary", **kwargs + ): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/scatterternary/_hovertemplatesrc.py new file mode 100644 index 00000000000..83888154452 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="scatterternary", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hovertext.py b/packages/python/plotly/plotly/validators/scatterternary/_hovertext.py new file mode 100644 index 00000000000..9df8cbf392e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="scatterternary", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_hovertextsrc.py b/packages/python/plotly/plotly/validators/scatterternary/_hovertextsrc.py new file mode 100644 index 00000000000..fe00590b448 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_hovertextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertextsrc", parent_name="scatterternary", **kwargs + ): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_ids.py b/packages/python/plotly/plotly/validators/scatterternary/_ids.py new file mode 100644 index 00000000000..63bdd07e7fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="scatterternary", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_idssrc.py b/packages/python/plotly/plotly/validators/scatterternary/_idssrc.py new file mode 100644 index 00000000000..684db633557 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="scatterternary", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_legendgroup.py b/packages/python/plotly/plotly/validators/scatterternary/_legendgroup.py new file mode 100644 index 00000000000..753d80e839e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_legendgroup.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="legendgroup", parent_name="scatterternary", **kwargs + ): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_line.py b/packages/python/plotly/plotly/validators/scatterternary/_line.py new file mode 100644 index 00000000000..05d70f36fab --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_line.py @@ -0,0 +1,35 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="scatterternary", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_marker.py b/packages/python/plotly/plotly/validators/scatterternary/_marker.py new file mode 100644 index 00000000000..0d16da7e4fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_marker.py @@ -0,0 +1,147 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="scatterternary", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.scatterternary.mar + ker.ColorBar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + gradient + :class:`plotly.graph_objects.scatterternary.mar + ker.Gradient` instance or dict with compatible + properties + line + :class:`plotly.graph_objects.scatterternary.mar + ker.Line` instance or dict with compatible + properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_meta.py b/packages/python/plotly/plotly/validators/scatterternary/_meta.py new file mode 100644 index 00000000000..09ae9a2f77e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="scatterternary", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_metasrc.py b/packages/python/plotly/plotly/validators/scatterternary/_metasrc.py new file mode 100644 index 00000000000..bd765a8ee19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="scatterternary", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_mode.py b/packages/python/plotly/plotly/validators/scatterternary/_mode.py new file mode 100644 index 00000000000..359dd5b82ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_mode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="mode", parent_name="scatterternary", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["lines", "markers", "text"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_name.py b/packages/python/plotly/plotly/validators/scatterternary/_name.py new file mode 100644 index 00000000000..857b456e212 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="scatterternary", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_opacity.py b/packages/python/plotly/plotly/validators/scatterternary/_opacity.py new file mode 100644 index 00000000000..3ac82145bef --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="scatterternary", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_selected.py b/packages/python/plotly/plotly/validators/scatterternary/_selected.py new file mode 100644 index 00000000000..f023647b3e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_selected.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="scatterternary", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatterternary.sel + ected.Marker` instance or dict with compatible + properties + textfont + :class:`plotly.graph_objects.scatterternary.sel + ected.Textfont` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_selectedpoints.py b/packages/python/plotly/plotly/validators/scatterternary/_selectedpoints.py new file mode 100644 index 00000000000..388ec021112 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_selectedpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="selectedpoints", parent_name="scatterternary", **kwargs + ): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_showlegend.py b/packages/python/plotly/plotly/validators/scatterternary/_showlegend.py new file mode 100644 index 00000000000..7d02a2ce4ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_showlegend.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showlegend", parent_name="scatterternary", **kwargs + ): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_stream.py b/packages/python/plotly/plotly/validators/scatterternary/_stream.py new file mode 100644 index 00000000000..f100517c2e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="scatterternary", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_subplot.py b/packages/python/plotly/plotly/validators/scatterternary/_subplot.py new file mode 100644 index 00000000000..4e4fc721ad0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_subplot.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="subplot", parent_name="scatterternary", **kwargs): + super(SubplotValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "ternary"), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_sum.py b/packages/python/plotly/plotly/validators/scatterternary/_sum.py new file mode 100644 index 00000000000..80508176c02 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_sum.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SumValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sum", parent_name="scatterternary", **kwargs): + super(SumValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_text.py b/packages/python/plotly/plotly/validators/scatterternary/_text.py new file mode 100644 index 00000000000..75836732892 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="scatterternary", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_textfont.py b/packages/python/plotly/plotly/validators/scatterternary/_textfont.py new file mode 100644 index 00000000000..29aff06b762 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="scatterternary", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_textposition.py b/packages/python/plotly/plotly/validators/scatterternary/_textposition.py new file mode 100644 index 00000000000..9ba91539b8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_textposition.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="textposition", parent_name="scatterternary", **kwargs + ): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_textpositionsrc.py b/packages/python/plotly/plotly/validators/scatterternary/_textpositionsrc.py new file mode 100644 index 00000000000..b3a43dd32ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="scatterternary", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_textsrc.py b/packages/python/plotly/plotly/validators/scatterternary/_textsrc.py new file mode 100644 index 00000000000..5c95ed00571 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="scatterternary", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_texttemplate.py b/packages/python/plotly/plotly/validators/scatterternary/_texttemplate.py new file mode 100644 index 00000000000..4ebb0fb9d47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_texttemplate.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scatterternary", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/scatterternary/_texttemplatesrc.py new file mode 100644 index 00000000000..6abf60df48e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatterternary", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_uid.py b/packages/python/plotly/plotly/validators/scatterternary/_uid.py new file mode 100644 index 00000000000..8bd4c1cb3dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="scatterternary", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_uirevision.py b/packages/python/plotly/plotly/validators/scatterternary/_uirevision.py new file mode 100644 index 00000000000..48b0aa9a592 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_uirevision.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="uirevision", parent_name="scatterternary", **kwargs + ): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_unselected.py b/packages/python/plotly/plotly/validators/scatterternary/_unselected.py new file mode 100644 index 00000000000..288877b54b8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_unselected.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="unselected", parent_name="scatterternary", **kwargs + ): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.scatterternary.uns + elected.Marker` instance or dict with + compatible properties + textfont + :class:`plotly.graph_objects.scatterternary.uns + elected.Textfont` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/_visible.py b/packages/python/plotly/plotly/validators/scatterternary/_visible.py new file mode 100644 index 00000000000..0b3e69677af --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="scatterternary", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/__init__.py index c1e46b3d0ea..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/__init__.py @@ -1,197 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="scatterternary.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="namelength", - parent_name="scatterternary.hoverlabel", - **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="scatterternary.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="scatterternary.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scatterternary.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bgcolorsrc", - parent_name="scatterternary.hoverlabel", - **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="scatterternary.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="scatterternary.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="scatterternary.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_align.py new file mode 100644 index 00000000000..ace2908b2f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="scatterternary.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..57eda32172f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="scatterternary.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..c88b4cae3ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="scatterternary.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..df29f34801a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bgcolorsrc", + parent_name="scatterternary.hoverlabel", + **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..7aa7dfc1271 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bordercolor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scatterternary.hoverlabel", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..7f4bab64097 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="scatterternary.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_font.py new file mode 100644 index 00000000000..149f3734ce0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="scatterternary.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_namelength.py new file mode 100644 index 00000000000..7cee3241c3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_namelength.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="namelength", + parent_name="scatterternary.hoverlabel", + **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..c97ecb3898a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="namelengthsrc", + parent_name="scatterternary.hoverlabel", + **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/__init__.py index d5effbd57a8..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/__init__.py @@ -1,115 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="sizesrc", - parent_name="scatterternary.hoverlabel.font", - **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterternary.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="scatterternary.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterternary.hoverlabel.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scatterternary.hoverlabel.font", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.hoverlabel.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_color.py new file mode 100644 index 00000000000..1eea4ddb926 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.hoverlabel.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..a9011be7e3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scatterternary.hoverlabel.font", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_family.py new file mode 100644 index 00000000000..c7649dc0313 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_family.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterternary.hoverlabel.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..2be3525c3e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="scatterternary.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_size.py new file mode 100644 index 00000000000..0a3eb89c65d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterternary.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..2037f04c915 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="sizesrc", + parent_name="scatterternary.hoverlabel.font", + **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/line/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/line/__init__.py index 309e7a0d732..73e814e94f3 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/line/__init__.py @@ -1,83 +1,22 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatterternary.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="smoothing", parent_name="scatterternary.line", **kwargs - ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1.3), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="shape", parent_name="scatterternary.line", **kwargs - ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["linear", "spline"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.DashValidator): - def __init__(self, plotly_name="dash", parent_name="scatterternary.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterternary.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._smoothing import SmoothingValidator + from ._shape import ShapeValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/line/_color.py b/packages/python/plotly/plotly/validators/scatterternary/line/_color.py new file mode 100644 index 00000000000..d3888381f7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterternary.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/line/_dash.py b/packages/python/plotly/plotly/validators/scatterternary/line/_dash.py new file mode 100644 index 00000000000..a05026167e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/line/_dash.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.DashValidator): + def __init__(self, plotly_name="dash", parent_name="scatterternary.line", **kwargs): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/line/_shape.py b/packages/python/plotly/plotly/validators/scatterternary/line/_shape.py new file mode 100644 index 00000000000..74dcf83e26a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/line/_shape.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="shape", parent_name="scatterternary.line", **kwargs + ): + super(ShapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["linear", "spline"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/line/_smoothing.py b/packages/python/plotly/plotly/validators/scatterternary/line/_smoothing.py new file mode 100644 index 00000000000..60ca353bfe6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/line/_smoothing.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="smoothing", parent_name="scatterternary.line", **kwargs + ): + super(SmoothingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1.3), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/line/_width.py b/packages/python/plotly/plotly/validators/scatterternary/line/_width.py new file mode 100644 index 00000000000..91dc06743ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatterternary.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/__init__.py index 564d0c6657d..bcd2242a57a 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/__init__.py @@ -1,1020 +1,60 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="symbolsrc", parent_name="scatterternary.marker", **kwargs - ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="symbol", parent_name="scatterternary.marker", **kwargs - ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatterternary.marker", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizeref", parent_name="scatterternary.marker", **kwargs - ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="sizemode", parent_name="scatterternary.marker", **kwargs - ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="sizemin", parent_name="scatterternary.marker", **kwargs - ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterternary.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="scatterternary.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="scatterternary.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="opacitysrc", parent_name="scatterternary.marker", **kwargs - ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="scatterternary.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxdisplayed", parent_name="scatterternary.marker", **kwargs - ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="scatterternary.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="gradient", parent_name="scatterternary.marker", **kwargs - ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Gradient"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for type . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterternary.marker", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="scatterternary.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="colorbar", parent_name="scatterternary.marker", **kwargs - ): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - ternary.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterternary.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterternary.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterternary.mar - ker.colorbar.Title` instance or dict with - compatible properties - titlefont - Deprecated: Please use - scatterternary.marker.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - scatterternary.marker.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="scatterternary.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterternary.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatterternary.marker.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scatterternary.marker", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scatterternary.marker", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scatterternary.marker", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatterternary.marker", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scatterternary.marker", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._maxdisplayed import MaxdisplayedValidator + from ._line import LineValidator + from ._gradient import GradientValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_autocolorscale.py new file mode 100644 index 00000000000..4cfe1ead345 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scatterternary.marker", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_cauto.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_cauto.py new file mode 100644 index 00000000000..3d23910a99f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatterternary.marker", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_cmax.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_cmax.py new file mode 100644 index 00000000000..be78cb54d47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scatterternary.marker", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_cmid.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_cmid.py new file mode 100644 index 00000000000..5eb1b37574b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scatterternary.marker", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_cmin.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_cmin.py new file mode 100644 index 00000000000..bd623631b68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scatterternary.marker", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_color.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_color.py new file mode 100644 index 00000000000..cdd9512216d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterternary.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatterternary.marker.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_coloraxis.py new file mode 100644 index 00000000000..72979e71093 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="scatterternary.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_colorbar.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_colorbar.py new file mode 100644 index 00000000000..077b2107ac1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_colorbar.py @@ -0,0 +1,230 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="colorbar", parent_name="scatterternary.marker", **kwargs + ): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.scatter + ternary.marker.colorbar.Tickformatstop` + instances or dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.scatterternary.marker.colorbar.tickformatstop + defaults), sets the default property values to + use for elements of + scatterternary.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.scatterternary.mar + ker.colorbar.Title` instance or dict with + compatible properties + titlefont + Deprecated: Please use + scatterternary.marker.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + scatterternary.marker.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_colorscale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_colorscale.py new file mode 100644 index 00000000000..53f26bbfff8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="scatterternary.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_colorsrc.py new file mode 100644 index 00000000000..5a7dff4b813 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterternary.marker", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_gradient.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_gradient.py new file mode 100644 index 00000000000..88d6f13a84f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_gradient.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="gradient", parent_name="scatterternary.marker", **kwargs + ): + super(GradientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Gradient"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the final color of the gradient fill: the + center color for radial, the right for + horizontal, or the bottom for vertical. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + type + Sets the type of gradient used to fill the + markers + typesrc + Sets the source reference on Chart Studio Cloud + for type . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_line.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_line.py new file mode 100644 index 00000000000..47d6c327869 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_line.py @@ -0,0 +1,106 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="scatterternary.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_maxdisplayed.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_maxdisplayed.py new file mode 100644 index 00000000000..756d55dc257 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_maxdisplayed.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxdisplayed", parent_name="scatterternary.marker", **kwargs + ): + super(MaxdisplayedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_opacity.py new file mode 100644 index 00000000000..8122309d6a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_opacity.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="scatterternary.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_opacitysrc.py new file mode 100644 index 00000000000..6e5fbe2c5a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_opacitysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="opacitysrc", parent_name="scatterternary.marker", **kwargs + ): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_reversescale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_reversescale.py new file mode 100644 index 00000000000..6775bdaeaff --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="scatterternary.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_showscale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_showscale.py new file mode 100644 index 00000000000..65d538aad23 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="scatterternary.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_size.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_size.py new file mode 100644 index 00000000000..fed9edaab2b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterternary.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_sizemin.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizemin.py new file mode 100644 index 00000000000..06c1f142f76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizemin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizemin", parent_name="scatterternary.marker", **kwargs + ): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_sizemode.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizemode.py new file mode 100644 index 00000000000..c219ab7fab6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizemode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="sizemode", parent_name="scatterternary.marker", **kwargs + ): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_sizeref.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizeref.py new file mode 100644 index 00000000000..828002263fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizeref.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="sizeref", parent_name="scatterternary.marker", **kwargs + ): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizesrc.py new file mode 100644 index 00000000000..c7369d12f7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatterternary.marker", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_symbol.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_symbol.py new file mode 100644 index 00000000000..c4fefee3ad2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_symbol.py @@ -0,0 +1,304 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="symbol", parent_name="scatterternary.marker", **kwargs + ): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/_symbolsrc.py new file mode 100644 index 00000000000..0e891820cee --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/_symbolsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="symbolsrc", parent_name="scatterternary.marker", **kwargs + ): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/__init__.py index 8db8f82db20..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/__init__.py @@ -1,873 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="scatterternary.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="yanchor", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="scatterternary.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="scatterternary.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="xanchor", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="scatterternary.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, - plotly_name="title", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="tickwidth", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="tickvals", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, - plotly_name="ticktext", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="ticksuffix", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="ticks", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickprefix", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="tickmode", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="ticklen", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="tickformat", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickfont", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="tickcolor", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, - plotly_name="tickangle", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, - plotly_name="tick0", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="thickness", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, - plotly_name="nticks", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="lenmode", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="scatterternary.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, - plotly_name="dtick", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bgcolor", - parent_name="scatterternary.marker.colorbar", - **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..dc50d75124e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bgcolor", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..bb140982f0a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..d73da0f482d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..9585b3620f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_dtick.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, + plotly_name="dtick", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..b57b563a6d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_len.py new file mode 100644 index 00000000000..3410b08a05d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="scatterternary.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..becd2bacbf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_lenmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="lenmode", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..9fe88fc5c6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_nticks.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, + plotly_name="nticks", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..06993e346c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..6770a97d667 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..3e0f9b7cfc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..bfa74091476 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..afecf3e6aa2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..aa9dcbf66ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..919f132f7eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..d957929f2b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_thickness.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="thickness", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..b314aa79e5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..00bdeb6f13d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tick0.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, + plotly_name="tick0", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..4569c2c750b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickangle.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, + plotly_name="tickangle", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..f8989bf7f3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="tickcolor", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..46569280abf --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickfont.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickfont", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..1ebb5041b2f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformat.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickformat", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..6102421e282 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..d03647a9329 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..1ec763db658 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticklen.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="ticklen", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..65e38c50bfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickmode.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="tickmode", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..6364e8a7063 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="tickprefix", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..eb2d3cb22e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticks.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="ticks", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..d144103fa62 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="ticksuffix", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..760efb84afe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticktext.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="ticktext", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..d8fdbebb973 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..6dfdff52c3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvals.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, + plotly_name="tickvals", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..c1e5c59a666 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..8d41157b50e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="tickwidth", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_title.py new file mode 100644 index 00000000000..5420ca5079a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_title.py @@ -0,0 +1,36 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, + plotly_name="title", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_x.py new file mode 100644 index 00000000000..00f4be8da3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="scatterternary.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..31049737907 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="xanchor", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..7414c4239be --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="scatterternary.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_y.py new file mode 100644 index 00000000000..cf2527c3c5b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="scatterternary.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..ffac80ec0d2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_yanchor.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="yanchor", + parent_name="scatterternary.marker.colorbar", + **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..ffa05516cf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="scatterternary.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py index 494840b7fbf..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterternary.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterternary.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..1d915b82b8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..227484e0e0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterternary.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..7493fd150fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterternary.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py index 250a8521241..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="scatterternary.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="scatterternary.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="scatterternary.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="scatterternary.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="scatterternary.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..2974814023c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="scatterternary.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..fb7c9c4b61f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="scatterternary.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..6c266f70b7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="scatterternary.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..aad8e074ae1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="scatterternary.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..7e348e82dff --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="scatterternary.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/__init__.py index 24fa13cc63d..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/__init__.py @@ -1,81 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="text", - parent_name="scatterternary.marker.colorbar.title", - **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="side", - parent_name="scatterternary.marker.colorbar.title", - **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="font", - parent_name="scatterternary.marker.colorbar.title", - **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..9d1575bc7eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_font.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="font", + parent_name="scatterternary.marker.colorbar.title", + **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..6a587829385 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_side.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="side", + parent_name="scatterternary.marker.colorbar.title", + **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..d9497acd9dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/_text.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="text", + parent_name="scatterternary.marker.colorbar.title", + **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py index 9f9fb0dd765..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterternary.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="scatterternary.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..6085b6dd563 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..d954bb37f28 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="scatterternary.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..bb3c1620a41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterternary.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/__init__.py index b6749327fe3..5193d7a59a5 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/__init__.py @@ -1,74 +1,20 @@ -import _plotly_utils.basevalidators - - -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="typesrc", - parent_name="scatterternary.marker.gradient", - **kwargs - ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="scatterternary.marker.gradient", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="colorsrc", - parent_name="scatterternary.marker.gradient", - **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.marker.gradient", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._typesrc import TypesrcValidator + from ._type import TypeValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_color.py b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_color.py new file mode 100644 index 00000000000..ca336a1479f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.marker.gradient", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_colorsrc.py new file mode 100644 index 00000000000..281f38ee357 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_colorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="colorsrc", + parent_name="scatterternary.marker.gradient", + **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_type.py b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_type.py new file mode 100644 index 00000000000..2bb5fa8719d --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_type.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="scatterternary.marker.gradient", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_typesrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_typesrc.py new file mode 100644 index 00000000000..2a560d74305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/gradient/_typesrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="typesrc", + parent_name="scatterternary.marker.gradient", + **kwargs + ): + super(TypesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/__init__.py index 5cba02c21d2..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/__init__.py @@ -1,216 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="scatterternary.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="scatterternary.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="reversescale", - parent_name="scatterternary.marker.line", - **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterternary.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, - plotly_name="colorscale", - parent_name="scatterternary.marker.line", - **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, - plotly_name="coloraxis", - parent_name="scatterternary.marker.line", - **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterternary.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "scatterternary.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmin", parent_name="scatterternary.marker.line", **kwargs - ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmid", parent_name="scatterternary.marker.line", **kwargs - ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="cmax", parent_name="scatterternary.marker.line", **kwargs - ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="cauto", parent_name="scatterternary.marker.line", **kwargs - ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="autocolorscale", - parent_name="scatterternary.marker.line", - **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..1b8cda32052 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_autocolorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="autocolorscale", + parent_name="scatterternary.marker.line", + **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cauto.py new file mode 100644 index 00000000000..a3372b7eda3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cauto.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="cauto", parent_name="scatterternary.marker.line", **kwargs + ): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmax.py new file mode 100644 index 00000000000..7a8db686bb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmax.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmax", parent_name="scatterternary.marker.line", **kwargs + ): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmid.py new file mode 100644 index 00000000000..85f2fbd4582 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmid.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmid", parent_name="scatterternary.marker.line", **kwargs + ): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmin.py new file mode 100644 index 00000000000..1633f31cd22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_cmin.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="cmin", parent_name="scatterternary.marker.line", **kwargs + ): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_color.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_color.py new file mode 100644 index 00000000000..d88d40f894e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterternary.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "scatterternary.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_coloraxis.py new file mode 100644 index 00000000000..acfd6e0eee8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_coloraxis.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, + plotly_name="coloraxis", + parent_name="scatterternary.marker.line", + **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_colorscale.py new file mode 100644 index 00000000000..eb82479173f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_colorscale.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, + plotly_name="colorscale", + parent_name="scatterternary.marker.line", + **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_colorsrc.py new file mode 100644 index 00000000000..5718f3b58d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterternary.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_reversescale.py new file mode 100644 index 00000000000..d71b795ce3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_reversescale.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="reversescale", + parent_name="scatterternary.marker.line", + **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_width.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_width.py new file mode 100644 index 00000000000..603a608d56f --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="scatterternary.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_widthsrc.py new file mode 100644 index 00000000000..e109339b20e --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="scatterternary.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/selected/__init__.py index 7381738c4c8..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/__init__.py @@ -1,46 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatterternary.selected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of selected points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatterternary.selected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/_marker.py b/packages/python/plotly/plotly/validators/scatterternary/selected/_marker.py new file mode 100644 index 00000000000..45c8e91a69a --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatterternary.selected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/_textfont.py b/packages/python/plotly/plotly/validators/scatterternary/selected/_textfont.py new file mode 100644 index 00000000000..058b4345711 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/_textfont.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatterternary.selected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/__init__.py index 8062840b01a..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/__init__.py @@ -1,55 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterternary.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scatterternary.selected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.selected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_color.py b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_color.py new file mode 100644 index 00000000000..3e85732c038 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.selected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_opacity.py new file mode 100644 index 00000000000..383e5a88bf1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scatterternary.selected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_size.py b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_size.py new file mode 100644 index 00000000000..7eb95fe69d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterternary.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/__init__.py index 93742c5e767..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.selected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/_color.py new file mode 100644 index 00000000000..93742c5e767 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/selected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.selected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/stream/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/stream/__init__.py index fdb6c1734da..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/stream/__init__.py @@ -1,34 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="token", parent_name="scatterternary.stream", **kwargs - ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="scatterternary.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/scatterternary/stream/_maxpoints.py new file mode 100644 index 00000000000..f3bf8dfc181 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="scatterternary.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/stream/_token.py b/packages/python/plotly/plotly/validators/scatterternary/stream/_token.py new file mode 100644 index 00000000000..ff7c79ede6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/stream/_token.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="token", parent_name="scatterternary.stream", **kwargs + ): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/__init__.py index c0231cab710..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="scatterternary.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="scatterternary.textfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="scatterternary.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="scatterternary.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="scatterternary.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="scatterternary.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/_color.py new file mode 100644 index 00000000000..cb61eb4a118 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="scatterternary.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/_colorsrc.py new file mode 100644 index 00000000000..9b9d59eb202 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="scatterternary.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/_family.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/_family.py new file mode 100644 index 00000000000..60967d40762 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="scatterternary.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/_familysrc.py new file mode 100644 index 00000000000..a574ce7cedc --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="scatterternary.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/_size.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/_size.py new file mode 100644 index 00000000000..6e84203d8d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="scatterternary.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/scatterternary/textfont/_sizesrc.py new file mode 100644 index 00000000000..0da183b90c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="scatterternary.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/__init__.py index 28e61d62341..12e2c638682 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/__init__.py @@ -1,50 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._textfont import TextfontValidator + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="textfont", parent_name="scatterternary.unselected", **kwargs - ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the text font color of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="scatterternary.unselected", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/_marker.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/_marker.py new file mode 100644 index 00000000000..003b27a470c --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/_marker.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="scatterternary.unselected", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/_textfont.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/_textfont.py new file mode 100644 index 00000000000..13bd0bd3e54 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/_textfont.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="textfont", parent_name="scatterternary.unselected", **kwargs + ): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the text font color of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py index d139b41d843..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/__init__.py @@ -1,58 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="scatterternary.unselected.marker", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="opacity", - parent_name="scatterternary.unselected.marker", - **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.unselected.marker", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_color.py new file mode 100644 index 00000000000..091f8923be0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.unselected.marker", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_opacity.py new file mode 100644 index 00000000000..da4102f9406 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_opacity.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="opacity", + parent_name="scatterternary.unselected.marker", + **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_size.py new file mode 100644 index 00000000000..fd17277c31b --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="scatterternary.unselected.marker", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/__init__.py index 4cad7075089..d4084e256ce 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/__init__.py @@ -1,17 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="scatterternary.unselected.textfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/_color.py b/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/_color.py new file mode 100644 index 00000000000..4cad7075089 --- /dev/null +++ b/packages/python/plotly/plotly/validators/scatterternary/unselected/textfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="scatterternary.unselected.textfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/__init__.py b/packages/python/plotly/plotly/validators/splom/__init__.py index 4d71b3b2966..84d7f9f7b96 100644 --- a/packages/python/plotly/plotly/validators/splom/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/__init__.py @@ -1,749 +1,80 @@ -import _plotly_utils.basevalidators - - -class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="yaxes", parent_name="splom", **kwargs): - super(YaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - { - "valType": "subplotid", - "regex": "/^y([2-9]|[1-9][0-9]+)?$/", - "editType": "plot", - }, - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="xaxes", parent_name="splom", **kwargs): - super(XaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - free_length=kwargs.pop("free_length", True), - items=kwargs.pop( - "items", - { - "valType": "subplotid", - "regex": "/^x([2-9]|[1-9][0-9]+)?$/", - "editType": "plot", - }, - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="splom", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="splom", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.splom.unselected.M - arker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="splom", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="splom", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="splom", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="splom", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="splom", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowupperhalfValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showupperhalf", parent_name="splom", **kwargs): - super(ShowupperhalfValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlowerhalfValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlowerhalf", parent_name="splom", **kwargs): - super(ShowlowerhalfValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="splom", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="splom", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="splom", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.splom.selected.Mar - ker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="splom", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="splom", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="splom", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="splom", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="splom", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.splom.marker.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - line - :class:`plotly.graph_objects.splom.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for size . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for symbol . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="splom", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="splom", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="splom", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="splom", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="splom", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="splom", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="splom", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="splom", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="splom", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="splom", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DimensionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="dimensiondefaults", parent_name="splom", **kwargs): - super(DimensionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Dimension"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="dimensions", parent_name="splom", **kwargs): - super(DimensionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Dimension"), - data_docs=kwargs.pop( - "data_docs", - """ - axis - :class:`plotly.graph_objects.splom.dimension.Ax - is` instance or dict with compatible properties - label - Sets the label corresponding to this splom - dimension. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . - visible - Determines whether or not this dimension is - shown on the graph. Note that even visible - false dimension contribute to the default grid - generate by this splom trace. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiagonalValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="diagonal", parent_name="splom", **kwargs): - super(DiagonalValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Diagonal"), - data_docs=kwargs.pop( - "data_docs", - """ - visible - Determines whether or not subplots on the - diagonal are displayed. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="splom", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="splom", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._yaxes import YaxesValidator + from ._xaxes import XaxesValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showupperhalf import ShowupperhalfValidator + from ._showlowerhalf import ShowlowerhalfValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._marker import MarkerValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dimensiondefaults import DimensiondefaultsValidator + from ._dimensions import DimensionsValidator + from ._diagonal import DiagonalValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxes.YaxesValidator", + "._xaxes.XaxesValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showupperhalf.ShowupperhalfValidator", + "._showlowerhalf.ShowlowerhalfValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dimensiondefaults.DimensiondefaultsValidator", + "._dimensions.DimensionsValidator", + "._diagonal.DiagonalValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/_customdata.py b/packages/python/plotly/plotly/validators/splom/_customdata.py new file mode 100644 index 00000000000..5c2edfac81a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="splom", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_customdatasrc.py b/packages/python/plotly/plotly/validators/splom/_customdatasrc.py new file mode 100644 index 00000000000..be5347732fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="splom", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_diagonal.py b/packages/python/plotly/plotly/validators/splom/_diagonal.py new file mode 100644 index 00000000000..709cda449ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_diagonal.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class DiagonalValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="diagonal", parent_name="splom", **kwargs): + super(DiagonalValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Diagonal"), + data_docs=kwargs.pop( + "data_docs", + """ + visible + Determines whether or not subplots on the + diagonal are displayed. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_dimensiondefaults.py b/packages/python/plotly/plotly/validators/splom/_dimensiondefaults.py new file mode 100644 index 00000000000..cad3564fb3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_dimensiondefaults.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class DimensiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="dimensiondefaults", parent_name="splom", **kwargs): + super(DimensiondefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Dimension"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_dimensions.py b/packages/python/plotly/plotly/validators/splom/_dimensions.py new file mode 100644 index 00000000000..6a82e6287b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_dimensions.py @@ -0,0 +1,53 @@ +import _plotly_utils.basevalidators + + +class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="dimensions", parent_name="splom", **kwargs): + super(DimensionsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Dimension"), + data_docs=kwargs.pop( + "data_docs", + """ + axis + :class:`plotly.graph_objects.splom.dimension.Ax + is` instance or dict with compatible properties + label + Sets the label corresponding to this splom + dimension. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the dimension values to be plotted. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . + visible + Determines whether or not this dimension is + shown on the graph. Note that even visible + false dimension contribute to the default grid + generate by this splom trace. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hoverinfo.py b/packages/python/plotly/plotly/validators/splom/_hoverinfo.py new file mode 100644 index 00000000000..e553fb4b3d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="splom", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/splom/_hoverinfosrc.py new file mode 100644 index 00000000000..798d32aaf18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="splom", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hoverlabel.py b/packages/python/plotly/plotly/validators/splom/_hoverlabel.py new file mode 100644 index 00000000000..fdbe63fdea8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="splom", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hovertemplate.py b/packages/python/plotly/plotly/validators/splom/_hovertemplate.py new file mode 100644 index 00000000000..a960e8e3915 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="splom", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/splom/_hovertemplatesrc.py new file mode 100644 index 00000000000..b810a1248eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="splom", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hovertext.py b/packages/python/plotly/plotly/validators/splom/_hovertext.py new file mode 100644 index 00000000000..cbc20d88c7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="splom", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_hovertextsrc.py b/packages/python/plotly/plotly/validators/splom/_hovertextsrc.py new file mode 100644 index 00000000000..321a077984b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="splom", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_ids.py b/packages/python/plotly/plotly/validators/splom/_ids.py new file mode 100644 index 00000000000..c6597eb76ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="splom", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_idssrc.py b/packages/python/plotly/plotly/validators/splom/_idssrc.py new file mode 100644 index 00000000000..f69083729e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="splom", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_legendgroup.py b/packages/python/plotly/plotly/validators/splom/_legendgroup.py new file mode 100644 index 00000000000..aacb930e341 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="splom", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_marker.py b/packages/python/plotly/plotly/validators/splom/_marker.py new file mode 100644 index 00000000000..c09dc2a17ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_marker.py @@ -0,0 +1,139 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="splom", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.splom.marker.Color + Bar` instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + line + :class:`plotly.graph_objects.splom.marker.Line` + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on Chart Studio Cloud + for opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on Chart Studio Cloud + for size . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on Chart Studio Cloud + for symbol . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_meta.py b/packages/python/plotly/plotly/validators/splom/_meta.py new file mode 100644 index 00000000000..736d7bdbc3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="splom", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_metasrc.py b/packages/python/plotly/plotly/validators/splom/_metasrc.py new file mode 100644 index 00000000000..fdabba9c03d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="splom", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_name.py b/packages/python/plotly/plotly/validators/splom/_name.py new file mode 100644 index 00000000000..eea26f3a153 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="splom", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_opacity.py b/packages/python/plotly/plotly/validators/splom/_opacity.py new file mode 100644 index 00000000000..9df08d78504 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="splom", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_selected.py b/packages/python/plotly/plotly/validators/splom/_selected.py new file mode 100644 index 00000000000..d518a7f9a8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_selected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="splom", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.splom.selected.Mar + ker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_selectedpoints.py b/packages/python/plotly/plotly/validators/splom/_selectedpoints.py new file mode 100644 index 00000000000..0e42e7a493a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="splom", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_showlegend.py b/packages/python/plotly/plotly/validators/splom/_showlegend.py new file mode 100644 index 00000000000..18ac5c7b70a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="splom", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_showlowerhalf.py b/packages/python/plotly/plotly/validators/splom/_showlowerhalf.py new file mode 100644 index 00000000000..32d340a6f0b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_showlowerhalf.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlowerhalfValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlowerhalf", parent_name="splom", **kwargs): + super(ShowlowerhalfValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_showupperhalf.py b/packages/python/plotly/plotly/validators/splom/_showupperhalf.py new file mode 100644 index 00000000000..2a2f0068783 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_showupperhalf.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowupperhalfValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showupperhalf", parent_name="splom", **kwargs): + super(ShowupperhalfValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_stream.py b/packages/python/plotly/plotly/validators/splom/_stream.py new file mode 100644 index 00000000000..0266ce3e000 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="splom", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_text.py b/packages/python/plotly/plotly/validators/splom/_text.py new file mode 100644 index 00000000000..e60d277af7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="splom", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_textsrc.py b/packages/python/plotly/plotly/validators/splom/_textsrc.py new file mode 100644 index 00000000000..6d3c4e59ff8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="splom", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_uid.py b/packages/python/plotly/plotly/validators/splom/_uid.py new file mode 100644 index 00000000000..586db914dee --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="splom", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_uirevision.py b/packages/python/plotly/plotly/validators/splom/_uirevision.py new file mode 100644 index 00000000000..62b73c5c9f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="splom", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_unselected.py b/packages/python/plotly/plotly/validators/splom/_unselected.py new file mode 100644 index 00000000000..cd575b8e85d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_unselected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="splom", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.splom.unselected.M + arker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_visible.py b/packages/python/plotly/plotly/validators/splom/_visible.py new file mode 100644 index 00000000000..e1742049417 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="splom", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_xaxes.py b/packages/python/plotly/plotly/validators/splom/_xaxes.py new file mode 100644 index 00000000000..78994642b1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_xaxes.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="xaxes", parent_name="splom", **kwargs): + super(XaxesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + { + "valType": "subplotid", + "regex": "/^x([2-9]|[1-9][0-9]+)?$/", + "editType": "plot", + }, + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/_yaxes.py b/packages/python/plotly/plotly/validators/splom/_yaxes.py new file mode 100644 index 00000000000..59b5b6393db --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/_yaxes.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="yaxes", parent_name="splom", **kwargs): + super(YaxesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + free_length=kwargs.pop("free_length", True), + items=kwargs.pop( + "items", + { + "valType": "subplotid", + "regex": "/^y([2-9]|[1-9][0-9]+)?$/", + "editType": "plot", + }, + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/diagonal/__init__.py b/packages/python/plotly/plotly/validators/splom/diagonal/__init__.py index 90f81a4e7c8..1df79295c0f 100644 --- a/packages/python/plotly/plotly/validators/splom/diagonal/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/diagonal/__init__.py @@ -1,12 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._visible import VisibleValidator +else: + from _plotly_utils.importers import relative_import -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="splom.diagonal", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._visible.VisibleValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/splom/diagonal/_visible.py b/packages/python/plotly/plotly/validators/splom/diagonal/_visible.py new file mode 100644 index 00000000000..90f81a4e7c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/diagonal/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="splom.diagonal", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/__init__.py b/packages/python/plotly/plotly/validators/splom/dimension/__init__.py index 1eac06e9afe..06f732d470e 100644 --- a/packages/python/plotly/plotly/validators/splom/dimension/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/dimension/__init__.py @@ -1,114 +1,26 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="splom.dimension", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="valuessrc", parent_name="splom.dimension", **kwargs - ): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="splom.dimension", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="templateitemname", parent_name="splom.dimension", **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="splom.dimension", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="label", parent_name="splom.dimension", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AxisValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="axis", parent_name="splom.dimension", **kwargs): - super(AxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Axis"), - data_docs=kwargs.pop( - "data_docs", - """ - matches - Determines whether or not the x & y axes - generated by this dimension match. Equivalent - to setting the `matches` axis attribute in the - layout with the correct axis id. - type - Sets the axis type for this dimension's - generated x and y axes. Note that the axis - `type` values set in layout take precedence - over this attribute. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._label import LabelValidator + from ._axis import AxisValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._label.LabelValidator", + "._axis.AxisValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_axis.py b/packages/python/plotly/plotly/validators/splom/dimension/_axis.py new file mode 100644 index 00000000000..8d066b27fc7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_axis.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class AxisValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="axis", parent_name="splom.dimension", **kwargs): + super(AxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Axis"), + data_docs=kwargs.pop( + "data_docs", + """ + matches + Determines whether or not the x & y axes + generated by this dimension match. Equivalent + to setting the `matches` axis attribute in the + layout with the correct axis id. + type + Sets the axis type for this dimension's + generated x and y axes. Note that the axis + `type` values set in layout take precedence + over this attribute. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_label.py b/packages/python/plotly/plotly/validators/splom/dimension/_label.py new file mode 100644 index 00000000000..a4352e481a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_label.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="label", parent_name="splom.dimension", **kwargs): + super(LabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_name.py b/packages/python/plotly/plotly/validators/splom/dimension/_name.py new file mode 100644 index 00000000000..04c93efe562 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="splom.dimension", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_templateitemname.py b/packages/python/plotly/plotly/validators/splom/dimension/_templateitemname.py new file mode 100644 index 00000000000..2e424d355ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_templateitemname.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="templateitemname", parent_name="splom.dimension", **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_values.py b/packages/python/plotly/plotly/validators/splom/dimension/_values.py new file mode 100644 index 00000000000..1333e09f380 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="splom.dimension", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_valuessrc.py b/packages/python/plotly/plotly/validators/splom/dimension/_valuessrc.py new file mode 100644 index 00000000000..1999c00fa4a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_valuessrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="valuessrc", parent_name="splom.dimension", **kwargs + ): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/_visible.py b/packages/python/plotly/plotly/validators/splom/dimension/_visible.py new file mode 100644 index 00000000000..33c67fc9899 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="splom.dimension", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/axis/__init__.py b/packages/python/plotly/plotly/validators/splom/dimension/axis/__init__.py index 15e63710e05..94e34818191 100644 --- a/packages/python/plotly/plotly/validators/splom/dimension/axis/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/dimension/axis/__init__.py @@ -1,31 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._type import TypeValidator + from ._matches import MatchesValidator +else: + from _plotly_utils.importers import relative_import -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="type", parent_name="splom.dimension.axis", **kwargs - ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["linear", "log", "date", "category"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MatchesValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="matches", parent_name="splom.dimension.axis", **kwargs - ): - super(MatchesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._type.TypeValidator", "._matches.MatchesValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/axis/_matches.py b/packages/python/plotly/plotly/validators/splom/dimension/axis/_matches.py new file mode 100644 index 00000000000..991d9b4bca5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/axis/_matches.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MatchesValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="matches", parent_name="splom.dimension.axis", **kwargs + ): + super(MatchesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/dimension/axis/_type.py b/packages/python/plotly/plotly/validators/splom/dimension/axis/_type.py new file mode 100644 index 00000000000..5db1d4bed52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/dimension/axis/_type.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="type", parent_name="splom.dimension.axis", **kwargs + ): + super(TypeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["linear", "log", "date", "category"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/__init__.py index edba976fa40..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/splom/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/__init__.py @@ -1,176 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="splom.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="splom.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="splom.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="splom.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="splom.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="splom.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="splom.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="splom.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="splom.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_align.py new file mode 100644 index 00000000000..77a3943055b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="splom.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..88723e587cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="splom.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..6f0610ff0a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="splom.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..828056e923a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="splom.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..4a20b4b4ccf --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="splom.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..1cc00c1c542 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="splom.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_font.py new file mode 100644 index 00000000000..eed842ae77e --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="splom.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f90516ed662 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="splom.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..ee88a888318 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="splom.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/__init__.py index b7e8ebbf767..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="splom.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="splom.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="splom.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="splom.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="splom.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="splom.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_color.py new file mode 100644 index 00000000000..0acbc3f023f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="splom.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..a8f13b835a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="splom.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_family.py new file mode 100644 index 00000000000..c9e084deabd --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="splom.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..b67225dd056 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="splom.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_size.py new file mode 100644 index 00000000000..da07bffa90c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="splom.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..f16390975d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="splom.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/__init__.py index e3c1779d5db..33bd66663fd 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/__init__.py @@ -1,925 +1,56 @@ -import _plotly_utils.basevalidators - - -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="symbolsrc", parent_name="splom.marker", **kwargs): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="splom.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="splom.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizeref", parent_name="splom.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="sizemode", parent_name="splom.marker", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["diameter", "area"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizemin", parent_name="splom.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="splom.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "markerSize"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="splom.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="splom.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="opacitysrc", parent_name="splom.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="splom.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="splom.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color`is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color`is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color`is set to a numerical array. - Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color`is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color`is set to a numerical array. - The colorscale must be an array containing - arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.line.cmin` and - `marker.line.cmax`. Alternatively, `colorscale` - may be a palette name string of the following - list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R - eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black - body,Earth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color`is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorsrc", parent_name="splom.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="splom.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="splom.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.splom.m - arker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.splom.marker.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - splom.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.splom.marker.color - bar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - splom.marker.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - splom.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="splom.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="splom.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop("colorscale_path", "splom.marker.colorscale"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="splom.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="splom.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="splom.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="splom.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="splom.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbolsrc import SymbolsrcValidator + from ._symbol import SymbolValidator + from ._sizesrc import SizesrcValidator + from ._sizeref import SizerefValidator + from ._sizemode import SizemodeValidator + from ._sizemin import SizeminValidator + from ._size import SizeValidator + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._opacitysrc import OpacitysrcValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/splom/marker/_autocolorscale.py new file mode 100644 index 00000000000..e731c503738 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="splom.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_cauto.py b/packages/python/plotly/plotly/validators/splom/marker/_cauto.py new file mode 100644 index 00000000000..aa5eb9c1737 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="splom.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_cmax.py b/packages/python/plotly/plotly/validators/splom/marker/_cmax.py new file mode 100644 index 00000000000..ac00bd668de --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="splom.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_cmid.py b/packages/python/plotly/plotly/validators/splom/marker/_cmid.py new file mode 100644 index 00000000000..3a21b5c29d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="splom.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_cmin.py b/packages/python/plotly/plotly/validators/splom/marker/_cmin.py new file mode 100644 index 00000000000..8d56cbd9124 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="splom.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_color.py b/packages/python/plotly/plotly/validators/splom/marker/_color.py new file mode 100644 index 00000000000..f3dda3e6f63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="splom.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop("colorscale_path", "splom.marker.colorscale"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/splom/marker/_coloraxis.py new file mode 100644 index 00000000000..c302d32bcbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="splom.marker", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_colorbar.py b/packages/python/plotly/plotly/validators/splom/marker/_colorbar.py new file mode 100644 index 00000000000..1b45201545d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="splom.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.splom.m + arker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.splom.marker.colorbar.tickformatstopdefaults) + , sets the default property values to use for + elements of + splom.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.splom.marker.color + bar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + splom.marker.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + splom.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_colorscale.py b/packages/python/plotly/plotly/validators/splom/marker/_colorscale.py new file mode 100644 index 00000000000..c4b7ccc2998 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="splom.marker", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_colorsrc.py b/packages/python/plotly/plotly/validators/splom/marker/_colorsrc.py new file mode 100644 index 00000000000..73ca40fd567 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_colorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorsrc", parent_name="splom.marker", **kwargs): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_line.py b/packages/python/plotly/plotly/validators/splom/marker/_line.py new file mode 100644 index 00000000000..3a1ecb69966 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_line.py @@ -0,0 +1,104 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="splom.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.line.colorscale`. Has an + effect only if in `marker.line.color`is set to + a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has + an effect only if in `marker.line.color`is set + to a numerical array. Defaults to `false` when + `marker.line.cmin` and `marker.line.cmax` are + set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.line.cmin` and/or + `marker.line.cmax` to be equidistant to this + point. Has an effect only if in + `marker.line.color`is set to a numerical array. + Value should have the same units as in + `marker.line.color`. Has no effect when + `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.line.color`is set + to a numerical array. Value should have the + same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color`is set to a numerical array. + The colorscale must be an array containing + arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.line.cmin` and + `marker.line.cmax`. Alternatively, `colorscale` + may be a palette name string of the following + list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,R + eds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Black + body,Earth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.line.color`is set to + a numerical array. If true, `marker.line.cmin` + will correspond to the last color in the array + and `marker.line.cmax` will correspond to the + first color. + width + Sets the width (in px) of the lines bounding + the marker points. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_opacity.py b/packages/python/plotly/plotly/validators/splom/marker/_opacity.py new file mode 100644 index 00000000000..41bf9a40c9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="splom.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_opacitysrc.py b/packages/python/plotly/plotly/validators/splom/marker/_opacitysrc.py new file mode 100644 index 00000000000..e15c4bc8b4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_opacitysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="opacitysrc", parent_name="splom.marker", **kwargs): + super(OpacitysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_reversescale.py b/packages/python/plotly/plotly/validators/splom/marker/_reversescale.py new file mode 100644 index 00000000000..7f632c23014 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="splom.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_showscale.py b/packages/python/plotly/plotly/validators/splom/marker/_showscale.py new file mode 100644 index 00000000000..589ced53392 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="splom.marker", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_size.py b/packages/python/plotly/plotly/validators/splom/marker/_size.py new file mode 100644 index 00000000000..a5cf0d0c203 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="splom.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "markerSize"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_sizemin.py b/packages/python/plotly/plotly/validators/splom/marker/_sizemin.py new file mode 100644 index 00000000000..9209d343ebb --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_sizemin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizemin", parent_name="splom.marker", **kwargs): + super(SizeminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_sizemode.py b/packages/python/plotly/plotly/validators/splom/marker/_sizemode.py new file mode 100644 index 00000000000..0878e34c59b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_sizemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="sizemode", parent_name="splom.marker", **kwargs): + super(SizemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["diameter", "area"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_sizeref.py b/packages/python/plotly/plotly/validators/splom/marker/_sizeref.py new file mode 100644 index 00000000000..10d005a8024 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_sizeref.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizeref", parent_name="splom.marker", **kwargs): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_sizesrc.py b/packages/python/plotly/plotly/validators/splom/marker/_sizesrc.py new file mode 100644 index 00000000000..9ae67b9e760 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="splom.marker", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_symbol.py b/packages/python/plotly/plotly/validators/splom/marker/_symbol.py new file mode 100644 index 00000000000..e5fdc1e424a --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="splom.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/_symbolsrc.py b/packages/python/plotly/plotly/validators/splom/marker/_symbolsrc.py new file mode 100644 index 00000000000..f98c297e8eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/_symbolsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="symbolsrc", parent_name="splom.marker", **kwargs): + super(SymbolsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/__init__.py index 25377b9c6f2..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/__init__.py @@ -1,782 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="splom.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="splom.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="splom.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="splom.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="splom.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="splom.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="splom.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="splom.marker.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="splom.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="splom.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="splom.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="splom.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="splom.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="splom.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="splom.marker.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="splom.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="splom.marker.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="splom.marker.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="splom.marker.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="splom.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="splom.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="splom.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="splom.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="splom.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="splom.marker.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="splom.marker.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="splom.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..e53120c6b84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="splom.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..42b45f6068f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="splom.marker.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..6602d2391d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="splom.marker.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..327c9b0a7a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="splom.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..eb5135eb768 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_len.py new file mode 100644 index 00000000000..41ca623fcd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="splom.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..7cebfdc60e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="splom.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..9b36f22caeb --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="splom.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..f223b31497e --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="splom.marker.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..4b7e937d698 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="splom.marker.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..fa57a2a8791 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..5aa884661a5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="splom.marker.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..3b6af2fe72c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..89d8df2d4f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..777effbd1f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..0f0501eda88 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="splom.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..fbba196db3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="splom.marker.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..fd42305b699 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="splom.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..7de589f64d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..cacb844d426 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..ebdffac5262 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..da80011034c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..30cf3e9803d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..c183ec5ddb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="splom.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..38cffbe3697 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="splom.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..c2a14e2dfaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..c49e4fea42f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..eac8337b158 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="splom.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..542775c9891 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="splom.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..8f7e2c075a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="splom.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..1703404acee --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="splom.marker.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..3bccf7e3650 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..bf29a3409e2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..2ec99c5009c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="splom.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_title.py new file mode 100644 index 00000000000..7bfb7dafdb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="splom.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_x.py new file mode 100644 index 00000000000..3046980c004 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="splom.marker.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..fff72eb689f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="splom.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..73a36da84ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="splom.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_y.py new file mode 100644 index 00000000000..31177d32270 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="splom.marker.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..b0ca0b09e58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="splom.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..27fbdd4039d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="splom.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/__init__.py index 78e0f534907..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/__init__.py @@ -1,55 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="splom.marker.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="splom.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="splom.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..29fdc1be022 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="splom.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..28a3c04f27e --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="splom.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..efef3ca107b --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="splom.marker.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py index 020a2020f78..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="splom.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="splom.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="splom.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="splom.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="splom.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..ab6578cbcec --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="splom.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..56e5b548ce2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="splom.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..6c2e45b3d92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="splom.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..b9c725ecfa5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="splom.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..4983546265f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="splom.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/__init__.py index 088a99d460f..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="splom.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="splom.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="splom.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..63a3b2c75a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="splom.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..e159e21aafc --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="splom.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..7cba92ec7ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="splom.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/__init__.py index f3a41a4d422..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="splom.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="splom.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="splom.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..e2c2578ddb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="splom.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..48d95ea90d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="splom.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..b929b57b23f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="splom.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/__init__.py b/packages/python/plotly/plotly/validators/splom/marker/line/__init__.py index e2b4d8b2c38..d0f12904f10 100644 --- a/packages/python/plotly/plotly/validators/splom/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/marker/line/__init__.py @@ -1,192 +1,36 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="splom.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="splom.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="splom.marker.line", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="splom.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="splom.marker.line", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="splom.marker.line", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="splom.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - colorscale_path=kwargs.pop( - "colorscale_path", "splom.marker.line.colorscale" - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="splom.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="splom.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="splom.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="splom.marker.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="splom.marker.line", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._reversescale import ReversescaleValidator + from ._colorsrc import ColorsrcValidator + from ._colorscale import ColorscaleValidator + from ._coloraxis import ColoraxisValidator + from ._color import ColorValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_autocolorscale.py b/packages/python/plotly/plotly/validators/splom/marker/line/_autocolorscale.py new file mode 100644 index 00000000000..541f5d4d386 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="splom.marker.line", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_cauto.py b/packages/python/plotly/plotly/validators/splom/marker/line/_cauto.py new file mode 100644 index 00000000000..69f52df8687 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="splom.marker.line", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_cmax.py b/packages/python/plotly/plotly/validators/splom/marker/line/_cmax.py new file mode 100644 index 00000000000..c95abbc6065 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="splom.marker.line", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_cmid.py b/packages/python/plotly/plotly/validators/splom/marker/line/_cmid.py new file mode 100644 index 00000000000..5f730cae7f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="splom.marker.line", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_cmin.py b/packages/python/plotly/plotly/validators/splom/marker/line/_cmin.py new file mode 100644 index 00000000000..98901324d53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="splom.marker.line", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_color.py b/packages/python/plotly/plotly/validators/splom/marker/line/_color.py new file mode 100644 index 00000000000..21f89fedc32 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_color.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="splom.marker.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + colorscale_path=kwargs.pop( + "colorscale_path", "splom.marker.line.colorscale" + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_coloraxis.py b/packages/python/plotly/plotly/validators/splom/marker/line/_coloraxis.py new file mode 100644 index 00000000000..26589292f4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="splom.marker.line", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_colorscale.py b/packages/python/plotly/plotly/validators/splom/marker/line/_colorscale.py new file mode 100644 index 00000000000..bc5e50122f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="splom.marker.line", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/splom/marker/line/_colorsrc.py new file mode 100644 index 00000000000..ee93011504c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="splom.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_reversescale.py b/packages/python/plotly/plotly/validators/splom/marker/line/_reversescale.py new file mode 100644 index 00000000000..36946efb3e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="splom.marker.line", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_width.py b/packages/python/plotly/plotly/validators/splom/marker/line/_width.py new file mode 100644 index 00000000000..b95ab4016b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="splom.marker.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/splom/marker/line/_widthsrc.py new file mode 100644 index 00000000000..ec94d825c72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="splom.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/selected/__init__.py b/packages/python/plotly/plotly/validators/splom/selected/__init__.py index 6206ffed245..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/splom/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/selected/__init__.py @@ -1,22 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="splom.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/splom/selected/_marker.py b/packages/python/plotly/plotly/validators/splom/selected/_marker.py new file mode 100644 index 00000000000..6206ffed245 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/selected/_marker.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="splom.selected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/splom/selected/marker/__init__.py index 130407c9679..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/splom/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/selected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="splom.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="splom.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="splom.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/selected/marker/_color.py b/packages/python/plotly/plotly/validators/splom/selected/marker/_color.py new file mode 100644 index 00000000000..49f08c55f6f --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="splom.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/splom/selected/marker/_opacity.py new file mode 100644 index 00000000000..4980c4a35af --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="splom.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/selected/marker/_size.py b/packages/python/plotly/plotly/validators/splom/selected/marker/_size.py new file mode 100644 index 00000000000..e04fbbe32b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="splom.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/stream/__init__.py b/packages/python/plotly/plotly/validators/splom/stream/__init__.py index 49334c608e0..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/splom/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="splom.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="splom.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/splom/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/splom/stream/_maxpoints.py new file mode 100644 index 00000000000..6288ffdaf0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="splom.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/stream/_token.py b/packages/python/plotly/plotly/validators/splom/stream/_token.py new file mode 100644 index 00000000000..f90ab1e58bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="splom.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/unselected/__init__.py b/packages/python/plotly/plotly/validators/splom/unselected/__init__.py index c80a741d59d..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/splom/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/unselected/__init__.py @@ -1,25 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="splom.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/splom/unselected/_marker.py b/packages/python/plotly/plotly/validators/splom/unselected/_marker.py new file mode 100644 index 00000000000..c80a741d59d --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/unselected/_marker.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="splom.unselected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/splom/unselected/marker/__init__.py index 67755c6c396..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/splom/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/splom/unselected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="splom.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="splom.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="splom.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/splom/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/splom/unselected/marker/_color.py new file mode 100644 index 00000000000..1ca684584fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="splom.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/splom/unselected/marker/_opacity.py new file mode 100644 index 00000000000..0eea3b9e141 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="splom.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/splom/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/splom/unselected/marker/_size.py new file mode 100644 index 00000000000..7e860c14449 --- /dev/null +++ b/packages/python/plotly/plotly/validators/splom/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="splom.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/__init__.py b/packages/python/plotly/plotly/validators/streamtube/__init__.py index 618ac811481..5c29d48d098 100644 --- a/packages/python/plotly/plotly/validators/streamtube/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/__init__.py @@ -1,1040 +1,110 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="streamtube", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="streamtube", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="streamtube", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="streamtube", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="streamtube", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="streamtube", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="wsrc", parent_name="streamtube", **kwargs): - super(WsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="w", parent_name="streamtube", **kwargs): - super(WValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="vsrc", parent_name="streamtube", **kwargs): - super(VsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="streamtube", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="v", parent_name="streamtube", **kwargs): - super(VValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="usrc", parent_name="streamtube", **kwargs): - super(UsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="streamtube", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="streamtube", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="u", parent_name="streamtube", **kwargs): - super(UValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="streamtube", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="streamtube", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="starts", parent_name="streamtube", **kwargs): - super(StartsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Starts"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Sets the x components of the starting position - of the streamtubes - xsrc - Sets the source reference on Chart Studio Cloud - for x . - y - Sets the y components of the starting position - of the streamtubes - ysrc - Sets the source reference on Chart Studio Cloud - for y . - z - Sets the z components of the starting position - of the streamtubes - zsrc - Sets the source reference on Chart Studio Cloud - for z . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="sizeref", parent_name="streamtube", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="streamtube", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="streamtube", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="streamtube", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="streamtube", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="streamtube", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="streamtube", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="streamtube", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="streamtube", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdisplayedValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="maxdisplayed", parent_name="streamtube", **kwargs): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lightposition", parent_name="streamtube", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lightposition"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lighting", parent_name="streamtube", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lighting"), - data_docs=kwargs.pop( - "data_docs", - """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="streamtube", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="streamtube", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="streamtube", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="streamtube", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="streamtube", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="streamtube", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="streamtube", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="streamtube", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="streamtube", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop( - "flags", - ["x", "y", "z", "u", "v", "w", "norm", "divergence", "text", "name"], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="streamtube", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="streamtube", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="streamtube", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="streamtube", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.streamt - ube.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.streamtube.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of streamtube.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.streamtube.colorba - r.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - streamtube.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - streamtube.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="streamtube", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="streamtube", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="streamtube", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="streamtube", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="streamtube", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="streamtube", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._x import XValidator + from ._wsrc import WsrcValidator + from ._w import WValidator + from ._vsrc import VsrcValidator + from ._visible import VisibleValidator + from ._v import VValidator + from ._usrc import UsrcValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._u import UValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._starts import StartsValidator + from ._sizeref import SizerefValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._reversescale import ReversescaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._maxdisplayed import MaxdisplayedValidator + from ._lightposition import LightpositionValidator + from ._lighting import LightingValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + "._wsrc.WsrcValidator", + "._w.WValidator", + "._vsrc.VsrcValidator", + "._visible.VisibleValidator", + "._v.VValidator", + "._usrc.UsrcValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._u.UValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._starts.StartsValidator", + "._sizeref.SizerefValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_autocolorscale.py b/packages/python/plotly/plotly/validators/streamtube/_autocolorscale.py new file mode 100644 index 00000000000..ba01cb00d7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="streamtube", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_cauto.py b/packages/python/plotly/plotly/validators/streamtube/_cauto.py new file mode 100644 index 00000000000..1e7fd7cd2a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="streamtube", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_cmax.py b/packages/python/plotly/plotly/validators/streamtube/_cmax.py new file mode 100644 index 00000000000..c9745795adc --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="streamtube", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_cmid.py b/packages/python/plotly/plotly/validators/streamtube/_cmid.py new file mode 100644 index 00000000000..66850d66ba8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="streamtube", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_cmin.py b/packages/python/plotly/plotly/validators/streamtube/_cmin.py new file mode 100644 index 00000000000..dca6968cca0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="streamtube", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_coloraxis.py b/packages/python/plotly/plotly/validators/streamtube/_coloraxis.py new file mode 100644 index 00000000000..a0dc51986c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="streamtube", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_colorbar.py b/packages/python/plotly/plotly/validators/streamtube/_colorbar.py new file mode 100644 index 00000000000..0697b46b3c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="streamtube", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.streamt + ube.colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.streamtube.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of streamtube.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.streamtube.colorba + r.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + streamtube.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + streamtube.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_colorscale.py b/packages/python/plotly/plotly/validators/streamtube/_colorscale.py new file mode 100644 index 00000000000..17d67167e58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="streamtube", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_customdata.py b/packages/python/plotly/plotly/validators/streamtube/_customdata.py new file mode 100644 index 00000000000..fc86a6a0a71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="streamtube", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_customdatasrc.py b/packages/python/plotly/plotly/validators/streamtube/_customdatasrc.py new file mode 100644 index 00000000000..08c9849560f --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="streamtube", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_hoverinfo.py b/packages/python/plotly/plotly/validators/streamtube/_hoverinfo.py new file mode 100644 index 00000000000..4a5012bd3d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_hoverinfo.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="streamtube", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", + ["x", "y", "z", "u", "v", "w", "norm", "divergence", "text", "name"], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/streamtube/_hoverinfosrc.py new file mode 100644 index 00000000000..a340e5c0d3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="streamtube", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_hoverlabel.py b/packages/python/plotly/plotly/validators/streamtube/_hoverlabel.py new file mode 100644 index 00000000000..919c3c91110 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="streamtube", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_hovertemplate.py b/packages/python/plotly/plotly/validators/streamtube/_hovertemplate.py new file mode 100644 index 00000000000..7e901fb9800 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="streamtube", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/streamtube/_hovertemplatesrc.py new file mode 100644 index 00000000000..9c83fa6bed0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="streamtube", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_hovertext.py b/packages/python/plotly/plotly/validators/streamtube/_hovertext.py new file mode 100644 index 00000000000..48e9ffdffe8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_hovertext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="streamtube", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_ids.py b/packages/python/plotly/plotly/validators/streamtube/_ids.py new file mode 100644 index 00000000000..536d575eebd --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="streamtube", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_idssrc.py b/packages/python/plotly/plotly/validators/streamtube/_idssrc.py new file mode 100644 index 00000000000..d3eef3ae5ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="streamtube", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_legendgroup.py b/packages/python/plotly/plotly/validators/streamtube/_legendgroup.py new file mode 100644 index 00000000000..3e9db92629e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="streamtube", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_lighting.py b/packages/python/plotly/plotly/validators/streamtube/_lighting.py new file mode 100644 index 00000000000..e3568a59b9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_lighting.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lighting", parent_name="streamtube", **kwargs): + super(LightingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lighting"), + data_docs=kwargs.pop( + "data_docs", + """ + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_lightposition.py b/packages/python/plotly/plotly/validators/streamtube/_lightposition.py new file mode 100644 index 00000000000..982a45b611a --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_lightposition.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lightposition", parent_name="streamtube", **kwargs): + super(LightpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lightposition"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_maxdisplayed.py b/packages/python/plotly/plotly/validators/streamtube/_maxdisplayed.py new file mode 100644 index 00000000000..e5df37d6e22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_maxdisplayed.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MaxdisplayedValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="maxdisplayed", parent_name="streamtube", **kwargs): + super(MaxdisplayedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_meta.py b/packages/python/plotly/plotly/validators/streamtube/_meta.py new file mode 100644 index 00000000000..f96ee0ded7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="streamtube", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_metasrc.py b/packages/python/plotly/plotly/validators/streamtube/_metasrc.py new file mode 100644 index 00000000000..6175531d80c --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="streamtube", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_name.py b/packages/python/plotly/plotly/validators/streamtube/_name.py new file mode 100644 index 00000000000..49b27fbe6f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="streamtube", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_opacity.py b/packages/python/plotly/plotly/validators/streamtube/_opacity.py new file mode 100644 index 00000000000..954cfc88755 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="streamtube", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_reversescale.py b/packages/python/plotly/plotly/validators/streamtube/_reversescale.py new file mode 100644 index 00000000000..1feca81f0aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="streamtube", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_scene.py b/packages/python/plotly/plotly/validators/streamtube/_scene.py new file mode 100644 index 00000000000..9f0a1163ce9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="streamtube", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_showlegend.py b/packages/python/plotly/plotly/validators/streamtube/_showlegend.py new file mode 100644 index 00000000000..4f6a6b7b18e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="streamtube", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_showscale.py b/packages/python/plotly/plotly/validators/streamtube/_showscale.py new file mode 100644 index 00000000000..c91458860b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="streamtube", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_sizeref.py b/packages/python/plotly/plotly/validators/streamtube/_sizeref.py new file mode 100644 index 00000000000..844a40c326a --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_sizeref.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="sizeref", parent_name="streamtube", **kwargs): + super(SizerefValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_starts.py b/packages/python/plotly/plotly/validators/streamtube/_starts.py new file mode 100644 index 00000000000..a2d06dfa4b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_starts.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class StartsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="starts", parent_name="streamtube", **kwargs): + super(StartsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Starts"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Sets the x components of the starting position + of the streamtubes + xsrc + Sets the source reference on Chart Studio Cloud + for x . + y + Sets the y components of the starting position + of the streamtubes + ysrc + Sets the source reference on Chart Studio Cloud + for y . + z + Sets the z components of the starting position + of the streamtubes + zsrc + Sets the source reference on Chart Studio Cloud + for z . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_stream.py b/packages/python/plotly/plotly/validators/streamtube/_stream.py new file mode 100644 index 00000000000..de4de329155 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="streamtube", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_text.py b/packages/python/plotly/plotly/validators/streamtube/_text.py new file mode 100644 index 00000000000..d3f6ed9d120 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="streamtube", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_u.py b/packages/python/plotly/plotly/validators/streamtube/_u.py new file mode 100644 index 00000000000..aa285c80102 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_u.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="u", parent_name="streamtube", **kwargs): + super(UValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_uid.py b/packages/python/plotly/plotly/validators/streamtube/_uid.py new file mode 100644 index 00000000000..4c77d4855e8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="streamtube", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_uirevision.py b/packages/python/plotly/plotly/validators/streamtube/_uirevision.py new file mode 100644 index 00000000000..328227b7019 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="streamtube", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_usrc.py b/packages/python/plotly/plotly/validators/streamtube/_usrc.py new file mode 100644 index 00000000000..b4524aa156e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_usrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="usrc", parent_name="streamtube", **kwargs): + super(UsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_v.py b/packages/python/plotly/plotly/validators/streamtube/_v.py new file mode 100644 index 00000000000..6889d3de102 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_v.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="v", parent_name="streamtube", **kwargs): + super(VValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_visible.py b/packages/python/plotly/plotly/validators/streamtube/_visible.py new file mode 100644 index 00000000000..97b46d6dbc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="streamtube", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_vsrc.py b/packages/python/plotly/plotly/validators/streamtube/_vsrc.py new file mode 100644 index 00000000000..3b9a2006002 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_vsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="vsrc", parent_name="streamtube", **kwargs): + super(VsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_w.py b/packages/python/plotly/plotly/validators/streamtube/_w.py new file mode 100644 index 00000000000..698dd887a2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_w.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="w", parent_name="streamtube", **kwargs): + super(WValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_wsrc.py b/packages/python/plotly/plotly/validators/streamtube/_wsrc.py new file mode 100644 index 00000000000..df09cdf2374 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_wsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="wsrc", parent_name="streamtube", **kwargs): + super(WsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_x.py b/packages/python/plotly/plotly/validators/streamtube/_x.py new file mode 100644 index 00000000000..6043ce706ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="streamtube", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_xsrc.py b/packages/python/plotly/plotly/validators/streamtube/_xsrc.py new file mode 100644 index 00000000000..818095db247 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="streamtube", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_y.py b/packages/python/plotly/plotly/validators/streamtube/_y.py new file mode 100644 index 00000000000..a7e8aa5f747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="streamtube", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_ysrc.py b/packages/python/plotly/plotly/validators/streamtube/_ysrc.py new file mode 100644 index 00000000000..eb72a2a6201 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="streamtube", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_z.py b/packages/python/plotly/plotly/validators/streamtube/_z.py new file mode 100644 index 00000000000..3b4b3c67b9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="streamtube", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/_zsrc.py b/packages/python/plotly/plotly/validators/streamtube/_zsrc.py new file mode 100644 index 00000000000..adfa2254529 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="streamtube", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/__init__.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/__init__.py index a544bc394ca..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/streamtube/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/__init__.py @@ -1,761 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="streamtube.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="streamtube.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="streamtube.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="streamtube.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="streamtube.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="streamtube.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="streamtube.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="streamtube.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="streamtube.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="streamtube.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="streamtube.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="streamtube.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="streamtube.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="streamtube.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="streamtube.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="streamtube.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="streamtube.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="streamtube.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="streamtube.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="streamtube.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="streamtube.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="streamtube.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="streamtube.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="streamtube.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="streamtube.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="streamtube.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="streamtube.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="streamtube.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="streamtube.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="streamtube.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="streamtube.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="streamtube.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="streamtube.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="streamtube.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="streamtube.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="streamtube.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="streamtube.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="streamtube.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="streamtube.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="streamtube.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="streamtube.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_bgcolor.py new file mode 100644 index 00000000000..8e9bae28e86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="streamtube.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_bordercolor.py new file mode 100644 index 00000000000..3ba86bbcd4f --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="streamtube.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_borderwidth.py new file mode 100644 index 00000000000..b2f656f06ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="streamtube.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_dtick.py new file mode 100644 index 00000000000..618bada9c82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="streamtube.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_exponentformat.py new file mode 100644 index 00000000000..5b622d8c741 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="streamtube.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_len.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_len.py new file mode 100644 index 00000000000..8e6079b9104 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="streamtube.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_lenmode.py new file mode 100644 index 00000000000..bb00c829f72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="streamtube.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_nticks.py new file mode 100644 index 00000000000..d938bb867af --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="streamtube.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..306a623e10f --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="streamtube.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..82d0b2cb4b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="streamtube.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_separatethousands.py new file mode 100644 index 00000000000..4be34651659 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="streamtube.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showexponent.py new file mode 100644 index 00000000000..cc5c295d710 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="streamtube.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showticklabels.py new file mode 100644 index 00000000000..1b2244a31ee --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="streamtube.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..4ff5a42c877 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="streamtube.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..8d58897b616 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="streamtube.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_thickness.py new file mode 100644 index 00000000000..d3895732e44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="streamtube.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..64f14a55def --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="streamtube.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tick0.py new file mode 100644 index 00000000000..e1190bb2ea7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="streamtube.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickangle.py new file mode 100644 index 00000000000..23bfdda314f --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="streamtube.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickcolor.py new file mode 100644 index 00000000000..7ad6c0636cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="streamtube.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickfont.py new file mode 100644 index 00000000000..666f3e911b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="streamtube.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformat.py new file mode 100644 index 00000000000..6167674be1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="streamtube.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..af5d40aec80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="streamtube.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..b23d449eb45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="streamtube.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticklen.py new file mode 100644 index 00000000000..64fea49775a --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="streamtube.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickmode.py new file mode 100644 index 00000000000..a02b163aa7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="streamtube.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickprefix.py new file mode 100644 index 00000000000..be2201e9f3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="streamtube.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticks.py new file mode 100644 index 00000000000..3fd32b41220 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="streamtube.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..ab3dbf58ea3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="streamtube.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticktext.py new file mode 100644 index 00000000000..60a0923b763 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="streamtube.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..75fc04acc44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="streamtube.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickvals.py new file mode 100644 index 00000000000..66e2ec0d3c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="streamtube.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..8469fa48624 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="streamtube.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickwidth.py new file mode 100644 index 00000000000..38cc83104ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="streamtube.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_title.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_title.py new file mode 100644 index 00000000000..8ca3aa517b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="streamtube.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_x.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_x.py new file mode 100644 index 00000000000..afd7d4806fc --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="streamtube.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_xanchor.py new file mode 100644 index 00000000000..424214e9388 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="streamtube.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_xpad.py new file mode 100644 index 00000000000..31ecc2ccda1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="streamtube.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_y.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_y.py new file mode 100644 index 00000000000..524ccfd8436 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="streamtube.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_yanchor.py new file mode 100644 index 00000000000..c3ee9cab458 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="streamtube.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ypad.py new file mode 100644 index 00000000000..680ac55b1bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="streamtube.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/__init__.py index 56e5de8f089..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="streamtube.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="streamtube.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="streamtube.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..2163b9acbb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="streamtube.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..15fba8d105e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="streamtube.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..95a562e8da1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="streamtube.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py index 08db54bab29..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="streamtube.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="streamtube.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="streamtube.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="streamtube.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="streamtube.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..8098610b0b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="streamtube.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..8d57664e27a --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="streamtube.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..5f282bebfa7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="streamtube.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..e8b39fbdddf --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="streamtube.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..e3bf69eb4b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="streamtube.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/__init__.py index 19daf6fee1e..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="streamtube.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="streamtube.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="streamtube.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_font.py new file mode 100644 index 00000000000..6783f712b97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="streamtube.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_side.py new file mode 100644 index 00000000000..6e0a48ebffc --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="streamtube.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_text.py new file mode 100644 index 00000000000..ef2fe01c31c --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="streamtube.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/__init__.py index 7e66c46a51b..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/__init__.py @@ -1,55 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="streamtube.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="streamtube.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="streamtube.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_color.py new file mode 100644 index 00000000000..4fcac784790 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="streamtube.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_family.py new file mode 100644 index 00000000000..07909111ff4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="streamtube.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_size.py new file mode 100644 index 00000000000..30342cd861c --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="streamtube.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/__init__.py index 68fd6a30472..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/__init__.py @@ -1,185 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="streamtube.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="streamtube.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="streamtube.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="streamtube.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="streamtube.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="streamtube.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="streamtube.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="streamtube.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="streamtube.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_align.py new file mode 100644 index 00000000000..51f87ca1cb2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="streamtube.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..06675c794c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="streamtube.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..e6ce4ccad53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="streamtube.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..31f4368c511 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="streamtube.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..d2491f5533e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="streamtube.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..17b0a988346 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="bordercolorsrc", + parent_name="streamtube.hoverlabel", + **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_font.py new file mode 100644 index 00000000000..61f36841067 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="streamtube.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_namelength.py new file mode 100644 index 00000000000..40c3bedf175 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="streamtube.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..7c0c5b2bac3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="streamtube.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/__init__.py index 9978d8788b0..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/__init__.py @@ -1,103 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="streamtube.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="streamtube.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="familysrc", - parent_name="streamtube.hoverlabel.font", - **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="streamtube.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="streamtube.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="streamtube.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_color.py new file mode 100644 index 00000000000..eeddad72b03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="streamtube.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..0618dad49ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="streamtube.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_family.py new file mode 100644 index 00000000000..aa68e877984 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="streamtube.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..ac2a499d8b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_familysrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="familysrc", + parent_name="streamtube.hoverlabel.font", + **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_size.py new file mode 100644 index 00000000000..4088c70141e --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="streamtube.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..590d11a6163 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="streamtube.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/__init__.py b/packages/python/plotly/plotly/validators/streamtube/lighting/__init__.py index 3b0e9b9e787..12f1cf66154 100644 --- a/packages/python/plotly/plotly/validators/streamtube/lighting/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/__init__.py @@ -1,130 +1,26 @@ -import _plotly_utils.basevalidators - - -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="vertexnormalsepsilon", - parent_name="streamtube.lighting", - **kwargs - ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="specular", parent_name="streamtube.lighting", **kwargs - ): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="roughness", parent_name="streamtube.lighting", **kwargs - ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="fresnel", parent_name="streamtube.lighting", **kwargs - ): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="facenormalsepsilon", - parent_name="streamtube.lighting", - **kwargs - ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="diffuse", parent_name="streamtube.lighting", **kwargs - ): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ambient", parent_name="streamtube.lighting", **kwargs - ): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._vertexnormalsepsilon import VertexnormalsepsilonValidator + from ._specular import SpecularValidator + from ._roughness import RoughnessValidator + from ._fresnel import FresnelValidator + from ._facenormalsepsilon import FacenormalsepsilonValidator + from ._diffuse import DiffuseValidator + from ._ambient import AmbientValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_ambient.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_ambient.py new file mode 100644 index 00000000000..f19d43603ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_ambient.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ambient", parent_name="streamtube.lighting", **kwargs + ): + super(AmbientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_diffuse.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_diffuse.py new file mode 100644 index 00000000000..f1432484316 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_diffuse.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="diffuse", parent_name="streamtube.lighting", **kwargs + ): + super(DiffuseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_facenormalsepsilon.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_facenormalsepsilon.py new file mode 100644 index 00000000000..4a07cc6a3df --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_facenormalsepsilon.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="facenormalsepsilon", + parent_name="streamtube.lighting", + **kwargs + ): + super(FacenormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_fresnel.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_fresnel.py new file mode 100644 index 00000000000..f4218a718fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_fresnel.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="fresnel", parent_name="streamtube.lighting", **kwargs + ): + super(FresnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_roughness.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_roughness.py new file mode 100644 index 00000000000..d480fcc24cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_roughness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="roughness", parent_name="streamtube.lighting", **kwargs + ): + super(RoughnessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_specular.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_specular.py new file mode 100644 index 00000000000..6bf79f42e3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_specular.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="specular", parent_name="streamtube.lighting", **kwargs + ): + super(SpecularValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py b/packages/python/plotly/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py new file mode 100644 index 00000000000..c7c4aa51c10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="vertexnormalsepsilon", + parent_name="streamtube.lighting", + **kwargs + ): + super(VertexnormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lightposition/__init__.py b/packages/python/plotly/plotly/validators/streamtube/lightposition/__init__.py index f83cfc98dc2..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/streamtube/lightposition/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/lightposition/__init__.py @@ -1,52 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="z", parent_name="streamtube.lightposition", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="streamtube.lightposition", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="streamtube.lightposition", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lightposition/_x.py b/packages/python/plotly/plotly/validators/streamtube/lightposition/_x.py new file mode 100644 index 00000000000..21a6c69c9ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lightposition/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="streamtube.lightposition", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lightposition/_y.py b/packages/python/plotly/plotly/validators/streamtube/lightposition/_y.py new file mode 100644 index 00000000000..4be91d74c76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lightposition/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="streamtube.lightposition", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/lightposition/_z.py b/packages/python/plotly/plotly/validators/streamtube/lightposition/_z.py new file mode 100644 index 00000000000..6e60f06a1e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/lightposition/_z.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="z", parent_name="streamtube.lightposition", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/__init__.py b/packages/python/plotly/plotly/validators/streamtube/starts/__init__.py index 1bf4463bfbb..cdfaa6fcffd 100644 --- a/packages/python/plotly/plotly/validators/streamtube/starts/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/starts/__init__.py @@ -1,82 +1,24 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="streamtube.starts", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="streamtube.starts", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="streamtube.starts", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="streamtube.starts", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="streamtube.starts", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="streamtube.starts", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/_x.py b/packages/python/plotly/plotly/validators/streamtube/starts/_x.py new file mode 100644 index 00000000000..9e598b43589 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/starts/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="streamtube.starts", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/_xsrc.py b/packages/python/plotly/plotly/validators/streamtube/starts/_xsrc.py new file mode 100644 index 00000000000..c065ee0f872 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/starts/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="streamtube.starts", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/_y.py b/packages/python/plotly/plotly/validators/streamtube/starts/_y.py new file mode 100644 index 00000000000..eb7584bfdc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/starts/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="streamtube.starts", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/_ysrc.py b/packages/python/plotly/plotly/validators/streamtube/starts/_ysrc.py new file mode 100644 index 00000000000..fbe0fe27d77 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/starts/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="streamtube.starts", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/_z.py b/packages/python/plotly/plotly/validators/streamtube/starts/_z.py new file mode 100644 index 00000000000..be1e3944744 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/starts/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="streamtube.starts", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/starts/_zsrc.py b/packages/python/plotly/plotly/validators/streamtube/starts/_zsrc.py new file mode 100644 index 00000000000..e0273565436 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/starts/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="streamtube.starts", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/stream/__init__.py b/packages/python/plotly/plotly/validators/streamtube/stream/__init__.py index 702f3ec8064..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/streamtube/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/streamtube/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="streamtube.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="streamtube.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/streamtube/stream/_maxpoints.py new file mode 100644 index 00000000000..6f618663b17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="streamtube.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/streamtube/stream/_token.py b/packages/python/plotly/plotly/validators/streamtube/stream/_token.py new file mode 100644 index 00000000000..2bd8c649549 --- /dev/null +++ b/packages/python/plotly/plotly/validators/streamtube/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="streamtube.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/__init__.py b/packages/python/plotly/plotly/validators/sunburst/__init__.py index d5e4d4b429f..912bd8fa776 100644 --- a/packages/python/plotly/plotly/validators/sunburst/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/__init__.py @@ -1,887 +1,94 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="sunburst", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuessrc", parent_name="sunburst", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="sunburst", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="sunburst", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="sunburst", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="texttemplatesrc", parent_name="sunburst", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="sunburst", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="sunburst", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="textinfo", parent_name="sunburst", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop( - "flags", - [ - "label", - "text", - "value", - "current path", - "percent root", - "percent entry", - "percent parent", - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="sunburst", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="sunburst", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="sunburst", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="parentssrc", parent_name="sunburst", **kwargs): - super(ParentssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="parents", parent_name="sunburst", **kwargs): - super(ParentsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="outsidetextfont", parent_name="sunburst", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="sunburst", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="sunburst", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="sunburst", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="sunburst", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="maxdepth", parent_name="sunburst", **kwargs): - super(MaxdepthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="sunburst", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colorsis set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colorsis - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colorsis set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.sunburst.marker.Co - lorBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colorsis set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - line - :class:`plotly.graph_objects.sunburst.marker.Li - ne` instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an - effect only if colorsis set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colorsis set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LevelValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="level", parent_name="sunburst", **kwargs): - super(LevelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LeafValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="leaf", parent_name="sunburst", **kwargs): - super(LeafValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Leaf"), - data_docs=kwargs.pop( - "data_docs", - """ - opacity - Sets the opacity of the leaves. With colorscale - it is defaulted to 1; otherwise it is defaulted - to 0.7 -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="labelssrc", parent_name="sunburst", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="labels", parent_name="sunburst", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="insidetextorientation", parent_name="sunburst", **kwargs - ): - super(InsidetextorientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["horizontal", "radial", "tangential", "auto"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="insidetextfont", parent_name="sunburst", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="sunburst", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="sunburst", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="sunburst", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="sunburst", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="sunburst", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="sunburst", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="sunburst", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="sunburst", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="sunburst", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop( - "flags", - [ - "label", - "text", - "value", - "name", - "current path", - "percent root", - "percent entry", - "percent parent", - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="sunburst", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this sunburst trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst - trace (in plot fraction). - y - Sets the vertical domain of this sunburst trace - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="sunburst", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="sunburst", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="count", parent_name="sunburst", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - flags=kwargs.pop("flags", ["branches", "leaves"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="branchvalues", parent_name="sunburst", **kwargs): - super(BranchvaluesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["remainder", "total"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textinfo import TextinfoValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._parentssrc import ParentssrcValidator + from ._parents import ParentsValidator + from ._outsidetextfont import OutsidetextfontValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._maxdepth import MaxdepthValidator + from ._marker import MarkerValidator + from ._level import LevelValidator + from ._leaf import LeafValidator + from ._labelssrc import LabelssrcValidator + from ._labels import LabelsValidator + from ._insidetextorientation import InsidetextorientationValidator + from ._insidetextfont import InsidetextfontValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._domain import DomainValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._count import CountValidator + from ._branchvalues import BranchvaluesValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._parentssrc.ParentssrcValidator", + "._parents.ParentsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdepth.MaxdepthValidator", + "._marker.MarkerValidator", + "._level.LevelValidator", + "._leaf.LeafValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._insidetextorientation.InsidetextorientationValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._count.CountValidator", + "._branchvalues.BranchvaluesValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_branchvalues.py b/packages/python/plotly/plotly/validators/sunburst/_branchvalues.py new file mode 100644 index 00000000000..0903d1d1db4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_branchvalues.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="branchvalues", parent_name="sunburst", **kwargs): + super(BranchvaluesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["remainder", "total"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_count.py b/packages/python/plotly/plotly/validators/sunburst/_count.py new file mode 100644 index 00000000000..765822a30a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_count.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="count", parent_name="sunburst", **kwargs): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + flags=kwargs.pop("flags", ["branches", "leaves"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_customdata.py b/packages/python/plotly/plotly/validators/sunburst/_customdata.py new file mode 100644 index 00000000000..2f6514244ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="sunburst", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_customdatasrc.py b/packages/python/plotly/plotly/validators/sunburst/_customdatasrc.py new file mode 100644 index 00000000000..de5eec30716 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="sunburst", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_domain.py b/packages/python/plotly/plotly/validators/sunburst/_domain.py new file mode 100644 index 00000000000..d04c9869a3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="sunburst", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this sunburst trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this sunburst trace . + x + Sets the horizontal domain of this sunburst + trace (in plot fraction). + y + Sets the vertical domain of this sunburst trace + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hoverinfo.py b/packages/python/plotly/plotly/validators/sunburst/_hoverinfo.py new file mode 100644 index 00000000000..fae8b356513 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hoverinfo.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="sunburst", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "name", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/sunburst/_hoverinfosrc.py new file mode 100644 index 00000000000..bc855383e0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="sunburst", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hoverlabel.py b/packages/python/plotly/plotly/validators/sunburst/_hoverlabel.py new file mode 100644 index 00000000000..8675fba8789 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="sunburst", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hovertemplate.py b/packages/python/plotly/plotly/validators/sunburst/_hovertemplate.py new file mode 100644 index 00000000000..904f20218fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="sunburst", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/sunburst/_hovertemplatesrc.py new file mode 100644 index 00000000000..d9b9daf6a36 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="sunburst", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hovertext.py b/packages/python/plotly/plotly/validators/sunburst/_hovertext.py new file mode 100644 index 00000000000..077316fb546 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="sunburst", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_hovertextsrc.py b/packages/python/plotly/plotly/validators/sunburst/_hovertextsrc.py new file mode 100644 index 00000000000..6d27191bd9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="sunburst", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_ids.py b/packages/python/plotly/plotly/validators/sunburst/_ids.py new file mode 100644 index 00000000000..73dd4936c95 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_ids.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="sunburst", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_idssrc.py b/packages/python/plotly/plotly/validators/sunburst/_idssrc.py new file mode 100644 index 00000000000..08e47b941ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="sunburst", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_insidetextfont.py b/packages/python/plotly/plotly/validators/sunburst/_insidetextfont.py new file mode 100644 index 00000000000..0e8a0271aab --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_insidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="sunburst", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_insidetextorientation.py b/packages/python/plotly/plotly/validators/sunburst/_insidetextorientation.py new file mode 100644 index 00000000000..99088a08abb --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_insidetextorientation.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="insidetextorientation", parent_name="sunburst", **kwargs + ): + super(InsidetextorientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["horizontal", "radial", "tangential", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_labels.py b/packages/python/plotly/plotly/validators/sunburst/_labels.py new file mode 100644 index 00000000000..6c337958a3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_labels.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="labels", parent_name="sunburst", **kwargs): + super(LabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_labelssrc.py b/packages/python/plotly/plotly/validators/sunburst/_labelssrc.py new file mode 100644 index 00000000000..db19b9fcf41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_labelssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelssrc", parent_name="sunburst", **kwargs): + super(LabelssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_leaf.py b/packages/python/plotly/plotly/validators/sunburst/_leaf.py new file mode 100644 index 00000000000..5f6c10d0341 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_leaf.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class LeafValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="leaf", parent_name="sunburst", **kwargs): + super(LeafValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Leaf"), + data_docs=kwargs.pop( + "data_docs", + """ + opacity + Sets the opacity of the leaves. With colorscale + it is defaulted to 1; otherwise it is defaulted + to 0.7 +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_level.py b/packages/python/plotly/plotly/validators/sunburst/_level.py new file mode 100644 index 00000000000..3f01d91839d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_level.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LevelValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="level", parent_name="sunburst", **kwargs): + super(LevelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_marker.py b/packages/python/plotly/plotly/validators/sunburst/_marker.py new file mode 100644 index 00000000000..a34af0cfc06 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_marker.py @@ -0,0 +1,103 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="sunburst", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.sunburst.marker.Co + lorBar` instance or dict with compatible + properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + line + :class:`plotly.graph_objects.sunburst.marker.Li + ne` instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_maxdepth.py b/packages/python/plotly/plotly/validators/sunburst/_maxdepth.py new file mode 100644 index 00000000000..0e1ef0605f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_maxdepth.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="maxdepth", parent_name="sunburst", **kwargs): + super(MaxdepthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_meta.py b/packages/python/plotly/plotly/validators/sunburst/_meta.py new file mode 100644 index 00000000000..d7f3d98240c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="sunburst", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_metasrc.py b/packages/python/plotly/plotly/validators/sunburst/_metasrc.py new file mode 100644 index 00000000000..527c2c6710b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="sunburst", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_name.py b/packages/python/plotly/plotly/validators/sunburst/_name.py new file mode 100644 index 00000000000..4ca91dd164c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="sunburst", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_opacity.py b/packages/python/plotly/plotly/validators/sunburst/_opacity.py new file mode 100644 index 00000000000..a29f4e12e84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="sunburst", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_outsidetextfont.py b/packages/python/plotly/plotly/validators/sunburst/_outsidetextfont.py new file mode 100644 index 00000000000..0ea11e30e35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_outsidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="outsidetextfont", parent_name="sunburst", **kwargs): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_parents.py b/packages/python/plotly/plotly/validators/sunburst/_parents.py new file mode 100644 index 00000000000..9fcb0e779cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_parents.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="parents", parent_name="sunburst", **kwargs): + super(ParentsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_parentssrc.py b/packages/python/plotly/plotly/validators/sunburst/_parentssrc.py new file mode 100644 index 00000000000..eb4f116ced4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_parentssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="parentssrc", parent_name="sunburst", **kwargs): + super(ParentssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_stream.py b/packages/python/plotly/plotly/validators/sunburst/_stream.py new file mode 100644 index 00000000000..6ccf989d5c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="sunburst", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_text.py b/packages/python/plotly/plotly/validators/sunburst/_text.py new file mode 100644 index 00000000000..950eeb3cb71 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="sunburst", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_textfont.py b/packages/python/plotly/plotly/validators/sunburst/_textfont.py new file mode 100644 index 00000000000..b490539165c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="sunburst", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_textinfo.py b/packages/python/plotly/plotly/validators/sunburst/_textinfo.py new file mode 100644 index 00000000000..41004e7b506 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_textinfo.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="sunburst", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_textsrc.py b/packages/python/plotly/plotly/validators/sunburst/_textsrc.py new file mode 100644 index 00000000000..e651f76b997 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="sunburst", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_texttemplate.py b/packages/python/plotly/plotly/validators/sunburst/_texttemplate.py new file mode 100644 index 00000000000..6fc9642eb7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="sunburst", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/sunburst/_texttemplatesrc.py new file mode 100644 index 00000000000..e13327efdac --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_texttemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="sunburst", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_uid.py b/packages/python/plotly/plotly/validators/sunburst/_uid.py new file mode 100644 index 00000000000..bd71b27989f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_uid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="sunburst", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_uirevision.py b/packages/python/plotly/plotly/validators/sunburst/_uirevision.py new file mode 100644 index 00000000000..428aa028f84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="sunburst", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_values.py b/packages/python/plotly/plotly/validators/sunburst/_values.py new file mode 100644 index 00000000000..4347ae69748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="sunburst", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_valuessrc.py b/packages/python/plotly/plotly/validators/sunburst/_valuessrc.py new file mode 100644 index 00000000000..fd26301a5cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_valuessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="sunburst", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/_visible.py b/packages/python/plotly/plotly/validators/sunburst/_visible.py new file mode 100644 index 00000000000..2a3ae55c013 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="sunburst", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/domain/__init__.py b/packages/python/plotly/plotly/validators/sunburst/domain/__init__.py index 1247d1fb9ab..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/sunburst/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="sunburst.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="sunburst.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="sunburst.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="sunburst.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/domain/_column.py b/packages/python/plotly/plotly/validators/sunburst/domain/_column.py new file mode 100644 index 00000000000..99e22a91439 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="sunburst.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/domain/_row.py b/packages/python/plotly/plotly/validators/sunburst/domain/_row.py new file mode 100644 index 00000000000..7680b962983 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="sunburst.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/domain/_x.py b/packages/python/plotly/plotly/validators/sunburst/domain/_x.py new file mode 100644 index 00000000000..8717cd5e6a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="sunburst.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/domain/_y.py b/packages/python/plotly/plotly/validators/sunburst/domain/_y.py new file mode 100644 index 00000000000..350ebe57b68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="sunburst.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/__init__.py index e74366142bb..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/__init__.py @@ -1,180 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="sunburst.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="sunburst.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="sunburst.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="sunburst.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="sunburst.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="sunburst.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="sunburst.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="sunburst.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="sunburst.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_align.py new file mode 100644 index 00000000000..841b765f372 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="sunburst.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..e27ee42cf8b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="sunburst.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..ad74a8c927a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="sunburst.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..a4f3eba8c24 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="sunburst.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..dbe1e3f50f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="sunburst.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..124edd016b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="sunburst.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_font.py new file mode 100644 index 00000000000..616ce1245e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="sunburst.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_namelength.py new file mode 100644 index 00000000000..a19b58c3017 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="sunburst.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..38d78167905 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="sunburst.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/__init__.py index e003a51b752..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sunburst.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="sunburst.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="sunburst.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="sunburst.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sunburst.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sunburst.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_color.py new file mode 100644 index 00000000000..1ceab2c94fb --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sunburst.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..c1619e0ef45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sunburst.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_family.py new file mode 100644 index 00000000000..950ee901f42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="sunburst.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..40cc6cdfcac --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="sunburst.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_size.py new file mode 100644 index 00000000000..7d8cf4d58e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="sunburst.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..2516e4da679 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sunburst.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/__init__.py index 10192f48db2..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sunburst.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="sunburst.insidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="sunburst.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="sunburst.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sunburst.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sunburst.insidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_color.py new file mode 100644 index 00000000000..0ad28f98dec --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sunburst.insidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..b7b9144df81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sunburst.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_family.py new file mode 100644 index 00000000000..7145df6fef7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="sunburst.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..73005fd9c5a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="sunburst.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_size.py new file mode 100644 index 00000000000..e317d0703d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="sunburst.insidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..07e3aeb5059 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sunburst.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/leaf/__init__.py b/packages/python/plotly/plotly/validators/sunburst/leaf/__init__.py index c9b865d07ac..163f929070c 100644 --- a/packages/python/plotly/plotly/validators/sunburst/leaf/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/leaf/__init__.py @@ -1,14 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._opacity import OpacityValidator +else: + from _plotly_utils.importers import relative_import -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="sunburst.leaf", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/leaf/_opacity.py b/packages/python/plotly/plotly/validators/sunburst/leaf/_opacity.py new file mode 100644 index 00000000000..c9b865d07ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/leaf/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="sunburst.leaf", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py index 4b440c5413f..96e91907520 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py @@ -1,432 +1,38 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showscale", parent_name="sunburst.marker", **kwargs - ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="sunburst.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="sunburst.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorssrc", parent_name="sunburst.marker", **kwargs - ): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="sunburst.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="colors", parent_name="sunburst.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="sunburst.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.sunburs - t.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.sunburst.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - sunburst.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.sunburst.marker.co - lorbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - sunburst.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - sunburst.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__( - self, plotly_name="coloraxis", parent_name="sunburst.marker", **kwargs - ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="sunburst.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="sunburst.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="sunburst.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="sunburst.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="sunburst.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._line import LineValidator + from ._colorssrc import ColorssrcValidator + from ._colorscale import ColorscaleValidator + from ._colors import ColorsValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colorscale.ColorscaleValidator", + "._colors.ColorsValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/sunburst/marker/_autocolorscale.py new file mode 100644 index 00000000000..297a2cf0cf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="sunburst.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_cauto.py b/packages/python/plotly/plotly/validators/sunburst/marker/_cauto.py new file mode 100644 index 00000000000..4745495be35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="sunburst.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_cmax.py b/packages/python/plotly/plotly/validators/sunburst/marker/_cmax.py new file mode 100644 index 00000000000..14985397643 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="sunburst.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_cmid.py b/packages/python/plotly/plotly/validators/sunburst/marker/_cmid.py new file mode 100644 index 00000000000..3df5169786b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="sunburst.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_cmin.py b/packages/python/plotly/plotly/validators/sunburst/marker/_cmin.py new file mode 100644 index 00000000000..d80e7433319 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="sunburst.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/sunburst/marker/_coloraxis.py new file mode 100644 index 00000000000..0eb0ccdfeb3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_coloraxis.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="sunburst.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_colorbar.py b/packages/python/plotly/plotly/validators/sunburst/marker/_colorbar.py new file mode 100644 index 00000000000..2642fb62b84 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="sunburst.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.sunburs + t.marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.sunburst.marker.colorbar.tickformatstopdefaul + ts), sets the default property values to use + for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.sunburst.marker.co + lorbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_colors.py b/packages/python/plotly/plotly/validators/sunburst/marker/_colors.py new file mode 100644 index 00000000000..d399c98d6af --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_colors.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="colors", parent_name="sunburst.marker", **kwargs): + super(ColorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_colorscale.py b/packages/python/plotly/plotly/validators/sunburst/marker/_colorscale.py new file mode 100644 index 00000000000..5b50d63948f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="sunburst.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_colorssrc.py b/packages/python/plotly/plotly/validators/sunburst/marker/_colorssrc.py new file mode 100644 index 00000000000..555e95066b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_colorssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorssrc", parent_name="sunburst.marker", **kwargs + ): + super(ColorssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_line.py b/packages/python/plotly/plotly/validators/sunburst/marker/_line.py new file mode 100644 index 00000000000..eb7689f83a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_line.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="sunburst.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_reversescale.py b/packages/python/plotly/plotly/validators/sunburst/marker/_reversescale.py new file mode 100644 index 00000000000..81f07983ead --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="sunburst.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/_showscale.py b/packages/python/plotly/plotly/validators/sunburst/marker/_showscale.py new file mode 100644 index 00000000000..906c86ce1b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/_showscale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="sunburst.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py index 5260c49c1d0..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py @@ -1,810 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="tickvalssrc", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="ticktextsrc", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="borderwidth", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="sunburst.marker.colorbar", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="sunburst.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..99ef1887049 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..d437cb9bc91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_bordercolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..dfcf71bf56f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_borderwidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..3cad6233c90 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..3e37dfa993a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_len.py new file mode 100644 index 00000000000..ea706e8e06f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..6dea67af60d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..a07c86339fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..00dc8ff6fe9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..3cd9fd78e1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..a1d3383852c --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..68ccd42cb49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..13f7f5dff17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..df7cbaf539b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..755a5206ea2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..e86562d708d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..d41e94722a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..f3561f91be3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..689ce8f6110 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..41d0ffa6fc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..08fca854986 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..f2adc2da45b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..a10d7feccb7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..c07b44ea67f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..cf21fa92c96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..0e152ab285a --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..cd723a174b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..59031427cad --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..f9bb831356f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..ab224c02ec5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..cb78d9e8ded --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..8d30a0aa6ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..5306546dcf9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..d9afcdf5869 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_title.py new file mode 100644 index 00000000000..cf7505a1fb3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_x.py new file mode 100644 index 00000000000..882a633e126 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..f2a257565b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..044596fef70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_y.py new file mode 100644 index 00000000000..4cb81d3d7d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..c8cf17ccc66 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..38a0118518d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py index de9228c2c8f..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="sunburst.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="sunburst.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="sunburst.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..ee1bd513e99 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="sunburst.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..277a3a6a9d6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="sunburst.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..d32a7de204d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="sunburst.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py index 8a766f4ad1b..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="sunburst.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="sunburst.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="sunburst.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="sunburst.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="sunburst.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..5f8502b1119 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..c9ab88d4c9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..2641ef93e46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..8fd96cb3293 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..6d6909934c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py index 69c55d32612..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="sunburst.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="sunburst.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="sunburst.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..985833029c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="sunburst.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..7fe08649bd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="sunburst.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..b888ab0c684 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="sunburst.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py index bd3848eb1c1..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="sunburst.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="sunburst.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="sunburst.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..91862064948 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="sunburst.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..a0b8236aa68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="sunburst.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..97484b1222f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="sunburst.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/line/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/line/__init__.py index 52854ca6f02..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/line/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="sunburst.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="sunburst.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sunburst.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sunburst.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/line/_color.py b/packages/python/plotly/plotly/validators/sunburst/marker/line/_color.py new file mode 100644 index 00000000000..d53ccd9a741 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/line/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sunburst.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/sunburst/marker/line/_colorsrc.py new file mode 100644 index 00000000000..7f90dddcb87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sunburst.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/line/_width.py b/packages/python/plotly/plotly/validators/sunburst/marker/line/_width.py new file mode 100644 index 00000000000..1bae9eaffef --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="sunburst.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/sunburst/marker/line/_widthsrc.py new file mode 100644 index 00000000000..975f25cce6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="sunburst.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/__init__.py index e4e921df626..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sunburst.outsidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="sunburst.outsidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="sunburst.outsidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="sunburst.outsidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sunburst.outsidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="sunburst.outsidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_color.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_color.py new file mode 100644 index 00000000000..8e96c810830 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="sunburst.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_colorsrc.py new file mode 100644 index 00000000000..9051eb88683 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sunburst.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_family.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_family.py new file mode 100644 index 00000000000..bb074d4c907 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="sunburst.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_familysrc.py new file mode 100644 index 00000000000..754905f72e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="sunburst.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_size.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_size.py new file mode 100644 index 00000000000..97556255bcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="sunburst.outsidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_sizesrc.py new file mode 100644 index 00000000000..35aad934feb --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sunburst.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/stream/__init__.py b/packages/python/plotly/plotly/validators/sunburst/stream/__init__.py index a9693aa41ae..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/sunburst/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="sunburst.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="sunburst.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/sunburst/stream/_maxpoints.py new file mode 100644 index 00000000000..45656869e3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="sunburst.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/stream/_token.py b/packages/python/plotly/plotly/validators/sunburst/stream/_token.py new file mode 100644 index 00000000000..1c7361ce0a6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="sunburst.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/__init__.py b/packages/python/plotly/plotly/validators/sunburst/textfont/__init__.py index 092ebc24fb0..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/sunburst/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/__init__.py @@ -1,94 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="sunburst.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="sunburst.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="sunburst.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="sunburst.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="sunburst.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="sunburst.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/_color.py b/packages/python/plotly/plotly/validators/sunburst/textfont/_color.py new file mode 100644 index 00000000000..177f435e2ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="sunburst.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/sunburst/textfont/_colorsrc.py new file mode 100644 index 00000000000..d46ffe07d97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="sunburst.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/_family.py b/packages/python/plotly/plotly/validators/sunburst/textfont/_family.py new file mode 100644 index 00000000000..48bc96a0485 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="sunburst.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/sunburst/textfont/_familysrc.py new file mode 100644 index 00000000000..27d38841819 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="sunburst.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/_size.py b/packages/python/plotly/plotly/validators/sunburst/textfont/_size.py new file mode 100644 index 00000000000..d3de3327db5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="sunburst.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/sunburst/textfont/_sizesrc.py new file mode 100644 index 00000000000..b3db8d664b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="sunburst.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/__init__.py b/packages/python/plotly/plotly/validators/surface/__init__.py index aa5a570d5b4..3bbcccb1aae 100644 --- a/packages/python/plotly/plotly/validators/surface/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/__init__.py @@ -1,1109 +1,114 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="surface", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="zcalendar", parent_name="surface", **kwargs): - super(ZcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="surface", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="surface", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ycalendar", parent_name="surface", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="surface", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="surface", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xcalendar", parent_name="surface", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - [ - "gregorian", - "chinese", - "coptic", - "discworld", - "ethiopian", - "hebrew", - "islamic", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "jalali", - "taiwan", - "thai", - "ummalqura", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="surface", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="surface", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="surface", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="surface", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="surface", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="surface", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfacecolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="surfacecolorsrc", parent_name="surface", **kwargs): - super(SurfacecolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="surfacecolor", parent_name="surface", **kwargs): - super(SurfacecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="surface", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="surface", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="surface", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="surface", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="surface", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="opacityscale", parent_name="surface", **kwargs): - super(OpacityscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="surface", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="surface", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="surface", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="surface", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lightposition", parent_name="surface", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lightposition"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lighting", parent_name="surface", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lighting"), - data_docs=kwargs.pop( - "data_docs", - """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="surface", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="surface", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="surface", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="surface", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="surface", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="surface", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="surface", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="surface", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="surface", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="surface", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HidesurfaceValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="hidesurface", parent_name="surface", **kwargs): - super(HidesurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="surface", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="surface", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contours", parent_name="surface", **kwargs): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contours"), - data_docs=kwargs.pop( - "data_docs", - """ - x - :class:`plotly.graph_objects.surface.contours.X - ` instance or dict with compatible properties - y - :class:`plotly.graph_objects.surface.contours.Y - ` instance or dict with compatible properties - z - :class:`plotly.graph_objects.surface.contours.Z - ` instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="connectgaps", parent_name="surface", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="surface", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="surface", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.surface - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.surface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of surface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.surface.colorbar.T - itle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - surface.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - surface.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="surface", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="surface", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="surface", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="surface", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="surface", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="surface", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._zcalendar import ZcalendarValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._ycalendar import YcalendarValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xcalendar import XcalendarValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._surfacecolorsrc import SurfacecolorsrcValidator + from ._surfacecolor import SurfacecolorValidator + from ._stream import StreamValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._reversescale import ReversescaleValidator + from ._opacityscale import OpacityscaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lightposition import LightpositionValidator + from ._lighting import LightingValidator + from ._legendgroup import LegendgroupValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._hidesurface import HidesurfaceValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contours import ContoursValidator + from ._connectgaps import ConnectgapsValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zcalendar.ZcalendarValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._ycalendar.YcalendarValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xcalendar.XcalendarValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._surfacecolorsrc.SurfacecolorsrcValidator", + "._surfacecolor.SurfacecolorValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacityscale.OpacityscaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendgroup.LegendgroupValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._hidesurface.HidesurfaceValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._connectgaps.ConnectgapsValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/_autocolorscale.py b/packages/python/plotly/plotly/validators/surface/_autocolorscale.py new file mode 100644 index 00000000000..1353099f121 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="surface", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_cauto.py b/packages/python/plotly/plotly/validators/surface/_cauto.py new file mode 100644 index 00000000000..3e67decf05a --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="surface", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_cmax.py b/packages/python/plotly/plotly/validators/surface/_cmax.py new file mode 100644 index 00000000000..cfed7079d6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="surface", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_cmid.py b/packages/python/plotly/plotly/validators/surface/_cmid.py new file mode 100644 index 00000000000..5806916ae03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="surface", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_cmin.py b/packages/python/plotly/plotly/validators/surface/_cmin.py new file mode 100644 index 00000000000..4dedc9a94c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="surface", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_coloraxis.py b/packages/python/plotly/plotly/validators/surface/_coloraxis.py new file mode 100644 index 00000000000..4c731501a34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="surface", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_colorbar.py b/packages/python/plotly/plotly/validators/surface/_colorbar.py new file mode 100644 index 00000000000..c9e4b45a798 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="surface", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.surface + .colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.surface.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of surface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.surface.colorbar.T + itle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + surface.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + surface.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_colorscale.py b/packages/python/plotly/plotly/validators/surface/_colorscale.py new file mode 100644 index 00000000000..37139d49fd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="surface", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_connectgaps.py b/packages/python/plotly/plotly/validators/surface/_connectgaps.py new file mode 100644 index 00000000000..20b4f9e2c7c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_connectgaps.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="connectgaps", parent_name="surface", **kwargs): + super(ConnectgapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_contours.py b/packages/python/plotly/plotly/validators/surface/_contours.py new file mode 100644 index 00000000000..779a0e032c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_contours.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contours", parent_name="surface", **kwargs): + super(ContoursValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contours"), + data_docs=kwargs.pop( + "data_docs", + """ + x + :class:`plotly.graph_objects.surface.contours.X + ` instance or dict with compatible properties + y + :class:`plotly.graph_objects.surface.contours.Y + ` instance or dict with compatible properties + z + :class:`plotly.graph_objects.surface.contours.Z + ` instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_customdata.py b/packages/python/plotly/plotly/validators/surface/_customdata.py new file mode 100644 index 00000000000..181c4bd5f63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="surface", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_customdatasrc.py b/packages/python/plotly/plotly/validators/surface/_customdatasrc.py new file mode 100644 index 00000000000..f4763a68559 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="surface", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hidesurface.py b/packages/python/plotly/plotly/validators/surface/_hidesurface.py new file mode 100644 index 00000000000..7e448aa5c8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hidesurface.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HidesurfaceValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="hidesurface", parent_name="surface", **kwargs): + super(HidesurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hoverinfo.py b/packages/python/plotly/plotly/validators/surface/_hoverinfo.py new file mode 100644 index 00000000000..2feee885a9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="surface", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/surface/_hoverinfosrc.py new file mode 100644 index 00000000000..b86d130141b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="surface", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hoverlabel.py b/packages/python/plotly/plotly/validators/surface/_hoverlabel.py new file mode 100644 index 00000000000..4b2e5404bef --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="surface", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hovertemplate.py b/packages/python/plotly/plotly/validators/surface/_hovertemplate.py new file mode 100644 index 00000000000..067df42a93c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="surface", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/surface/_hovertemplatesrc.py new file mode 100644 index 00000000000..7a5cb49c475 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="surface", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hovertext.py b/packages/python/plotly/plotly/validators/surface/_hovertext.py new file mode 100644 index 00000000000..60ccd8f5e21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="surface", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_hovertextsrc.py b/packages/python/plotly/plotly/validators/surface/_hovertextsrc.py new file mode 100644 index 00000000000..026468417de --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="surface", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_ids.py b/packages/python/plotly/plotly/validators/surface/_ids.py new file mode 100644 index 00000000000..da5b79b6402 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="surface", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_idssrc.py b/packages/python/plotly/plotly/validators/surface/_idssrc.py new file mode 100644 index 00000000000..e81c660064b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="surface", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_legendgroup.py b/packages/python/plotly/plotly/validators/surface/_legendgroup.py new file mode 100644 index 00000000000..69c95133575 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="surface", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_lighting.py b/packages/python/plotly/plotly/validators/surface/_lighting.py new file mode 100644 index 00000000000..6c1a996f239 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_lighting.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lighting", parent_name="surface", **kwargs): + super(LightingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lighting"), + data_docs=kwargs.pop( + "data_docs", + """ + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_lightposition.py b/packages/python/plotly/plotly/validators/surface/_lightposition.py new file mode 100644 index 00000000000..02f527fed08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_lightposition.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lightposition", parent_name="surface", **kwargs): + super(LightpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lightposition"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_meta.py b/packages/python/plotly/plotly/validators/surface/_meta.py new file mode 100644 index 00000000000..3e84b0e30b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="surface", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_metasrc.py b/packages/python/plotly/plotly/validators/surface/_metasrc.py new file mode 100644 index 00000000000..6e29a76299c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="surface", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_name.py b/packages/python/plotly/plotly/validators/surface/_name.py new file mode 100644 index 00000000000..81927450618 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="surface", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_opacity.py b/packages/python/plotly/plotly/validators/surface/_opacity.py new file mode 100644 index 00000000000..df598bbfe35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="surface", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_opacityscale.py b/packages/python/plotly/plotly/validators/surface/_opacityscale.py new file mode 100644 index 00000000000..ff35304a576 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_opacityscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="opacityscale", parent_name="surface", **kwargs): + super(OpacityscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_reversescale.py b/packages/python/plotly/plotly/validators/surface/_reversescale.py new file mode 100644 index 00000000000..a5bc4789c61 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="surface", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_scene.py b/packages/python/plotly/plotly/validators/surface/_scene.py new file mode 100644 index 00000000000..4d0f17a1c1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="surface", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_showlegend.py b/packages/python/plotly/plotly/validators/surface/_showlegend.py new file mode 100644 index 00000000000..d609611ab3f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="surface", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_showscale.py b/packages/python/plotly/plotly/validators/surface/_showscale.py new file mode 100644 index 00000000000..8d98a7a34f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="surface", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_stream.py b/packages/python/plotly/plotly/validators/surface/_stream.py new file mode 100644 index 00000000000..8d25ea25895 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="surface", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_surfacecolor.py b/packages/python/plotly/plotly/validators/surface/_surfacecolor.py new file mode 100644 index 00000000000..53bd52395c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_surfacecolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SurfacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="surfacecolor", parent_name="surface", **kwargs): + super(SurfacecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_surfacecolorsrc.py b/packages/python/plotly/plotly/validators/surface/_surfacecolorsrc.py new file mode 100644 index 00000000000..497b86e9000 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_surfacecolorsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SurfacecolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="surfacecolorsrc", parent_name="surface", **kwargs): + super(SurfacecolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_text.py b/packages/python/plotly/plotly/validators/surface/_text.py new file mode 100644 index 00000000000..96a43890ab2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="surface", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_textsrc.py b/packages/python/plotly/plotly/validators/surface/_textsrc.py new file mode 100644 index 00000000000..ac7c7b733f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="surface", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_uid.py b/packages/python/plotly/plotly/validators/surface/_uid.py new file mode 100644 index 00000000000..568da068d1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="surface", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_uirevision.py b/packages/python/plotly/plotly/validators/surface/_uirevision.py new file mode 100644 index 00000000000..58ca157d701 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="surface", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_visible.py b/packages/python/plotly/plotly/validators/surface/_visible.py new file mode 100644 index 00000000000..a4ef75a3331 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="surface", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_x.py b/packages/python/plotly/plotly/validators/surface/_x.py new file mode 100644 index 00000000000..a85d5b8e871 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="surface", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_xcalendar.py b/packages/python/plotly/plotly/validators/surface/_xcalendar.py new file mode 100644 index 00000000000..56e31aa909a --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_xcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xcalendar", parent_name="surface", **kwargs): + super(XcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_xsrc.py b/packages/python/plotly/plotly/validators/surface/_xsrc.py new file mode 100644 index 00000000000..94da86791b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="surface", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_y.py b/packages/python/plotly/plotly/validators/surface/_y.py new file mode 100644 index 00000000000..b501713cb38 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="surface", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_ycalendar.py b/packages/python/plotly/plotly/validators/surface/_ycalendar.py new file mode 100644 index 00000000000..8552e00e559 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_ycalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ycalendar", parent_name="surface", **kwargs): + super(YcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_ysrc.py b/packages/python/plotly/plotly/validators/surface/_ysrc.py new file mode 100644 index 00000000000..494ca24f05b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="surface", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_z.py b/packages/python/plotly/plotly/validators/surface/_z.py new file mode 100644 index 00000000000..2f953befcdf --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="surface", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_zcalendar.py b/packages/python/plotly/plotly/validators/surface/_zcalendar.py new file mode 100644 index 00000000000..a91372e0018 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_zcalendar.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="zcalendar", parent_name="surface", **kwargs): + super(ZcalendarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + [ + "gregorian", + "chinese", + "coptic", + "discworld", + "ethiopian", + "hebrew", + "islamic", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "jalali", + "taiwan", + "thai", + "ummalqura", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/_zsrc.py b/packages/python/plotly/plotly/validators/surface/_zsrc.py new file mode 100644 index 00000000000..fad1bb0a184 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="surface", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/__init__.py b/packages/python/plotly/plotly/validators/surface/colorbar/__init__.py index 5684dde1b27..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/surface/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/colorbar/__init__.py @@ -1,738 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="surface.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="surface.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="surface.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="surface.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="surface.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="surface.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="surface.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="surface.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="surface.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="surface.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="surface.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="surface.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="surface.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="surface.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="surface.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="surface.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="surface.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="surface.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="surface.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="surface.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="surface.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="surface.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="surface.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="surface.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="surface.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="surface.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="surface.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="surface.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="surface.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="surface.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="surface.colorbar", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="surface.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="surface.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="surface.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="surface.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="surface.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="surface.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="surface.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="surface.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="surface.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="surface.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/surface/colorbar/_bgcolor.py new file mode 100644 index 00000000000..628455e5a8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="surface.colorbar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/surface/colorbar/_bordercolor.py new file mode 100644 index 00000000000..c3efc738997 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="surface.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/surface/colorbar/_borderwidth.py new file mode 100644 index 00000000000..9d2211a9592 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="surface.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/surface/colorbar/_dtick.py new file mode 100644 index 00000000000..2d1718030a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="surface.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/surface/colorbar/_exponentformat.py new file mode 100644 index 00000000000..62ffdfd845c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="surface.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_len.py b/packages/python/plotly/plotly/validators/surface/colorbar/_len.py new file mode 100644 index 00000000000..269d997a1b5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="surface.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/surface/colorbar/_lenmode.py new file mode 100644 index 00000000000..ac608eafd26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="surface.colorbar", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/surface/colorbar/_nticks.py new file mode 100644 index 00000000000..5e34e6c2f7d --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="surface.colorbar", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/surface/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..377094739c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="surface.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/surface/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..409294c2642 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="surface.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/surface/colorbar/_separatethousands.py new file mode 100644 index 00000000000..c7c8a3f0786 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="surface.colorbar", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/surface/colorbar/_showexponent.py new file mode 100644 index 00000000000..5428e0a15fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="surface.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/surface/colorbar/_showticklabels.py new file mode 100644 index 00000000000..410a34cd6ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="surface.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/surface/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..4e591379f60 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="surface.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/surface/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..10eb2a4ca92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="surface.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/surface/colorbar/_thickness.py new file mode 100644 index 00000000000..1b7e913b318 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="surface.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/surface/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..be09a9567da --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="surface.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tick0.py new file mode 100644 index 00000000000..36f4ab11352 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="surface.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickangle.py new file mode 100644 index 00000000000..1a844ade69f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="surface.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickcolor.py new file mode 100644 index 00000000000..c12deb59435 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="surface.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickfont.py new file mode 100644 index 00000000000..6b14b4de3bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="surface.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickformat.py new file mode 100644 index 00000000000..638e454f51f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="surface.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..911518d7361 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="surface.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..e32ea585ef0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="surface.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/surface/colorbar/_ticklen.py new file mode 100644 index 00000000000..edad3dda139 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="surface.colorbar", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickmode.py new file mode 100644 index 00000000000..a7c784fbf3c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="surface.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickprefix.py new file mode 100644 index 00000000000..71b62fcbeb3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="surface.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/surface/colorbar/_ticks.py new file mode 100644 index 00000000000..8576f2c7874 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="surface.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/surface/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..6895039afd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="surface.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/surface/colorbar/_ticktext.py new file mode 100644 index 00000000000..d02a3b438a8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="surface.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/surface/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..fd0919fd485 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="surface.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickvals.py new file mode 100644 index 00000000000..fd9bb6d9aa3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="surface.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..d67363a8dac --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="surface.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/surface/colorbar/_tickwidth.py new file mode 100644 index 00000000000..03b9e99b612 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="surface.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_title.py b/packages/python/plotly/plotly/validators/surface/colorbar/_title.py new file mode 100644 index 00000000000..24d70939442 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="surface.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_x.py b/packages/python/plotly/plotly/validators/surface/colorbar/_x.py new file mode 100644 index 00000000000..0e3c631561e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="surface.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/surface/colorbar/_xanchor.py new file mode 100644 index 00000000000..aa7e0bf9360 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="surface.colorbar", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/surface/colorbar/_xpad.py new file mode 100644 index 00000000000..15ece6a7e30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="surface.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_y.py b/packages/python/plotly/plotly/validators/surface/colorbar/_y.py new file mode 100644 index 00000000000..721f41eb495 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="surface.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/surface/colorbar/_yanchor.py new file mode 100644 index 00000000000..c94d354baaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="surface.colorbar", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/surface/colorbar/_ypad.py new file mode 100644 index 00000000000..fcae8774271 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="surface.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/__init__.py index 3e9778df98a..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="surface.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="surface.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="surface.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..b7e034b6b1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="surface.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..9e87524ea4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="surface.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..fcd72dcabe7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="surface.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/__init__.py index 68bb518185d..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="surface.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="surface.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="surface.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="surface.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="surface.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..296573c9270 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="surface.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..4c8ea1221c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="surface.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..d6ca8c64697 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="surface.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..66dce01fac4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="surface.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..052f63b5d4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="surface.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/__init__.py index 161d0579705..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/surface/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="surface.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="surface.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="surface.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/_font.py new file mode 100644 index 00000000000..a1c6e158cf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="surface.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/_side.py new file mode 100644 index 00000000000..3b7da512edf --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="surface.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/_text.py new file mode 100644 index 00000000000..a53eb8ff573 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="surface.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/__init__.py index eb6657a5a2c..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/surface/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="surface.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="surface.colorbar.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="surface.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_color.py new file mode 100644 index 00000000000..f4ca329a8dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="surface.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_family.py new file mode 100644 index 00000000000..512df222041 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="surface.colorbar.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_size.py new file mode 100644 index 00000000000..da7ebe1781c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="surface.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/__init__.py index 1713dea7671..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/__init__.py @@ -1,151 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="z", parent_name="surface.contours", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Z"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the z dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.z - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the z dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="y", parent_name="surface.contours", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Y"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the y dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.y - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the y dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="x", parent_name="surface.contours", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "X"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the x dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.x - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the x dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/_x.py b/packages/python/plotly/plotly/validators/surface/contours/_x.py new file mode 100644 index 00000000000..160b01bd53f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/_x.py @@ -0,0 +1,49 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="x", parent_name="surface.contours", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "X"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more + than `contours.start` + highlight + Determines whether or not contour lines about + the x dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour + lines. + highlightwidth + Sets the width of the highlighted contour + lines. + project + :class:`plotly.graph_objects.surface.contours.x + .Project` instance or dict with compatible + properties + show + Determines whether or not contour lines about + the x dimension are drawn. + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + usecolormap + An alternate to "color". Determines whether or + not the contour lines are colored using the + trace "colorscale". + width + Sets the width of the contour lines. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/_y.py b/packages/python/plotly/plotly/validators/surface/contours/_y.py new file mode 100644 index 00000000000..86632e339a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/_y.py @@ -0,0 +1,49 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="y", parent_name="surface.contours", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Y"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more + than `contours.start` + highlight + Determines whether or not contour lines about + the y dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour + lines. + highlightwidth + Sets the width of the highlighted contour + lines. + project + :class:`plotly.graph_objects.surface.contours.y + .Project` instance or dict with compatible + properties + show + Determines whether or not contour lines about + the y dimension are drawn. + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + usecolormap + An alternate to "color". Determines whether or + not the contour lines are colored using the + trace "colorscale". + width + Sets the width of the contour lines. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/_z.py b/packages/python/plotly/plotly/validators/surface/contours/_z.py new file mode 100644 index 00000000000..d3f5b467c14 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/_z.py @@ -0,0 +1,49 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="z", parent_name="surface.contours", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Z"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour lines. + end + Sets the end contour level value. Must be more + than `contours.start` + highlight + Determines whether or not contour lines about + the z dimension are highlighted on hover. + highlightcolor + Sets the color of the highlighted contour + lines. + highlightwidth + Sets the width of the highlighted contour + lines. + project + :class:`plotly.graph_objects.surface.contours.z + .Project` instance or dict with compatible + properties + show + Determines whether or not contour lines about + the z dimension are drawn. + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + usecolormap + An alternate to "color". Determines whether or + not the contour lines are colored using the + trace "colorscale". + width + Sets the width of the contour lines. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/x/__init__.py index 8095e8e4427..3b034f3a7ea 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/x/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/x/__init__.py @@ -1,189 +1,34 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="surface.contours.x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="usecolormap", parent_name="surface.contours.x", **kwargs - ): - super(UsecolormapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="start", parent_name="surface.contours.x", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="surface.contours.x", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="surface.contours.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="project", parent_name="surface.contours.x", **kwargs - ): - super(ProjectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Project"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="highlightwidth", parent_name="surface.contours.x", **kwargs - ): - super(HighlightwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="highlightcolor", parent_name="surface.contours.x", **kwargs - ): - super(HighlightcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="highlight", parent_name="surface.contours.x", **kwargs - ): - super(HighlightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="end", parent_name="surface.contours.x", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="surface.contours.x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._usecolormap import UsecolormapValidator + from ._start import StartValidator + from ._size import SizeValidator + from ._show import ShowValidator + from ._project import ProjectValidator + from ._highlightwidth import HighlightwidthValidator + from ._highlightcolor import HighlightcolorValidator + from ._highlight import HighlightValidator + from ._end import EndValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._usecolormap.UsecolormapValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._show.ShowValidator", + "._project.ProjectValidator", + "._highlightwidth.HighlightwidthValidator", + "._highlightcolor.HighlightcolorValidator", + "._highlight.HighlightValidator", + "._end.EndValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_color.py b/packages/python/plotly/plotly/validators/surface/contours/x/_color.py new file mode 100644 index 00000000000..c8baf9cfa3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="surface.contours.x", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_end.py b/packages/python/plotly/plotly/validators/surface/contours/x/_end.py new file mode 100644 index 00000000000..dcd0b7ee3b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="end", parent_name="surface.contours.x", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_highlight.py b/packages/python/plotly/plotly/validators/surface/contours/x/_highlight.py new file mode 100644 index 00000000000..9a67257b3fe --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_highlight.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="highlight", parent_name="surface.contours.x", **kwargs + ): + super(HighlightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_highlightcolor.py b/packages/python/plotly/plotly/validators/surface/contours/x/_highlightcolor.py new file mode 100644 index 00000000000..1083008e0da --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_highlightcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="highlightcolor", parent_name="surface.contours.x", **kwargs + ): + super(HighlightcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_highlightwidth.py b/packages/python/plotly/plotly/validators/surface/contours/x/_highlightwidth.py new file mode 100644 index 00000000000..c51bd642bd2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_highlightwidth.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="highlightwidth", parent_name="surface.contours.x", **kwargs + ): + super(HighlightwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_project.py b/packages/python/plotly/plotly/validators/surface/contours/x/_project.py new file mode 100644 index 00000000000..ca1fd706245 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_project.py @@ -0,0 +1,36 @@ +import _plotly_utils.basevalidators + + +class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="project", parent_name="surface.contours.x", **kwargs + ): + super(ProjectValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Project"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Determines whether or not these contour lines + are projected on the x plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + y + Determines whether or not these contour lines + are projected on the y plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + z + Determines whether or not these contour lines + are projected on the z plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_show.py b/packages/python/plotly/plotly/validators/surface/contours/x/_show.py new file mode 100644 index 00000000000..569dc2e233c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="surface.contours.x", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_size.py b/packages/python/plotly/plotly/validators/surface/contours/x/_size.py new file mode 100644 index 00000000000..8832528c3a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="surface.contours.x", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_start.py b/packages/python/plotly/plotly/validators/surface/contours/x/_start.py new file mode 100644 index 00000000000..d43132f5ca9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="start", parent_name="surface.contours.x", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_usecolormap.py b/packages/python/plotly/plotly/validators/surface/contours/x/_usecolormap.py new file mode 100644 index 00000000000..f10638ec64c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_usecolormap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="usecolormap", parent_name="surface.contours.x", **kwargs + ): + super(UsecolormapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/_width.py b/packages/python/plotly/plotly/validators/surface/contours/x/_width.py new file mode 100644 index 00000000000..e1be33c641c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="surface.contours.x", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/project/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/x/project/__init__.py index 8dba021dc17..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/x/project/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/x/project/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="z", parent_name="surface.contours.x.project", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="y", parent_name="surface.contours.x.project", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="x", parent_name="surface.contours.x.project", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/project/_x.py b/packages/python/plotly/plotly/validators/surface/contours/x/project/_x.py new file mode 100644 index 00000000000..e11d764b431 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/project/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="x", parent_name="surface.contours.x.project", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/project/_y.py b/packages/python/plotly/plotly/validators/surface/contours/x/project/_y.py new file mode 100644 index 00000000000..6610790bb48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/project/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="y", parent_name="surface.contours.x.project", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/x/project/_z.py b/packages/python/plotly/plotly/validators/surface/contours/x/project/_z.py new file mode 100644 index 00000000000..a83205ff006 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/x/project/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="z", parent_name="surface.contours.x.project", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/y/__init__.py index 83d9da39a30..3b034f3a7ea 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/y/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/y/__init__.py @@ -1,189 +1,34 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="surface.contours.y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="usecolormap", parent_name="surface.contours.y", **kwargs - ): - super(UsecolormapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="start", parent_name="surface.contours.y", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="surface.contours.y", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="surface.contours.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="project", parent_name="surface.contours.y", **kwargs - ): - super(ProjectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Project"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="highlightwidth", parent_name="surface.contours.y", **kwargs - ): - super(HighlightwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="highlightcolor", parent_name="surface.contours.y", **kwargs - ): - super(HighlightcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="highlight", parent_name="surface.contours.y", **kwargs - ): - super(HighlightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="end", parent_name="surface.contours.y", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="surface.contours.y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._usecolormap import UsecolormapValidator + from ._start import StartValidator + from ._size import SizeValidator + from ._show import ShowValidator + from ._project import ProjectValidator + from ._highlightwidth import HighlightwidthValidator + from ._highlightcolor import HighlightcolorValidator + from ._highlight import HighlightValidator + from ._end import EndValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._usecolormap.UsecolormapValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._show.ShowValidator", + "._project.ProjectValidator", + "._highlightwidth.HighlightwidthValidator", + "._highlightcolor.HighlightcolorValidator", + "._highlight.HighlightValidator", + "._end.EndValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_color.py b/packages/python/plotly/plotly/validators/surface/contours/y/_color.py new file mode 100644 index 00000000000..518d73145f6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="surface.contours.y", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_end.py b/packages/python/plotly/plotly/validators/surface/contours/y/_end.py new file mode 100644 index 00000000000..794b26336ef --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="end", parent_name="surface.contours.y", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_highlight.py b/packages/python/plotly/plotly/validators/surface/contours/y/_highlight.py new file mode 100644 index 00000000000..d980dd3690e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_highlight.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="highlight", parent_name="surface.contours.y", **kwargs + ): + super(HighlightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_highlightcolor.py b/packages/python/plotly/plotly/validators/surface/contours/y/_highlightcolor.py new file mode 100644 index 00000000000..1a5686735a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_highlightcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="highlightcolor", parent_name="surface.contours.y", **kwargs + ): + super(HighlightcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_highlightwidth.py b/packages/python/plotly/plotly/validators/surface/contours/y/_highlightwidth.py new file mode 100644 index 00000000000..cc213b01042 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_highlightwidth.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="highlightwidth", parent_name="surface.contours.y", **kwargs + ): + super(HighlightwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_project.py b/packages/python/plotly/plotly/validators/surface/contours/y/_project.py new file mode 100644 index 00000000000..163d0136293 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_project.py @@ -0,0 +1,36 @@ +import _plotly_utils.basevalidators + + +class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="project", parent_name="surface.contours.y", **kwargs + ): + super(ProjectValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Project"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Determines whether or not these contour lines + are projected on the x plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + y + Determines whether or not these contour lines + are projected on the y plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + z + Determines whether or not these contour lines + are projected on the z plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_show.py b/packages/python/plotly/plotly/validators/surface/contours/y/_show.py new file mode 100644 index 00000000000..512c7dc69df --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="surface.contours.y", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_size.py b/packages/python/plotly/plotly/validators/surface/contours/y/_size.py new file mode 100644 index 00000000000..e39984068c9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="surface.contours.y", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_start.py b/packages/python/plotly/plotly/validators/surface/contours/y/_start.py new file mode 100644 index 00000000000..2ccbe432d19 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="start", parent_name="surface.contours.y", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_usecolormap.py b/packages/python/plotly/plotly/validators/surface/contours/y/_usecolormap.py new file mode 100644 index 00000000000..a4456f2165f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_usecolormap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="usecolormap", parent_name="surface.contours.y", **kwargs + ): + super(UsecolormapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/_width.py b/packages/python/plotly/plotly/validators/surface/contours/y/_width.py new file mode 100644 index 00000000000..22ace01ae65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="surface.contours.y", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/project/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/y/project/__init__.py index 31af0d66129..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/y/project/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/y/project/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="z", parent_name="surface.contours.y.project", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="y", parent_name="surface.contours.y.project", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="x", parent_name="surface.contours.y.project", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/project/_x.py b/packages/python/plotly/plotly/validators/surface/contours/y/project/_x.py new file mode 100644 index 00000000000..7d23f7ae72e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/project/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="x", parent_name="surface.contours.y.project", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/project/_y.py b/packages/python/plotly/plotly/validators/surface/contours/y/project/_y.py new file mode 100644 index 00000000000..361394f5bad --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/project/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="y", parent_name="surface.contours.y.project", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/y/project/_z.py b/packages/python/plotly/plotly/validators/surface/contours/y/project/_z.py new file mode 100644 index 00000000000..bf5f588c19f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/y/project/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="z", parent_name="surface.contours.y.project", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/z/__init__.py index 02b49402124..3b034f3a7ea 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/z/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/z/__init__.py @@ -1,189 +1,34 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="surface.contours.z", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="usecolormap", parent_name="surface.contours.z", **kwargs - ): - super(UsecolormapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StartValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="start", parent_name="surface.contours.z", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="surface.contours.z", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="surface.contours.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="project", parent_name="surface.contours.z", **kwargs - ): - super(ProjectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Project"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="highlightwidth", parent_name="surface.contours.z", **kwargs - ): - super(HighlightwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="highlightcolor", parent_name="surface.contours.z", **kwargs - ): - super(HighlightcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="highlight", parent_name="surface.contours.z", **kwargs - ): - super(HighlightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EndValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="end", parent_name="surface.contours.z", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="surface.contours.z", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._usecolormap import UsecolormapValidator + from ._start import StartValidator + from ._size import SizeValidator + from ._show import ShowValidator + from ._project import ProjectValidator + from ._highlightwidth import HighlightwidthValidator + from ._highlightcolor import HighlightcolorValidator + from ._highlight import HighlightValidator + from ._end import EndValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._usecolormap.UsecolormapValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._show.ShowValidator", + "._project.ProjectValidator", + "._highlightwidth.HighlightwidthValidator", + "._highlightcolor.HighlightcolorValidator", + "._highlight.HighlightValidator", + "._end.EndValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_color.py b/packages/python/plotly/plotly/validators/surface/contours/z/_color.py new file mode 100644 index 00000000000..5f29e3422ab --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="surface.contours.z", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_end.py b/packages/python/plotly/plotly/validators/surface/contours/z/_end.py new file mode 100644 index 00000000000..6df261d4a63 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_end.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class EndValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="end", parent_name="surface.contours.z", **kwargs): + super(EndValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_highlight.py b/packages/python/plotly/plotly/validators/surface/contours/z/_highlight.py new file mode 100644 index 00000000000..77ae97e850f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_highlight.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="highlight", parent_name="surface.contours.z", **kwargs + ): + super(HighlightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_highlightcolor.py b/packages/python/plotly/plotly/validators/surface/contours/z/_highlightcolor.py new file mode 100644 index 00000000000..8ddcd9d8c7e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_highlightcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="highlightcolor", parent_name="surface.contours.z", **kwargs + ): + super(HighlightcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_highlightwidth.py b/packages/python/plotly/plotly/validators/surface/contours/z/_highlightwidth.py new file mode 100644 index 00000000000..4a1263d3b37 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_highlightwidth.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="highlightwidth", parent_name="surface.contours.z", **kwargs + ): + super(HighlightwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_project.py b/packages/python/plotly/plotly/validators/surface/contours/z/_project.py new file mode 100644 index 00000000000..e43e0c84973 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_project.py @@ -0,0 +1,36 @@ +import _plotly_utils.basevalidators + + +class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="project", parent_name="surface.contours.z", **kwargs + ): + super(ProjectValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Project"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Determines whether or not these contour lines + are projected on the x plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + y + Determines whether or not these contour lines + are projected on the y plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. + z + Determines whether or not these contour lines + are projected on the z plane. If `highlight` is + set to True (the default), the projected lines + are shown on hover. If `show` is set to True, + the projected lines are shown in permanence. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_show.py b/packages/python/plotly/plotly/validators/surface/contours/z/_show.py new file mode 100644 index 00000000000..d3d43b884f0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="surface.contours.z", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_size.py b/packages/python/plotly/plotly/validators/surface/contours/z/_size.py new file mode 100644 index 00000000000..07c28349279 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_size.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="surface.contours.z", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_start.py b/packages/python/plotly/plotly/validators/surface/contours/z/_start.py new file mode 100644 index 00000000000..ce4b601c68b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_start.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class StartValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="start", parent_name="surface.contours.z", **kwargs): + super(StartValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_usecolormap.py b/packages/python/plotly/plotly/validators/surface/contours/z/_usecolormap.py new file mode 100644 index 00000000000..cd412a88831 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_usecolormap.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="usecolormap", parent_name="surface.contours.z", **kwargs + ): + super(UsecolormapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/_width.py b/packages/python/plotly/plotly/validators/surface/contours/z/_width.py new file mode 100644 index 00000000000..c635a193e0d --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="surface.contours.z", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/project/__init__.py b/packages/python/plotly/plotly/validators/surface/contours/z/project/__init__.py index 63dd75fa458..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/surface/contours/z/project/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/contours/z/project/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="z", parent_name="surface.contours.z.project", **kwargs - ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="y", parent_name="surface.contours.z.project", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="x", parent_name="surface.contours.z.project", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/project/_x.py b/packages/python/plotly/plotly/validators/surface/contours/z/project/_x.py new file mode 100644 index 00000000000..3d7c53c978a --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/project/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="x", parent_name="surface.contours.z.project", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/project/_y.py b/packages/python/plotly/plotly/validators/surface/contours/z/project/_y.py new file mode 100644 index 00000000000..73df50c23d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/project/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="y", parent_name="surface.contours.z.project", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/contours/z/project/_z.py b/packages/python/plotly/plotly/validators/surface/contours/z/project/_z.py new file mode 100644 index 00000000000..87e95dca6d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/contours/z/project/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="z", parent_name="surface.contours.z.project", **kwargs + ): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/__init__.py index 7c341bfdb18..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/surface/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="surface.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="surface.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="surface.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="surface.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="surface.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="surface.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="surface.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="surface.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="surface.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_align.py new file mode 100644 index 00000000000..15340407e1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="surface.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..485d10ab22f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="surface.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..c77a2b6a7ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="surface.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..6a51afe58b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="surface.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..0b9a2a788c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="surface.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..5c5fb3d12cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="surface.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_font.py new file mode 100644 index 00000000000..17685a82cf0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="surface.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_namelength.py new file mode 100644 index 00000000000..b4f7edd4a4b --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="surface.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..297bced212e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="surface.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/__init__.py index 28e219382e9..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="surface.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="surface.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="surface.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="surface.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="surface.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="surface.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_color.py new file mode 100644 index 00000000000..816987f10ba --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="surface.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..04dca959cc8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="surface.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_family.py new file mode 100644 index 00000000000..8d21ce7c65f --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="surface.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..13806a74b1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="surface.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_size.py new file mode 100644 index 00000000000..3ead157e55d --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="surface.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..bd61b28e196 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="surface.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lighting/__init__.py b/packages/python/plotly/plotly/validators/surface/lighting/__init__.py index f8efcfa2087..2cfddbe40eb 100644 --- a/packages/python/plotly/plotly/validators/surface/lighting/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/lighting/__init__.py @@ -1,82 +1,22 @@ -import _plotly_utils.basevalidators - - -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="specular", parent_name="surface.lighting", **kwargs - ): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="roughness", parent_name="surface.lighting", **kwargs - ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fresnel", parent_name="surface.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="diffuse", parent_name="surface.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ambient", parent_name="surface.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._specular import SpecularValidator + from ._roughness import RoughnessValidator + from ._fresnel import FresnelValidator + from ._diffuse import DiffuseValidator + from ._ambient import AmbientValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/surface/lighting/_ambient.py b/packages/python/plotly/plotly/validators/surface/lighting/_ambient.py new file mode 100644 index 00000000000..11aff159615 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lighting/_ambient.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ambient", parent_name="surface.lighting", **kwargs): + super(AmbientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lighting/_diffuse.py b/packages/python/plotly/plotly/validators/surface/lighting/_diffuse.py new file mode 100644 index 00000000000..5a113025616 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lighting/_diffuse.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="diffuse", parent_name="surface.lighting", **kwargs): + super(DiffuseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lighting/_fresnel.py b/packages/python/plotly/plotly/validators/surface/lighting/_fresnel.py new file mode 100644 index 00000000000..7e00b1f1eaa --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lighting/_fresnel.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fresnel", parent_name="surface.lighting", **kwargs): + super(FresnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lighting/_roughness.py b/packages/python/plotly/plotly/validators/surface/lighting/_roughness.py new file mode 100644 index 00000000000..05c9a96de2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lighting/_roughness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="roughness", parent_name="surface.lighting", **kwargs + ): + super(RoughnessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lighting/_specular.py b/packages/python/plotly/plotly/validators/surface/lighting/_specular.py new file mode 100644 index 00000000000..50cc124bb89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lighting/_specular.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="specular", parent_name="surface.lighting", **kwargs + ): + super(SpecularValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lightposition/__init__.py b/packages/python/plotly/plotly/validators/surface/lightposition/__init__.py index 56155f8f912..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/surface/lightposition/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/lightposition/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="z", parent_name="surface.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="surface.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="surface.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/surface/lightposition/_x.py b/packages/python/plotly/plotly/validators/surface/lightposition/_x.py new file mode 100644 index 00000000000..336514993ae --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lightposition/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="surface.lightposition", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lightposition/_y.py b/packages/python/plotly/plotly/validators/surface/lightposition/_y.py new file mode 100644 index 00000000000..49f734d3918 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lightposition/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="surface.lightposition", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/lightposition/_z.py b/packages/python/plotly/plotly/validators/surface/lightposition/_z.py new file mode 100644 index 00000000000..8d6ca7f5982 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/lightposition/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="z", parent_name="surface.lightposition", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/stream/__init__.py b/packages/python/plotly/plotly/validators/surface/stream/__init__.py index 27e1d4d843b..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/surface/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/surface/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="surface.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="surface.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/surface/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/surface/stream/_maxpoints.py new file mode 100644 index 00000000000..4c10d9e1ec9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="surface.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/surface/stream/_token.py b/packages/python/plotly/plotly/validators/surface/stream/_token.py new file mode 100644 index 00000000000..0027adf668e --- /dev/null +++ b/packages/python/plotly/plotly/validators/surface/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="surface.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/__init__.py b/packages/python/plotly/plotly/validators/table/__init__.py index c660097a36f..0700e0edc0a 100644 --- a/packages/python/plotly/plotly/validators/table/__init__.py +++ b/packages/python/plotly/plotly/validators/table/__init__.py @@ -1,472 +1,54 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="table", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="table", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="table", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="table", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="table", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="table", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="table", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="table", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="table", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="table", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="table", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="table", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeaderValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="header", parent_name="table", **kwargs): - super(HeaderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Header"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - fill - :class:`plotly.graph_objects.table.header.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.header.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud - for format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.header.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for suffix . - values - Header cell values. `values[m][n]` represents - the value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="table", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this table trace . - row - If there is a layout grid, use the domain for - this row in the grid for this table trace . - x - Sets the horizontal domain of this table trace - (in plot fraction). - y - Sets the vertical domain of this table trace - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="table", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="table", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnwidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="columnwidthsrc", parent_name="table", **kwargs): - super(ColumnwidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="columnwidth", parent_name="table", **kwargs): - super(ColumnwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnordersrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="columnordersrc", parent_name="table", **kwargs): - super(ColumnordersrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnorderValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="columnorder", parent_name="table", **kwargs): - super(ColumnorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CellsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="cells", parent_name="table", **kwargs): - super(CellsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Cells"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - fill - :class:`plotly.graph_objects.table.cells.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.cells.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on Chart Studio Cloud - for format . - height - The height of cells. - line - :class:`plotly.graph_objects.table.cells.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for suffix . - values - Cell values. `values[m][n]` represents the - value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for values . -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._stream import StreamValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._header import HeaderValidator + from ._domain import DomainValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._columnwidthsrc import ColumnwidthsrcValidator + from ._columnwidth import ColumnwidthValidator + from ._columnordersrc import ColumnordersrcValidator + from ._columnorder import ColumnorderValidator + from ._cells import CellsValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._stream.StreamValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._header.HeaderValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._columnwidthsrc.ColumnwidthsrcValidator", + "._columnwidth.ColumnwidthValidator", + "._columnordersrc.ColumnordersrcValidator", + "._columnorder.ColumnorderValidator", + "._cells.CellsValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/_cells.py b/packages/python/plotly/plotly/validators/table/_cells.py new file mode 100644 index 00000000000..9e4e8255e34 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_cells.py @@ -0,0 +1,65 @@ +import _plotly_utils.basevalidators + + +class CellsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="cells", parent_name="table", **kwargs): + super(CellsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Cells"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + fill + :class:`plotly.graph_objects.table.cells.Fill` + instance or dict with compatible properties + font + :class:`plotly.graph_objects.table.cells.Font` + instance or dict with compatible properties + format + Sets the cell value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud + for format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.cells.Line` + instance or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud + for prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud + for suffix . + values + Cell values. `values[m][n]` represents the + value of the `n`th point in column `m`, + therefore the `values[m]` vector length for all + columns must be the same (longer vectors will + be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_columnorder.py b/packages/python/plotly/plotly/validators/table/_columnorder.py new file mode 100644 index 00000000000..1513396b785 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_columnorder.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColumnorderValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="columnorder", parent_name="table", **kwargs): + super(ColumnorderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_columnordersrc.py b/packages/python/plotly/plotly/validators/table/_columnordersrc.py new file mode 100644 index 00000000000..61fb29eca55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_columnordersrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColumnordersrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="columnordersrc", parent_name="table", **kwargs): + super(ColumnordersrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_columnwidth.py b/packages/python/plotly/plotly/validators/table/_columnwidth.py new file mode 100644 index 00000000000..9c127731d7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_columnwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="columnwidth", parent_name="table", **kwargs): + super(ColumnwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_columnwidthsrc.py b/packages/python/plotly/plotly/validators/table/_columnwidthsrc.py new file mode 100644 index 00000000000..f00c9d4b377 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_columnwidthsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColumnwidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="columnwidthsrc", parent_name="table", **kwargs): + super(ColumnwidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_customdata.py b/packages/python/plotly/plotly/validators/table/_customdata.py new file mode 100644 index 00000000000..8fb0b00c963 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="table", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_customdatasrc.py b/packages/python/plotly/plotly/validators/table/_customdatasrc.py new file mode 100644 index 00000000000..f79d8157a0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="table", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_domain.py b/packages/python/plotly/plotly/validators/table/_domain.py new file mode 100644 index 00000000000..72d8d042c87 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_domain.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="table", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this table trace . + row + If there is a layout grid, use the domain for + this row in the grid for this table trace . + x + Sets the horizontal domain of this table trace + (in plot fraction). + y + Sets the vertical domain of this table trace + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_header.py b/packages/python/plotly/plotly/validators/table/_header.py new file mode 100644 index 00000000000..06cb8ebedef --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_header.py @@ -0,0 +1,65 @@ +import _plotly_utils.basevalidators + + +class HeaderValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="header", parent_name="table", **kwargs): + super(HeaderValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Header"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans two or more lines (i.e. `text` contains + one or more
HTML tags) or if an explicit + width is set to override the text width. + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + fill + :class:`plotly.graph_objects.table.header.Fill` + instance or dict with compatible properties + font + :class:`plotly.graph_objects.table.header.Font` + instance or dict with compatible properties + format + Sets the cell value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on Chart Studio Cloud + for format . + height + The height of cells. + line + :class:`plotly.graph_objects.table.header.Line` + instance or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on Chart Studio Cloud + for prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on Chart Studio Cloud + for suffix . + values + Header cell values. `values[m][n]` represents + the value of the `n`th point in column `m`, + therefore the `values[m]` vector length for all + columns must be the same (longer vectors will + be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on Chart Studio Cloud + for values . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_hoverinfo.py b/packages/python/plotly/plotly/validators/table/_hoverinfo.py new file mode 100644 index 00000000000..1d763580f65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="table", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/table/_hoverinfosrc.py new file mode 100644 index 00000000000..7ee723c08d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="table", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_hoverlabel.py b/packages/python/plotly/plotly/validators/table/_hoverlabel.py new file mode 100644 index 00000000000..c19bb805688 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="table", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_ids.py b/packages/python/plotly/plotly/validators/table/_ids.py new file mode 100644 index 00000000000..f3b6a4dca57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="table", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_idssrc.py b/packages/python/plotly/plotly/validators/table/_idssrc.py new file mode 100644 index 00000000000..d23056bcb18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="table", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_meta.py b/packages/python/plotly/plotly/validators/table/_meta.py new file mode 100644 index 00000000000..f92b07c07cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="table", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_metasrc.py b/packages/python/plotly/plotly/validators/table/_metasrc.py new file mode 100644 index 00000000000..bf6aef58bb0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="table", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_name.py b/packages/python/plotly/plotly/validators/table/_name.py new file mode 100644 index 00000000000..d64a488569e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="table", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_stream.py b/packages/python/plotly/plotly/validators/table/_stream.py new file mode 100644 index 00000000000..0cac34a0e40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="table", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_uid.py b/packages/python/plotly/plotly/validators/table/_uid.py new file mode 100644 index 00000000000..55354df9c0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="table", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_uirevision.py b/packages/python/plotly/plotly/validators/table/_uirevision.py new file mode 100644 index 00000000000..1ccb73dfbce --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="table", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/_visible.py b/packages/python/plotly/plotly/validators/table/_visible.py new file mode 100644 index 00000000000..103c2157d1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="table", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/__init__.py b/packages/python/plotly/plotly/validators/table/cells/__init__.py index b3455495b27..71c2f54af9a 100644 --- a/packages/python/plotly/plotly/validators/table/cells/__init__.py +++ b/packages/python/plotly/plotly/validators/table/cells/__init__.py @@ -1,257 +1,40 @@ -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuessrc", parent_name="table.cells", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="table.cells", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SuffixsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="suffixsrc", parent_name="table.cells", **kwargs): - super(SuffixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="suffix", parent_name="table.cells", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="prefixsrc", parent_name="table.cells", **kwargs): - super(PrefixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="prefix", parent_name="table.cells", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="table.cells", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="height", parent_name="table.cells", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="formatsrc", parent_name="table.cells", **kwargs): - super(FormatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FormatValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="format", parent_name="table.cells", **kwargs): - super(FormatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="table.cells", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="fill", parent_name="table.cells", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Fill"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="table.cells", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="table.cells", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._suffixsrc import SuffixsrcValidator + from ._suffix import SuffixValidator + from ._prefixsrc import PrefixsrcValidator + from ._prefix import PrefixValidator + from ._line import LineValidator + from ._height import HeightValidator + from ._formatsrc import FormatsrcValidator + from ._format import FormatValidator + from ._font import FontValidator + from ._fill import FillValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._suffixsrc.SuffixsrcValidator", + "._suffix.SuffixValidator", + "._prefixsrc.PrefixsrcValidator", + "._prefix.PrefixValidator", + "._line.LineValidator", + "._height.HeightValidator", + "._formatsrc.FormatsrcValidator", + "._format.FormatValidator", + "._font.FontValidator", + "._fill.FillValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_align.py b/packages/python/plotly/plotly/validators/table/cells/_align.py new file mode 100644 index 00000000000..5b4dcff86c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="table.cells", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_alignsrc.py b/packages/python/plotly/plotly/validators/table/cells/_alignsrc.py new file mode 100644 index 00000000000..8d48ed15788 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="table.cells", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_fill.py b/packages/python/plotly/plotly/validators/table/cells/_fill.py new file mode 100644 index 00000000000..114c2cd5090 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_fill.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="fill", parent_name="table.cells", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Fill"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the cell fill color. It accepts either a + specific color or an array of colors or a 2D + array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_font.py b/packages/python/plotly/plotly/validators/table/cells/_font.py new file mode 100644 index 00000000000..4392bdedf91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="table.cells", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_format.py b/packages/python/plotly/plotly/validators/table/cells/_format.py new file mode 100644 index 00000000000..1fac8d2fe8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_format.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FormatValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="format", parent_name="table.cells", **kwargs): + super(FormatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_formatsrc.py b/packages/python/plotly/plotly/validators/table/cells/_formatsrc.py new file mode 100644 index 00000000000..378d137f531 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_formatsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="formatsrc", parent_name="table.cells", **kwargs): + super(FormatsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_height.py b/packages/python/plotly/plotly/validators/table/cells/_height.py new file mode 100644 index 00000000000..bd4e9947250 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_height.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HeightValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="height", parent_name="table.cells", **kwargs): + super(HeightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_line.py b/packages/python/plotly/plotly/validators/table/cells/_line.py new file mode 100644 index 00000000000..398b223bc68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_line.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="table.cells", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_prefix.py b/packages/python/plotly/plotly/validators/table/cells/_prefix.py new file mode 100644 index 00000000000..90b39b4ae5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_prefix.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class PrefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="prefix", parent_name="table.cells", **kwargs): + super(PrefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_prefixsrc.py b/packages/python/plotly/plotly/validators/table/cells/_prefixsrc.py new file mode 100644 index 00000000000..7b90642dc41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_prefixsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="prefixsrc", parent_name="table.cells", **kwargs): + super(PrefixsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_suffix.py b/packages/python/plotly/plotly/validators/table/cells/_suffix.py new file mode 100644 index 00000000000..25eedac281c --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_suffix.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="suffix", parent_name="table.cells", **kwargs): + super(SuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_suffixsrc.py b/packages/python/plotly/plotly/validators/table/cells/_suffixsrc.py new file mode 100644 index 00000000000..d122ec73ea9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_suffixsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SuffixsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="suffixsrc", parent_name="table.cells", **kwargs): + super(SuffixsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_values.py b/packages/python/plotly/plotly/validators/table/cells/_values.py new file mode 100644 index 00000000000..8ff2cc6c490 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="table.cells", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/_valuessrc.py b/packages/python/plotly/plotly/validators/table/cells/_valuessrc.py new file mode 100644 index 00000000000..d73618db123 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/_valuessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="table.cells", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/fill/__init__.py b/packages/python/plotly/plotly/validators/table/cells/fill/__init__.py index 4c0e105afed..bdc564f8f76 100644 --- a/packages/python/plotly/plotly/validators/table/cells/fill/__init__.py +++ b/packages/python/plotly/plotly/validators/table/cells/fill/__init__.py @@ -1,29 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.cells.fill", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="table.cells.fill", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/fill/_color.py b/packages/python/plotly/plotly/validators/table/cells/fill/_color.py new file mode 100644 index 00000000000..424ae23246a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/fill/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="table.cells.fill", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/fill/_colorsrc.py b/packages/python/plotly/plotly/validators/table/cells/fill/_colorsrc.py new file mode 100644 index 00000000000..4e0074f475d --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/fill/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.cells.fill", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/__init__.py b/packages/python/plotly/plotly/validators/table/cells/font/__init__.py index 468a8a0d48d..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/table/cells/font/__init__.py +++ b/packages/python/plotly/plotly/validators/table/cells/font/__init__.py @@ -1,92 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="table.cells.font", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="table.cells.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="table.cells.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="table.cells.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.cells.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="table.cells.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/_color.py b/packages/python/plotly/plotly/validators/table/cells/font/_color.py new file mode 100644 index 00000000000..5192456fd6e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/font/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="table.cells.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/_colorsrc.py b/packages/python/plotly/plotly/validators/table/cells/font/_colorsrc.py new file mode 100644 index 00000000000..d8aa96d12e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.cells.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/_family.py b/packages/python/plotly/plotly/validators/table/cells/font/_family.py new file mode 100644 index 00000000000..817f58b00f5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/font/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="table.cells.font", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/_familysrc.py b/packages/python/plotly/plotly/validators/table/cells/font/_familysrc.py new file mode 100644 index 00000000000..691390d5a9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="table.cells.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/_size.py b/packages/python/plotly/plotly/validators/table/cells/font/_size.py new file mode 100644 index 00000000000..59bd62a1d44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/font/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="table.cells.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/font/_sizesrc.py b/packages/python/plotly/plotly/validators/table/cells/font/_sizesrc.py new file mode 100644 index 00000000000..79f32639a7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/font/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="table.cells.font", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/line/__init__.py b/packages/python/plotly/plotly/validators/table/cells/line/__init__.py index 8438a1511c2..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/table/cells/line/__init__.py +++ b/packages/python/plotly/plotly/validators/table/cells/line/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="table.cells.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="table.cells.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.cells.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="table.cells.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/line/_color.py b/packages/python/plotly/plotly/validators/table/cells/line/_color.py new file mode 100644 index 00000000000..101c3f4fd9e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="table.cells.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/line/_colorsrc.py b/packages/python/plotly/plotly/validators/table/cells/line/_colorsrc.py new file mode 100644 index 00000000000..fb7549ac0cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.cells.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/line/_width.py b/packages/python/plotly/plotly/validators/table/cells/line/_width.py new file mode 100644 index 00000000000..66c8561864b --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="table.cells.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/cells/line/_widthsrc.py b/packages/python/plotly/plotly/validators/table/cells/line/_widthsrc.py new file mode 100644 index 00000000000..89cf4c421b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/cells/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="table.cells.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/domain/__init__.py b/packages/python/plotly/plotly/validators/table/domain/__init__.py index 957a9d90e91..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/table/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/table/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="table.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="table.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="table.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="table.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/domain/_column.py b/packages/python/plotly/plotly/validators/table/domain/_column.py new file mode 100644 index 00000000000..c3bba4fd904 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="table.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/domain/_row.py b/packages/python/plotly/plotly/validators/table/domain/_row.py new file mode 100644 index 00000000000..afc3c40b75f --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="table.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/domain/_x.py b/packages/python/plotly/plotly/validators/table/domain/_x.py new file mode 100644 index 00000000000..2891bb56b22 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="table.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/domain/_y.py b/packages/python/plotly/plotly/validators/table/domain/_y.py new file mode 100644 index 00000000000..8ec0db81a4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="table.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/__init__.py b/packages/python/plotly/plotly/validators/table/header/__init__.py index ad3362e2372..71c2f54af9a 100644 --- a/packages/python/plotly/plotly/validators/table/header/__init__.py +++ b/packages/python/plotly/plotly/validators/table/header/__init__.py @@ -1,257 +1,40 @@ -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuessrc", parent_name="table.header", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="table.header", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SuffixsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="suffixsrc", parent_name="table.header", **kwargs): - super(SuffixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="suffix", parent_name="table.header", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="prefixsrc", parent_name="table.header", **kwargs): - super(PrefixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="prefix", parent_name="table.header", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="table.header", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="height", parent_name="table.header", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="formatsrc", parent_name="table.header", **kwargs): - super(FormatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FormatValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="format", parent_name="table.header", **kwargs): - super(FormatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="table.header", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="fill", parent_name="table.header", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Fill"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="alignsrc", parent_name="table.header", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="table.header", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._suffixsrc import SuffixsrcValidator + from ._suffix import SuffixValidator + from ._prefixsrc import PrefixsrcValidator + from ._prefix import PrefixValidator + from ._line import LineValidator + from ._height import HeightValidator + from ._formatsrc import FormatsrcValidator + from ._format import FormatValidator + from ._font import FontValidator + from ._fill import FillValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._suffixsrc.SuffixsrcValidator", + "._suffix.SuffixValidator", + "._prefixsrc.PrefixsrcValidator", + "._prefix.PrefixValidator", + "._line.LineValidator", + "._height.HeightValidator", + "._formatsrc.FormatsrcValidator", + "._format.FormatValidator", + "._font.FontValidator", + "._fill.FillValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_align.py b/packages/python/plotly/plotly/validators/table/header/_align.py new file mode 100644 index 00000000000..e1e4b683b29 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="table.header", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_alignsrc.py b/packages/python/plotly/plotly/validators/table/header/_alignsrc.py new file mode 100644 index 00000000000..3c17006c204 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_alignsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="alignsrc", parent_name="table.header", **kwargs): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_fill.py b/packages/python/plotly/plotly/validators/table/header/_fill.py new file mode 100644 index 00000000000..dae8a9886c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_fill.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="fill", parent_name="table.header", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Fill"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the cell fill color. It accepts either a + specific color or an array of colors or a 2D + array of colors. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_font.py b/packages/python/plotly/plotly/validators/table/header/_font.py new file mode 100644 index 00000000000..d57e4c054db --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="table.header", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_format.py b/packages/python/plotly/plotly/validators/table/header/_format.py new file mode 100644 index 00000000000..6bac729bcd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_format.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FormatValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="format", parent_name="table.header", **kwargs): + super(FormatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_formatsrc.py b/packages/python/plotly/plotly/validators/table/header/_formatsrc.py new file mode 100644 index 00000000000..267141d5a41 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_formatsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="formatsrc", parent_name="table.header", **kwargs): + super(FormatsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_height.py b/packages/python/plotly/plotly/validators/table/header/_height.py new file mode 100644 index 00000000000..30395df63d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_height.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HeightValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="height", parent_name="table.header", **kwargs): + super(HeightValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_line.py b/packages/python/plotly/plotly/validators/table/header/_line.py new file mode 100644 index 00000000000..fb3fc9fe63a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_line.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="table.header", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_prefix.py b/packages/python/plotly/plotly/validators/table/header/_prefix.py new file mode 100644 index 00000000000..cabfb435411 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_prefix.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class PrefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="prefix", parent_name="table.header", **kwargs): + super(PrefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_prefixsrc.py b/packages/python/plotly/plotly/validators/table/header/_prefixsrc.py new file mode 100644 index 00000000000..f8ee922b250 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_prefixsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="prefixsrc", parent_name="table.header", **kwargs): + super(PrefixsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_suffix.py b/packages/python/plotly/plotly/validators/table/header/_suffix.py new file mode 100644 index 00000000000..ebfd5ae00c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_suffix.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="suffix", parent_name="table.header", **kwargs): + super(SuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_suffixsrc.py b/packages/python/plotly/plotly/validators/table/header/_suffixsrc.py new file mode 100644 index 00000000000..8680819fd7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_suffixsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SuffixsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="suffixsrc", parent_name="table.header", **kwargs): + super(SuffixsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_values.py b/packages/python/plotly/plotly/validators/table/header/_values.py new file mode 100644 index 00000000000..3e6a0646165 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="table.header", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/_valuessrc.py b/packages/python/plotly/plotly/validators/table/header/_valuessrc.py new file mode 100644 index 00000000000..0910acd5a48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/_valuessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="table.header", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/fill/__init__.py b/packages/python/plotly/plotly/validators/table/header/fill/__init__.py index cca8adc469c..bdc564f8f76 100644 --- a/packages/python/plotly/plotly/validators/table/header/fill/__init__.py +++ b/packages/python/plotly/plotly/validators/table/header/fill/__init__.py @@ -1,29 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.header.fill", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="table.header.fill", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/table/header/fill/_color.py b/packages/python/plotly/plotly/validators/table/header/fill/_color.py new file mode 100644 index 00000000000..71db57225d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/fill/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="table.header.fill", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/fill/_colorsrc.py b/packages/python/plotly/plotly/validators/table/header/fill/_colorsrc.py new file mode 100644 index 00000000000..f3dafe5742f --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/fill/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.header.fill", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/__init__.py b/packages/python/plotly/plotly/validators/table/header/font/__init__.py index 0da7aac9267..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/table/header/font/__init__.py +++ b/packages/python/plotly/plotly/validators/table/header/font/__init__.py @@ -1,94 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="table.header.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="table.header.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="table.header.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="table.header.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.header.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="table.header.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/_color.py b/packages/python/plotly/plotly/validators/table/header/font/_color.py new file mode 100644 index 00000000000..4ee6340efc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/font/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="table.header.font", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/_colorsrc.py b/packages/python/plotly/plotly/validators/table/header/font/_colorsrc.py new file mode 100644 index 00000000000..734dad3d9d7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.header.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/_family.py b/packages/python/plotly/plotly/validators/table/header/font/_family.py new file mode 100644 index 00000000000..38240120da6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/font/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="table.header.font", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/_familysrc.py b/packages/python/plotly/plotly/validators/table/header/font/_familysrc.py new file mode 100644 index 00000000000..d004f6dcb1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="table.header.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/_size.py b/packages/python/plotly/plotly/validators/table/header/font/_size.py new file mode 100644 index 00000000000..1ba0851d03e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/font/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="table.header.font", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/font/_sizesrc.py b/packages/python/plotly/plotly/validators/table/header/font/_sizesrc.py new file mode 100644 index 00000000000..396f8d07d9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="table.header.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/line/__init__.py b/packages/python/plotly/plotly/validators/table/header/line/__init__.py index 5d514a14b19..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/table/header/line/__init__.py +++ b/packages/python/plotly/plotly/validators/table/header/line/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="table.header.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="table.header.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.header.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="table.header.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/header/line/_color.py b/packages/python/plotly/plotly/validators/table/header/line/_color.py new file mode 100644 index 00000000000..8ddf6a7a17f --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="table.header.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/line/_colorsrc.py b/packages/python/plotly/plotly/validators/table/header/line/_colorsrc.py new file mode 100644 index 00000000000..311044837dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.header.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/line/_width.py b/packages/python/plotly/plotly/validators/table/header/line/_width.py new file mode 100644 index 00000000000..0eced168fb1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="table.header.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/header/line/_widthsrc.py b/packages/python/plotly/plotly/validators/table/header/line/_widthsrc.py new file mode 100644 index 00000000000..2c4aaea36c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/header/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="table.header.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/table/hoverlabel/__init__.py index 76a11468082..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/table/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/__init__.py @@ -1,176 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="table.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="table.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="table.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="table.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="table.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="table.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="table.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="table.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="table.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_align.py new file mode 100644 index 00000000000..4b1c31642ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="table.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..60c4ab4c779 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="table.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..c9076d869b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_bgcolor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="table.hoverlabel", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..8a8ba360ef4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="table.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..1c5d08004ad --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="table.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..775c347dcac --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="table.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_font.py new file mode 100644 index 00000000000..d7144271de2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="table.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f3f6075970c --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="table.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..237f841b8a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="table.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/__init__.py index 68d0378f3e6..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/table/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="table.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="table.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="table.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="table.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="table.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="table.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_color.py new file mode 100644 index 00000000000..d88d4811e15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="table.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..ce864daff9d --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="table.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_family.py new file mode 100644 index 00000000000..2308e6d303a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="table.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..5b1cdab1ddc --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="table.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_size.py new file mode 100644 index 00000000000..d74de194c2a --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="table.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..9eac019337d --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="table.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/stream/__init__.py b/packages/python/plotly/plotly/validators/table/stream/__init__.py index db982f58b67..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/table/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/table/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="table.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="table.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/table/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/table/stream/_maxpoints.py new file mode 100644 index 00000000000..2d11a18437e --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="table.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/table/stream/_token.py b/packages/python/plotly/plotly/validators/table/stream/_token.py new file mode 100644 index 00000000000..dd775062137 --- /dev/null +++ b/packages/python/plotly/plotly/validators/table/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="table.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/__init__.py b/packages/python/plotly/plotly/validators/treemap/__init__.py index 2279698f579..381d386c4aa 100644 --- a/packages/python/plotly/plotly/validators/treemap/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/__init__.py @@ -1,965 +1,96 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="treemap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuessrc", parent_name="treemap", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="values", parent_name="treemap", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="treemap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="treemap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TilingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tiling", parent_name="treemap", **kwargs): - super(TilingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tiling"), - data_docs=kwargs.pop( - "data_docs", - """ - flip - Determines if the positions obtained from - solver are flipped on each axis. - packing - Determines d3 treemap solver. For more info - please refer to - https://github.com/d3/d3-hierarchy#treemap- - tiling - pad - Sets the inner padding (in px). - squarifyratio - When using "squarify" `packing` algorithm, - according to https://github.com/d3/d3-hierarchy - /blob/master/README.md#squarify_ratio this - option specifies the desired aspect ratio of - the generated rectangles. The ratio must be - specified as a number greater than or equal to - one. Note that the orientation of the generated - rectangles (tall or wide) is not implied by the - ratio; for example, a ratio of two will attempt - to produce a mixture of rectangles whose - width:height ratio is either 2:1 or 1:2. When - using "squarify", unlike d3 which uses the - Golden Ratio i.e. 1.618034, Plotly applies 1 to - increase squares in treemap layouts. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="texttemplatesrc", parent_name="treemap", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="treemap", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="treemap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="treemap", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="textinfo", parent_name="treemap", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop( - "flags", - [ - "label", - "text", - "value", - "current path", - "percent root", - "percent entry", - "percent parent", - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="treemap", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="text", parent_name="treemap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="treemap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PathbarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pathbar", parent_name="treemap", **kwargs): - super(PathbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pathbar"), - data_docs=kwargs.pop( - "data_docs", - """ - edgeshape - Determines which shape is used for edges - between `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used - with 3 pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. - outside the trace `domain` and with one pixel - gap. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="parentssrc", parent_name="treemap", **kwargs): - super(ParentssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="parents", parent_name="treemap", **kwargs): - super(ParentsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="outsidetextfont", parent_name="treemap", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="treemap", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="treemap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="treemap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="treemap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="maxdepth", parent_name="treemap", **kwargs): - super(MaxdepthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="treemap", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colorsis set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colorsis - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colorsis set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colorsis set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.treemap.marker.Col - orBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colorsis set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorssrc - Sets the source reference on Chart Studio Cloud - for colors . - depthfade - Determines if the sector colors are faded - towards the background from the leaves up to - the headers. This option is unavailable when a - `colorscale` is present, defaults to false when - `marker.colors` is set, but otherwise defaults - to true. When set to "reversed", the fading - direction is inverted, that is the top elements - within hierarchy are drawn with fully saturated - colors while the leaves are faded towards the - background color. - line - :class:`plotly.graph_objects.treemap.marker.Lin - e` instance or dict with compatible properties - pad - :class:`plotly.graph_objects.treemap.marker.Pad - ` instance or dict with compatible properties - reversescale - Reverses the color mapping if true. Has an - effect only if colorsis set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colorsis set to a numerical array. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LevelValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="level", parent_name="treemap", **kwargs): - super(LevelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="labelssrc", parent_name="treemap", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="labels", parent_name="treemap", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="insidetextfont", parent_name="treemap", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="treemap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="treemap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - anim=kwargs.pop("anim", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="treemap", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="treemap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="treemap", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="treemap", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="treemap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="treemap", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="treemap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop( - "flags", - [ - "label", - "text", - "value", - "name", - "current path", - "percent root", - "percent entry", - "percent parent", - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="domain", parent_name="treemap", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Domain"), - data_docs=kwargs.pop( - "data_docs", - """ - column - If there is a layout grid, use the domain for - this column in the grid for this treemap trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this treemap trace . - x - Sets the horizontal domain of this treemap - trace (in plot fraction). - y - Sets the vertical domain of this treemap trace - (in plot fraction). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="treemap", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="treemap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="count", parent_name="treemap", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - flags=kwargs.pop("flags", ["branches", "leaves"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="branchvalues", parent_name="treemap", **kwargs): - super(BranchvaluesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["remainder", "total"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._valuessrc import ValuessrcValidator + from ._values import ValuesValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._tiling import TilingValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textposition import TextpositionValidator + from ._textinfo import TextinfoValidator + from ._textfont import TextfontValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._pathbar import PathbarValidator + from ._parentssrc import ParentssrcValidator + from ._parents import ParentsValidator + from ._outsidetextfont import OutsidetextfontValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._maxdepth import MaxdepthValidator + from ._marker import MarkerValidator + from ._level import LevelValidator + from ._labelssrc import LabelssrcValidator + from ._labels import LabelsValidator + from ._insidetextfont import InsidetextfontValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._domain import DomainValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._count import CountValidator + from ._branchvalues import BranchvaluesValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tiling.TilingValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._pathbar.PathbarValidator", + "._parentssrc.ParentssrcValidator", + "._parents.ParentsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdepth.MaxdepthValidator", + "._marker.MarkerValidator", + "._level.LevelValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._count.CountValidator", + "._branchvalues.BranchvaluesValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_branchvalues.py b/packages/python/plotly/plotly/validators/treemap/_branchvalues.py new file mode 100644 index 00000000000..3c28160b605 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_branchvalues.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="branchvalues", parent_name="treemap", **kwargs): + super(BranchvaluesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["remainder", "total"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_count.py b/packages/python/plotly/plotly/validators/treemap/_count.py new file mode 100644 index 00000000000..8316809893b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_count.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="count", parent_name="treemap", **kwargs): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + flags=kwargs.pop("flags", ["branches", "leaves"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_customdata.py b/packages/python/plotly/plotly/validators/treemap/_customdata.py new file mode 100644 index 00000000000..ed8bd10e95a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="treemap", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_customdatasrc.py b/packages/python/plotly/plotly/validators/treemap/_customdatasrc.py new file mode 100644 index 00000000000..81b3f576132 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="treemap", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_domain.py b/packages/python/plotly/plotly/validators/treemap/_domain.py new file mode 100644 index 00000000000..2b797aa53b3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_domain.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="treemap", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this treemap trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap + trace (in plot fraction). + y + Sets the vertical domain of this treemap trace + (in plot fraction). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hoverinfo.py b/packages/python/plotly/plotly/validators/treemap/_hoverinfo.py new file mode 100644 index 00000000000..b8abb9888bf --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hoverinfo.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="treemap", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "name", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/treemap/_hoverinfosrc.py new file mode 100644 index 00000000000..2a675063dcd --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="treemap", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hoverlabel.py b/packages/python/plotly/plotly/validators/treemap/_hoverlabel.py new file mode 100644 index 00000000000..9620552b47e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="treemap", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hovertemplate.py b/packages/python/plotly/plotly/validators/treemap/_hovertemplate.py new file mode 100644 index 00000000000..f80ad75f8a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="treemap", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/treemap/_hovertemplatesrc.py new file mode 100644 index 00000000000..20ae211eefb --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="treemap", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hovertext.py b/packages/python/plotly/plotly/validators/treemap/_hovertext.py new file mode 100644 index 00000000000..1f8d76eb3c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="treemap", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_hovertextsrc.py b/packages/python/plotly/plotly/validators/treemap/_hovertextsrc.py new file mode 100644 index 00000000000..d3e914977f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="treemap", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_ids.py b/packages/python/plotly/plotly/validators/treemap/_ids.py new file mode 100644 index 00000000000..106581ecc1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_ids.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="treemap", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_idssrc.py b/packages/python/plotly/plotly/validators/treemap/_idssrc.py new file mode 100644 index 00000000000..382d1d1455f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="treemap", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_insidetextfont.py b/packages/python/plotly/plotly/validators/treemap/_insidetextfont.py new file mode 100644 index 00000000000..46defc987c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_insidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="treemap", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_labels.py b/packages/python/plotly/plotly/validators/treemap/_labels.py new file mode 100644 index 00000000000..fe4aa378264 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_labels.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="labels", parent_name="treemap", **kwargs): + super(LabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_labelssrc.py b/packages/python/plotly/plotly/validators/treemap/_labelssrc.py new file mode 100644 index 00000000000..2158146ed75 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_labelssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelssrc", parent_name="treemap", **kwargs): + super(LabelssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_level.py b/packages/python/plotly/plotly/validators/treemap/_level.py new file mode 100644 index 00000000000..99b6360e74a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_level.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LevelValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="level", parent_name="treemap", **kwargs): + super(LevelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_marker.py b/packages/python/plotly/plotly/validators/treemap/_marker.py new file mode 100644 index 00000000000..bdbef4a2e0c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_marker.py @@ -0,0 +1,117 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="treemap", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + :class:`plotly.graph_objects.treemap.marker.Col + orBar` instance or dict with compatible + properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on Chart Studio Cloud + for colors . + depthfade + Determines if the sector colors are faded + towards the background from the leaves up to + the headers. This option is unavailable when a + `colorscale` is present, defaults to false when + `marker.colors` is set, but otherwise defaults + to true. When set to "reversed", the fading + direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated + colors while the leaves are faded towards the + background color. + line + :class:`plotly.graph_objects.treemap.marker.Lin + e` instance or dict with compatible properties + pad + :class:`plotly.graph_objects.treemap.marker.Pad + ` instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_maxdepth.py b/packages/python/plotly/plotly/validators/treemap/_maxdepth.py new file mode 100644 index 00000000000..fdaedfc376f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_maxdepth.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="maxdepth", parent_name="treemap", **kwargs): + super(MaxdepthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_meta.py b/packages/python/plotly/plotly/validators/treemap/_meta.py new file mode 100644 index 00000000000..c20d8c0ffb4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="treemap", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_metasrc.py b/packages/python/plotly/plotly/validators/treemap/_metasrc.py new file mode 100644 index 00000000000..629f9452c57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="treemap", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_name.py b/packages/python/plotly/plotly/validators/treemap/_name.py new file mode 100644 index 00000000000..ee34d67764d --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="treemap", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_opacity.py b/packages/python/plotly/plotly/validators/treemap/_opacity.py new file mode 100644 index 00000000000..e99a3aa463a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="treemap", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_outsidetextfont.py b/packages/python/plotly/plotly/validators/treemap/_outsidetextfont.py new file mode 100644 index 00000000000..983077ff729 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_outsidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="outsidetextfont", parent_name="treemap", **kwargs): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_parents.py b/packages/python/plotly/plotly/validators/treemap/_parents.py new file mode 100644 index 00000000000..a8b58d6a5ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_parents.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="parents", parent_name="treemap", **kwargs): + super(ParentsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_parentssrc.py b/packages/python/plotly/plotly/validators/treemap/_parentssrc.py new file mode 100644 index 00000000000..a14f3acc17b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_parentssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="parentssrc", parent_name="treemap", **kwargs): + super(ParentssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_pathbar.py b/packages/python/plotly/plotly/validators/treemap/_pathbar.py new file mode 100644 index 00000000000..15748e4b427 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_pathbar.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class PathbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pathbar", parent_name="treemap", **kwargs): + super(PathbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pathbar"), + data_docs=kwargs.pop( + "data_docs", + """ + edgeshape + Determines which shape is used for edges + between `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used + with 3 pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. + outside the trace `domain` and with one pixel + gap. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_stream.py b/packages/python/plotly/plotly/validators/treemap/_stream.py new file mode 100644 index 00000000000..534ed894012 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="treemap", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_text.py b/packages/python/plotly/plotly/validators/treemap/_text.py new file mode 100644 index 00000000000..9c289c8b3cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_text.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="treemap", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_textfont.py b/packages/python/plotly/plotly/validators/treemap/_textfont.py new file mode 100644 index 00000000000..b446e296726 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="treemap", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_textinfo.py b/packages/python/plotly/plotly/validators/treemap/_textinfo.py new file mode 100644 index 00000000000..629111bfaf8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_textinfo.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="treemap", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_textposition.py b/packages/python/plotly/plotly/validators/treemap/_textposition.py new file mode 100644 index 00000000000..d269d2a60f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_textposition.py @@ -0,0 +1,26 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="treemap", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_textsrc.py b/packages/python/plotly/plotly/validators/treemap/_textsrc.py new file mode 100644 index 00000000000..3a77df3239a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="treemap", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_texttemplate.py b/packages/python/plotly/plotly/validators/treemap/_texttemplate.py new file mode 100644 index 00000000000..7928d0c6dd5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="treemap", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/treemap/_texttemplatesrc.py new file mode 100644 index 00000000000..f936417c6e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_texttemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="treemap", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_tiling.py b/packages/python/plotly/plotly/validators/treemap/_tiling.py new file mode 100644 index 00000000000..070521f3d18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_tiling.py @@ -0,0 +1,41 @@ +import _plotly_utils.basevalidators + + +class TilingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tiling", parent_name="treemap", **kwargs): + super(TilingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tiling"), + data_docs=kwargs.pop( + "data_docs", + """ + flip + Determines if the positions obtained from + solver are flipped on each axis. + packing + Determines d3 treemap solver. For more info + please refer to + https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, + according to https://github.com/d3/d3-hierarchy + /blob/master/README.md#squarify_ratio this + option specifies the desired aspect ratio of + the generated rectangles. The ratio must be + specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the + ratio; for example, a ratio of two will attempt + to produce a mixture of rectangles whose + width:height ratio is either 2:1 or 1:2. When + using "squarify", unlike d3 which uses the + Golden Ratio i.e. 1.618034, Plotly applies 1 to + increase squares in treemap layouts. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_uid.py b/packages/python/plotly/plotly/validators/treemap/_uid.py new file mode 100644 index 00000000000..d30a9451157 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_uid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="treemap", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_uirevision.py b/packages/python/plotly/plotly/validators/treemap/_uirevision.py new file mode 100644 index 00000000000..bbea721600c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="treemap", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_values.py b/packages/python/plotly/plotly/validators/treemap/_values.py new file mode 100644 index 00000000000..6a151484afd --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_values.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="treemap", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_valuessrc.py b/packages/python/plotly/plotly/validators/treemap/_valuessrc.py new file mode 100644 index 00000000000..2af1970f92e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_valuessrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="treemap", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/_visible.py b/packages/python/plotly/plotly/validators/treemap/_visible.py new file mode 100644 index 00000000000..33a6f019282 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="treemap", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/domain/__init__.py b/packages/python/plotly/plotly/validators/treemap/domain/__init__.py index 3a7aced7e7a..ea6b5d05d34 100644 --- a/packages/python/plotly/plotly/validators/treemap/domain/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/domain/__init__.py @@ -1,70 +1,20 @@ -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="y", parent_name="treemap.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="x", parent_name="treemap.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="row", parent_name="treemap.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="column", parent_name="treemap.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._y import YValidator + from ._x import XValidator + from ._row import RowValidator + from ._column import ColumnValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/domain/_column.py b/packages/python/plotly/plotly/validators/treemap/domain/_column.py new file mode 100644 index 00000000000..adfe4c9ad6b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/domain/_column.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="treemap.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/domain/_row.py b/packages/python/plotly/plotly/validators/treemap/domain/_row.py new file mode 100644 index 00000000000..bc65ba16d49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/domain/_row.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="treemap.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/domain/_x.py b/packages/python/plotly/plotly/validators/treemap/domain/_x.py new file mode 100644 index 00000000000..687387f5c68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/domain/_x.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="treemap.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/domain/_y.py b/packages/python/plotly/plotly/validators/treemap/domain/_y.py new file mode 100644 index 00000000000..132f4688f46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/domain/_y.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="treemap.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py index f15a26e7f09..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="treemap.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="treemap.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="treemap.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="treemap.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="treemap.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="treemap.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="treemap.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="treemap.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="treemap.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_align.py new file mode 100644 index 00000000000..74f4eb51d98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="treemap.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..c433ba60b2e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="treemap.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..2d854b52bac --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="treemap.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..1acf667a07b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="treemap.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..3139fa62d44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="treemap.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..d63439f08e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="treemap.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_font.py new file mode 100644 index 00000000000..5207544b67f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="treemap.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_namelength.py new file mode 100644 index 00000000000..07c0d6ffd27 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="treemap.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3eb246bbc7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="treemap.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py index de1195a10aa..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="treemap.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="treemap.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="treemap.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="treemap.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="treemap.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="treemap.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_color.py new file mode 100644 index 00000000000..159dac2137c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..0ddf7341021 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_family.py new file mode 100644 index 00000000000..59dbc7c1577 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="treemap.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..2ba47948e13 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_size.py new file mode 100644 index 00000000000..eaccf364023 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="treemap.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..892475314ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="treemap.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py index 550b1b2b75c..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="treemap.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="treemap.insidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="treemap.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="treemap.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="treemap.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="treemap.insidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_color.py new file mode 100644 index 00000000000..d054901abea --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.insidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..7f61b10ea30 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_family.py new file mode 100644 index 00000000000..700931bb221 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="treemap.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..6ce3bd8188e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_size.py new file mode 100644 index 00000000000..9146d025a86 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="treemap.insidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..3d96ea168dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="treemap.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/__init__.py index 090f77e96d6..a5b36cf49de 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/__init__.py @@ -1,467 +1,42 @@ -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="treemap.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="reversescale", parent_name="treemap.marker", **kwargs - ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="pad", parent_name="treemap.marker", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Pad"), - data_docs=kwargs.pop( - "data_docs", - """ - b - Sets the padding form the bottom (in px). - l - Sets the padding form the left (in px). - r - Sets the padding form the right (in px). - t - Sets the padding form the top (in px). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="treemap.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for width . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DepthfadeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="depthfade", parent_name="treemap.marker", **kwargs): - super(DepthfadeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [True, False, "reversed"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="colorssrc", parent_name="treemap.marker", **kwargs): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__( - self, plotly_name="colorscale", parent_name="treemap.marker", **kwargs - ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="colors", parent_name="treemap.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="treemap.marker", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.treemap - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.treemap.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - treemap.marker.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.treemap.marker.col - orbar.Title` instance or dict with compatible - properties - titlefont - Deprecated: Please use - treemap.marker.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - treemap.marker.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="treemap.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="treemap.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="treemap.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="treemap.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="treemap.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="autocolorscale", parent_name="treemap.marker", **kwargs - ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._showscale import ShowscaleValidator + from ._reversescale import ReversescaleValidator + from ._pad import PadValidator + from ._line import LineValidator + from ._depthfade import DepthfadeValidator + from ._colorssrc import ColorssrcValidator + from ._colorscale import ColorscaleValidator + from ._colors import ColorsValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pad.PadValidator", + "._line.LineValidator", + "._depthfade.DepthfadeValidator", + "._colorssrc.ColorssrcValidator", + "._colorscale.ColorscaleValidator", + "._colors.ColorsValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_autocolorscale.py b/packages/python/plotly/plotly/validators/treemap/marker/_autocolorscale.py new file mode 100644 index 00000000000..da4fc6cb31d --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_autocolorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="treemap.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_cauto.py b/packages/python/plotly/plotly/validators/treemap/marker/_cauto.py new file mode 100644 index 00000000000..2993c81ae26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="treemap.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_cmax.py b/packages/python/plotly/plotly/validators/treemap/marker/_cmax.py new file mode 100644 index 00000000000..012501cf492 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="treemap.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_cmid.py b/packages/python/plotly/plotly/validators/treemap/marker/_cmid.py new file mode 100644 index 00000000000..205a038c756 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="treemap.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_cmin.py b/packages/python/plotly/plotly/validators/treemap/marker/_cmin.py new file mode 100644 index 00000000000..fe64db0605a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="treemap.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_coloraxis.py b/packages/python/plotly/plotly/validators/treemap/marker/_coloraxis.py new file mode 100644 index 00000000000..f37235975c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="treemap.marker", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_colorbar.py b/packages/python/plotly/plotly/validators/treemap/marker/_colorbar.py new file mode 100644 index 00000000000..9e42fcef747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_colorbar.py @@ -0,0 +1,228 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="treemap.marker", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.treemap + .marker.colorbar.Tickformatstop` instances or + dicts with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.treemap.marker.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.treemap.marker.col + orbar.Title` instance or dict with compatible + properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_colors.py b/packages/python/plotly/plotly/validators/treemap/marker/_colors.py new file mode 100644 index 00000000000..a0340fc5955 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_colors.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="colors", parent_name="treemap.marker", **kwargs): + super(ColorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_colorscale.py b/packages/python/plotly/plotly/validators/treemap/marker/_colorscale.py new file mode 100644 index 00000000000..32c8569c9cf --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_colorscale.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="treemap.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_colorssrc.py b/packages/python/plotly/plotly/validators/treemap/marker/_colorssrc.py new file mode 100644 index 00000000000..da1cc477a53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_colorssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorssrc", parent_name="treemap.marker", **kwargs): + super(ColorssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_depthfade.py b/packages/python/plotly/plotly/validators/treemap/marker/_depthfade.py new file mode 100644 index 00000000000..1be66727233 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_depthfade.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DepthfadeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="depthfade", parent_name="treemap.marker", **kwargs): + super(DepthfadeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_line.py b/packages/python/plotly/plotly/validators/treemap/marker/_line.py new file mode 100644 index 00000000000..5ca6700d561 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_line.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="treemap.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on Chart Studio Cloud + for width . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_pad.py b/packages/python/plotly/plotly/validators/treemap/marker/_pad.py new file mode 100644 index 00000000000..a382f2fa660 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_pad.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pad", parent_name="treemap.marker", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pad"), + data_docs=kwargs.pop( + "data_docs", + """ + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_reversescale.py b/packages/python/plotly/plotly/validators/treemap/marker/_reversescale.py new file mode 100644 index 00000000000..04881aabd06 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_reversescale.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="treemap.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/_showscale.py b/packages/python/plotly/plotly/validators/treemap/marker/_showscale.py new file mode 100644 index 00000000000..b2736ecfa1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="treemap.marker", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py index 45297153705..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py @@ -1,798 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ypad", parent_name="treemap.marker.colorbar", **kwargs - ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="yanchor", parent_name="treemap.marker.colorbar", **kwargs - ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="y", parent_name="treemap.marker.colorbar", **kwargs - ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="xpad", parent_name="treemap.marker.colorbar", **kwargs - ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="xanchor", parent_name="treemap.marker.colorbar", **kwargs - ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="x", parent_name="treemap.marker.colorbar", **kwargs - ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__( - self, plotly_name="title", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="tickvals", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="ticktext", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="ticks", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="tickmode", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="ticklen", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, - plotly_name="tickformatstops", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="tickfont", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="treemap.marker.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="tick0", parent_name="treemap.marker.colorbar", **kwargs - ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="thicknessmode", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="treemap.marker.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showticksuffix", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showtickprefix", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="showticklabels", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="showexponent", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="separatethousands", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="outlinewidth", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="outlinecolor", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="nticks", parent_name="treemap.marker.colorbar", **kwargs - ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="lenmode", parent_name="treemap.marker.colorbar", **kwargs - ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="len", parent_name="treemap.marker.colorbar", **kwargs - ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, - plotly_name="exponentformat", - parent_name="treemap.marker.colorbar", - **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__( - self, plotly_name="dtick", parent_name="treemap.marker.colorbar", **kwargs - ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="treemap.marker.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="treemap.marker.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="treemap.marker.colorbar", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_bgcolor.py new file mode 100644 index 00000000000..ebe0107dbfc --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_bgcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_bordercolor.py new file mode 100644 index 00000000000..4a37c994c48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_borderwidth.py new file mode 100644 index 00000000000..b90a661ee89 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="treemap.marker.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_dtick.py new file mode 100644 index 00000000000..a6739479fa3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_dtick.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="treemap.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_exponentformat.py new file mode 100644 index 00000000000..681e4af5b46 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_exponentformat.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_len.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_len.py new file mode 100644 index 00000000000..c3e7f078e81 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_len.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="treemap.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_lenmode.py new file mode 100644 index 00000000000..d23ea18c9e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_lenmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="treemap.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_nticks.py new file mode 100644 index 00000000000..cd3dc7bd455 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_nticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="treemap.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..27285cffb18 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_outlinecolor.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..88c2ac04dcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_outlinewidth.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_separatethousands.py new file mode 100644 index 00000000000..482c33cc484 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_separatethousands.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showexponent.py new file mode 100644 index 00000000000..0d2acb3bc9b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showexponent.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showticklabels.py new file mode 100644 index 00000000000..3b73f6ea6ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showticklabels.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..a054679fff8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showtickprefix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..75679cfa70f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_showticksuffix.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_thickness.py new file mode 100644 index 00000000000..4939c98089a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="treemap.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..57bca4885ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_thicknessmode.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tick0.py new file mode 100644 index 00000000000..77bab9191d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tick0.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="treemap.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickangle.py new file mode 100644 index 00000000000..4dbe36ab75e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickcolor.py new file mode 100644 index 00000000000..5ad8eefc0cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickfont.py new file mode 100644 index 00000000000..48f776b7efa --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickfont.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformat.py new file mode 100644 index 00000000000..eaabf1060b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..4d49e1eb350 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..c3abddbed40 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickformatstops.py @@ -0,0 +1,54 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticklen.py new file mode 100644 index 00000000000..3fc6f20b92e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticklen.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickmode.py new file mode 100644 index 00000000000..636e210d6af --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickmode.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickprefix.py new file mode 100644 index 00000000000..fc07458f491 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticks.py new file mode 100644 index 00000000000..3ba0f396ec9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticks.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..1576a2cb777 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticktext.py new file mode 100644 index 00000000000..e578ff51cc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticktext.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..867731040c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickvals.py new file mode 100644 index 00000000000..9991b07ddc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickvals.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..8c9881cdc8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickwidth.py new file mode 100644 index 00000000000..b788c989e92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_title.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_title.py new file mode 100644 index 00000000000..2ae332d7305 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_title.py @@ -0,0 +1,33 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_x.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_x.py new file mode 100644 index 00000000000..00edc7a2747 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_x.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="treemap.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_xanchor.py new file mode 100644 index 00000000000..84ea50a23d1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_xanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_xpad.py new file mode 100644 index 00000000000..517073db269 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_xpad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="treemap.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_y.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_y.py new file mode 100644 index 00000000000..08436fa4483 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_y.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="treemap.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_yanchor.py new file mode 100644 index 00000000000..3e9320dc292 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_yanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ypad.py new file mode 100644 index 00000000000..1aa1ae02cc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ypad.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="treemap.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py index 81c4d38938c..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="treemap.marker.colorbar.tickfont", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="treemap.marker.colorbar.tickfont", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="treemap.marker.colorbar.tickfont", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..8935bf084a1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="treemap.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..ff275fb16e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="treemap.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..13c1a8106b7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="treemap.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py index c008221a001..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py @@ -1,100 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="treemap.marker.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="treemap.marker.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="name", - parent_name="treemap.marker.colorbar.tickformatstop", - **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="treemap.marker.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="treemap.marker.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "colorbars"}, - {"valType": "any", "editType": "colorbars"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..bf751fa530b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..8be52282182 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..35bf0bbde56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..c58ba29c503 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..f38f84ce83e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py index 0d1815a0cd6..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="treemap.marker.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="treemap.marker.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="treemap.marker.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_font.py new file mode 100644 index 00000000000..4820dd34ee3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="treemap.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_side.py new file mode 100644 index 00000000000..d47fb2792aa --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="treemap.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_text.py new file mode 100644 index 00000000000..6413ddf878f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="treemap.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py index 43a934cf6e9..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py @@ -1,58 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="size", - parent_name="treemap.marker.colorbar.title.font", - **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="family", - parent_name="treemap.marker.colorbar.title.font", - **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="treemap.marker.colorbar.title.font", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "colorbars"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_color.py new file mode 100644 index 00000000000..1ae891dea0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_color.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="treemap.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_family.py new file mode 100644 index 00000000000..1b3cd517d3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_family.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="treemap.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_size.py new file mode 100644 index 00000000000..1e652ebb6f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/_size.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="treemap.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py index bb32fda977a..15461c0b5de 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py @@ -1,65 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="widthsrc", parent_name="treemap.marker.line", **kwargs - ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="treemap.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="treemap.marker.line", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="treemap.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/line/_color.py b/packages/python/plotly/plotly/validators/treemap/marker/line/_color.py new file mode 100644 index 00000000000..c2c1cfe48bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/line/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/line/_colorsrc.py b/packages/python/plotly/plotly/validators/treemap/marker/line/_colorsrc.py new file mode 100644 index 00000000000..97ec5dd0514 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/line/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/line/_width.py b/packages/python/plotly/plotly/validators/treemap/marker/line/_width.py new file mode 100644 index 00000000000..8cb9b07da1e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="treemap.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/line/_widthsrc.py b/packages/python/plotly/plotly/validators/treemap/marker/line/_widthsrc.py new file mode 100644 index 00000000000..c80c8aa6218 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/line/_widthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="treemap.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py index d0300723e69..7770792ed8c 100644 --- a/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators - - -class TValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="t", parent_name="treemap.marker.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="r", parent_name="treemap.marker.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="l", parent_name="treemap.marker.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="b", parent_name="treemap.marker.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._t import TValidator + from ._r import RValidator + from ._l import LValidator + from ._b import BValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/pad/_b.py b/packages/python/plotly/plotly/validators/treemap/marker/pad/_b.py new file mode 100644 index 00000000000..44764ae74be --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/pad/_b.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b", parent_name="treemap.marker.pad", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/pad/_l.py b/packages/python/plotly/plotly/validators/treemap/marker/pad/_l.py new file mode 100644 index 00000000000..748b276a6e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/pad/_l.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="l", parent_name="treemap.marker.pad", **kwargs): + super(LValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/pad/_r.py b/packages/python/plotly/plotly/validators/treemap/marker/pad/_r.py new file mode 100644 index 00000000000..e4a7a5241a9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/pad/_r.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="r", parent_name="treemap.marker.pad", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/pad/_t.py b/packages/python/plotly/plotly/validators/treemap/marker/pad/_t.py new file mode 100644 index 00000000000..4e1edc55f53 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/pad/_t.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="t", parent_name="treemap.marker.pad", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py index c3ebd07d366..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="treemap.outsidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="treemap.outsidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="treemap.outsidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="treemap.outsidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="treemap.outsidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="treemap.outsidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_color.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_color.py new file mode 100644 index 00000000000..b4d9e21bb65 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_colorsrc.py new file mode 100644 index 00000000000..9cfb7151917 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_family.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_family.py new file mode 100644 index 00000000000..6268d1f4c4c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="treemap.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_familysrc.py new file mode 100644 index 00000000000..10dc3f2520f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_size.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_size.py new file mode 100644 index 00000000000..e67de05613e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="treemap.outsidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_sizesrc.py new file mode 100644 index 00000000000..05acc18c4d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="treemap.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py b/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py index 46af38ebdb1..76ab60d1d99 100644 --- a/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py @@ -1,109 +1,22 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="treemap.pathbar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="treemap.pathbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 12), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="treemap.pathbar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="side", parent_name="treemap.pathbar", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EdgeshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="edgeshape", parent_name="treemap.pathbar", **kwargs - ): - super(EdgeshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", [">", "<", "|", "/", "\\"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._thickness import ThicknessValidator + from ._textfont import TextfontValidator + from ._side import SideValidator + from ._edgeshape import EdgeshapeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._thickness.ThicknessValidator", + "._textfont.TextfontValidator", + "._side.SideValidator", + "._edgeshape.EdgeshapeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/_edgeshape.py b/packages/python/plotly/plotly/validators/treemap/pathbar/_edgeshape.py new file mode 100644 index 00000000000..a4f4be5a936 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/_edgeshape.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class EdgeshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="edgeshape", parent_name="treemap.pathbar", **kwargs + ): + super(EdgeshapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [">", "<", "|", "/", "\\"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/_side.py b/packages/python/plotly/plotly/validators/treemap/pathbar/_side.py new file mode 100644 index 00000000000..65da234798c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/_side.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="treemap.pathbar", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/_textfont.py b/packages/python/plotly/plotly/validators/treemap/pathbar/_textfont.py new file mode 100644 index 00000000000..e0fdf528b3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="treemap.pathbar", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/_thickness.py b/packages/python/plotly/plotly/validators/treemap/pathbar/_thickness.py new file mode 100644 index 00000000000..69b26232302 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="treemap.pathbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 12), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/_visible.py b/packages/python/plotly/plotly/validators/treemap/pathbar/_visible.py new file mode 100644 index 00000000000..d15e7d335f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="treemap.pathbar", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py index c1a2f4aa1db..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="treemap.pathbar.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="treemap.pathbar.textfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="treemap.pathbar.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="treemap.pathbar.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="treemap.pathbar.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="treemap.pathbar.textfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_color.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_color.py new file mode 100644 index 00000000000..803911bf663 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_colorsrc.py new file mode 100644 index 00000000000..264114c6dcd --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_family.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_family.py new file mode 100644 index 00000000000..7e1e1f133de --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_familysrc.py new file mode 100644 index 00000000000..ea99a6caf1c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_size.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_size.py new file mode 100644 index 00000000000..1f31e900d2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_sizesrc.py new file mode 100644 index 00000000000..8a5f2dbcb8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/stream/__init__.py b/packages/python/plotly/plotly/validators/treemap/stream/__init__.py index 7600084f8ed..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/treemap/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="treemap.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="treemap.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/treemap/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/treemap/stream/_maxpoints.py new file mode 100644 index 00000000000..24348a256e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="treemap.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/stream/_token.py b/packages/python/plotly/plotly/validators/treemap/stream/_token.py new file mode 100644 index 00000000000..161c3ae4334 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="treemap.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py index addb37947b9..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py @@ -1,92 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="sizesrc", parent_name="treemap.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="treemap.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="treemap.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="family", parent_name="treemap.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="treemap.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="treemap.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/_color.py b/packages/python/plotly/plotly/validators/treemap/textfont/_color.py new file mode 100644 index 00000000000..def7f4142b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="treemap.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/treemap/textfont/_colorsrc.py new file mode 100644 index 00000000000..6202bd0d5bd --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/_family.py b/packages/python/plotly/plotly/validators/treemap/textfont/_family.py new file mode 100644 index 00000000000..9cf80038f64 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/_family.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="treemap.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/treemap/textfont/_familysrc.py new file mode 100644 index 00000000000..c3d10f04bb4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/_size.py b/packages/python/plotly/plotly/validators/treemap/textfont/_size.py new file mode 100644 index 00000000000..452a113f2a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="treemap.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/treemap/textfont/_sizesrc.py new file mode 100644 index 00000000000..f0e782f4fba --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/_sizesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="treemap.textfont", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py b/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py index cb7dba4fc0e..31949387a86 100644 --- a/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators - - -class SquarifyratioValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="squarifyratio", parent_name="treemap.tiling", **kwargs - ): - super(SquarifyratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pad", parent_name="treemap.tiling", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PackingValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="packing", parent_name="treemap.tiling", **kwargs): - super(PackingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop( - "values", - ["squarify", "binary", "dice", "slice", "slice-dice", "dice-slice"], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FlipValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="flip", parent_name="treemap.tiling", **kwargs): - super(FlipValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - flags=kwargs.pop("flags", ["x", "y"]), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._squarifyratio import SquarifyratioValidator + from ._pad import PadValidator + from ._packing import PackingValidator + from ._flip import FlipValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._squarifyratio.SquarifyratioValidator", + "._pad.PadValidator", + "._packing.PackingValidator", + "._flip.FlipValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/treemap/tiling/_flip.py b/packages/python/plotly/plotly/validators/treemap/tiling/_flip.py new file mode 100644 index 00000000000..59dcc857e1a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/tiling/_flip.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class FlipValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="flip", parent_name="treemap.tiling", **kwargs): + super(FlipValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + flags=kwargs.pop("flags", ["x", "y"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/tiling/_packing.py b/packages/python/plotly/plotly/validators/treemap/tiling/_packing.py new file mode 100644 index 00000000000..8d27b02d0b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/tiling/_packing.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class PackingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="packing", parent_name="treemap.tiling", **kwargs): + super(PackingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["squarify", "binary", "dice", "slice", "slice-dice", "dice-slice"], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/tiling/_pad.py b/packages/python/plotly/plotly/validators/treemap/tiling/_pad.py new file mode 100644 index 00000000000..cc2f3c9b54b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/tiling/_pad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pad", parent_name="treemap.tiling", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/tiling/_squarifyratio.py b/packages/python/plotly/plotly/validators/treemap/tiling/_squarifyratio.py new file mode 100644 index 00000000000..723a9c1a46c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/tiling/_squarifyratio.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SquarifyratioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="squarifyratio", parent_name="treemap.tiling", **kwargs + ): + super(SquarifyratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/__init__.py b/packages/python/plotly/plotly/validators/violin/__init__.py index b883b7bd802..02ed7e31032 100644 --- a/packages/python/plotly/plotly/validators/violin/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/__init__.py @@ -1,908 +1,118 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="violin", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="violin", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="violin", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="violin", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="violin", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="violin", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="violin", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="violin", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="violin", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="violin", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="unselected", parent_name="violin", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Unselected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.violin.unselected. - Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="violin", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="violin", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="violin", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="violin", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="violin", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpanmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="spanmode", parent_name="violin", **kwargs): - super(SpanmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["soft", "hard", "manual"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpanValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__(self, plotly_name="span", parent_name="violin", **kwargs): - super(SpanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="side", parent_name="violin", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["both", "positive", "negative"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="violin", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="violin", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="selected", parent_name="violin", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Selected"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.violin.selected.Ma - rker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScalemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="scalemode", parent_name="violin", **kwargs): - super(ScalemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["width", "count"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="scalegroup", parent_name="violin", **kwargs): - super(ScalegroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="points", parent_name="violin", **kwargs): - super(PointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["all", "outliers", "suspectedoutliers", False] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PointposValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="pointpos", parent_name="violin", **kwargs): - super(PointposValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="violin", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="violin", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="offsetgroup", parent_name="violin", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="violin", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="violin", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="violin", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MeanlineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="meanline", parent_name="violin", **kwargs): - super(MeanlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Meanline"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the mean line color. - visible - Determines if a line corresponding to the - sample's mean is shown inside the violins. If - `box.visible` is turned on, the mean line is - drawn inside the inner box. Otherwise, the mean - line is drawn from one side of the violin to - other. - width - Sets the mean line width. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="violin", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.violin.marker.Line - ` instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="violin", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the - violin(s). -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="violin", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class JitterValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="jitter", parent_name="violin", **kwargs): - super(JitterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="violin", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="violin", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="violin", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="violin", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="violin", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="violin", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoveron", parent_name="violin", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - extras=kwargs.pop("extras", ["all"]), - flags=kwargs.pop("flags", ["violins", "points", "kde"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="violin", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="violin", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="violin", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="violin", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="violin", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="violin", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BoxValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="box", parent_name="violin", **kwargs): - super(BoxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Box"), - data_docs=kwargs.pop( - "data_docs", - """ - fillcolor - Sets the inner box plot fill color. - line - :class:`plotly.graph_objects.violin.box.Line` - instance or dict with compatible properties - visible - Determines if an miniature box plot is drawn - inside the violins. - width - Sets the width of the inner box plots relative - to the violins' width. For example, with 1, the - inner box plots are as wide as the violins. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BandwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="bandwidth", parent_name="violin", **kwargs): - super(BandwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="alignmentgroup", parent_name="violin", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._unselected import UnselectedValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._spanmode import SpanmodeValidator + from ._span import SpanValidator + from ._side import SideValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._selected import SelectedValidator + from ._scalemode import ScalemodeValidator + from ._scalegroup import ScalegroupValidator + from ._points import PointsValidator + from ._pointpos import PointposValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._offsetgroup import OffsetgroupValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._meanline import MeanlineValidator + from ._marker import MarkerValidator + from ._line import LineValidator + from ._legendgroup import LegendgroupValidator + from ._jitter import JitterValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoveron import HoveronValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._fillcolor import FillcolorValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._box import BoxValidator + from ._bandwidth import BandwidthValidator + from ._alignmentgroup import AlignmentgroupValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._spanmode.SpanmodeValidator", + "._span.SpanValidator", + "._side.SideValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._scalemode.ScalemodeValidator", + "._scalegroup.ScalegroupValidator", + "._points.PointsValidator", + "._pointpos.PointposValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._meanline.MeanlineValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendgroup.LegendgroupValidator", + "._jitter.JitterValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._box.BoxValidator", + "._bandwidth.BandwidthValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/_alignmentgroup.py b/packages/python/plotly/plotly/validators/violin/_alignmentgroup.py new file mode 100644 index 00000000000..68ab94b28ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_alignmentgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="alignmentgroup", parent_name="violin", **kwargs): + super(AlignmentgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_bandwidth.py b/packages/python/plotly/plotly/validators/violin/_bandwidth.py new file mode 100644 index 00000000000..3171e915ff6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_bandwidth.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BandwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="bandwidth", parent_name="violin", **kwargs): + super(BandwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_box.py b/packages/python/plotly/plotly/validators/violin/_box.py new file mode 100644 index 00000000000..a211a7c2c9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_box.py @@ -0,0 +1,28 @@ +import _plotly_utils.basevalidators + + +class BoxValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="box", parent_name="violin", **kwargs): + super(BoxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Box"), + data_docs=kwargs.pop( + "data_docs", + """ + fillcolor + Sets the inner box plot fill color. + line + :class:`plotly.graph_objects.violin.box.Line` + instance or dict with compatible properties + visible + Determines if an miniature box plot is drawn + inside the violins. + width + Sets the width of the inner box plots relative + to the violins' width. For example, with 1, the + inner box plots are as wide as the violins. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_customdata.py b/packages/python/plotly/plotly/validators/violin/_customdata.py new file mode 100644 index 00000000000..4aa991ed0c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="violin", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_customdatasrc.py b/packages/python/plotly/plotly/validators/violin/_customdatasrc.py new file mode 100644 index 00000000000..0d1ea8d2167 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="violin", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_fillcolor.py b/packages/python/plotly/plotly/validators/violin/_fillcolor.py new file mode 100644 index 00000000000..0f191685667 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="violin", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hoverinfo.py b/packages/python/plotly/plotly/validators/violin/_hoverinfo.py new file mode 100644 index 00000000000..3d79d9c9f0f --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="violin", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/violin/_hoverinfosrc.py new file mode 100644 index 00000000000..468da823bf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="violin", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hoverlabel.py b/packages/python/plotly/plotly/validators/violin/_hoverlabel.py new file mode 100644 index 00000000000..b745a70daac --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="violin", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hoveron.py b/packages/python/plotly/plotly/validators/violin/_hoveron.py new file mode 100644 index 00000000000..fd93d697c43 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hoveron.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoveron", parent_name="violin", **kwargs): + super(HoveronValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + extras=kwargs.pop("extras", ["all"]), + flags=kwargs.pop("flags", ["violins", "points", "kde"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hovertemplate.py b/packages/python/plotly/plotly/validators/violin/_hovertemplate.py new file mode 100644 index 00000000000..78d7e7adcea --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="violin", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/violin/_hovertemplatesrc.py new file mode 100644 index 00000000000..09024f29a72 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="violin", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hovertext.py b/packages/python/plotly/plotly/validators/violin/_hovertext.py new file mode 100644 index 00000000000..eef0db07172 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="violin", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_hovertextsrc.py b/packages/python/plotly/plotly/validators/violin/_hovertextsrc.py new file mode 100644 index 00000000000..2368eb06bc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="violin", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_ids.py b/packages/python/plotly/plotly/validators/violin/_ids.py new file mode 100644 index 00000000000..238ba37ac80 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="violin", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_idssrc.py b/packages/python/plotly/plotly/validators/violin/_idssrc.py new file mode 100644 index 00000000000..0126b543095 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="violin", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_jitter.py b/packages/python/plotly/plotly/validators/violin/_jitter.py new file mode 100644 index 00000000000..f9d3e5c08a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_jitter.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class JitterValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="jitter", parent_name="violin", **kwargs): + super(JitterValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_legendgroup.py b/packages/python/plotly/plotly/validators/violin/_legendgroup.py new file mode 100644 index 00000000000..29807dd3375 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="violin", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_line.py b/packages/python/plotly/plotly/validators/violin/_line.py new file mode 100644 index 00000000000..9a25d990eec --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_line.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="violin", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of line bounding the violin(s). + width + Sets the width (in px) of line bounding the + violin(s). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_marker.py b/packages/python/plotly/plotly/validators/violin/_marker.py new file mode 100644 index 00000000000..783e5c4b2db --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_marker.py @@ -0,0 +1,38 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="violin", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + line + :class:`plotly.graph_objects.violin.marker.Line + ` instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_meanline.py b/packages/python/plotly/plotly/validators/violin/_meanline.py new file mode 100644 index 00000000000..68ad65170a0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_meanline.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class MeanlineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="meanline", parent_name="violin", **kwargs): + super(MeanlineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Meanline"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the mean line color. + visible + Determines if a line corresponding to the + sample's mean is shown inside the violins. If + `box.visible` is turned on, the mean line is + drawn inside the inner box. Otherwise, the mean + line is drawn from one side of the violin to + other. + width + Sets the mean line width. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_meta.py b/packages/python/plotly/plotly/validators/violin/_meta.py new file mode 100644 index 00000000000..f03b3be4cac --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="violin", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_metasrc.py b/packages/python/plotly/plotly/validators/violin/_metasrc.py new file mode 100644 index 00000000000..878937fd748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="violin", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_name.py b/packages/python/plotly/plotly/validators/violin/_name.py new file mode 100644 index 00000000000..92c0bb8566f --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="violin", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_offsetgroup.py b/packages/python/plotly/plotly/validators/violin/_offsetgroup.py new file mode 100644 index 00000000000..6d42068e7d8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_offsetgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="offsetgroup", parent_name="violin", **kwargs): + super(OffsetgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_opacity.py b/packages/python/plotly/plotly/validators/violin/_opacity.py new file mode 100644 index 00000000000..d8adbe852cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="violin", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_orientation.py b/packages/python/plotly/plotly/validators/violin/_orientation.py new file mode 100644 index 00000000000..b19d61addc1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="violin", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_pointpos.py b/packages/python/plotly/plotly/validators/violin/_pointpos.py new file mode 100644 index 00000000000..7ba25f96398 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_pointpos.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PointposValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pointpos", parent_name="violin", **kwargs): + super(PointposValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_points.py b/packages/python/plotly/plotly/validators/violin/_points.py new file mode 100644 index 00000000000..9eb06d1c2b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_points.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class PointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="points", parent_name="violin", **kwargs): + super(PointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["all", "outliers", "suspectedoutliers", False] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_scalegroup.py b/packages/python/plotly/plotly/validators/violin/_scalegroup.py new file mode 100644 index 00000000000..ba4e3529960 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_scalegroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="scalegroup", parent_name="violin", **kwargs): + super(ScalegroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_scalemode.py b/packages/python/plotly/plotly/validators/violin/_scalemode.py new file mode 100644 index 00000000000..d1c91628069 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_scalemode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ScalemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="scalemode", parent_name="violin", **kwargs): + super(ScalemodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["width", "count"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_selected.py b/packages/python/plotly/plotly/validators/violin/_selected.py new file mode 100644 index 00000000000..342590959d5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_selected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="selected", parent_name="violin", **kwargs): + super(SelectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Selected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.violin.selected.Ma + rker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_selectedpoints.py b/packages/python/plotly/plotly/validators/violin/_selectedpoints.py new file mode 100644 index 00000000000..86c17b3a188 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="violin", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_showlegend.py b/packages/python/plotly/plotly/validators/violin/_showlegend.py new file mode 100644 index 00000000000..edb275414ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="violin", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_side.py b/packages/python/plotly/plotly/validators/violin/_side.py new file mode 100644 index 00000000000..4e50ba059b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_side.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="violin", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["both", "positive", "negative"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_span.py b/packages/python/plotly/plotly/validators/violin/_span.py new file mode 100644 index 00000000000..94c61da88c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_span.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class SpanValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="span", parent_name="violin", **kwargs): + super(SpanValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_spanmode.py b/packages/python/plotly/plotly/validators/violin/_spanmode.py new file mode 100644 index 00000000000..7bbad4567b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_spanmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SpanmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="spanmode", parent_name="violin", **kwargs): + super(SpanmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["soft", "hard", "manual"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_stream.py b/packages/python/plotly/plotly/validators/violin/_stream.py new file mode 100644 index 00000000000..7447a7ee227 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="violin", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_text.py b/packages/python/plotly/plotly/validators/violin/_text.py new file mode 100644 index 00000000000..929f6811cbc --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="violin", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_textsrc.py b/packages/python/plotly/plotly/validators/violin/_textsrc.py new file mode 100644 index 00000000000..9fa561efb00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="violin", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_uid.py b/packages/python/plotly/plotly/validators/violin/_uid.py new file mode 100644 index 00000000000..ab610a8d542 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="violin", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_uirevision.py b/packages/python/plotly/plotly/validators/violin/_uirevision.py new file mode 100644 index 00000000000..d2d1419957e --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="violin", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_unselected.py b/packages/python/plotly/plotly/validators/violin/_unselected.py new file mode 100644 index 00000000000..dc8855cc8a4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_unselected.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="unselected", parent_name="violin", **kwargs): + super(UnselectedValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Unselected"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.violin.unselected. + Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_visible.py b/packages/python/plotly/plotly/validators/violin/_visible.py new file mode 100644 index 00000000000..97677374290 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="violin", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_width.py b/packages/python/plotly/plotly/validators/violin/_width.py new file mode 100644 index 00000000000..92ac0b5a129 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="violin", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_x.py b/packages/python/plotly/plotly/validators/violin/_x.py new file mode 100644 index 00000000000..533f76c40c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="violin", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_x0.py b/packages/python/plotly/plotly/validators/violin/_x0.py new file mode 100644 index 00000000000..d0165cf6ced --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="violin", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_xaxis.py b/packages/python/plotly/plotly/validators/violin/_xaxis.py new file mode 100644 index 00000000000..546c9ab3d01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="violin", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_xsrc.py b/packages/python/plotly/plotly/validators/violin/_xsrc.py new file mode 100644 index 00000000000..bc72cd22d94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="violin", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_y.py b/packages/python/plotly/plotly/validators/violin/_y.py new file mode 100644 index 00000000000..2908378d0f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="violin", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_y0.py b/packages/python/plotly/plotly/validators/violin/_y0.py new file mode 100644 index 00000000000..42b267d50c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="violin", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_yaxis.py b/packages/python/plotly/plotly/validators/violin/_yaxis.py new file mode 100644 index 00000000000..3bf5e76799e --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="violin", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/_ysrc.py b/packages/python/plotly/plotly/validators/violin/_ysrc.py new file mode 100644 index 00000000000..126f76a326b --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="violin", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/__init__.py b/packages/python/plotly/plotly/validators/violin/box/__init__.py index 07e9f845985..4024741e169 100644 --- a/packages/python/plotly/plotly/validators/violin/box/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/box/__init__.py @@ -1,64 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="violin.box", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="violin.box", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="violin.box", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the inner box plot bounding line color. - width - Sets the inner box plot bounding line width. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="fillcolor", parent_name="violin.box", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._line import LineValidator + from ._fillcolor import FillcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._line.LineValidator", + "._fillcolor.FillcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/_fillcolor.py b/packages/python/plotly/plotly/validators/violin/box/_fillcolor.py new file mode 100644 index 00000000000..8d873cd4297 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/box/_fillcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="fillcolor", parent_name="violin.box", **kwargs): + super(FillcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/_line.py b/packages/python/plotly/plotly/validators/violin/box/_line.py new file mode 100644 index 00000000000..615b3abab97 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/box/_line.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="violin.box", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the inner box plot bounding line color. + width + Sets the inner box plot bounding line width. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/_visible.py b/packages/python/plotly/plotly/validators/violin/box/_visible.py new file mode 100644 index 00000000000..4525cda84c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/box/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="violin.box", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/_width.py b/packages/python/plotly/plotly/validators/violin/box/_width.py new file mode 100644 index 00000000000..a7ad2d75a82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/box/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="violin.box", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/line/__init__.py b/packages/python/plotly/plotly/validators/violin/box/line/__init__.py index 88eefde89cb..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/violin/box/line/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/box/line/__init__.py @@ -1,27 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="violin.box.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="violin.box.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/line/_color.py b/packages/python/plotly/plotly/validators/violin/box/line/_color.py new file mode 100644 index 00000000000..13a4e9b89e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/box/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="violin.box.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/box/line/_width.py b/packages/python/plotly/plotly/validators/violin/box/line/_width.py new file mode 100644 index 00000000000..1b0e398ed49 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/box/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="violin.box.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/__init__.py index cb854a29646..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/violin/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="violin.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="violin.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="violin.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="violin.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="violin.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="violin.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="violin.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="violin.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="violin.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_align.py new file mode 100644 index 00000000000..837c21ec492 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="violin.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..c3e069578bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="violin.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..5deab182efb --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="violin.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..a002f35eb00 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="violin.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..6f2c926cee9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="violin.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..1b513782c3a --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="violin.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_font.py new file mode 100644 index 00000000000..c47018e58b0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="violin.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_namelength.py new file mode 100644 index 00000000000..da56a2594ca --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="violin.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..dd0d0e00709 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="violin.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/__init__.py index 34d27b77a64..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="violin.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="violin.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="violin.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="violin.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="violin.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="violin.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_color.py new file mode 100644 index 00000000000..4cba9bad12d --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="violin.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..561dba8a50e --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="violin.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_family.py new file mode 100644 index 00000000000..7f4df9be7fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="violin.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..7aa8a85ace9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="violin.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_size.py new file mode 100644 index 00000000000..b6aa113dd2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="violin.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..7fb79439615 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="violin.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/line/__init__.py b/packages/python/plotly/plotly/validators/violin/line/__init__.py index 8f724e39ec6..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/violin/line/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/line/__init__.py @@ -1,27 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="violin.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="violin.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/violin/line/_color.py b/packages/python/plotly/plotly/validators/violin/line/_color.py new file mode 100644 index 00000000000..3526467d12e --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/line/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="violin.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/line/_width.py b/packages/python/plotly/plotly/validators/violin/line/_width.py new file mode 100644 index 00000000000..53d3c859a58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/line/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="violin.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/__init__.py b/packages/python/plotly/plotly/validators/violin/marker/__init__.py index cd66db16af9..c79e8fe46e2 100644 --- a/packages/python/plotly/plotly/validators/violin/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/marker/__init__.py @@ -1,400 +1,24 @@ -import _plotly_utils.basevalidators - - -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="symbol", parent_name="violin.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", - [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, - "circle-open-dot", - 1, - "square", - 101, - "square-open", - 201, - "square-dot", - 301, - "square-open-dot", - 2, - "diamond", - 102, - "diamond-open", - 202, - "diamond-dot", - 302, - "diamond-open-dot", - 3, - "cross", - 103, - "cross-open", - 203, - "cross-dot", - 303, - "cross-open-dot", - 4, - "x", - 104, - "x-open", - 204, - "x-dot", - 304, - "x-open-dot", - 5, - "triangle-up", - 105, - "triangle-up-open", - 205, - "triangle-up-dot", - 305, - "triangle-up-open-dot", - 6, - "triangle-down", - 106, - "triangle-down-open", - 206, - "triangle-down-dot", - 306, - "triangle-down-open-dot", - 7, - "triangle-left", - 107, - "triangle-left-open", - 207, - "triangle-left-dot", - 307, - "triangle-left-open-dot", - 8, - "triangle-right", - 108, - "triangle-right-open", - 208, - "triangle-right-dot", - 308, - "triangle-right-open-dot", - 9, - "triangle-ne", - 109, - "triangle-ne-open", - 209, - "triangle-ne-dot", - 309, - "triangle-ne-open-dot", - 10, - "triangle-se", - 110, - "triangle-se-open", - 210, - "triangle-se-dot", - 310, - "triangle-se-open-dot", - 11, - "triangle-sw", - 111, - "triangle-sw-open", - 211, - "triangle-sw-dot", - 311, - "triangle-sw-open-dot", - 12, - "triangle-nw", - 112, - "triangle-nw-open", - 212, - "triangle-nw-dot", - 312, - "triangle-nw-open-dot", - 13, - "pentagon", - 113, - "pentagon-open", - 213, - "pentagon-dot", - 313, - "pentagon-open-dot", - 14, - "hexagon", - 114, - "hexagon-open", - 214, - "hexagon-dot", - 314, - "hexagon-open-dot", - 15, - "hexagon2", - 115, - "hexagon2-open", - 215, - "hexagon2-dot", - 315, - "hexagon2-open-dot", - 16, - "octagon", - 116, - "octagon-open", - 216, - "octagon-dot", - 316, - "octagon-open-dot", - 17, - "star", - 117, - "star-open", - 217, - "star-dot", - 317, - "star-open-dot", - 18, - "hexagram", - 118, - "hexagram-open", - 218, - "hexagram-dot", - 318, - "hexagram-open-dot", - 19, - "star-triangle-up", - 119, - "star-triangle-up-open", - 219, - "star-triangle-up-dot", - 319, - "star-triangle-up-open-dot", - 20, - "star-triangle-down", - 120, - "star-triangle-down-open", - 220, - "star-triangle-down-dot", - 320, - "star-triangle-down-open-dot", - 21, - "star-square", - 121, - "star-square-open", - 221, - "star-square-dot", - 321, - "star-square-open-dot", - 22, - "star-diamond", - 122, - "star-diamond-open", - 222, - "star-diamond-dot", - 322, - "star-diamond-open-dot", - 23, - "diamond-tall", - 123, - "diamond-tall-open", - 223, - "diamond-tall-dot", - 323, - "diamond-tall-open-dot", - 24, - "diamond-wide", - 124, - "diamond-wide-open", - 224, - "diamond-wide-dot", - 324, - "diamond-wide-open-dot", - 25, - "hourglass", - 125, - "hourglass-open", - 26, - "bowtie", - 126, - "bowtie-open", - 27, - "circle-cross", - 127, - "circle-cross-open", - 28, - "circle-x", - 128, - "circle-x-open", - 29, - "square-cross", - 129, - "square-cross-open", - 30, - "square-x", - 130, - "square-x-open", - 31, - "diamond-cross", - 131, - "diamond-cross-open", - 32, - "diamond-x", - 132, - "diamond-x-open", - 33, - "cross-thin", - 133, - "cross-thin-open", - 34, - "x-thin", - 134, - "x-thin-open", - 35, - "asterisk", - 135, - "asterisk-open", - 36, - "hash", - 136, - "hash-open", - 236, - "hash-dot", - 336, - "hash-open-dot", - 37, - "y-up", - 137, - "y-up-open", - 38, - "y-down", - 138, - "y-down-open", - 39, - "y-left", - 139, - "y-left-open", - 40, - "y-right", - 140, - "y-right-open", - 41, - "line-ew", - 141, - "line-ew-open", - 42, - "line-ns", - 142, - "line-ns-open", - 43, - "line-ne", - 143, - "line-ne-open", - 44, - "line-nw", - 144, - "line-nw-open", - ], - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="violin.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outliercolor", parent_name="violin.marker", **kwargs - ): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="violin.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="violin.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets themarker.linecolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="violin.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._symbol import SymbolValidator + from ._size import SizeValidator + from ._outliercolor import OutliercolorValidator + from ._opacity import OpacityValidator + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbol.SymbolValidator", + "._size.SizeValidator", + "._outliercolor.OutliercolorValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/_color.py b/packages/python/plotly/plotly/validators/violin/marker/_color.py new file mode 100644 index 00000000000..c546fcf24e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="violin.marker", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/_line.py b/packages/python/plotly/plotly/validators/violin/marker/_line.py new file mode 100644 index 00000000000..72b61b6249c --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/_line.py @@ -0,0 +1,32 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="violin.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets themarker.linecolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if + set. + outliercolor + Sets the border line color of the outlier + sample points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the + outlier sample points. + width + Sets the width (in px) of the lines bounding + the marker points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/_opacity.py b/packages/python/plotly/plotly/validators/violin/marker/_opacity.py new file mode 100644 index 00000000000..fc5d5da208e --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/_opacity.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="violin.marker", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/_outliercolor.py b/packages/python/plotly/plotly/validators/violin/marker/_outliercolor.py new file mode 100644 index 00000000000..270336eb44a --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/_outliercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outliercolor", parent_name="violin.marker", **kwargs + ): + super(OutliercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/_size.py b/packages/python/plotly/plotly/validators/violin/marker/_size.py new file mode 100644 index 00000000000..3cad4f7d166 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="violin.marker", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/_symbol.py b/packages/python/plotly/plotly/validators/violin/marker/_symbol.py new file mode 100644 index 00000000000..8840fe98c8d --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/_symbol.py @@ -0,0 +1,302 @@ +import _plotly_utils.basevalidators + + +class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="symbol", parent_name="violin.marker", **kwargs): + super(SymbolValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, + "square", + 101, + "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, + "diamond", + 102, + "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, + "cross", + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open", + ], + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/line/__init__.py b/packages/python/plotly/plotly/validators/violin/marker/line/__init__.py index cb172106ef7..f2cb10d010e 100644 --- a/packages/python/plotly/plotly/validators/violin/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/marker/line/__init__.py @@ -1,62 +1,20 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="violin.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlierwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlierwidth", parent_name="violin.marker.line", **kwargs - ): - super(OutlierwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outliercolor", parent_name="violin.marker.line", **kwargs - ): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="violin.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._outlierwidth import OutlierwidthValidator + from ._outliercolor import OutliercolorValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._outlierwidth.OutlierwidthValidator", + "._outliercolor.OutliercolorValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/line/_color.py b/packages/python/plotly/plotly/validators/violin/marker/line/_color.py new file mode 100644 index 00000000000..83de24525e7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/line/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="violin.marker.line", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/line/_outliercolor.py b/packages/python/plotly/plotly/validators/violin/marker/line/_outliercolor.py new file mode 100644 index 00000000000..d2b2cb9dcc5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/line/_outliercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outliercolor", parent_name="violin.marker.line", **kwargs + ): + super(OutliercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/line/_outlierwidth.py b/packages/python/plotly/plotly/validators/violin/marker/line/_outlierwidth.py new file mode 100644 index 00000000000..b9f4776c073 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/line/_outlierwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlierwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlierwidth", parent_name="violin.marker.line", **kwargs + ): + super(OutlierwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/marker/line/_width.py b/packages/python/plotly/plotly/validators/violin/marker/line/_width.py new file mode 100644 index 00000000000..e38437af29d --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/marker/line/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="violin.marker.line", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/meanline/__init__.py b/packages/python/plotly/plotly/validators/violin/meanline/__init__.py index 9bac8b2277f..fddc9964cc2 100644 --- a/packages/python/plotly/plotly/validators/violin/meanline/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/meanline/__init__.py @@ -1,41 +1,18 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="violin.meanline", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="visible", parent_name="violin.meanline", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="violin.meanline", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/meanline/_color.py b/packages/python/plotly/plotly/validators/violin/meanline/_color.py new file mode 100644 index 00000000000..3605b17a3c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/meanline/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="violin.meanline", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/meanline/_visible.py b/packages/python/plotly/plotly/validators/violin/meanline/_visible.py new file mode 100644 index 00000000000..b63ae752b7f --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/meanline/_visible.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="violin.meanline", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/meanline/_width.py b/packages/python/plotly/plotly/validators/violin/meanline/_width.py new file mode 100644 index 00000000000..9cb6c6f1ea2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/meanline/_width.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="violin.meanline", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/selected/__init__.py b/packages/python/plotly/plotly/validators/violin/selected/__init__.py index 6887099dd98..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/violin/selected/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/selected/__init__.py @@ -1,22 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="violin.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/violin/selected/_marker.py b/packages/python/plotly/plotly/validators/violin/selected/_marker.py new file mode 100644 index 00000000000..6887099dd98 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/selected/_marker.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="violin.selected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/selected/marker/__init__.py b/packages/python/plotly/plotly/validators/violin/selected/marker/__init__.py index 931587546d5..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/violin/selected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/selected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="violin.selected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="violin.selected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="violin.selected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/selected/marker/_color.py b/packages/python/plotly/plotly/validators/violin/selected/marker/_color.py new file mode 100644 index 00000000000..8473f1743cd --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/selected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="violin.selected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/selected/marker/_opacity.py b/packages/python/plotly/plotly/validators/violin/selected/marker/_opacity.py new file mode 100644 index 00000000000..681815fe744 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/selected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="violin.selected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/selected/marker/_size.py b/packages/python/plotly/plotly/validators/violin/selected/marker/_size.py new file mode 100644 index 00000000000..36aed912f15 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/selected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="violin.selected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/stream/__init__.py b/packages/python/plotly/plotly/validators/violin/stream/__init__.py index 07e07e01e6a..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/violin/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="violin.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="violin.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/violin/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/violin/stream/_maxpoints.py new file mode 100644 index 00000000000..4a492668554 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="violin.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/stream/_token.py b/packages/python/plotly/plotly/validators/violin/stream/_token.py new file mode 100644 index 00000000000..1bb4a834174 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="violin.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/unselected/__init__.py b/packages/python/plotly/plotly/validators/violin/unselected/__init__.py index 5a58b90ed4d..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/violin/unselected/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/unselected/__init__.py @@ -1,25 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="violin.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/violin/unselected/_marker.py b/packages/python/plotly/plotly/validators/violin/unselected/_marker.py new file mode 100644 index 00000000000..5a58b90ed4d --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/unselected/_marker.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="violin.unselected", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of unselected points, + applied only when a selection exists. + opacity + Sets the marker opacity of unselected points, + applied only when a selection exists. + size + Sets the marker size of unselected points, + applied only when a selection exists. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/unselected/marker/__init__.py b/packages/python/plotly/plotly/validators/violin/unselected/marker/__init__.py index 08a04d8a0b9..7420ddcec19 100644 --- a/packages/python/plotly/plotly/validators/violin/unselected/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/violin/unselected/marker/__init__.py @@ -1,49 +1,18 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="violin.unselected.marker", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="opacity", parent_name="violin.unselected.marker", **kwargs - ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="violin.unselected.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._opacity import OpacityValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._size.SizeValidator", + "._opacity.OpacityValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/violin/unselected/marker/_color.py b/packages/python/plotly/plotly/validators/violin/unselected/marker/_color.py new file mode 100644 index 00000000000..705c1de293c --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/unselected/marker/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="violin.unselected.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/unselected/marker/_opacity.py b/packages/python/plotly/plotly/validators/violin/unselected/marker/_opacity.py new file mode 100644 index 00000000000..046cbd755d0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/unselected/marker/_opacity.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="opacity", parent_name="violin.unselected.marker", **kwargs + ): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/violin/unselected/marker/_size.py b/packages/python/plotly/plotly/validators/violin/unselected/marker/_size.py new file mode 100644 index 00000000000..bff895bc793 --- /dev/null +++ b/packages/python/plotly/plotly/validators/violin/unselected/marker/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="violin.unselected.marker", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/__init__.py b/packages/python/plotly/plotly/validators/volume/__init__.py index 0e8048400de..1b1219d81b4 100644 --- a/packages/python/plotly/plotly/validators/volume/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/__init__.py @@ -1,1149 +1,118 @@ -import _plotly_utils.basevalidators - - -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="zsrc", parent_name="volume", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="z", parent_name="volume", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="volume", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="volume", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="volume", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="volume", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="volume", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="valuesrc", parent_name="volume", **kwargs): - super(ValuesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="value", parent_name="volume", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="volume", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="volume", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="volume", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="volume", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="surface", parent_name="volume", **kwargs): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Surface"), - data_docs=kwargs.pop( - "data_docs", - """ - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="volume", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpaceframeValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="spaceframe", parent_name="volume", **kwargs): - super(SpaceframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Spaceframe"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 1 meaning - that they are entirely shaded. Applying a - `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SlicesValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="slices", parent_name="volume", **kwargs): - super(SlicesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Slices"), - data_docs=kwargs.pop( - "data_docs", - """ - x - :class:`plotly.graph_objects.volume.slices.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.slices.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.slices.Z` - instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showscale", parent_name="volume", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="volume", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="scene", parent_name="volume", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "scene"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="reversescale", parent_name="volume", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="opacityscale", parent_name="volume", **kwargs): - super(OpacityscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="volume", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="volume", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="volume", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="volume", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lightposition", parent_name="volume", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lightposition"), - data_docs=kwargs.pop( - "data_docs", - """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="lighting", parent_name="volume", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Lighting"), - data_docs=kwargs.pop( - "data_docs", - """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="volume", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsominValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="isomin", parent_name="volume", **kwargs): - super(IsominValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IsomaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="isomax", parent_name="volume", **kwargs): - super(IsomaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="volume", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="volume", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="volume", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="volume", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertemplatesrc", parent_name="volume", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="volume", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="volume", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="volume", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="volume", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="flatshading", parent_name="volume", **kwargs): - super(FlatshadingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="volume", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="volume", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="contour", parent_name="volume", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Contour"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): - def __init__(self, plotly_name="colorscale", parent_name="volume", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="colorbar", parent_name="volume", **kwargs): - super(ColorBarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "ColorBar"), - data_docs=kwargs.pop( - "data_docs", - """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.volume. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.volume.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of volume.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for tickvals . - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.volume.colorbar.Ti - tle` instance or dict with compatible - properties - titlefont - Deprecated: Please use - volume.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - volume.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="coloraxis", parent_name="volume", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", None), - edit_type=kwargs.pop("edit_type", "calc"), - regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CminValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmin", parent_name="volume", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmid", parent_name="volume", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="cmax", parent_name="volume", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"cauto": False}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cauto", parent_name="volume", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CapsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="caps", parent_name="volume", **kwargs): - super(CapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Caps"), - data_docs=kwargs.pop( - "data_docs", - """ - x - :class:`plotly.graph_objects.volume.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.caps.Z` - instance or dict with compatible properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="autocolorscale", parent_name="volume", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._zsrc import ZsrcValidator + from ._z import ZValidator + from ._ysrc import YsrcValidator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._x import XValidator + from ._visible import VisibleValidator + from ._valuesrc import ValuesrcValidator + from ._value import ValueValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._textsrc import TextsrcValidator + from ._text import TextValidator + from ._surface import SurfaceValidator + from ._stream import StreamValidator + from ._spaceframe import SpaceframeValidator + from ._slices import SlicesValidator + from ._showscale import ShowscaleValidator + from ._showlegend import ShowlegendValidator + from ._scene import SceneValidator + from ._reversescale import ReversescaleValidator + from ._opacityscale import OpacityscaleValidator + from ._opacity import OpacityValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._lightposition import LightpositionValidator + from ._lighting import LightingValidator + from ._legendgroup import LegendgroupValidator + from ._isomin import IsominValidator + from ._isomax import IsomaxValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._flatshading import FlatshadingValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._contour import ContourValidator + from ._colorscale import ColorscaleValidator + from ._colorbar import ColorbarValidator + from ._coloraxis import ColoraxisValidator + from ._cmin import CminValidator + from ._cmid import CmidValidator + from ._cmax import CmaxValidator + from ._cauto import CautoValidator + from ._caps import CapsValidator + from ._autocolorscale import AutocolorscaleValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._valuesrc.ValuesrcValidator", + "._value.ValueValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._surface.SurfaceValidator", + "._stream.StreamValidator", + "._spaceframe.SpaceframeValidator", + "._slices.SlicesValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacityscale.OpacityscaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendgroup.LegendgroupValidator", + "._isomin.IsominValidator", + "._isomax.IsomaxValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._flatshading.FlatshadingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contour.ContourValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._caps.CapsValidator", + "._autocolorscale.AutocolorscaleValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/_autocolorscale.py b/packages/python/plotly/plotly/validators/volume/_autocolorscale.py new file mode 100644 index 00000000000..b6a52f32928 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_autocolorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="autocolorscale", parent_name="volume", **kwargs): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_caps.py b/packages/python/plotly/plotly/validators/volume/_caps.py new file mode 100644 index 00000000000..28eb428bc59 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_caps.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class CapsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="caps", parent_name="volume", **kwargs): + super(CapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Caps"), + data_docs=kwargs.pop( + "data_docs", + """ + x + :class:`plotly.graph_objects.volume.caps.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.volume.caps.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.volume.caps.Z` + instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_cauto.py b/packages/python/plotly/plotly/validators/volume/_cauto.py new file mode 100644 index 00000000000..91c958e80e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_cauto.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="volume", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_cmax.py b/packages/python/plotly/plotly/validators/volume/_cmax.py new file mode 100644 index 00000000000..8bffae37dd8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_cmax.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="volume", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_cmid.py b/packages/python/plotly/plotly/validators/volume/_cmid.py new file mode 100644 index 00000000000..cf90bf260d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_cmid.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="volume", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_cmin.py b/packages/python/plotly/plotly/validators/volume/_cmin.py new file mode 100644 index 00000000000..7c6dc8c4b12 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_cmin.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="volume", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_coloraxis.py b/packages/python/plotly/plotly/validators/volume/_coloraxis.py new file mode 100644 index 00000000000..f5187144162 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_coloraxis.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="volume", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_colorbar.py b/packages/python/plotly/plotly/validators/volume/_colorbar.py new file mode 100644 index 00000000000..0071f47d9ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_colorbar.py @@ -0,0 +1,227 @@ +import _plotly_utils.basevalidators + + +class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="volume", **kwargs): + super(ColorbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.volume. + colorbar.Tickformatstop` instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.volume.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of volume.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud + for ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud + for tickvals . + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.volume.colorbar.Ti + tle` instance or dict with compatible + properties + titlefont + Deprecated: Please use + volume.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + volume.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_colorscale.py b/packages/python/plotly/plotly/validators/volume/_colorscale.py new file mode 100644 index 00000000000..4907daa5ee2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_colorscale.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__(self, plotly_name="colorscale", parent_name="volume", **kwargs): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_contour.py b/packages/python/plotly/plotly/validators/volume/_contour.py new file mode 100644 index 00000000000..a190efe2c26 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_contour.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="contour", parent_name="volume", **kwargs): + super(ContourValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Contour"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_customdata.py b/packages/python/plotly/plotly/validators/volume/_customdata.py new file mode 100644 index 00000000000..25f39156b5e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="volume", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_customdatasrc.py b/packages/python/plotly/plotly/validators/volume/_customdatasrc.py new file mode 100644 index 00000000000..0788e0d3ed3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="volume", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_flatshading.py b/packages/python/plotly/plotly/validators/volume/_flatshading.py new file mode 100644 index 00000000000..42d144352d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_flatshading.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="flatshading", parent_name="volume", **kwargs): + super(FlatshadingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hoverinfo.py b/packages/python/plotly/plotly/validators/volume/_hoverinfo.py new file mode 100644 index 00000000000..ea59020a970 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hoverinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="volume", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/volume/_hoverinfosrc.py new file mode 100644 index 00000000000..118dc0ef1ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="volume", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hoverlabel.py b/packages/python/plotly/plotly/validators/volume/_hoverlabel.py new file mode 100644 index 00000000000..a0b91169424 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="volume", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hovertemplate.py b/packages/python/plotly/plotly/validators/volume/_hovertemplate.py new file mode 100644 index 00000000000..4e1bde19c42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="volume", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/volume/_hovertemplatesrc.py new file mode 100644 index 00000000000..b82c35d76b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hovertemplatesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="volume", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hovertext.py b/packages/python/plotly/plotly/validators/volume/_hovertext.py new file mode 100644 index 00000000000..b0e788fed94 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="volume", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_hovertextsrc.py b/packages/python/plotly/plotly/validators/volume/_hovertextsrc.py new file mode 100644 index 00000000000..757fd387585 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="volume", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_ids.py b/packages/python/plotly/plotly/validators/volume/_ids.py new file mode 100644 index 00000000000..46bb0b47d03 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="volume", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_idssrc.py b/packages/python/plotly/plotly/validators/volume/_idssrc.py new file mode 100644 index 00000000000..b3087027748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="volume", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_isomax.py b/packages/python/plotly/plotly/validators/volume/_isomax.py new file mode 100644 index 00000000000..6068e68983d --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_isomax.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IsomaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="isomax", parent_name="volume", **kwargs): + super(IsomaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_isomin.py b/packages/python/plotly/plotly/validators/volume/_isomin.py new file mode 100644 index 00000000000..0a6d7d5a9c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_isomin.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IsominValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="isomin", parent_name="volume", **kwargs): + super(IsominValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_legendgroup.py b/packages/python/plotly/plotly/validators/volume/_legendgroup.py new file mode 100644 index 00000000000..0202ff6edd3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="volume", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_lighting.py b/packages/python/plotly/plotly/validators/volume/_lighting.py new file mode 100644 index 00000000000..8eff0397eb8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_lighting.py @@ -0,0 +1,40 @@ +import _plotly_utils.basevalidators + + +class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lighting", parent_name="volume", **kwargs): + super(LightingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lighting"), + data_docs=kwargs.pop( + "data_docs", + """ + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_lightposition.py b/packages/python/plotly/plotly/validators/volume/_lightposition.py new file mode 100644 index 00000000000..f7114f0b8e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_lightposition.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="lightposition", parent_name="volume", **kwargs): + super(LightpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Lightposition"), + data_docs=kwargs.pop( + "data_docs", + """ + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_meta.py b/packages/python/plotly/plotly/validators/volume/_meta.py new file mode 100644 index 00000000000..a6a52d13ed6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="volume", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_metasrc.py b/packages/python/plotly/plotly/validators/volume/_metasrc.py new file mode 100644 index 00000000000..0d589a0553a --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="volume", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_name.py b/packages/python/plotly/plotly/validators/volume/_name.py new file mode 100644 index 00000000000..37560192dfb --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="volume", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_opacity.py b/packages/python/plotly/plotly/validators/volume/_opacity.py new file mode 100644 index 00000000000..89634eed3bb --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="volume", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_opacityscale.py b/packages/python/plotly/plotly/validators/volume/_opacityscale.py new file mode 100644 index 00000000000..7882607939c --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_opacityscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="opacityscale", parent_name="volume", **kwargs): + super(OpacityscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_reversescale.py b/packages/python/plotly/plotly/validators/volume/_reversescale.py new file mode 100644 index 00000000000..99c122b9dc2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_reversescale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="reversescale", parent_name="volume", **kwargs): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_scene.py b/packages/python/plotly/plotly/validators/volume/_scene.py new file mode 100644 index 00000000000..f52a5ed34c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_scene.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="scene", parent_name="volume", **kwargs): + super(SceneValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "scene"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_showlegend.py b/packages/python/plotly/plotly/validators/volume/_showlegend.py new file mode 100644 index 00000000000..13a38b8456a --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="volume", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_showscale.py b/packages/python/plotly/plotly/validators/volume/_showscale.py new file mode 100644 index 00000000000..3118ffdd2e0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_showscale.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="volume", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_slices.py b/packages/python/plotly/plotly/validators/volume/_slices.py new file mode 100644 index 00000000000..fdff42bc7d3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_slices.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class SlicesValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="slices", parent_name="volume", **kwargs): + super(SlicesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Slices"), + data_docs=kwargs.pop( + "data_docs", + """ + x + :class:`plotly.graph_objects.volume.slices.X` + instance or dict with compatible properties + y + :class:`plotly.graph_objects.volume.slices.Y` + instance or dict with compatible properties + z + :class:`plotly.graph_objects.volume.slices.Z` + instance or dict with compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_spaceframe.py b/packages/python/plotly/plotly/validators/volume/_spaceframe.py new file mode 100644 index 00000000000..1f677bc93eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_spaceframe.py @@ -0,0 +1,27 @@ +import _plotly_utils.basevalidators + + +class SpaceframeValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="spaceframe", parent_name="volume", **kwargs): + super(SpaceframeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Spaceframe"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `spaceframe` + elements. The default fill value is 1 meaning + that they are entirely shaded. Applying a + `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Displays/hides tetrahedron shapes between + minimum and maximum iso-values. Often useful + when either caps or surfaces are disabled or + filled with values less than 1. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_stream.py b/packages/python/plotly/plotly/validators/volume/_stream.py new file mode 100644 index 00000000000..ca6f5c722f8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="volume", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_surface.py b/packages/python/plotly/plotly/validators/volume/_surface.py new file mode 100644 index 00000000000..be530bbd93f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_surface.py @@ -0,0 +1,42 @@ +import _plotly_utils.basevalidators + + +class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="surface", parent_name="volume", **kwargs): + super(SurfaceValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Surface"), + data_docs=kwargs.pop( + "data_docs", + """ + count + Sets the number of iso-surfaces between minimum + and maximum iso-values. By default this value + is 2 meaning that only minimum and maximum + surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The + default fill value of the surface is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is + `all` meaning that the rest of surface elements + would be shaded. The check options (either 1 or + 2) could be used to draw half of the squares on + the surface. Using various combinations of + capital `A`, `B`, `C`, `D` and `E` may also be + used to reduce the number of triangles on the + iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and + maximum iso-values. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_text.py b/packages/python/plotly/plotly/validators/volume/_text.py new file mode 100644 index 00000000000..315a32e9e9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="volume", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_textsrc.py b/packages/python/plotly/plotly/validators/volume/_textsrc.py new file mode 100644 index 00000000000..99640fbb239 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="volume", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_uid.py b/packages/python/plotly/plotly/validators/volume/_uid.py new file mode 100644 index 00000000000..1a180953a5c --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="volume", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_uirevision.py b/packages/python/plotly/plotly/validators/volume/_uirevision.py new file mode 100644 index 00000000000..8b15194fbb6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="volume", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_value.py b/packages/python/plotly/plotly/validators/volume/_value.py new file mode 100644 index 00000000000..b518cdd5c2d --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_value.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="value", parent_name="volume", **kwargs): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_valuesrc.py b/packages/python/plotly/plotly/validators/volume/_valuesrc.py new file mode 100644 index 00000000000..2a3d1f53080 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_valuesrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuesrc", parent_name="volume", **kwargs): + super(ValuesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_visible.py b/packages/python/plotly/plotly/validators/volume/_visible.py new file mode 100644 index 00000000000..aa9721d7adc --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="volume", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_x.py b/packages/python/plotly/plotly/validators/volume/_x.py new file mode 100644 index 00000000000..8633e67de68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="volume", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_xsrc.py b/packages/python/plotly/plotly/validators/volume/_xsrc.py new file mode 100644 index 00000000000..5ab6e41baa4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="volume", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_y.py b/packages/python/plotly/plotly/validators/volume/_y.py new file mode 100644 index 00000000000..08ed7fa9ed0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="volume", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_ysrc.py b/packages/python/plotly/plotly/validators/volume/_ysrc.py new file mode 100644 index 00000000000..f8ffff38f68 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="volume", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_z.py b/packages/python/plotly/plotly/validators/volume/_z.py new file mode 100644 index 00000000000..c59a08d80c6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_z.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="z", parent_name="volume", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/_zsrc.py b/packages/python/plotly/plotly/validators/volume/_zsrc.py new file mode 100644 index 00000000000..d85e1b4425a --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/_zsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="zsrc", parent_name="volume", **kwargs): + super(ZsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/__init__.py b/packages/python/plotly/plotly/validators/volume/caps/__init__.py index 24283571cfa..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/volume/caps/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/caps/__init__.py @@ -1,91 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="z", parent_name="volume.caps", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Z"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="y", parent_name="volume.caps", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Y"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="x", parent_name="volume.caps", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "X"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/_x.py b/packages/python/plotly/plotly/validators/volume/caps/_x.py new file mode 100644 index 00000000000..ab5dca31391 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/_x.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="x", parent_name="volume.caps", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "X"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the x `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/_y.py b/packages/python/plotly/plotly/validators/volume/caps/_y.py new file mode 100644 index 00000000000..a8743f78971 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/_y.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="y", parent_name="volume.caps", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Y"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the y `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/_z.py b/packages/python/plotly/plotly/validators/volume/caps/_z.py new file mode 100644 index 00000000000..32828337d58 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/_z.py @@ -0,0 +1,29 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="z", parent_name="volume.caps", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Z"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `caps`. The default + fill value of the `caps` is 1 meaning that they + are entirely shaded. On the other hand Applying + a `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Sets the fill ratio of the `slices`. The + default fill value of the z `slices` is 1 + meaning that they are entirely shaded. On the + other hand Applying a `fill` ratio less than + one would allow the creation of openings + parallel to the edges. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/x/__init__.py b/packages/python/plotly/plotly/validators/volume/caps/x/__init__.py index fb3100dc725..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/volume/caps/x/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/caps/x/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.caps.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.caps.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/x/_fill.py b/packages/python/plotly/plotly/validators/volume/caps/x/_fill.py new file mode 100644 index 00000000000..352264926ff --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/x/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.caps.x", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/x/_show.py b/packages/python/plotly/plotly/validators/volume/caps/x/_show.py new file mode 100644 index 00000000000..a77c4f32cc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/x/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.caps.x", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/y/__init__.py b/packages/python/plotly/plotly/validators/volume/caps/y/__init__.py index c172653cc30..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/volume/caps/y/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/caps/y/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.caps.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.caps.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/y/_fill.py b/packages/python/plotly/plotly/validators/volume/caps/y/_fill.py new file mode 100644 index 00000000000..3677d0ad6ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/y/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.caps.y", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/y/_show.py b/packages/python/plotly/plotly/validators/volume/caps/y/_show.py new file mode 100644 index 00000000000..2bdb9826ec2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/y/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.caps.y", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/z/__init__.py b/packages/python/plotly/plotly/validators/volume/caps/z/__init__.py index 8167df82772..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/volume/caps/z/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/caps/z/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.caps.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.caps.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/z/_fill.py b/packages/python/plotly/plotly/validators/volume/caps/z/_fill.py new file mode 100644 index 00000000000..06ac4cdcd93 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/z/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.caps.z", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/caps/z/_show.py b/packages/python/plotly/plotly/validators/volume/caps/z/_show.py new file mode 100644 index 00000000000..7417173559f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/caps/z/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.caps.z", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/__init__.py b/packages/python/plotly/plotly/validators/volume/colorbar/__init__.py index d1dec9f10bb..4f72c5503b8 100644 --- a/packages/python/plotly/plotly/validators/volume/colorbar/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/colorbar/__init__.py @@ -1,730 +1,94 @@ -import _plotly_utils.basevalidators - - -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ypad", parent_name="volume.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="yanchor", parent_name="volume.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["top", "middle", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="volume.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="xpad", parent_name="volume.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="xanchor", parent_name="volume.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "center", "right"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="volume.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 3), - min=kwargs.pop("min", -2), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): - def __init__(self, plotly_name="title", parent_name="volume.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Title"), - data_docs=kwargs.pop( - "data_docs", - """ - font - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - side - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - text - Sets the title of the color bar. Note that - before the existence of `title.text`, the - title's contents used to be defined as the - `title` attribute itself. This behavior has - been deprecated. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="tickwidth", parent_name="volume.colorbar", **kwargs - ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="tickvalssrc", parent_name="volume.colorbar", **kwargs - ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="tickvals", parent_name="volume.colorbar", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="ticktextsrc", parent_name="volume.colorbar", **kwargs - ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ticktext", parent_name="volume.colorbar", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="ticksuffix", parent_name="volume.colorbar", **kwargs - ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="ticks", parent_name="volume.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["outside", "inside", ""]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickprefix", parent_name="volume.colorbar", **kwargs - ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="tickmode", parent_name="volume.colorbar", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {}), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["auto", "linear", "array"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ticklen", parent_name="volume.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, - plotly_name="tickformatstopdefaults", - parent_name="volume.colorbar", - **kwargs - ): - super(TickformatstopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__( - self, plotly_name="tickformatstops", parent_name="volume.colorbar", **kwargs - ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), - data_docs=kwargs.pop( - "data_docs", - """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="tickformat", parent_name="volume.colorbar", **kwargs - ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="tickfont", parent_name="volume.colorbar", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Tickfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="tickcolor", parent_name="volume.colorbar", **kwargs - ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__( - self, plotly_name="tickangle", parent_name="volume.colorbar", **kwargs - ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="tick0", parent_name="volume.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="thicknessmode", parent_name="volume.colorbar", **kwargs - ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="thickness", parent_name="volume.colorbar", **kwargs - ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showticksuffix", parent_name="volume.colorbar", **kwargs - ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showtickprefix", parent_name="volume.colorbar", **kwargs - ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="showticklabels", parent_name="volume.colorbar", **kwargs - ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="showexponent", parent_name="volume.colorbar", **kwargs - ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["all", "first", "last", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="separatethousands", parent_name="volume.colorbar", **kwargs - ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="outlinewidth", parent_name="volume.colorbar", **kwargs - ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="outlinecolor", parent_name="volume.colorbar", **kwargs - ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="nticks", parent_name="volume.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="lenmode", parent_name="volume.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["fraction", "pixels"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LenValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="len", parent_name="volume.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="exponentformat", parent_name="volume.colorbar", **kwargs - ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="dtick", parent_name="volume.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="borderwidth", parent_name="volume.colorbar", **kwargs - ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="volume.colorbar", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="bgcolor", parent_name="volume.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ypad import YpadValidator + from ._yanchor import YanchorValidator + from ._y import YValidator + from ._xpad import XpadValidator + from ._xanchor import XanchorValidator + from ._x import XValidator + from ._title import TitleValidator + from ._tickwidth import TickwidthValidator + from ._tickvalssrc import TickvalssrcValidator + from ._tickvals import TickvalsValidator + from ._ticktextsrc import TicktextsrcValidator + from ._ticktext import TicktextValidator + from ._ticksuffix import TicksuffixValidator + from ._ticks import TicksValidator + from ._tickprefix import TickprefixValidator + from ._tickmode import TickmodeValidator + from ._ticklen import TicklenValidator + from ._tickformatstopdefaults import TickformatstopdefaultsValidator + from ._tickformatstops import TickformatstopsValidator + from ._tickformat import TickformatValidator + from ._tickfont import TickfontValidator + from ._tickcolor import TickcolorValidator + from ._tickangle import TickangleValidator + from ._tick0 import Tick0Validator + from ._thicknessmode import ThicknessmodeValidator + from ._thickness import ThicknessValidator + from ._showticksuffix import ShowticksuffixValidator + from ._showtickprefix import ShowtickprefixValidator + from ._showticklabels import ShowticklabelsValidator + from ._showexponent import ShowexponentValidator + from ._separatethousands import SeparatethousandsValidator + from ._outlinewidth import OutlinewidthValidator + from ._outlinecolor import OutlinecolorValidator + from ._nticks import NticksValidator + from ._lenmode import LenmodeValidator + from ._len import LenValidator + from ._exponentformat import ExponentformatValidator + from ._dtick import DtickValidator + from ._borderwidth import BorderwidthValidator + from ._bordercolor import BordercolorValidator + from ._bgcolor import BgcolorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._nticks.NticksValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_bgcolor.py b/packages/python/plotly/plotly/validators/volume/colorbar/_bgcolor.py new file mode 100644 index 00000000000..8bb5a4cb204 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_bgcolor.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="bgcolor", parent_name="volume.colorbar", **kwargs): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_bordercolor.py b/packages/python/plotly/plotly/validators/volume/colorbar/_bordercolor.py new file mode 100644 index 00000000000..16f801f934d --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_bordercolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="volume.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_borderwidth.py b/packages/python/plotly/plotly/validators/volume/colorbar/_borderwidth.py new file mode 100644 index 00000000000..812ecc9003e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_borderwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="volume.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_dtick.py b/packages/python/plotly/plotly/validators/volume/colorbar/_dtick.py new file mode 100644 index 00000000000..1ec8c812eec --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_dtick.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="dtick", parent_name="volume.colorbar", **kwargs): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_exponentformat.py b/packages/python/plotly/plotly/validators/volume/colorbar/_exponentformat.py new file mode 100644 index 00000000000..9b7790a7b1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_exponentformat.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="exponentformat", parent_name="volume.colorbar", **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_len.py b/packages/python/plotly/plotly/validators/volume/colorbar/_len.py new file mode 100644 index 00000000000..d6bf9bbc922 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_len.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="len", parent_name="volume.colorbar", **kwargs): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_lenmode.py b/packages/python/plotly/plotly/validators/volume/colorbar/_lenmode.py new file mode 100644 index 00000000000..3995b58ea4e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_lenmode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="lenmode", parent_name="volume.colorbar", **kwargs): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_nticks.py b/packages/python/plotly/plotly/validators/volume/colorbar/_nticks.py new file mode 100644 index 00000000000..19acd2fde3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_nticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="nticks", parent_name="volume.colorbar", **kwargs): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_outlinecolor.py b/packages/python/plotly/plotly/validators/volume/colorbar/_outlinecolor.py new file mode 100644 index 00000000000..b9526e538dd --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_outlinecolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="outlinecolor", parent_name="volume.colorbar", **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_outlinewidth.py b/packages/python/plotly/plotly/validators/volume/colorbar/_outlinewidth.py new file mode 100644 index 00000000000..29edfd47f0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_outlinewidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="outlinewidth", parent_name="volume.colorbar", **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_separatethousands.py b/packages/python/plotly/plotly/validators/volume/colorbar/_separatethousands.py new file mode 100644 index 00000000000..15c96d1e82d --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_separatethousands.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="separatethousands", parent_name="volume.colorbar", **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_showexponent.py b/packages/python/plotly/plotly/validators/volume/colorbar/_showexponent.py new file mode 100644 index 00000000000..9395334d75a --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_showexponent.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showexponent", parent_name="volume.colorbar", **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_showticklabels.py b/packages/python/plotly/plotly/validators/volume/colorbar/_showticklabels.py new file mode 100644 index 00000000000..bf013587ad8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_showticklabels.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showticklabels", parent_name="volume.colorbar", **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_showtickprefix.py b/packages/python/plotly/plotly/validators/volume/colorbar/_showtickprefix.py new file mode 100644 index 00000000000..8e5d58c1566 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_showtickprefix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showtickprefix", parent_name="volume.colorbar", **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_showticksuffix.py b/packages/python/plotly/plotly/validators/volume/colorbar/_showticksuffix.py new file mode 100644 index 00000000000..1b9d6d0e4f9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_showticksuffix.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="showticksuffix", parent_name="volume.colorbar", **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_thickness.py b/packages/python/plotly/plotly/validators/volume/colorbar/_thickness.py new file mode 100644 index 00000000000..dda1f5d2339 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_thickness.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="volume.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_thicknessmode.py b/packages/python/plotly/plotly/validators/volume/colorbar/_thicknessmode.py new file mode 100644 index 00000000000..351c0431fee --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_thicknessmode.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="thicknessmode", parent_name="volume.colorbar", **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tick0.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tick0.py new file mode 100644 index 00000000000..2bc80fb0cf3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tick0.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="tick0", parent_name="volume.colorbar", **kwargs): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickangle.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickangle.py new file mode 100644 index 00000000000..d207cb61a48 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickangle.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="volume.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickcolor.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickcolor.py new file mode 100644 index 00000000000..77cfc5eaba0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickcolor.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="volume.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickfont.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickfont.py new file mode 100644 index 00000000000..16d626d4708 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickfont.py @@ -0,0 +1,37 @@ +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tickfont", parent_name="volume.colorbar", **kwargs): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickformat.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickformat.py new file mode 100644 index 00000000000..413e0bc17a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickformat.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="volume.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickformatstopdefaults.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickformatstopdefaults.py new file mode 100644 index 00000000000..33389199abd --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickformatstopdefaults.py @@ -0,0 +1,21 @@ +import _plotly_utils.basevalidators + + +class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="volume.colorbar", + **kwargs + ): + super(TickformatstopdefaultsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickformatstops.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickformatstops.py new file mode 100644 index 00000000000..e0f1ecd0b3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickformatstops.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="tickformatstops", parent_name="volume.colorbar", **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_ticklen.py b/packages/python/plotly/plotly/validators/volume/colorbar/_ticklen.py new file mode 100644 index 00000000000..33e42093ce0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_ticklen.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ticklen", parent_name="volume.colorbar", **kwargs): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickmode.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickmode.py new file mode 100644 index 00000000000..98d68cfbea4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickmode.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="tickmode", parent_name="volume.colorbar", **kwargs): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickprefix.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickprefix.py new file mode 100644 index 00000000000..52460c02edd --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickprefix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="volume.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_ticks.py b/packages/python/plotly/plotly/validators/volume/colorbar/_ticks.py new file mode 100644 index 00000000000..ebf188f25c2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_ticks.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="ticks", parent_name="volume.colorbar", **kwargs): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_ticksuffix.py b/packages/python/plotly/plotly/validators/volume/colorbar/_ticksuffix.py new file mode 100644 index 00000000000..1106e90e237 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_ticksuffix.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="volume.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_ticktext.py b/packages/python/plotly/plotly/validators/volume/colorbar/_ticktext.py new file mode 100644 index 00000000000..88942ef0a8e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_ticktext.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ticktext", parent_name="volume.colorbar", **kwargs): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_ticktextsrc.py b/packages/python/plotly/plotly/validators/volume/colorbar/_ticktextsrc.py new file mode 100644 index 00000000000..22bb88e2641 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_ticktextsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="volume.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickvals.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickvals.py new file mode 100644 index 00000000000..786fa51c028 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickvals.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="tickvals", parent_name="volume.colorbar", **kwargs): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickvalssrc.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickvalssrc.py new file mode 100644 index 00000000000..38d6c05a33b --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickvalssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="volume.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_tickwidth.py b/packages/python/plotly/plotly/validators/volume/colorbar/_tickwidth.py new file mode 100644 index 00000000000..99aa2d167c3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_tickwidth.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="volume.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_title.py b/packages/python/plotly/plotly/validators/volume/colorbar/_title.py new file mode 100644 index 00000000000..1ca98154748 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_title.py @@ -0,0 +1,31 @@ +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__(self, plotly_name="title", parent_name="volume.colorbar", **kwargs): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_x.py b/packages/python/plotly/plotly/validators/volume/colorbar/_x.py new file mode 100644 index 00000000000..3d9f8a75bcf --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="volume.colorbar", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_xanchor.py b/packages/python/plotly/plotly/validators/volume/colorbar/_xanchor.py new file mode 100644 index 00000000000..1de6bdefc56 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_xanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="xanchor", parent_name="volume.colorbar", **kwargs): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_xpad.py b/packages/python/plotly/plotly/validators/volume/colorbar/_xpad.py new file mode 100644 index 00000000000..249f0f10af4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_xpad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="xpad", parent_name="volume.colorbar", **kwargs): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_y.py b/packages/python/plotly/plotly/validators/volume/colorbar/_y.py new file mode 100644 index 00000000000..b1aac86aa3d --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="volume.colorbar", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_yanchor.py b/packages/python/plotly/plotly/validators/volume/colorbar/_yanchor.py new file mode 100644 index 00000000000..a4ccc7e17f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_yanchor.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="yanchor", parent_name="volume.colorbar", **kwargs): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/_ypad.py b/packages/python/plotly/plotly/validators/volume/colorbar/_ypad.py new file mode 100644 index 00000000000..8c524d813ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/_ypad.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ypad", parent_name="volume.colorbar", **kwargs): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/__init__.py index 33e93d9761c..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="volume.colorbar.tickfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="volume.colorbar.tickfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="volume.colorbar.tickfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_color.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_color.py new file mode 100644 index 00000000000..63b7a0eaf3e --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="volume.colorbar.tickfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_family.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_family.py new file mode 100644 index 00000000000..0d479828f11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="volume.colorbar.tickfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_size.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_size.py new file mode 100644 index 00000000000..2492811ecee --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickfont/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="volume.colorbar.tickfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/__init__.py index b149cd24034..9221b8da1d0 100644 --- a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/__init__.py @@ -1,97 +1,22 @@ -import _plotly_utils.basevalidators - - -class ValueValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="value", - parent_name="volume.colorbar.tickformatstop", - **kwargs - ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, - plotly_name="templateitemname", - parent_name="volume.colorbar.tickformatstop", - **kwargs - ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="name", parent_name="volume.colorbar.tickformatstop", **kwargs - ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, - plotly_name="enabled", - parent_name="volume.colorbar.tickformatstop", - **kwargs - ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): - def __init__( - self, - plotly_name="dtickrange", - parent_name="volume.colorbar.tickformatstop", - **kwargs - ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - items=kwargs.pop( - "items", - [ - {"valType": "any", "editType": "calc"}, - {"valType": "any", "editType": "calc"}, - ], - ), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._value import ValueValidator + from ._templateitemname import TemplateitemnameValidator + from ._name import NameValidator + from ._enabled import EnabledValidator + from ._dtickrange import DtickrangeValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py new file mode 100644 index 00000000000..05788f3d0f3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="volume.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "calc"}, + {"valType": "any", "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_enabled.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_enabled.py new file mode 100644 index 00000000000..7aa4679db47 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_enabled.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="volume.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_name.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_name.py new file mode 100644 index 00000000000..2d2d5e5ce17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_name.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="name", parent_name="volume.colorbar.tickformatstop", **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py new file mode 100644 index 00000000000..6c7e1a6b136 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="volume.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_value.py b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_value.py new file mode 100644 index 00000000000..878193fe946 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/tickformatstop/_value.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="volume.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/__init__.py index 57cb835e0d4..7835223fe16 100644 --- a/packages/python/plotly/plotly/validators/volume/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/__init__.py @@ -1,72 +1,14 @@ -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="text", parent_name="volume.colorbar.title", **kwargs - ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="side", parent_name="volume.colorbar.title", **kwargs - ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["right", "top", "bottom"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="volume.colorbar.title", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._text import TextValidator + from ._side import SideValidator + from ._font import FontValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/_font.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/_font.py new file mode 100644 index 00000000000..a1e90f8c7c0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/_font.py @@ -0,0 +1,39 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="volume.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/_side.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/_side.py new file mode 100644 index 00000000000..47d97137fba --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/_side.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="volume.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/_text.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/_text.py new file mode 100644 index 00000000000..e3cffe70136 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/_text.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="volume.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/__init__.py index ef0c61ecac7..8db13cd0286 100644 --- a/packages/python/plotly/plotly/validators/volume/colorbar/title/font/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/__init__.py @@ -1,49 +1,14 @@ -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="volume.colorbar.title.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="volume.colorbar.title.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="volume.colorbar.title.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._size import SizeValidator + from ._family import FamilyValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._family.FamilyValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_color.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_color.py new file mode 100644 index 00000000000..7e24a9e2a55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="volume.colorbar.title.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_family.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_family.py new file mode 100644 index 00000000000..67224e1d9c8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_family.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="volume.colorbar.title.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_size.py b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_size.py new file mode 100644 index 00000000000..8e12d07ff10 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_size.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="volume.colorbar.title.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/contour/__init__.py b/packages/python/plotly/plotly/validators/volume/contour/__init__.py index b71dcff45ac..e59b78ead51 100644 --- a/packages/python/plotly/plotly/validators/volume/contour/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/contour/__init__.py @@ -1,42 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="volume.contour", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 16), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.contour", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="volume.contour", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._show import ShowValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/volume/contour/_color.py b/packages/python/plotly/plotly/validators/volume/contour/_color.py new file mode 100644 index 00000000000..96ede4f0c42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/contour/_color.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="volume.contour", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/contour/_show.py b/packages/python/plotly/plotly/validators/volume/contour/_show.py new file mode 100644 index 00000000000..876f83d60c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/contour/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.contour", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/contour/_width.py b/packages/python/plotly/plotly/validators/volume/contour/_width.py new file mode 100644 index 00000000000..d0404c1acfd --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/contour/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="volume.contour", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 16), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/__init__.py index cace5e7d7c4..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/volume/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/__init__.py @@ -1,178 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="volume.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="volume.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="volume.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="volume.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="volume.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="volume.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="volume.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="volume.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="volume.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_align.py new file mode 100644 index 00000000000..7416e8c4551 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_align.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="align", parent_name="volume.hoverlabel", **kwargs): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..72e73683ef8 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="volume.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..81a8a79c4fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="volume.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..ee0dfd41d45 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="volume.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..88fe57386ec --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="volume.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..9571476078f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="volume.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_font.py new file mode 100644 index 00000000000..84203e9fc9f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_font.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="font", parent_name="volume.hoverlabel", **kwargs): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_namelength.py new file mode 100644 index 00000000000..23ef553f3af --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="volume.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..e5ae6f2e1a7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="volume.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/__init__.py index 0c467d402e6..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="volume.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="volume.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="volume.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="volume.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="volume.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="volume.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_color.py new file mode 100644 index 00000000000..f0f4d102f91 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="volume.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..8cb0eb8d98f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="volume.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_family.py new file mode 100644 index 00000000000..d7143048265 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="volume.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..e4e964ae5b2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="volume.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_size.py new file mode 100644 index 00000000000..40fec5f636b --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="volume.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..022fe9f10e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="volume.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/__init__.py b/packages/python/plotly/plotly/validators/volume/lighting/__init__.py index 84c3cc29867..12f1cf66154 100644 --- a/packages/python/plotly/plotly/validators/volume/lighting/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/lighting/__init__.py @@ -1,119 +1,26 @@ -import _plotly_utils.basevalidators - - -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="vertexnormalsepsilon", - parent_name="volume.lighting", - **kwargs - ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="specular", parent_name="volume.lighting", **kwargs): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 2), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="roughness", parent_name="volume.lighting", **kwargs - ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fresnel", parent_name="volume.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 5), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="facenormalsepsilon", parent_name="volume.lighting", **kwargs - ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="diffuse", parent_name="volume.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="ambient", parent_name="volume.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._vertexnormalsepsilon import VertexnormalsepsilonValidator + from ._specular import SpecularValidator + from ._roughness import RoughnessValidator + from ._fresnel import FresnelValidator + from ._facenormalsepsilon import FacenormalsepsilonValidator + from ._diffuse import DiffuseValidator + from ._ambient import AmbientValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_ambient.py b/packages/python/plotly/plotly/validators/volume/lighting/_ambient.py new file mode 100644 index 00000000000..014bdc7e11c --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_ambient.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="ambient", parent_name="volume.lighting", **kwargs): + super(AmbientValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_diffuse.py b/packages/python/plotly/plotly/validators/volume/lighting/_diffuse.py new file mode 100644 index 00000000000..ae8e05e1f5f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_diffuse.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="diffuse", parent_name="volume.lighting", **kwargs): + super(DiffuseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_facenormalsepsilon.py b/packages/python/plotly/plotly/validators/volume/lighting/_facenormalsepsilon.py new file mode 100644 index 00000000000..b611cd3514f --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_facenormalsepsilon.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="facenormalsepsilon", parent_name="volume.lighting", **kwargs + ): + super(FacenormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_fresnel.py b/packages/python/plotly/plotly/validators/volume/lighting/_fresnel.py new file mode 100644 index 00000000000..bf63ad86f7b --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_fresnel.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fresnel", parent_name="volume.lighting", **kwargs): + super(FresnelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 5), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_roughness.py b/packages/python/plotly/plotly/validators/volume/lighting/_roughness.py new file mode 100644 index 00000000000..3965815b86d --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_roughness.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="roughness", parent_name="volume.lighting", **kwargs + ): + super(RoughnessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_specular.py b/packages/python/plotly/plotly/validators/volume/lighting/_specular.py new file mode 100644 index 00000000000..761af6b9d11 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_specular.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="specular", parent_name="volume.lighting", **kwargs): + super(SpecularValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 2), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lighting/_vertexnormalsepsilon.py b/packages/python/plotly/plotly/validators/volume/lighting/_vertexnormalsepsilon.py new file mode 100644 index 00000000000..68fad742098 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lighting/_vertexnormalsepsilon.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="vertexnormalsepsilon", + parent_name="volume.lighting", + **kwargs + ): + super(VertexnormalsepsilonValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lightposition/__init__.py b/packages/python/plotly/plotly/validators/volume/lightposition/__init__.py index d9aec15a210..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/volume/lightposition/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/lightposition/__init__.py @@ -1,46 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="z", parent_name="volume.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="y", parent_name="volume.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="x", parent_name="volume.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 100000), - min=kwargs.pop("min", -100000), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/lightposition/_x.py b/packages/python/plotly/plotly/validators/volume/lightposition/_x.py new file mode 100644 index 00000000000..b76eab9a3f1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lightposition/_x.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="x", parent_name="volume.lightposition", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lightposition/_y.py b/packages/python/plotly/plotly/validators/volume/lightposition/_y.py new file mode 100644 index 00000000000..ba89bdccfc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lightposition/_y.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="y", parent_name="volume.lightposition", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/lightposition/_z.py b/packages/python/plotly/plotly/validators/volume/lightposition/_z.py new file mode 100644 index 00000000000..fb3d7b7f602 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/lightposition/_z.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="z", parent_name="volume.lightposition", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 100000), + min=kwargs.pop("min", -100000), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/__init__.py b/packages/python/plotly/plotly/validators/volume/slices/__init__.py index 37a186e40d2..6565993f47a 100644 --- a/packages/python/plotly/plotly/validators/volume/slices/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/slices/__init__.py @@ -1,106 +1,12 @@ -import _plotly_utils.basevalidators - - -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="z", parent_name="volume.slices", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Z"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the z dimension are drawn. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="y", parent_name="volume.slices", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Y"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the y dimension are drawn. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="x", parent_name="volume.slices", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "X"), - data_docs=kwargs.pop( - "data_docs", - """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for locations . - show - Determines whether or not slice planes about - the x dimension are drawn. -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._z import ZValidator + from ._y import YValidator + from ._x import XValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/_x.py b/packages/python/plotly/plotly/validators/volume/slices/_x.py new file mode 100644 index 00000000000..7c12577ecf5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/_x.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="x", parent_name="volume.slices", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "X"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis x except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the x dimension are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/_y.py b/packages/python/plotly/plotly/validators/volume/slices/_y.py new file mode 100644 index 00000000000..ee3e2e50e17 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/_y.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="y", parent_name="volume.slices", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Y"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis y except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the y dimension are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/_z.py b/packages/python/plotly/plotly/validators/volume/slices/_z.py new file mode 100644 index 00000000000..3bcdb667ffa --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/_z.py @@ -0,0 +1,34 @@ +import _plotly_utils.basevalidators + + +class ZValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="z", parent_name="volume.slices", **kwargs): + super(ZValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Z"), + data_docs=kwargs.pop( + "data_docs", + """ + fill + Sets the fill ratio of the `slices`. The + default fill value of the `slices` is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + locations + Specifies the location(s) of slices on the + axis. When not specified slices would be + created for all points of the axis z except + start and end. + locationssrc + Sets the source reference on Chart Studio Cloud + for locations . + show + Determines whether or not slice planes about + the z dimension are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/x/__init__.py b/packages/python/plotly/plotly/validators/volume/slices/x/__init__.py index fca611fe232..164bbaf02df 100644 --- a/packages/python/plotly/plotly/validators/volume/slices/x/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/slices/x/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.slices.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="volume.slices.x", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="volume.slices.x", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.slices.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/x/_fill.py b/packages/python/plotly/plotly/validators/volume/slices/x/_fill.py new file mode 100644 index 00000000000..3271a78fa21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/x/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.slices.x", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/x/_locations.py b/packages/python/plotly/plotly/validators/volume/slices/x/_locations.py new file mode 100644 index 00000000000..441012483b1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/x/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="volume.slices.x", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/x/_locationssrc.py b/packages/python/plotly/plotly/validators/volume/slices/x/_locationssrc.py new file mode 100644 index 00000000000..d093a376d6c --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/x/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="volume.slices.x", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/x/_show.py b/packages/python/plotly/plotly/validators/volume/slices/x/_show.py new file mode 100644 index 00000000000..d96c4ed83ea --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/x/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.slices.x", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/y/__init__.py b/packages/python/plotly/plotly/validators/volume/slices/y/__init__.py index 26ebf4f5c52..164bbaf02df 100644 --- a/packages/python/plotly/plotly/validators/volume/slices/y/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/slices/y/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.slices.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="volume.slices.y", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="volume.slices.y", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.slices.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/y/_fill.py b/packages/python/plotly/plotly/validators/volume/slices/y/_fill.py new file mode 100644 index 00000000000..cce00fb52fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/y/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.slices.y", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/y/_locations.py b/packages/python/plotly/plotly/validators/volume/slices/y/_locations.py new file mode 100644 index 00000000000..dc9be9c7576 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/y/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="volume.slices.y", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/y/_locationssrc.py b/packages/python/plotly/plotly/validators/volume/slices/y/_locationssrc.py new file mode 100644 index 00000000000..3d50208c5c4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/y/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="volume.slices.y", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/y/_show.py b/packages/python/plotly/plotly/validators/volume/slices/y/_show.py new file mode 100644 index 00000000000..08195a9e375 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/y/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.slices.y", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/z/__init__.py b/packages/python/plotly/plotly/validators/volume/slices/z/__init__.py index b1901ae59a3..164bbaf02df 100644 --- a/packages/python/plotly/plotly/validators/volume/slices/z/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/slices/z/__init__.py @@ -1,60 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.slices.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="locationssrc", parent_name="volume.slices.z", **kwargs - ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__( - self, plotly_name="locations", parent_name="volume.slices.z", **kwargs - ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.slices.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._locationssrc import LocationssrcValidator + from ._locations import LocationsValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/z/_fill.py b/packages/python/plotly/plotly/validators/volume/slices/z/_fill.py new file mode 100644 index 00000000000..8e3b1e56265 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/z/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.slices.z", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/z/_locations.py b/packages/python/plotly/plotly/validators/volume/slices/z/_locations.py new file mode 100644 index 00000000000..a2899fad6ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/z/_locations.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="locations", parent_name="volume.slices.z", **kwargs + ): + super(LocationsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/z/_locationssrc.py b/packages/python/plotly/plotly/validators/volume/slices/z/_locationssrc.py new file mode 100644 index 00000000000..1f3e54c41e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/z/_locationssrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="locationssrc", parent_name="volume.slices.z", **kwargs + ): + super(LocationssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/slices/z/_show.py b/packages/python/plotly/plotly/validators/volume/slices/z/_show.py new file mode 100644 index 00000000000..be1c7f42929 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/slices/z/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.slices.z", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/spaceframe/__init__.py b/packages/python/plotly/plotly/validators/volume/spaceframe/__init__.py index a2667c0b35a..a83bc4511ea 100644 --- a/packages/python/plotly/plotly/validators/volume/spaceframe/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/spaceframe/__init__.py @@ -1,28 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._fill import FillValidator +else: + from _plotly_utils.importers import relative_import -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.spaceframe", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.spaceframe", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/spaceframe/_fill.py b/packages/python/plotly/plotly/validators/volume/spaceframe/_fill.py new file mode 100644 index 00000000000..7c5bf2f672c --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/spaceframe/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.spaceframe", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/spaceframe/_show.py b/packages/python/plotly/plotly/validators/volume/spaceframe/_show.py new file mode 100644 index 00000000000..f36c14f69eb --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/spaceframe/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.spaceframe", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/stream/__init__.py b/packages/python/plotly/plotly/validators/volume/stream/__init__.py index f1e0185b61f..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/volume/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/stream/__init__.py @@ -1,30 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="volume.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="maxpoints", parent_name="volume.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/volume/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/volume/stream/_maxpoints.py new file mode 100644 index 00000000000..fe4ff47214a --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/stream/_maxpoints.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="volume.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/stream/_token.py b/packages/python/plotly/plotly/validators/volume/stream/_token.py new file mode 100644 index 00000000000..41e68b15ac7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="volume.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/surface/__init__.py b/packages/python/plotly/plotly/validators/volume/surface/__init__.py index f4cb08717b0..c75d5c08248 100644 --- a/packages/python/plotly/plotly/validators/volume/surface/__init__.py +++ b/packages/python/plotly/plotly/validators/volume/surface/__init__.py @@ -1,59 +1,20 @@ -import _plotly_utils.basevalidators - - -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="show", parent_name="volume.surface", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="pattern", parent_name="volume.surface", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - extras=kwargs.pop("extras", ["all", "odd", "even"]), - flags=kwargs.pop("flags", ["A", "B", "C", "D", "E"]), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FillValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="fill", parent_name="volume.surface", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CountValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__(self, plotly_name="count", parent_name="volume.surface", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._show import ShowValidator + from ._pattern import PatternValidator + from ._fill import FillValidator + from ._count import CountValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._pattern.PatternValidator", + "._fill.FillValidator", + "._count.CountValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/volume/surface/_count.py b/packages/python/plotly/plotly/validators/volume/surface/_count.py new file mode 100644 index 00000000000..e243e7c1705 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/surface/_count.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class CountValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="count", parent_name="volume.surface", **kwargs): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/surface/_fill.py b/packages/python/plotly/plotly/validators/volume/surface/_fill.py new file mode 100644 index 00000000000..ab03c79b3a3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/surface/_fill.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FillValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="fill", parent_name="volume.surface", **kwargs): + super(FillValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/surface/_pattern.py b/packages/python/plotly/plotly/validators/volume/surface/_pattern.py new file mode 100644 index 00000000000..cdcdb421adb --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/surface/_pattern.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="pattern", parent_name="volume.surface", **kwargs): + super(PatternValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + extras=kwargs.pop("extras", ["all", "odd", "even"]), + flags=kwargs.pop("flags", ["A", "B", "C", "D", "E"]), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/volume/surface/_show.py b/packages/python/plotly/plotly/validators/volume/surface/_show.py new file mode 100644 index 00000000000..150df37e6e3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/volume/surface/_show.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="show", parent_name="volume.surface", **kwargs): + super(ShowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/__init__.py b/packages/python/plotly/plotly/validators/waterfall/__init__.py index 519ef776519..b1423f8573f 100644 --- a/packages/python/plotly/plotly/validators/waterfall/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/__init__.py @@ -1,1065 +1,132 @@ -import _plotly_utils.basevalidators - - -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="ysrc", parent_name="waterfall", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="yaxis", parent_name="waterfall", **kwargs): - super(YAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "y"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="y0", parent_name="waterfall", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="y", parent_name="waterfall", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="xsrc", parent_name="waterfall", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XAxisValidator(_plotly_utils.basevalidators.SubplotidValidator): - def __init__(self, plotly_name="xaxis", parent_name="waterfall", **kwargs): - super(XAxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - dflt=kwargs.pop("dflt", "x"), - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class X0Validator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="x0", parent_name="waterfall", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="x", parent_name="waterfall", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="widthsrc", parent_name="waterfall", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="width", parent_name="waterfall", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="visible", parent_name="waterfall", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", [True, False, "legendonly"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="uirevision", parent_name="waterfall", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class UidValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="uid", parent_name="waterfall", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TotalsValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="totals", parent_name="waterfall", **kwargs): - super(TotalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Totals"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.waterfall.totals.M - arker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="texttemplatesrc", parent_name="waterfall", **kwargs - ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="texttemplate", parent_name="waterfall", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="textsrc", parent_name="waterfall", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="textpositionsrc", parent_name="waterfall", **kwargs - ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="textposition", parent_name="waterfall", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="textinfo", parent_name="waterfall", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "plot"), - extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["label", "text", "initial", "delta", "final"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="textfont", parent_name="waterfall", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Textfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): - def __init__(self, plotly_name="textangle", parent_name="waterfall", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class TextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="text", parent_name="waterfall", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="stream", parent_name="waterfall", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Stream"), - data_docs=kwargs.pop( - "data_docs", - """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="showlegend", parent_name="waterfall", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="selectedpoints", parent_name="waterfall", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="outsidetextfont", parent_name="waterfall", **kwargs - ): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="orientation", parent_name="waterfall", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["v", "h"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="opacity", parent_name="waterfall", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - max=kwargs.pop("max", 1), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="offsetsrc", parent_name="waterfall", **kwargs): - super(OffsetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="offsetgroup", parent_name="waterfall", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="offset", parent_name="waterfall", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NameValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="name", parent_name="waterfall", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="metasrc", parent_name="waterfall", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): - def __init__(self, plotly_name="meta", parent_name="waterfall", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MeasuresrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="measuresrc", parent_name="waterfall", **kwargs): - super(MeasuresrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MeasureValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="measure", parent_name="waterfall", **kwargs): - super(MeasureValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="legendgroup", parent_name="waterfall", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="insidetextfont", parent_name="waterfall", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="insidetextanchor", parent_name="waterfall", **kwargs - ): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["end", "middle", "start"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="increasing", parent_name="waterfall", **kwargs): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Increasing"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.waterfall.increasi - ng.Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="idssrc", parent_name="waterfall", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="ids", parent_name="waterfall", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hovertextsrc", parent_name="waterfall", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertext", parent_name="waterfall", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hovertemplatesrc", parent_name="waterfall", **kwargs - ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="hovertemplate", parent_name="waterfall", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="waterfall", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for align . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="waterfall", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="waterfall", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop( - "flags", ["name", "x", "y", "text", "initial", "delta", "final"] - ), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DyValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dy", parent_name="waterfall", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DxValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="dx", parent_name="waterfall", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="decreasing", parent_name="waterfall", **kwargs): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Decreasing"), - data_docs=kwargs.pop( - "data_docs", - """ - marker - :class:`plotly.graph_objects.waterfall.decreasi - ng.Marker` instance or dict with compatible - properties -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="customdatasrc", parent_name="waterfall", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): - def __init__(self, plotly_name="customdata", parent_name="waterfall", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "data"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="constraintext", parent_name="waterfall", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["inside", "outside", "both", "none"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="connector", parent_name="waterfall", **kwargs): - super(ConnectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Connector"), - data_docs=kwargs.pop( - "data_docs", - """ - line - :class:`plotly.graph_objects.waterfall.connecto - r.Line` instance or dict with compatible - properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__(self, plotly_name="cliponaxis", parent_name="waterfall", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BaseValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="base", parent_name="waterfall", **kwargs): - super(BaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="alignmentgroup", parent_name="waterfall", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - role=kwargs.pop("role", "info"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._ysrc import YsrcValidator + from ._yaxis import YaxisValidator + from ._y0 import Y0Validator + from ._y import YValidator + from ._xsrc import XsrcValidator + from ._xaxis import XaxisValidator + from ._x0 import X0Validator + from ._x import XValidator + from ._widthsrc import WidthsrcValidator + from ._width import WidthValidator + from ._visible import VisibleValidator + from ._uirevision import UirevisionValidator + from ._uid import UidValidator + from ._totals import TotalsValidator + from ._texttemplatesrc import TexttemplatesrcValidator + from ._texttemplate import TexttemplateValidator + from ._textsrc import TextsrcValidator + from ._textpositionsrc import TextpositionsrcValidator + from ._textposition import TextpositionValidator + from ._textinfo import TextinfoValidator + from ._textfont import TextfontValidator + from ._textangle import TextangleValidator + from ._text import TextValidator + from ._stream import StreamValidator + from ._showlegend import ShowlegendValidator + from ._selectedpoints import SelectedpointsValidator + from ._outsidetextfont import OutsidetextfontValidator + from ._orientation import OrientationValidator + from ._opacity import OpacityValidator + from ._offsetsrc import OffsetsrcValidator + from ._offsetgroup import OffsetgroupValidator + from ._offset import OffsetValidator + from ._name import NameValidator + from ._metasrc import MetasrcValidator + from ._meta import MetaValidator + from ._measuresrc import MeasuresrcValidator + from ._measure import MeasureValidator + from ._legendgroup import LegendgroupValidator + from ._insidetextfont import InsidetextfontValidator + from ._insidetextanchor import InsidetextanchorValidator + from ._increasing import IncreasingValidator + from ._idssrc import IdssrcValidator + from ._ids import IdsValidator + from ._hovertextsrc import HovertextsrcValidator + from ._hovertext import HovertextValidator + from ._hovertemplatesrc import HovertemplatesrcValidator + from ._hovertemplate import HovertemplateValidator + from ._hoverlabel import HoverlabelValidator + from ._hoverinfosrc import HoverinfosrcValidator + from ._hoverinfo import HoverinfoValidator + from ._dy import DyValidator + from ._dx import DxValidator + from ._decreasing import DecreasingValidator + from ._customdatasrc import CustomdatasrcValidator + from ._customdata import CustomdataValidator + from ._constraintext import ConstraintextValidator + from ._connector import ConnectorValidator + from ._cliponaxis import CliponaxisValidator + from ._base import BaseValidator + from ._alignmentgroup import AlignmentgroupValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._totals.TotalsValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetsrc.OffsetsrcValidator", + "._offsetgroup.OffsetgroupValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._measuresrc.MeasuresrcValidator", + "._measure.MeasureValidator", + "._legendgroup.LegendgroupValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._increasing.IncreasingValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._decreasing.DecreasingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._constraintext.ConstraintextValidator", + "._connector.ConnectorValidator", + "._cliponaxis.CliponaxisValidator", + "._base.BaseValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_alignmentgroup.py b/packages/python/plotly/plotly/validators/waterfall/_alignmentgroup.py new file mode 100644 index 00000000000..c75d79c1c67 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_alignmentgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="alignmentgroup", parent_name="waterfall", **kwargs): + super(AlignmentgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_base.py b/packages/python/plotly/plotly/validators/waterfall/_base.py new file mode 100644 index 00000000000..364e7dfbd3b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_base.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class BaseValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="base", parent_name="waterfall", **kwargs): + super(BaseValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_cliponaxis.py b/packages/python/plotly/plotly/validators/waterfall/_cliponaxis.py new file mode 100644 index 00000000000..859b38a2276 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_cliponaxis.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cliponaxis", parent_name="waterfall", **kwargs): + super(CliponaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_connector.py b/packages/python/plotly/plotly/validators/waterfall/_connector.py new file mode 100644 index 00000000000..4822b67c508 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_connector.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="connector", parent_name="waterfall", **kwargs): + super(ConnectorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Connector"), + data_docs=kwargs.pop( + "data_docs", + """ + line + :class:`plotly.graph_objects.waterfall.connecto + r.Line` instance or dict with compatible + properties + mode + Sets the shape of connector lines. + visible + Determines if connector lines are drawn. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_constraintext.py b/packages/python/plotly/plotly/validators/waterfall/_constraintext.py new file mode 100644 index 00000000000..1cd1428fd82 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_constraintext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="constraintext", parent_name="waterfall", **kwargs): + super(ConstraintextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "both", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_customdata.py b/packages/python/plotly/plotly/validators/waterfall/_customdata.py new file mode 100644 index 00000000000..eb0fb7db852 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_customdata.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="waterfall", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_customdatasrc.py b/packages/python/plotly/plotly/validators/waterfall/_customdatasrc.py new file mode 100644 index 00000000000..608330df118 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_customdatasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="waterfall", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_decreasing.py b/packages/python/plotly/plotly/validators/waterfall/_decreasing.py new file mode 100644 index 00000000000..af6eb0e1d8c --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_decreasing.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="decreasing", parent_name="waterfall", **kwargs): + super(DecreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Decreasing"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.waterfall.decreasi + ng.Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_dx.py b/packages/python/plotly/plotly/validators/waterfall/_dx.py new file mode 100644 index 00000000000..1ded49d7d69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_dx.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dx", parent_name="waterfall", **kwargs): + super(DxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_dy.py b/packages/python/plotly/plotly/validators/waterfall/_dy.py new file mode 100644 index 00000000000..886b1c20bf9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_dy.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class DyValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="dy", parent_name="waterfall", **kwargs): + super(DyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hoverinfo.py b/packages/python/plotly/plotly/validators/waterfall/_hoverinfo.py new file mode 100644 index 00000000000..3c57da3b7e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hoverinfo.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="waterfall", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", ["name", "x", "y", "text", "initial", "delta", "final"] + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hoverinfosrc.py b/packages/python/plotly/plotly/validators/waterfall/_hoverinfosrc.py new file mode 100644 index 00000000000..0b0187c672d --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hoverinfosrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="waterfall", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hoverlabel.py b/packages/python/plotly/plotly/validators/waterfall/_hoverlabel.py new file mode 100644 index 00000000000..66b93336425 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hoverlabel.py @@ -0,0 +1,51 @@ +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="waterfall", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on Chart Studio Cloud + for align . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud + for bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud + for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud + for namelength . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hovertemplate.py b/packages/python/plotly/plotly/validators/waterfall/_hovertemplate.py new file mode 100644 index 00000000000..240c6f55fcc --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hovertemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="waterfall", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hovertemplatesrc.py b/packages/python/plotly/plotly/validators/waterfall/_hovertemplatesrc.py new file mode 100644 index 00000000000..05b9c5aab01 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hovertemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="hovertemplatesrc", parent_name="waterfall", **kwargs + ): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hovertext.py b/packages/python/plotly/plotly/validators/waterfall/_hovertext.py new file mode 100644 index 00000000000..54c639667df --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hovertext.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="waterfall", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_hovertextsrc.py b/packages/python/plotly/plotly/validators/waterfall/_hovertextsrc.py new file mode 100644 index 00000000000..024806e5f2c --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_hovertextsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="waterfall", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_ids.py b/packages/python/plotly/plotly/validators/waterfall/_ids.py new file mode 100644 index 00000000000..46b89da34e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_ids.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="waterfall", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_idssrc.py b/packages/python/plotly/plotly/validators/waterfall/_idssrc.py new file mode 100644 index 00000000000..96e7526d850 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_idssrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="waterfall", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_increasing.py b/packages/python/plotly/plotly/validators/waterfall/_increasing.py new file mode 100644 index 00000000000..6389ebc1de4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_increasing.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="increasing", parent_name="waterfall", **kwargs): + super(IncreasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Increasing"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.waterfall.increasi + ng.Marker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_insidetextanchor.py b/packages/python/plotly/plotly/validators/waterfall/_insidetextanchor.py new file mode 100644 index 00000000000..7ff17461c0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_insidetextanchor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="insidetextanchor", parent_name="waterfall", **kwargs + ): + super(InsidetextanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["end", "middle", "start"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_insidetextfont.py b/packages/python/plotly/plotly/validators/waterfall/_insidetextfont.py new file mode 100644 index 00000000000..17806a651e5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_insidetextfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="waterfall", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_legendgroup.py b/packages/python/plotly/plotly/validators/waterfall/_legendgroup.py new file mode 100644 index 00000000000..1629d005f42 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_legendgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="legendgroup", parent_name="waterfall", **kwargs): + super(LegendgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_measure.py b/packages/python/plotly/plotly/validators/waterfall/_measure.py new file mode 100644 index 00000000000..d3812c27f1f --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_measure.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MeasureValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="measure", parent_name="waterfall", **kwargs): + super(MeasureValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_measuresrc.py b/packages/python/plotly/plotly/validators/waterfall/_measuresrc.py new file mode 100644 index 00000000000..9c0f2793d35 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_measuresrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MeasuresrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="measuresrc", parent_name="waterfall", **kwargs): + super(MeasuresrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_meta.py b/packages/python/plotly/plotly/validators/waterfall/_meta.py new file mode 100644 index 00000000000..d91418a6aaf --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_meta.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="waterfall", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_metasrc.py b/packages/python/plotly/plotly/validators/waterfall/_metasrc.py new file mode 100644 index 00000000000..a4bc87d29ac --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_metasrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="waterfall", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_name.py b/packages/python/plotly/plotly/validators/waterfall/_name.py new file mode 100644 index 00000000000..d4f4870b01e --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_name.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="waterfall", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_offset.py b/packages/python/plotly/plotly/validators/waterfall/_offset.py new file mode 100644 index 00000000000..f4185877722 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_offset.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="offset", parent_name="waterfall", **kwargs): + super(OffsetValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_offsetgroup.py b/packages/python/plotly/plotly/validators/waterfall/_offsetgroup.py new file mode 100644 index 00000000000..690c363cede --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_offsetgroup.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="offsetgroup", parent_name="waterfall", **kwargs): + super(OffsetgroupValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_offsetsrc.py b/packages/python/plotly/plotly/validators/waterfall/_offsetsrc.py new file mode 100644 index 00000000000..2751be1b62c --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_offsetsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="offsetsrc", parent_name="waterfall", **kwargs): + super(OffsetsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_opacity.py b/packages/python/plotly/plotly/validators/waterfall/_opacity.py new file mode 100644 index 00000000000..7dd8e1d2512 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_opacity.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="waterfall", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_orientation.py b/packages/python/plotly/plotly/validators/waterfall/_orientation.py new file mode 100644 index 00000000000..468b4080629 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_orientation.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="orientation", parent_name="waterfall", **kwargs): + super(OrientationValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["v", "h"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_outsidetextfont.py b/packages/python/plotly/plotly/validators/waterfall/_outsidetextfont.py new file mode 100644 index 00000000000..eda16437a08 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_outsidetextfont.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="outsidetextfont", parent_name="waterfall", **kwargs + ): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_selectedpoints.py b/packages/python/plotly/plotly/validators/waterfall/_selectedpoints.py new file mode 100644 index 00000000000..054b1d6a229 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_selectedpoints.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="selectedpoints", parent_name="waterfall", **kwargs): + super(SelectedpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_showlegend.py b/packages/python/plotly/plotly/validators/waterfall/_showlegend.py new file mode 100644 index 00000000000..3090959c607 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_showlegend.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showlegend", parent_name="waterfall", **kwargs): + super(ShowlegendValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_stream.py b/packages/python/plotly/plotly/validators/waterfall/_stream.py new file mode 100644 index 00000000000..2cc4d74d449 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_stream.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="waterfall", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See https://chart- + studio.plotly.com/settings for more details. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_text.py b/packages/python/plotly/plotly/validators/waterfall/_text.py new file mode 100644 index 00000000000..b5b6f367e52 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_text.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="text", parent_name="waterfall", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_textangle.py b/packages/python/plotly/plotly/validators/waterfall/_textangle.py new file mode 100644 index 00000000000..86b1eda62c7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_textangle.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__(self, plotly_name="textangle", parent_name="waterfall", **kwargs): + super(TextangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_textfont.py b/packages/python/plotly/plotly/validators/waterfall/_textfont.py new file mode 100644 index 00000000000..f6f0a70fb55 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_textfont.py @@ -0,0 +1,46 @@ +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="waterfall", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_textinfo.py b/packages/python/plotly/plotly/validators/waterfall/_textinfo.py new file mode 100644 index 00000000000..49eea99e5ce --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_textinfo.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="waterfall", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop("flags", ["label", "text", "initial", "delta", "final"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_textposition.py b/packages/python/plotly/plotly/validators/waterfall/_textposition.py new file mode 100644 index 00000000000..c79a1c41ec7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_textposition.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="waterfall", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_textpositionsrc.py b/packages/python/plotly/plotly/validators/waterfall/_textpositionsrc.py new file mode 100644 index 00000000000..daa38a336d9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_textpositionsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="textpositionsrc", parent_name="waterfall", **kwargs + ): + super(TextpositionsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_textsrc.py b/packages/python/plotly/plotly/validators/waterfall/_textsrc.py new file mode 100644 index 00000000000..691fd4d7356 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_textsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="waterfall", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_texttemplate.py b/packages/python/plotly/plotly/validators/waterfall/_texttemplate.py new file mode 100644 index 00000000000..6727759562c --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_texttemplate.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="waterfall", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_texttemplatesrc.py b/packages/python/plotly/plotly/validators/waterfall/_texttemplatesrc.py new file mode 100644 index 00000000000..84654e7d8cb --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_texttemplatesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="waterfall", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_totals.py b/packages/python/plotly/plotly/validators/waterfall/_totals.py new file mode 100644 index 00000000000..aa862ff96de --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_totals.py @@ -0,0 +1,20 @@ +import _plotly_utils.basevalidators + + +class TotalsValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="totals", parent_name="waterfall", **kwargs): + super(TotalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Totals"), + data_docs=kwargs.pop( + "data_docs", + """ + marker + :class:`plotly.graph_objects.waterfall.totals.M + arker` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_uid.py b/packages/python/plotly/plotly/validators/waterfall/_uid.py new file mode 100644 index 00000000000..9542f2f5103 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_uid.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="waterfall", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_uirevision.py b/packages/python/plotly/plotly/validators/waterfall/_uirevision.py new file mode 100644 index 00000000000..b542914f9da --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_uirevision.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="waterfall", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_visible.py b/packages/python/plotly/plotly/validators/waterfall/_visible.py new file mode 100644 index 00000000000..f72890be66b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_visible.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="waterfall", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_width.py b/packages/python/plotly/plotly/validators/waterfall/_width.py new file mode 100644 index 00000000000..372d7c450f2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_width.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="width", parent_name="waterfall", **kwargs): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_widthsrc.py b/packages/python/plotly/plotly/validators/waterfall/_widthsrc.py new file mode 100644 index 00000000000..200d2efbaa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_widthsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="widthsrc", parent_name="waterfall", **kwargs): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_x.py b/packages/python/plotly/plotly/validators/waterfall/_x.py new file mode 100644 index 00000000000..bab4ab5d29f --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_x.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="x", parent_name="waterfall", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_x0.py b/packages/python/plotly/plotly/validators/waterfall/_x0.py new file mode 100644 index 00000000000..18709c9258b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_x0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class X0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="x0", parent_name="waterfall", **kwargs): + super(X0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_xaxis.py b/packages/python/plotly/plotly/validators/waterfall/_xaxis.py new file mode 100644 index 00000000000..ec07edce873 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_xaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="xaxis", parent_name="waterfall", **kwargs): + super(XaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "x"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_xsrc.py b/packages/python/plotly/plotly/validators/waterfall/_xsrc.py new file mode 100644 index 00000000000..e7efb36bf70 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_xsrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="xsrc", parent_name="waterfall", **kwargs): + super(XsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_y.py b/packages/python/plotly/plotly/validators/waterfall/_y.py new file mode 100644 index 00000000000..61926fc87b4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_y.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="y", parent_name="waterfall", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "data"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_y0.py b/packages/python/plotly/plotly/validators/waterfall/_y0.py new file mode 100644 index 00000000000..ca0fffa8ab4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_y0.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class Y0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="y0", parent_name="waterfall", **kwargs): + super(Y0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_yaxis.py b/packages/python/plotly/plotly/validators/waterfall/_yaxis.py new file mode 100644 index 00000000000..b1924f1454a --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_yaxis.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="yaxis", parent_name="waterfall", **kwargs): + super(YaxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", "y"), + edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/_ysrc.py b/packages/python/plotly/plotly/validators/waterfall/_ysrc.py new file mode 100644 index 00000000000..9e8acdf57c5 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/_ysrc.py @@ -0,0 +1,12 @@ +import _plotly_utils.basevalidators + + +class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="ysrc", parent_name="waterfall", **kwargs): + super(YsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/__init__.py b/packages/python/plotly/plotly/validators/waterfall/connector/__init__.py index 728f902bd04..be6e7598376 100644 --- a/packages/python/plotly/plotly/validators/waterfall/connector/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/connector/__init__.py @@ -1,56 +1,14 @@ -import _plotly_utils.basevalidators - - -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): - def __init__( - self, plotly_name="visible", parent_name="waterfall.connector", **kwargs - ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="mode", parent_name="waterfall.connector", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - role=kwargs.pop("role", "info"), - values=kwargs.pop("values", ["spanning", "between"]), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="line", parent_name="waterfall.connector", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). -""", - ), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._visible import VisibleValidator + from ._mode import ModeValidator + from ._line import LineValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._visible.VisibleValidator", "._mode.ModeValidator", "._line.LineValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/_line.py b/packages/python/plotly/plotly/validators/waterfall/connector/_line.py new file mode 100644 index 00000000000..8375e805302 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/connector/_line.py @@ -0,0 +1,25 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="waterfall.connector", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + width + Sets the line width (in px). +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/_mode.py b/packages/python/plotly/plotly/validators/waterfall/connector/_mode.py new file mode 100644 index 00000000000..bd3698cea39 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/connector/_mode.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="mode", parent_name="waterfall.connector", **kwargs): + super(ModeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["spanning", "between"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/_visible.py b/packages/python/plotly/plotly/validators/waterfall/connector/_visible.py new file mode 100644 index 00000000000..3dea2639bc9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/connector/_visible.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="visible", parent_name="waterfall.connector", **kwargs + ): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/line/__init__.py b/packages/python/plotly/plotly/validators/waterfall/connector/line/__init__.py index 9720fe0922f..ac8bd485063 100644 --- a/packages/python/plotly/plotly/validators/waterfall/connector/line/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/connector/line/__init__.py @@ -1,50 +1,14 @@ -import _plotly_utils.basevalidators - - -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="waterfall.connector.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "plot"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class DashValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="dash", parent_name="waterfall.connector.line", **kwargs - ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - values=kwargs.pop( - "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.connector.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._dash import DashValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/line/_color.py b/packages/python/plotly/plotly/validators/waterfall/connector/line/_color.py new file mode 100644 index 00000000000..4b382565da2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/connector/line/_color.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.connector.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py b/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py new file mode 100644 index 00000000000..bd64073e854 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class DashValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="dash", parent_name="waterfall.connector.line", **kwargs + ): + super(DashValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/line/_width.py b/packages/python/plotly/plotly/validators/waterfall/connector/line/_width.py new file mode 100644 index 00000000000..aff3fef1b8a --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/connector/line/_width.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="waterfall.connector.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/__init__.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/__init__.py index 890fc67a9cc..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/waterfall/decreasing/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/__init__.py @@ -1,24 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="waterfall.decreasing", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of all decreasing values. - line - :class:`plotly.graph_objects.waterfall.decreasi - ng.marker.Line` instance or dict with - compatible properties -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/_marker.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/_marker.py new file mode 100644 index 00000000000..890fc67a9cc --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="waterfall.decreasing", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of all decreasing values. + line + :class:`plotly.graph_objects.waterfall.decreasi + ng.marker.Line` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/__init__.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/__init__.py index b90db6fffd2..745b673cac1 100644 --- a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/__init__.py @@ -1,39 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="waterfall.decreasing.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color of all decreasing values. - width - Sets the line width of all decreasing values. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.decreasing.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/_color.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/_color.py new file mode 100644 index 00000000000..2a7e839b9d4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.decreasing.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/_line.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/_line.py new file mode 100644 index 00000000000..c67744fecc3 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/_line.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="waterfall.decreasing.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color of all decreasing values. + width + Sets the line width of all decreasing values. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/__init__.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/__init__.py index 0ed26a6f08e..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/__init__.py @@ -1,39 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="width", - parent_name="waterfall.decreasing.marker.line", - **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="waterfall.decreasing.marker.line", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/_color.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/_color.py new file mode 100644 index 00000000000..44b54d224be --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="waterfall.decreasing.marker.line", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/_width.py b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/_width.py new file mode 100644 index 00000000000..4983b9f75bc --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/decreasing/marker/line/_width.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="width", + parent_name="waterfall.decreasing.marker.line", + **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/__init__.py index 0ef92d88168..cd92e825531 100644 --- a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/__init__.py @@ -1,182 +1,30 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="namelengthsrc", parent_name="waterfall.hoverlabel", **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="waterfall.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="waterfall.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for color . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans",, "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for family . - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for size . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bordercolorsrc", parent_name="waterfall.hoverlabel", **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bordercolor", parent_name="waterfall.hoverlabel", **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="waterfall.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="waterfall.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="waterfall.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="waterfall.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._namelengthsrc import NamelengthsrcValidator + from ._namelength import NamelengthValidator + from ._font import FontValidator + from ._bordercolorsrc import BordercolorsrcValidator + from ._bordercolor import BordercolorValidator + from ._bgcolorsrc import BgcolorsrcValidator + from ._bgcolor import BgcolorValidator + from ._alignsrc import AlignsrcValidator + from ._align import AlignValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_align.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_align.py new file mode 100644 index 00000000000..46ac8f1e0b6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_align.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="align", parent_name="waterfall.hoverlabel", **kwargs + ): + super(AlignValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "right", "auto"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_alignsrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_alignsrc.py new file mode 100644 index 00000000000..26c098022e1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_alignsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="alignsrc", parent_name="waterfall.hoverlabel", **kwargs + ): + super(AlignsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolor.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolor.py new file mode 100644 index 00000000000..15fb8f179b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="waterfall.hoverlabel", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py new file mode 100644 index 00000000000..69019ceda1d --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bgcolorsrc", parent_name="waterfall.hoverlabel", **kwargs + ): + super(BgcolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bordercolor.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bordercolor.py new file mode 100644 index 00000000000..95d9d8247da --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bordercolor.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="waterfall.hoverlabel", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py new file mode 100644 index 00000000000..a587b4d18fd --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="bordercolorsrc", parent_name="waterfall.hoverlabel", **kwargs + ): + super(BordercolorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_font.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_font.py new file mode 100644 index 00000000000..4eac9b6999b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_font.py @@ -0,0 +1,48 @@ +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="waterfall.hoverlabel", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on Chart Studio Cloud + for color . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The Chart Studio Cloud (at + https://chart-studio.plotly.com or on-premise) + generates images on a server, where only a + select number of fonts are installed and + supported. These include "Arial", "Balto", + "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on Chart Studio Cloud + for family . + size + + sizesrc + Sets the source reference on Chart Studio Cloud + for size . +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_namelength.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_namelength.py new file mode 100644 index 00000000000..f0fe1a46bf6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_namelength.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="namelength", parent_name="waterfall.hoverlabel", **kwargs + ): + super(NamelengthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", -1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py new file mode 100644 index 00000000000..3872a1ccb92 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="namelengthsrc", parent_name="waterfall.hoverlabel", **kwargs + ): + super(NamelengthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/__init__.py index 93235710785..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="waterfall.hoverlabel.font", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="waterfall.hoverlabel.font", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="waterfall.hoverlabel.font", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="waterfall.hoverlabel.font", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="waterfall.hoverlabel.font", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.hoverlabel.font", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_color.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_color.py new file mode 100644 index 00000000000..6730f9a0e76 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.hoverlabel.font", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py new file mode 100644 index 00000000000..ca25a6ec679 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="waterfall.hoverlabel.font", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_family.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_family.py new file mode 100644 index 00000000000..9c969b0776c --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="waterfall.hoverlabel.font", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_familysrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_familysrc.py new file mode 100644 index 00000000000..8e2b5694895 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="waterfall.hoverlabel.font", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_size.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_size.py new file mode 100644 index 00000000000..0b539d35f6d --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="waterfall.hoverlabel.font", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py new file mode 100644 index 00000000000..7683b8f13e6 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="waterfall.hoverlabel.font", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/__init__.py b/packages/python/plotly/plotly/validators/waterfall/increasing/__init__.py index f5a972b8e9a..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/waterfall/increasing/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/__init__.py @@ -1,24 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="marker", parent_name="waterfall.increasing", **kwargs - ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of all increasing values. - line - :class:`plotly.graph_objects.waterfall.increasi - ng.marker.Line` instance or dict with - compatible properties -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/_marker.py b/packages/python/plotly/plotly/validators/waterfall/increasing/_marker.py new file mode 100644 index 00000000000..f5a972b8e9a --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/_marker.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="marker", parent_name="waterfall.increasing", **kwargs + ): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of all increasing values. + line + :class:`plotly.graph_objects.waterfall.increasi + ng.marker.Line` instance or dict with + compatible properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/__init__.py b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/__init__.py index 25dfcb2737a..745b673cac1 100644 --- a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/__init__.py @@ -1,39 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="waterfall.increasing.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color of all increasing values. - width - Sets the line width of all increasing values. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.increasing.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/_color.py b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/_color.py new file mode 100644 index 00000000000..bae736ae427 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.increasing.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/_line.py b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/_line.py new file mode 100644 index 00000000000..fcf1a9cb366 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/_line.py @@ -0,0 +1,22 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="waterfall.increasing.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color of all increasing values. + width + Sets the line width of all increasing values. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/__init__.py b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/__init__.py index f335c3b798f..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/__init__.py @@ -1,39 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, - plotly_name="width", - parent_name="waterfall.increasing.marker.line", - **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="color", - parent_name="waterfall.increasing.marker.line", - **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/_color.py b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/_color.py new file mode 100644 index 00000000000..7563bc87fa9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/_color.py @@ -0,0 +1,18 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="waterfall.increasing.marker.line", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/_width.py b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/_width.py new file mode 100644 index 00000000000..80f8e4bf193 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/increasing/marker/line/_width.py @@ -0,0 +1,19 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="width", + parent_name="waterfall.increasing.marker.line", + **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/__init__.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/__init__.py index 6366aead6cd..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="waterfall.insidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="waterfall.insidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="waterfall.insidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="waterfall.insidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="waterfall.insidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.insidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_color.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_color.py new file mode 100644 index 00000000000..c91d49b9dc0 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.insidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_colorsrc.py new file mode 100644 index 00000000000..41952c9215b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="waterfall.insidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_family.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_family.py new file mode 100644 index 00000000000..224a6a354e4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="waterfall.insidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_familysrc.py new file mode 100644 index 00000000000..72004a2e820 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="waterfall.insidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_size.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_size.py new file mode 100644 index 00000000000..1e4ef90fcad --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="waterfall.insidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_sizesrc.py new file mode 100644 index 00000000000..ca9bec65885 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/insidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="waterfall.insidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/__init__.py index aba419da7a3..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/__init__.py @@ -1,100 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="waterfall.outsidetextfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="size", parent_name="waterfall.outsidetextfont", **kwargs - ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="waterfall.outsidetextfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="waterfall.outsidetextfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="waterfall.outsidetextfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.outsidetextfont", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_color.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_color.py new file mode 100644 index 00000000000..d4dc565bdc4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_colorsrc.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_colorsrc.py new file mode 100644 index 00000000000..9f604b28975 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="waterfall.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_family.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_family.py new file mode 100644 index 00000000000..43bd057b89b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="waterfall.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_familysrc.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_familysrc.py new file mode 100644 index 00000000000..fba1614edd4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="waterfall.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_size.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_size.py new file mode 100644 index 00000000000..5f58a20932a --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_size.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="waterfall.outsidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_sizesrc.py b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_sizesrc.py new file mode 100644 index 00000000000..9d3d253f498 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/outsidetextfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="waterfall.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/stream/__init__.py b/packages/python/plotly/plotly/validators/waterfall/stream/__init__.py index 4b910a56346..db8027ed802 100644 --- a/packages/python/plotly/plotly/validators/waterfall/stream/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/stream/__init__.py @@ -1,32 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._token import TokenValidator + from ._maxpoints import MaxpointsValidator +else: + from _plotly_utils.importers import relative_import -class TokenValidator(_plotly_utils.basevalidators.StringValidator): - def __init__(self, plotly_name="token", parent_name="waterfall.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "info"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="maxpoints", parent_name="waterfall.stream", **kwargs - ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), - max=kwargs.pop("max", 10000), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "info"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/stream/_maxpoints.py b/packages/python/plotly/plotly/validators/waterfall/stream/_maxpoints.py new file mode 100644 index 00000000000..d33da1cd148 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/stream/_maxpoints.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="maxpoints", parent_name="waterfall.stream", **kwargs + ): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/stream/_token.py b/packages/python/plotly/plotly/validators/waterfall/stream/_token.py new file mode 100644 index 00000000000..e62abcc842b --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/stream/_token.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="waterfall.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/__init__.py b/packages/python/plotly/plotly/validators/waterfall/textfont/__init__.py index 0b813ae9517..d333cdc39e6 100644 --- a/packages/python/plotly/plotly/validators/waterfall/textfont/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/__init__.py @@ -1,96 +1,24 @@ -import _plotly_utils.basevalidators - - -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="sizesrc", parent_name="waterfall.textfont", **kwargs - ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__(self, plotly_name="size", parent_name="waterfall.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - min=kwargs.pop("min", 1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="familysrc", parent_name="waterfall.textfont", **kwargs - ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): - def __init__( - self, plotly_name="family", parent_name="waterfall.textfont", **kwargs - ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "calc"), - no_blank=kwargs.pop("no_blank", True), - role=kwargs.pop("role", "style"), - strict=kwargs.pop("strict", True), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="colorsrc", parent_name="waterfall.textfont", **kwargs - ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__(self, plotly_name="color", parent_name="waterfall.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) +import sys + +if sys.version_info < (3, 7): + from ._sizesrc import SizesrcValidator + from ._size import SizeValidator + from ._familysrc import FamilysrcValidator + from ._family import FamilyValidator + from ._colorsrc import ColorsrcValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/_color.py b/packages/python/plotly/plotly/validators/waterfall/textfont/_color.py new file mode 100644 index 00000000000..b6d0acc2888 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/_color.py @@ -0,0 +1,13 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="waterfall.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/_colorsrc.py b/packages/python/plotly/plotly/validators/waterfall/textfont/_colorsrc.py new file mode 100644 index 00000000000..7fc1c49661f --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/_colorsrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="waterfall.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/_family.py b/packages/python/plotly/plotly/validators/waterfall/textfont/_family.py new file mode 100644 index 00000000000..a5abeb1ad96 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/_family.py @@ -0,0 +1,17 @@ +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="waterfall.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/_familysrc.py b/packages/python/plotly/plotly/validators/waterfall/textfont/_familysrc.py new file mode 100644 index 00000000000..22c2086f44e --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/_familysrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="waterfall.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/_size.py b/packages/python/plotly/plotly/validators/waterfall/textfont/_size.py new file mode 100644 index 00000000000..7c0653cd070 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/_size.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="waterfall.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/textfont/_sizesrc.py b/packages/python/plotly/plotly/validators/waterfall/textfont/_sizesrc.py new file mode 100644 index 00000000000..cb4700ed309 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/textfont/_sizesrc.py @@ -0,0 +1,14 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="waterfall.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/__init__.py b/packages/python/plotly/plotly/validators/waterfall/totals/__init__.py index 64687ae98f7..b5d1334f882 100644 --- a/packages/python/plotly/plotly/validators/waterfall/totals/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/totals/__init__.py @@ -1,23 +1,10 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._marker import MarkerValidator +else: + from _plotly_utils.importers import relative_import -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="marker", parent_name="waterfall.totals", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Marker"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the marker color of all intermediate sums - and total values. - line - :class:`plotly.graph_objects.waterfall.totals.m - arker.Line` instance or dict with compatible - properties -""", - ), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/_marker.py b/packages/python/plotly/plotly/validators/waterfall/totals/_marker.py new file mode 100644 index 00000000000..64687ae98f7 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/totals/_marker.py @@ -0,0 +1,23 @@ +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="waterfall.totals", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the marker color of all intermediate sums + and total values. + line + :class:`plotly.graph_objects.waterfall.totals.m + arker.Line` instance or dict with compatible + properties +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/marker/__init__.py b/packages/python/plotly/plotly/validators/waterfall/totals/marker/__init__.py index ed636030fe1..745b673cac1 100644 --- a/packages/python/plotly/plotly/validators/waterfall/totals/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/totals/marker/__init__.py @@ -1,41 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._line import LineValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="line", parent_name="waterfall.totals.marker", **kwargs - ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Line"), - data_docs=kwargs.pop( - "data_docs", - """ - color - Sets the line color of all intermediate sums - and total values. - width - Sets the line width of all intermediate sums - and total values. -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.totals.marker", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/marker/_color.py b/packages/python/plotly/plotly/validators/waterfall/totals/marker/_color.py new file mode 100644 index 00000000000..f7553f5df21 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/totals/marker/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.totals.marker", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/marker/_line.py b/packages/python/plotly/plotly/validators/waterfall/totals/marker/_line.py new file mode 100644 index 00000000000..5cc359e3ae4 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/totals/marker/_line.py @@ -0,0 +1,24 @@ +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="line", parent_name="waterfall.totals.marker", **kwargs + ): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the line color of all intermediate sums + and total values. + width + Sets the line width of all intermediate sums + and total values. +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/__init__.py b/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/__init__.py index 34b4fcc502a..033b675a505 100644 --- a/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/__init__.py @@ -1,33 +1,11 @@ -import _plotly_utils.basevalidators +import sys +if sys.version_info < (3, 7): + from ._width import WidthValidator + from ._color import ColorValidator +else: + from _plotly_utils.importers import relative_import -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): - def __init__( - self, plotly_name="width", parent_name="waterfall.totals.marker.line", **kwargs - ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - min=kwargs.pop("min", 0), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="color", parent_name="waterfall.totals.marker.line", **kwargs - ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", False), - edit_type=kwargs.pop("edit_type", "style"), - role=kwargs.pop("role", "style"), - **kwargs - ) + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/_color.py b/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/_color.py new file mode 100644 index 00000000000..419c9023f57 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/_color.py @@ -0,0 +1,15 @@ +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="waterfall.totals.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/_width.py b/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/_width.py new file mode 100644 index 00000000000..c070ccdd383 --- /dev/null +++ b/packages/python/plotly/plotly/validators/waterfall/totals/marker/line/_width.py @@ -0,0 +1,16 @@ +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="waterfall.totals.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", False), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py index cc4ceb868a4..e7d36e3080e 100644 --- a/packages/python/plotly/setup.py +++ b/packages/python/plotly/setup.py @@ -475,6 +475,7 @@ def run(self): "plotly.figure_factory", "plotly.data", "plotly.express", + "plotly.graph_objects", "_plotly_utils", "_plotly_utils.colors", "_plotly_future_", diff --git a/packages/python/plotly/test_init/README.md b/packages/python/plotly/test_init/README.md new file mode 100644 index 00000000000..f40abe04837 --- /dev/null +++ b/packages/python/plotly/test_init/README.md @@ -0,0 +1,12 @@ +The test_init test the plotly.py initialization logic and must be run individually. + +For example, run... +``` +$ pytest test_init/test_lazy_imports.py +$ pytest test_init/test_dependencies_not_imported.py +``` + +instead of ... +``` +$ pytest test_init +``` diff --git a/packages/python/plotly/test_init/__init__.py b/packages/python/plotly/test_init/__init__.py new file mode 100644 index 00000000000..6be12326fb5 --- /dev/null +++ b/packages/python/plotly/test_init/__init__.py @@ -0,0 +1,6 @@ +import sys +import pytest + +version_skip = pytest.mark.skipif( + sys.version_info < (3, 7), reason="Python version < 3.7" +) diff --git a/packages/python/plotly/test_init/test_dependencies_not_imported.py b/packages/python/plotly/test_init/test_dependencies_not_imported.py new file mode 100644 index 00000000000..ea4f3b82f88 --- /dev/null +++ b/packages/python/plotly/test_init/test_dependencies_not_imported.py @@ -0,0 +1,36 @@ +import sys +from . import version_skip + + +@version_skip +def test_dependencies_not_imported(): + + # Check that creating a figure without using numpy and pandas does not result in + # the import of numpy and pandas, even if they are installed. + assert "plotly" not in sys.modules + assert "numpy" not in sys.modules + assert "pandas" not in sys.modules + + import plotly.graph_objects as go + + fig = go.Figure().add_scatter(x=[0], y=[1]) + fig.to_json() + + assert "plotly" in sys.modules + assert "numpy" not in sys.modules + assert "pandas" not in sys.modules + + # check that numpy is installed + import numpy as np + + fig = go.Figure().add_scatter(x=np.array([0]), y=np.array([1])) + fig.to_json() + assert "numpy" in sys.modules + assert "pandas" not in sys.modules + + # check that pandas is installed + import pandas as pd + + fig = go.Figure().add_scatter(x=pd.Series([0]), y=pd.Series([1])) + fig.to_json() + assert "pandas" in sys.modules diff --git a/packages/python/plotly/test_init/test_lazy_imports.py b/packages/python/plotly/test_init/test_lazy_imports.py new file mode 100644 index 00000000000..06b54ce8fd8 --- /dev/null +++ b/packages/python/plotly/test_init/test_lazy_imports.py @@ -0,0 +1,39 @@ +import sys +from . import version_skip + + +@version_skip +def test_lazy_imports(): + + # plotly not imported yet + assert "plotly" not in sys.modules + + # Import top-level plotly module + import plotly + + assert "plotly" in sys.modules + + # Check that submodules are not auto-imported, but can be be accessed using + # attribute syntax + submodules = ["graph_objs", "io", "express"] + for m in submodules: + module_str = "plotly." + m + assert module_str not in sys.modules + + getattr(plotly, m) + assert module_str in sys.modules + + # Check that constructing and serializing empty figure doesn't auto-import + # nested graph objects + plotly.graph_objects.Figure().to_json() + submodules = [("layout", "title"), ("scatter", "marker"), ("scattergl", "marker")] + for module_parts in submodules: + module_str = "plotly.graph_objs." + ".".join(module_parts) + assert module_str not in sys.modules + + # Use getattr to + module = plotly.graph_objects + for m in module_parts: + module = getattr(module, m) + + assert module_str in sys.modules diff --git a/packages/python/plotly/tox.ini b/packages/python/plotly/tox.ini index 095ec2fd3e9..83c22336bef 100644 --- a/packages/python/plotly/tox.ini +++ b/packages/python/plotly/tox.ini @@ -98,6 +98,8 @@ basepython={env:PLOTLY_TOX_PYTHON_37:} commands= python --version pytest {posargs} -x plotly/tests/test_core + pytest {posargs} -x test_init/test_dependencies_not_imported.py + pytest {posargs} -x test_init/test_lazy_imports.py ; OPTIONAL ENVIRONMENTS ;[testenv:py27-optional]